Files
FixIt/package.json
T
Cell a96ba665ac refactor(assets)!: rewrite content encryption with AES-256-GCM and PBKDF2 (#806)
* refactor(assets)!: rewrite content encryption with AES-256-GCM and PBKDF2

- Remove legacy Base64 obfuscation layer (content-encryption.html)
- Replace <cipher-text> with <template> for inert content storage
- Single-layer AES-256-GCM encryption via post-build script
- PBKDF2 key derivation (100k iterations) for encryption
- PBKDF2-protected password verification (data-verify-salt)
- Depth-tracking parser for nested shortcode support
- Dev mode: plaintext content used directly without encryption
- Remove crypto-js and xxhash-wasm vendored dependencies

* feat(post-encrypt): prepare package for npm publishing

- Add bin entry, build script, and dist output for npx usage
- Replace @hugo-fixit/shared with standalone implementations
- Add CLI shebang for direct execution
- Add package README with usage documentation
- Remove FIXIT_ENCRYPT_INPUT env var (redundant with --input)
- Add encryption detection warning in assets.html
- Remove Post-build Encryption sections from READMEs

* chore: integrate post-encrypt into build pipeline and use consola

- Replace console with consola for post-encrypt logging
- Improve verification messages (no templates, count, etc.)
- Simplify build scripts: encrypt runs as part of main build
- Update encryption detection warning to use npx command

* feat(assets): add encryption dev warning admonition

- Add danger admonition in single.html for full-page encryption (dev mode only)
- Add encryption detection warning in assets.html console
- Improve post-encrypt verification messages with template count

* feat(assets): improve encryption i18n, cache security, and error handling

- Add encryptionWarning and encryptionCommand i18n keys for all 16 languages
- Store PBKDF2 verification hash in localStorage cache for better security
- Show decryption errors via flashTooltip instead of console only
- Add FixItDecryptor type definitions in global.ts
- Move encryption detection to init/detection-encryption.html with batched warning
- Remove redundant per-page warning from assets.html

* feat(assets): redesign fixit-decryptor UI with card layout

- Page-level: card form with lock icon header, password input with key icon, primary-colored unlock button, circular re-encrypt button
- Shortcode-level: connected input+button design (search bar style) with focus ring sync
- Remove loading spinner, use display:none/flex toggle via .initialized class
- Move lock icon styling to UnoCSS (text-primary text-xl)
- Initialize CellTooltip on re-encrypt button
- Fix JSDoc @param warnings in global.ts

* refactor(assets): unify TOC template and decryptor animations

- TOC always rendered in `<template data-toc>`, containers populated by initToc()
- Moved TOC scroll/resize handling from events.ts to toc.ts (syncTocLayout, syncTocActiveState)
- Removed EventsModule toc dependency, updated public-api.ts constructor
- Removed visibility:hidden from #toc-auto
- Decryptor: form always visible, @starting-style for fade-in on init
- Decryptor: content expand/collapse animation using height + opacity
- Removed encrypted-hidden from TOC elements in single.html

* refactor(assets): add target to fixit:decrypted event and simplify handlers

- Add { target: Element } payload to fixit:decrypted in event-bus.ts
- Remove $content closure from fixit-decryptor init(), use detail.target
- Update content.ts and toc.ts to use detail.target from event

* fix(assets): use eventBus for TOC scroll/resize listeners and eliminate redundant template parsing

- Replace raw window scroll/resize listeners in TocModule with eventBus
  subscriptions (fixit:scroll/fixit:resize), reusing EventsModule's
  throttle and debounce instead of duplicating un-throttled handlers.
- Refactor hasUnencryptedTemplate in post-encrypt to accept the already-
  computed matches array, avoiding a redundant findEncryptionTemplates
  call on the same HTML content.
- Remove crypto-js and xxhash-wasm from README credits.

* style(assets): soften decryptor button background and add form hover shadow

* build(workflow): add post-encrypt step to build script
2026-07-05 23:26:11 +08:00

74 lines
2.2 KiB
JSON

{
"name": "@hugo-fixit/core",
"type": "module",
"version": "0.4.5",
"nextVersion": "1.0.0",
"private": true,
"packageManager": "pnpm@11.4.0",
"description": "Hugo FixIt core theme component source files",
"author": {
"name": "Lruihao",
"email": "1024@lruihao.cn",
"url": "https://lruihao.cn"
},
"license": "MIT",
"homepage": "https://fixit.lruihao.cn",
"repository": {
"type": "git",
"url": "git+https://github.com/hugo-fixit/FixIt.git"
},
"bugs": {
"url": "https://github.com/hugo-fixit/FixIt/issues"
},
"keywords": [
"hugo",
"theme",
"fixit"
],
"engines": {
"node": ">=22"
},
"scripts": {
"dev:demo": "pnpm -F demo dev",
"dev:test": "pnpm -F test dev",
"dev:docs": "hugo server --source=../fixit-docs -D --disableFastRender --navigateToChanged --ignoreCache -O",
"build:demo": "pnpm -F demo build",
"build:test": "pnpm -F test build",
"build": "concurrently 'pnpm build:demo' 'pnpm build:test' && pnpm -F integration start && pnpm encrypt && pnpm encrypt --verify",
"encrypt": "pnpm -F post-encrypt start",
"clean": "rm -rf public resources/_gen apps/*/public apps/*/resources/_gen",
"preview": "serve public",
"lint": "eslint --cache .",
"typecheck": "tsc --noEmit -p assets/tsconfig.json",
"version": "pnpm -F versioning start prod",
"changelog": "auto-changelog-plus --starting-date 2021-12-18",
"gen:lexers": "pnpm -F chroma-lexers start",
"unocss": "unocss",
"unocss:watch": "unocss --watch",
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@antfu/eslint-config": "^9.1.0",
"@iconify/json": "^2.2.493",
"@iconify/utils": "^3.1.3",
"@types/node": "^25.9.4",
"@unocss/cli": "^66.7.4",
"auto-changelog-plus": "^1.3.0",
"concurrently": "^10.0.3",
"eslint": "^10.6.0",
"jiti": "^2.7.0",
"lint-staged": "^17.0.8",
"serve": "^14.2.6",
"simple-git-hooks": "^2.13.1",
"tsx": "^4.22.4",
"typescript": "^6.0.3",
"unocss": "^66.7.4"
},
"simple-git-hooks": {
"pre-commit": "pnpm -F versioning start dev && pnpm typecheck && pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}