Commit Graph

211 Commits

Author SHA1 Message Date
Cell 152e7fa5a2 chore: change sassdoc/typedoc output to local public/references/ 2026-08-24 01:51:22 +08:00
Cell 3c449a9017 refactor(assets): extract UnoCSS config into @hugo-fixit/unocss-preset package (#829)
Extract theme tokens, shortcuts, blocklist, safelist, and icon configuration
from uno.config.ts into a reusable workspace package at packages/unocss-preset/.

- Create @hugo-fixit/unocss-preset with presetFixIt and createFixItConfig()
- Simplify uno.config.ts to use createFixItConfig() with content/cli overrides
- Move unocss, @iconify/json from root devDependencies to preset package
2026-08-14 12:33:18 +08:00
dependabot[bot] 0bc1862853 chore(deps-dev): bump the npm-development group with 6 updates (#813)
Bumps the npm-development group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@antfu/eslint-config](https://github.com/antfu/eslint-config) | `9.1.0` | `9.2.0` |
| [@iconify/json](https://github.com/iconify/icon-sets) | `2.2.502` | `2.2.507` |
| [concurrently](https://github.com/open-cli-tools/concurrently) | `10.0.3` | `10.0.4` |
| [eslint](https://github.com/eslint/eslint) | `10.7.0` | `10.8.0` |
| [lint-staged](https://github.com/lint-staged/lint-staged) | `17.1.0` | `17.2.0` |
| [fs-extra](https://github.com/jprichardson/node-fs-extra) | `11.3.6` | `11.4.0` |


Updates `@antfu/eslint-config` from 9.1.0 to 9.2.0
- [Release notes](https://github.com/antfu/eslint-config/releases)
- [Commits](https://github.com/antfu/eslint-config/compare/v9.1.0...v9.2.0)

Updates `@iconify/json` from 2.2.502 to 2.2.507
- [Commits](https://github.com/iconify/icon-sets/compare/2.2.502...2.2.507)

Updates `concurrently` from 10.0.3 to 10.0.4
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v10.0.3...v10.0.4)

Updates `eslint` from 10.7.0 to 10.8.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.7.0...v10.8.0)

Updates `lint-staged` from 17.1.0 to 17.2.0
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v17.1.0...v17.2.0)

Updates `fs-extra` from 11.3.6 to 11.4.0
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/11.3.6...11.4.0)

---
updated-dependencies:
- dependency-name: "@antfu/eslint-config"
  dependency-version: 9.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: "@iconify/json"
  dependency-version: 2.2.507
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: concurrently
  dependency-version: 10.0.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: eslint
  dependency-version: 10.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: lint-staged
  dependency-version: 17.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: fs-extra
  dependency-version: 11.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-12 18:01:24 +08:00
Cell a73416e2be chore(release): 1.0.0-alpha 2026-07-27 14:44:11 +08:00
Cell 15b415ff2e docs(encrypt): update Go implementation status to Available
Also fix shell command injection in bench.ts and simplify build script.
2026-07-21 16:23:08 +08:00
Cell 2c0b48370b feat(gen-docs): add Hugo partials docs generation (#809)
* feat(gen-docs): add documentation generation package with SassDoc and TypeDoc support

Add new `@hugo-fixit/gen-docs` package that parses Hugo config (hugo.toml) and generates
documentation. Includes SassDoc annotations for SCSS variables and mixins, TypeDoc config
for TypeScript source docs, and a `.sassdocrc` configuration file.

* docs(readme): add browsers support section

* feat(gen-docs): add Hugo partials docs generation and fix config empty sections

- Add partial-parser.ts: parses Hugo partial comment blocks (@param/@return/@example)
- Add partials.ts renderer: generates grouped Markdown with param tables
- Add `partials` subcommand with -t/-o options for template injection
- Fix config-parser: empty TOML sections (library.js/library.css) now retain descriptions
- Fix config-parser: correctly distinguish section-level vs key-level comments
- Update README with partials subcommand documentation
2026-07-21 12:19:07 +08:00
Cell bfee4041d6 refactor(encrypt): rename post-encrypt to encrypt
- Rename package from @hugo-fixit/post-encrypt to @hugo-fixit/encrypt
- Rename bin from post-encrypt to fixit-encrypt
- Update all i18n translations (16 files) to use npx @hugo-fixit/encrypt
- Update CI workflow, publish script, code comments, and docs
- Rewrite README with performance benchmarks and other implementations
2026-07-19 13:15:57 +08:00
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
Cell 0f35108699 chore(deps): update concurrently to version 10.0.3 2026-07-02 01:36:02 +08:00
dependabot[bot] 994a5d45b5 chore(deps-dev): bump the npm-development group with 9 updates (#798) 2026-07-01 09:32:38 +08:00
Cell fb0c00e274 refactor(assets): simplify breakpoints and update UnoCSS CLI config
- Refactor SCSS breakpoints to flat min-width values (680/960/1200/1440)
  with _bp-max helper deriving ranges from adjacent breakpoints
- Add 'xs': null to breakpoints map, remove special-case handling
- Update responsive image sizes to match exact breakpoint max values
- Add print:hidden to UnoCSS safelist as replacement for d-none-print
- Move UnoCSS CLI config to cli.entry in uno.config.ts
- Rename css:build → unocss, css:dev → unocss:watch
- Update documentation (CLAUDE.md, CONTRIBUTING.md, copilot-instructions.md)
2026-06-27 16:28:31 +08:00
Cell 8af8e806d7 feat(assets): integrate UnoCSS for utility classes and presetIcons (#795)
* refactor(assets): integrate UnoCSS for utility classes

- Add UnoCSS with presetWind3 as pre-built CSS (assets/css/unocss.css)
- Add uno.config.ts with theme breakpoints, colors, safelist, and blocklist
- Replace SCSS utility classes with UnoCSS atomic classes:
  - d-none → hidden
  - d-none-desktop → sm:hidden
  - d-none-mobile → max-sm:hidden
  - order-* (safelist)
  - variant-numeric → tabular-nums lining-nums
- Rename .blur to .is-blur to avoid UnoCSS conflict
- Add @unocss-skip comments for SVG path elements to prevent false positives
- Remove redundant _utilities.scss ($orders map) and simplify _common.scss
- Update documentation (CLAUDE.md, CONTRIBUTING.md, copilot-instructions.md)

* refactor(assets): replace 404/offline SCSS with UnoCSS atomic classes

- Replace _404.scss styles with atomic classes on template elements
- Replace _offline.scss styles with atomic classes on template elements
- Keep selectors (id/class) as user customization hooks
- Delete assets/scss/pages/_404.scss and _offline.scss

* refactor(assets): simplify SCSS with UnoCSS atomic classes

- Replace _bilibili.scss with atomic classes (relative, aspect-video, inset-0)
- Replace _version.scss with atomic classes (whitespace-nowrap, align-text-bottom)
- Replace _noscript-warning.scss with atomic classes (bg-danger, fixed, z-200)
- Add semantic z-index shortcuts (z-hide, z-auto, z-base, z-loading, z-sticky, z-fixed)
- Add h1-h6 to UnoCSS blocklist to prevent false positives
- Use Source path for UnoCSS CSS loading to enable Hugo minify

* chore(assets): minor SCSS and template cleanup

* fix(assets): add secondary color to UnoCSS theme config

text-secondary was broken because the secondary color mapping was missing.

* feat(assets): add UnoCSS presetIcons support and z-index shortcuts

- Add presetIcons preset with empty collections (ready for custom icon sets)
- Add @iconify/json and @iconify/utils devDependencies
- Add semantic z-index shortcuts (z-hide, z-auto, z-base, z-loading, z-sticky, z-fixed)
- Add secondary color to UnoCSS theme config

* refactor(assets): replace SVG icons with UnoCSS presetIcons

- Add Lucide and Octicons icon collections to presetIcons config
- Replace arrow-up/down and enter-key SVGs with Lucide icons
- Replace alert icons (info, light-bulb, report, alert, stop) with Octicons
- Delete replaced SVG files from assets/images/icons/
- Keep custom SVGs (csdn, plume, rootme)

* refactor(layouts): redesign 404 and offline pages with UnoCSS

- Replace translate-y-[30vh] with self-stretch flex centering below header
- Remove arbitrary values (text-[3.6rem], text-[1.8rem], etc.)
- Restore @page print styles in _common.scss
- Simplify offline page layout (icon + title + text)
- Fix hardcoded #57606a → text-secondary
2026-06-27 06:27:12 +08:00
Cell a7bae572a1 chore(assets): move tsconfig to assets 2026-06-11 16:54:43 +08:00
dependabot[bot] b8ec5f16d7 chore(deps-dev): bump the npm-development group across 1 directory with 6 updates (#775)
Bumps the npm-development group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.7.0` | `25.9.2` |
| [auto-changelog-plus](https://github.com/Lruihao/auto-changelog-plus) | `1.2.4` | `1.3.0` |
| [eslint](https://github.com/eslint/eslint) | `10.3.0` | `10.4.1` |
| [lint-staged](https://github.com/lint-staged/lint-staged) | `17.0.4` | `17.0.7` |
| [tsx](https://github.com/privatenumber/tsx) | `4.21.0` | `4.22.4` |
| [fs-extra](https://github.com/jprichardson/node-fs-extra) | `11.3.3` | `11.3.5` |



Updates `@types/node` from 25.7.0 to 25.9.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `auto-changelog-plus` from 1.2.4 to 1.3.0
- [Release notes](https://github.com/Lruihao/auto-changelog-plus/releases)
- [Changelog](https://github.com/Lruihao/auto-changelog-plus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lruihao/auto-changelog-plus/compare/v1.2.4...v1.3.0)

Updates `eslint` from 10.3.0 to 10.4.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.3.0...v10.4.1)

Updates `lint-staged` from 17.0.4 to 17.0.7
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v17.0.4...v17.0.7)

Updates `tsx` from 4.21.0 to 4.22.4
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.21.0...v4.22.4)

Updates `fs-extra` from 11.3.3 to 11.3.5
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/11.3.3...11.3.5)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: auto-changelog-plus
  dependency-version: 1.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: eslint
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: fs-extra
  dependency-version: 11.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: lint-staged
  dependency-version: 17.0.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: tsx
  dependency-version: 4.22.4
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-11 10:39:40 +08:00
Cell f5b030b4eb chore(packages): replace helpers with standalone chroma-lexers and enrich shared
- Replace helpers dispatcher pattern with standalone chroma-lexers package
- Add runCommand, fromRoot, consola re-export to shared
- Update versioning and integration to use shared utilities
- Shorten dev version format: base36 timestamp, no hash
- Rename eslint.config.js to eslint.config.ts (add jiti)
- Add README.md to each package
2026-06-11 10:35:10 +08:00
Cell 03ca90b49f feat(assets): add helpers package for chroma lexer map generation (#781)
- Add `packages/helpers` with CLI dispatcher pattern for code generation
- Add `chroma-lexers` helper that fetches lexer definitions from alecthomas/chroma
- Rename `$code-type-map` to `$chroma-lexers`, `_code-type.scss` to `_chroma-lexers.scss`
- Fix `fi-var` and `set-fi-var` to preserve quotes for string fallbacks
- Add `capitalize` utility to `packages/shared`
- Replace `console.*` with `consola` in packages
- Add `pnpm gen:lexers` script and CI workflow for auto-regeneration
- Update CLAUDE.md and CONTRIBUTING.md
2026-06-03 16:41:07 +08:00
Cell bc3fb3a717 chore: add Dockerfile and devcontainer configuration for Hugo theme development 2026-05-29 16:42:04 +08:00
Cell 0fe8e100df docs: update contributing guidelines 2026-05-28 16:10:05 +08:00
Cell 4a60d805fa chore: pnpm v11 migration 2026-05-28 15:21:04 +08:00
Cell a7cf34367d chore(workflow): support nextVersion for dev version base
- Add optional `nextVersion` field in package.json to override the
  auto-incremented patch version used for dev builds
- In prod mode, automatically remove `nextVersion` field after release
- Fix packages tsconfig.json: switch to `module/moduleResolution: nodenext`,
  remove unsupported `baseUrl` and `jsx` options

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 14:48:26 +08:00
Cell 14a965f9c1 refactor(assets): migrate JavaScript to TypeScript service architecture (#766)
* refactor: add TypeScript support and refactor utility functions

* docs: add CLAUDE.md for Claude Code guidance

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* refactor(assets): replace factory-function pattern with service classes and DI container

Introduce typed service container, event bus, and service interfaces to replace
the shared FixItContext factory-function pattern. Each module is now a standalone
class implementing a typed interface, with explicit constructor-injected
dependencies. The window.fixit backward-compatibility facade is built via a
publicAPI() helper that extracts class methods.

Also removes unnecessary setTimeout/afterPaint deferred execution wrappers
from init sequences, and improves module header comments.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* refactor: replace private properties with class fields in modules

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* refactor(assets): rewrite link page script in TypeScript

Rename pages/link.js to link.ts with proper type annotations and update
the Hugo template reference accordingly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs: rewrite CLAUDE.md and copilot-instructions.md in English

Update both files to reflect the new service-class architecture with
DI container, typed event bus, and ES6 # private fields.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: update event handling to use CustomEvent for better type safety

* refactor: enhance theme switching by adding isChanged flag to event details

* refactor(assets): refactor Mermaid module structure and event wiring

* refactor(assets): align lib integrations with TypedEventBus and add module overviews

* chore(assets): remove vite-specific import ignore comments

* refactor(assets): remove deprecated forEach utility and use native forEach

Replace custom forEach wrapper with native .forEach() on NodeList, HTMLCollection (via querySelectorAll), and arrays. The utility was already marked @deprecated and all 30+ call sites use synchronous handlers, making the wrapper unnecessary. Also replace getElementsByClassName/getElementsByTagName with querySelectorAll for consistency.

- Delete utils/array.ts (no longer needed)
- Remove forEach export from utils/index.ts
- Refactor 11 module files to use native .forEach()
- Switch getElementsByClassName to querySelectorAll in theme.ts and charts.ts

* refactor(assets): split ChartsModule into independent lib files

Move ECharts, Mapbox GL, and TypeIt integrations from the ServiceContainer-managed ChartsModule into three standalone lib files (echarts.ts, mapbox.ts, typeit.ts). Each lib:
- Instantiates its own TypedEventBus
- Reads config from window.config.*
- Self-initializes on DOMContentLoaded
- Handles decrypt/re-init events independently
- Uses implicit idempotency via DOM element queries

Key improvements:
- Reduces ServiceContainer complexity
- Makes chart libs independently loadable
- Fixes partial decryption handling in echarts (only re-inits decrypted portion)
- Maintains consistency with aplayer/file-tree lib pattern

* refactor(assets): extract third-party libraries to standalone lib files

Extract twemoji, pangu, cookieconsent, watermark, lightgallery, and json-viewer
from modules into separate lib files for better separation of concerns. Each lib
is loaded conditionally via assets.html and handles its own initialization and
event lifecycle independently.

Additionally, unify fixit event handling by replacing document.addEventListener
calls with TypedEventBus.on() in EncryptionModule and MiscModule for consistent
event architecture.

Remove unused MiscService dependency from ContentModule.

* refactor(assets): unify js.Build pipeline and defaults

- extract shared helper partial function/js-build.html for js.Build + minify

- make plugin script renderer and Mermaid use the same js.Build logic

- default Build.minify to hugo.IsProduction when unset

- default Build.sourceMap to cond hugo.IsDevelopment "linked" "none"

- remove duplicated sourceMap branching in layout templates

- update js targetPath naming to .js (no explicit .min.js suffix)

* refactor(assets): extract comment systems to independent lib files

Extract comment system initialization logic from CommentModule into 7 independent
lib files (artalk, gitalk, valine, waline, utterances, twikoo, giscus). Each lib:
- Conditionally loads based on window.config.comment configuration
- Handles backend-specific initialization via DOMContentLoaded
- Manages its own theme synchronization and event listeners
- Is loaded conditionally in assets.html only when enabled

Simplify CommentModule to handle only:
- Comment section UI display and visibility toggle
- Shared lightGallery initialization utility (used by Artalk and Twikoo)
- Comment expiration handling

This reduces module complexity and enables per-backend lazy loading.

* refactor(assets): unify js.Build pipeline and consolidate PWA config

Enhance js-build.html to accept Build as bool/dict, auto-derive
targetPath from resource name (.ts → .js), and skip js.Build when
Build is false/omit. Simplify assets.html by removing explicit
targetPath dicts for all .ts lib builds. Consolidate enablePWA and
serviceWorkerURL into a PWA config object.

* refactor(assets): decouple toc from content module and add JSDoc headers

- Remove TocService dependency from ContentModule, toc now self-manages
- Rename initContent() → setup(), init() → setup() for toc
- Make initFootnotes private (#initFootnotes)
- Add multi-line JSDoc headers with Responsibilities to all modules,
  main.ts, pages/link.ts, and head/color-scheme.ts

* refactor(assets): split types.ts into types/ directory module

* refactor(assets): simplify JS module architecture and expose typed window.fixit API

- Remove DI container (core/container.ts), use direct constructor calls
- Export shared eventBus singleton from core/event-bus.ts, remove 16 redundant instances
- Merge thin modules: SvgModule/CommentModule/LinkGuardModule into ContentModule/MiscModule
- Trim service interfaces to externally-used methods only
- Replace publicAPI() reflection with minimal typed window.fixit facade
- Expose public APIs: setThemeMode, eventBus, initContent, mask overlay, scroll state
- Extract setThemeMode from initSwitchTheme closure as public method
- Rename fixit:reset to fixit:re-encrypt, remove dead events
- Replace custom.js.example with custom.ts.example
- Update CLAUDE.md and copilot-instructions.md

* style(i18n): use semantic names for comment dividers instead of file paths

Replace file-path-based comment dividers (e.g. partials/base/header.html)
with semantic names (e.g. Header) across all 16 i18n files for consistency.

* chore(workflow): update cron schedule for library updates

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 12:43:42 +08:00
Cell 97ddee080f chore(deps-dev): update pnpm and dev dependencies 2026-05-12 15:36:40 +08:00
Cell e4580190e9 chore(deps): update Node.js, pnpm, and dev dependencies
- Update Node.js version in .nvmrc from v20 to v24
- Update pnpm packageManager from 10.33.0 to 11.0.9
- Update pnpm-workspace.yaml to use allowBuilds instead of onlyBuiltDependencies
- Bump dev dependencies to latest versions: @antfu/eslint-config, @types/node, lint-staged, typescript
2026-05-11 03:45:45 +08:00
Cell 673be1e8c0 chore: update minimum Hugo version to 0.158.0 across documentation and configuration files 2026-04-07 14:48:20 +08:00
Cell 92b0a6b56e chore(release): 0.4.5 2026-03-25 10:53:08 +08:00
Cell c79badcf44 chore(release): 0.4.4 2026-03-19 14:15:16 +08:00
Cell 789973da78 chore(dev-deps): update dev dependencies 2026-03-18 12:29:29 +08:00
Cell ba63d67a3c chore(release): 0.4.3 2026-03-03 16:17:30 +08:00
dependabot[bot] 8599d14976 chore(deps-dev): bump @antfu/eslint-config from 6.7.3 to 7.6.1 (#704)
Bumps [@antfu/eslint-config](https://github.com/antfu/eslint-config) from 6.7.3 to 7.6.1.
- [Release notes](https://github.com/antfu/eslint-config/releases)
- [Commits](https://github.com/antfu/eslint-config/compare/v6.7.3...v7.6.1)

---
updated-dependencies:
- dependency-name: "@antfu/eslint-config"
  dependency-version: 7.6.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 11:36:47 +08:00
dependabot[bot] 0928c72452 chore(deps-dev): bump the npm-development group with 2 updates (#703)
Bumps the npm-development group with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [lint-staged](https://github.com/lint-staged/lint-staged).


Updates `@types/node` from 24.10.15 to 24.11.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `lint-staged` from 16.2.7 to 16.3.0
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.2.7...v16.3.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: lint-staged
  dependency-version: 16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 11:34:00 +08:00
dependabot[bot] 581d8373bf chore(deps-dev): bump @types/node in the npm-development group
Bumps the npm-development group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 24.10.4 to 24.10.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.10.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-27 11:28:01 +08:00
Cell 2a5bd268a3 chore(release): 0.4.2 2026-01-17 14:41:08 +08:00
Cell 12b7c65f80 chore(release): 0.4.1 2026-01-06 16:27:34 +08:00
Cell 4a3df3cbdb chore(release): 0.4.0 2026-01-04 15:30:37 +08:00
Cell 31e5b99f1f chore: update version and changelog scripts in package.json 2026-01-04 15:30:12 +08:00
Cell 00870fda7e chore(release): 0.4.0-rc 2026-01-03 20:22:02 +08:00
Cell 7ffaca013c chore(release): 0.4.0-beta 2025-12-31 16:45:48 +08:00
Cell b4d5859b2b chore(deps-dev): update a group of dev dependencies 2025-12-31 12:43:21 +08:00
Cell 1dcc2ecf1f chore(release): 0.4.0-alpha.3 2025-12-30 16:46:10 +08:00
dependabot[bot] 053e5b4bd0 chore(deps-dev): bump the npm-development group with 2 updates (#663)
Bumps the npm-development group with 2 updates: [lint-staged](https://github.com/lint-staged/lint-staged) and [tsx](https://github.com/privatenumber/tsx).


Updates `lint-staged` from 16.2.6 to 16.2.7
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.2.6...v16.2.7)

Updates `tsx` from 4.20.6 to 4.21.0
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.20.6...v4.21.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-version: 16.2.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: tsx
  dependency-version: 4.21.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 14:54:38 +08:00
Cell 3045374786 chore(release): 0.4.0-alpha.2 2025-11-19 12:39:02 +08:00
Cell 0aac71430d chore(deps-dev): update packageManager and auto-changelog-plus version in package.json and pnpm-lock.yaml 2025-11-19 12:38:00 +08:00
Cell ea20bdb82d chore(deps-dev): update group of dev dependencies 2025-11-19 11:23:23 +08:00
dependabot[bot] 4bf8b5abeb chore(deps-dev): bump @antfu/eslint-config from 5.4.1 to 6.2.0 (#654)
Bumps [@antfu/eslint-config](https://github.com/antfu/eslint-config) from 5.4.1 to 6.2.0.
- [Release notes](https://github.com/antfu/eslint-config/releases)
- [Commits](https://github.com/antfu/eslint-config/compare/v5.4.1...v6.2.0)

---
updated-dependencies:
- dependency-name: "@antfu/eslint-config"
  dependency-version: 6.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-05 14:36:54 +08:00
dependabot[bot] 956649b2f7 chore(deps-dev): bump the npm-development group with 4 updates (#653)
Bumps the npm-development group with 4 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [auto-changelog-plus](https://github.com/Lruihao/auto-changelog-plus), [eslint](https://github.com/eslint/eslint) and [lint-staged](https://github.com/lint-staged/lint-staged).


Updates `@types/node` from 24.7.2 to 24.9.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `auto-changelog-plus` from 1.2.1 to 1.2.2
- [Release notes](https://github.com/Lruihao/auto-changelog-plus/releases)
- [Changelog](https://github.com/Lruihao/auto-changelog-plus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lruihao/auto-changelog-plus/compare/v1.2.1...v1.2.2)

Updates `eslint` from 9.37.0 to 9.39.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.37.0...v9.39.0)

Updates `lint-staged` from 16.2.4 to 16.2.6
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.2.4...v16.2.6)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.9.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: auto-changelog-plus
  dependency-version: 1.2.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: eslint
  dependency-version: 9.39.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: lint-staged
  dependency-version: 16.2.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-05 14:33:55 +08:00
dependabot[bot] c6f6a6c296 chore(deps-dev): bump the npm-development group with 2 updates (#646)
Bumps the npm-development group with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [lint-staged](https://github.com/lint-staged/lint-staged).


Updates `@types/node` from 24.7.1 to 24.7.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `lint-staged` from 16.2.3 to 16.2.4
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.2.3...v16.2.4)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.7.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: lint-staged
  dependency-version: 16.2.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-14 15:08:42 +08:00
dependabot[bot] 1c95aef348 chore(deps-dev): bump the npm-development group with 9 updates (#638)
Bumps the npm-development group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@antfu/eslint-config](https://github.com/antfu/eslint-config) | `5.2.1` | `5.4.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `24.3.0` | `24.6.1` |
| [auto-changelog-plus](https://github.com/Lruihao/auto-changelog-plus) | `1.1.0` | `1.2.1` |
| [eslint](https://github.com/eslint/eslint) | `9.34.0` | `9.36.0` |
| [lint-staged](https://github.com/lint-staged/lint-staged) | `16.1.5` | `16.2.3` |
| [serve](https://github.com/vercel/serve) | `14.2.4` | `14.2.5` |
| [tsx](https://github.com/privatenumber/tsx) | `4.20.5` | `4.20.6` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.9.2` | `5.9.3` |
| [fs-extra](https://github.com/jprichardson/node-fs-extra) | `11.3.1` | `11.3.2` |


Updates `@antfu/eslint-config` from 5.2.1 to 5.4.1
- [Release notes](https://github.com/antfu/eslint-config/releases)
- [Commits](https://github.com/antfu/eslint-config/compare/v5.2.1...v5.4.1)

Updates `@types/node` from 24.3.0 to 24.6.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `auto-changelog-plus` from 1.1.0 to 1.2.1
- [Release notes](https://github.com/Lruihao/auto-changelog-plus/releases)
- [Changelog](https://github.com/Lruihao/auto-changelog-plus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lruihao/auto-changelog-plus/compare/v1.1.0...v1.2.1)

Updates `eslint` from 9.34.0 to 9.36.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.34.0...v9.36.0)

Updates `lint-staged` from 16.1.5 to 16.2.3
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.1.5...v16.2.3)

Updates `serve` from 14.2.4 to 14.2.5
- [Release notes](https://github.com/vercel/serve/releases)
- [Commits](https://github.com/vercel/serve/compare/14.2.4...v14.2.5)

Updates `tsx` from 4.20.5 to 4.20.6
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.20.5...v4.20.6)

Updates `typescript` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.2...v5.9.3)

Updates `fs-extra` from 11.3.1 to 11.3.2
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/11.3.1...11.3.2)

---
updated-dependencies:
- dependency-name: "@antfu/eslint-config"
  dependency-version: 5.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: "@types/node"
  dependency-version: 24.6.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: auto-changelog-plus
  dependency-version: 1.2.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: eslint
  dependency-version: 9.36.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: lint-staged
  dependency-version: 16.2.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: serve
  dependency-version: 14.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: tsx
  dependency-version: 4.20.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
- dependency-name: fs-extra
  dependency-version: 11.3.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-10 10:00:47 +08:00
Cell 81c333ca63 chore(deps-dev): bump auto-changelog-plus from 1.0.0 to 1.1.0 2025-09-13 04:23:36 +08:00
Cell c430a012c0 chore(release): 0.4.0-alpha.1 2025-09-13 01:55:49 +08:00
Cell f3053330bf chore(deps-dev): replace fixit-releaser with auto-changelog-plus (#631) 2025-09-05 15:47:01 +08:00