commit edbf78f2363b4808547c486c32605d1c40ea2b13 Author: 刘航宇 <3364451258@qq.com> Date: Thu Aug 6 21:03:00 2026 +0800 feat: 初始化 Halo 暗色模式插件 - Halo Plugin 后端(Java/Gradle),含 DarkModePlugin 主类和测试 - Vue 3 + TypeScript 前端 UI,包含主题切换组件和设置页面 - 暗色模式 CSS 变量和覆盖样式(布局/编辑器/表单/滚动条等) - 设计文档和调查文档 - Halo 插件/主题开发 Agent Skills Co-Authored-By: Claude diff --git a/.agents/skills/halo-plugin-dev/SKILL.md b/.agents/skills/halo-plugin-dev/SKILL.md new file mode 100644 index 0000000..4028330 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/SKILL.md @@ -0,0 +1,91 @@ +--- +name: halo-plugin-dev +description: > + Use when creating or modifying a Halo CMS plugin: writing Java backend code, + configuring plugin.yaml, defining custom extensions (GVK), creating custom APIs + (CustomEndpoint, MVC controllers), building Vue-based UI with @halo-dev/ui-shared, + setting up Gradle builds with DevTools, defining RBAC role templates, declaring + pluginDependencies, exposing or consuming plugin extension points, publishing + shared events, registering custom FormKit inputs, generating API clients from + OpenAPI, registering theme-side Finder APIs, or handling plugin lifecycle + (start/stop/delete). +--- + +# Halo Plugin Development + +Halo is built on **Spring Boot + Spring WebFlux + Vue 3**. A plugin consists of: + +- **Backend (Java)**: runs inside Halo's JVM, uses Spring DI, reactive WebFlux, custom extensions (CRD-like), and custom APIs +- **Frontend (Vue/TypeScript)**: built into `main.js` + `style.css`, injected into Console and UC (User Center) +- **Manifest (`plugin.yaml`)**: plugin metadata, dependencies, settings, and config map names + +> **Important**: Halo's plugin APIs, VO field names, extension annotations, and UI APIs evolve across versions. **Do not rely on training data for specific field names, method signatures, or type structures.** When writing code that accesses extension fields or calls shared beans, always fetch the relevant online doc from the References section below first. + +## Quick Start + +Create a new plugin project using the official scaffolding tool: + +```bash +pnpm create halo-plugin +``` + +Follow the prompts (plugin name, domain, author, UI build tool: Rsbuild or Vite). + +Then run with DevTools (requires Docker): + +```bash +./gradlew haloServer +``` + +Visit `http://localhost:8090/console` — username/password defaults to `admin`/`admin`. + +After code changes: + +```bash +./gradlew reload +``` + +Or use `watch` for auto-reload: + +```bash +./gradlew watch +``` + +## Development Workflow + +1. **Scaffold**: `pnpm create halo-plugin` +2. **Backend**: write Java code under `src/main/java/` +3. **Frontend**: write Vue/TS code under `ui/src/` (or `console/src/`) +4. **Manifest**: configure `src/main/resources/plugin.yaml` +5. **Extensions**: declare YAML resources under `src/main/resources/extensions/` +6. **Run**: `./gradlew haloServer` (with Docker) +7. **Test**: visit Console at `http://localhost:8090/console` +8. **Build**: `./gradlew build` produces a JAR for distribution + +## References Index + +| File | Content | When to read | +| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| [references/api-changelog.md](references/api-changelog.md) | High-impact plugin API changes by Halo version, with docs routes | Before using version-sensitive APIs, upgrading Halo dependencies, or raising `spec.requires` | +| [references/plugin-structure.md](references/plugin-structure.md) | Directory structure, backend/frontend layout, build.gradle basics | Creating a new plugin from scratch or understanding the directory layout | +| [references/plugin-manifest.md](references/plugin-manifest.md) | plugin.yaml fields, version requirements, dependencies, settings/configMap | Writing or editing plugin.yaml | +| [references/plugin-interaction.md](references/plugin-interaction.md) | pluginDependencies, API modules, shared events, defining and consuming plugin extension points | Depending on another plugin, exposing an API module, sharing events, or making a plugin extensible | +| [references/devtools.md](references/devtools.md) | haloServer, reload, watch, generateApiClient, generateRoleTasks, debug config | Running `./gradlew haloServer`, hot reload, or debugging a plugin | +| [references/server-extension.md](references/server-extension.md) | Custom Extension (GVK), AbstractExtension, CRUD APIs, indexes, field/label selectors | Defining a custom data model, storage, or query indexes | +| [references/server-api.md](references/server-api.md) | CustomEndpoint, @Controller with @ApiVersion, query params, validation, OpenAPI docs | Writing a new backend API endpoint or controller | +| [references/server-lifecycle.md](references/server-lifecycle.md) | BasePlugin lifecycle (start/stop/delete), Scheme registration/cleanup | Handling plugin start, stop, delete, or scheme registration | +| [references/server-shared-beans.md](references/server-shared-beans.md) | ReactiveExtensionClient, SchemeManager, UserService, AttachmentService, ExtensionGetter, etc. | Injecting or calling Halo core services from plugin Java code | +| [references/server-security.md](references/server-security.md) | Role templates, RBAC rules, verbs, aggregation, UI permissions | Adding RBAC roles, API permissions, or UI permission checks | +| [references/ui-entry.md](references/ui-entry.md) | definePlugin, routes/ucRoutes, menu config, parentName, RouteMeta | Adding a new page to the Console or User Center | +| [references/ui-build.md](references/ui-build.md) | @halo-dev/ui-plugin-bundler-kit (Vite/Rsbuild), output dirs, migration | Configuring the frontend build (Vite/Rsbuild) or troubleshooting bundling | +| [references/ui-shared.md](references/ui-shared.md) | stores (currentUser, globalInfo), utils (date, permission, attachment, id), events | Formatting dates, checking permissions, handling attachments, generating IDs — do NOT install dayjs/date-fns or write your own date utils | +| [references/ui-extension-points.md](references/ui-extension-points.md) | ExtensionPoint keys, editor, attachment selector, dashboard widgets, list operations/fields | Extending existing Console UI (editor, lists, attachment picker, dashboard) | +| [references/ui-components.md](references/ui-components.md) | Base components (@halo-dev/components), business components, directives (v-permission, v-tooltip) | Looking for a UI component, directive, or modal API to use in Vue code | +| [references/ui-forms.md](references/ui-forms.md) | FormKit schema and component usage, custom inputs (select, attachment, array, etc.), validation | Building a form with FormKit schema or custom inputs | +| [references/ui-api-request.md](references/ui-api-request.md) | @halo-dev/api-client (coreApiClient, axiosInstance), generateApiClient Gradle task | Making HTTP requests from plugin UI to Halo APIs | +| [references/ui-tooling.md](references/ui-tooling.md) | unplugin-icons + Iconify, UnoCSS (Vite/Rsbuild config) | Adding icons or writing atomic CSS (UnoCSS) in plugin UI | +| [references/server-reconciler.md](references/server-reconciler.md) | Reconciler + ControllerBuilder, finalizers, retry scheduling, vs Watcher | Building a controller that watches and reconciles resource state | +| [references/server-search.md](references/server-search.md) | HaloDocument, HaloDocumentsProvider, SearchEngine, search events | Integrating with Halo search (indexing, searching, search events) | +| [references/theme-head-processor.md](references/theme-head-processor.md) | TemplateHeadProcessor for injecting scripts/styles/meta into theme head | Injecting scripts, styles, or meta tags into the theme `` | +| [references/theme-content-handler.md](references/theme-content-handler.md) | ReactivePostContentHandler / ReactiveSinglePageContentHandler for modifying rendered HTML | Modifying post or page HTML after rendering | +| [references/theme-integration.md](references/theme-integration.md) | Finder API for themes, template variables, reverse proxy, static resources, CommentSubject | Adding theme-side template variables or Finder APIs | diff --git a/.agents/skills/halo-plugin-dev/agents/openai.yaml b/.agents/skills/halo-plugin-dev/agents/openai.yaml new file mode 100644 index 0000000..9e93723 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Halo Plugin Development" + short_description: "Build Halo CMS plugins with Java backend and Vue frontend" + default_prompt: "Help me create a Halo plugin" diff --git a/.agents/skills/halo-plugin-dev/references/api-changelog.md b/.agents/skills/halo-plugin-dev/references/api-changelog.md new file mode 100644 index 0000000..630515b --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/api-changelog.md @@ -0,0 +1,29 @@ +# Plugin API Changelog + +Read the official changelog before using version-sensitive plugin APIs, +upgrading Halo dependencies, or raising `spec.requires`. + +Official docs: + +- Plugin API changelog: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-changelog.md +- Form schema: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/form-schema.md + +High-impact changes: + +| Halo version | Change | Skill reference | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- | +| 2.25.0 | `select` options support `icon` and `description`; remote selects support `requestOption.iconField` and `descriptionField` | [ui-forms.md](ui-forms.md) | +| 2.25.0 | Plugin UI can register custom FormKit inputs through `definePlugin({ formkit: { inputs } })` | [ui-entry.md](ui-entry.md), [ui-forms.md](ui-forms.md) | +| 2.25.0 | `secret` FormKit input supports `descriptionPreset` | [ui-forms.md](ui-forms.md) | +| 2.23.0 | Spring Boot 4 upgrade can break plugins using Spring APIs; upgrade the Halo platform dependency and `spec.requires` together | [devtools.md](devtools.md), [plugin-manifest.md](plugin-manifest.md) | +| 2.23.0 | `iconify` supports optional `sizing` config | [ui-forms.md](ui-forms.md) | +| 2.22.8 | `toggle` FormKit input added | [ui-forms.md](ui-forms.md) | +| 2.22.5 | SpringDoc update can break OpenAPI documentation generation; upgrade the Halo platform dependency and `spec.requires` together | [server-api.md](server-api.md), [devtools.md](devtools.md) | +| 2.22.2 | `switch` FormKit input added | [ui-forms.md](ui-forms.md) | +| 2.22.0 | Custom model index/query APIs changed: use `IndexSpecs.single/multi`, `Queries`, and newer `ExtensionClient` query helpers | [server-extension.md](server-extension.md) | +| 2.22.0 | `@halo-dev/console-shared` was renamed to `@halo-dev/ui-shared` | [ui-shared.md](ui-shared.md) | +| 2.22.0 | Attachment selector extension results need `mediaType` on `AttachmentLike` | [ui-extension-points.md](ui-extension-points.md) | + +When a feature requires a newer Halo runtime, update dependency versions and +`plugin.yaml` `spec.requires` together. Do not raise `spec.requires` for an +optional UI enhancement unless the plugin cannot run without it. diff --git a/.agents/skills/halo-plugin-dev/references/devtools.md b/.agents/skills/halo-plugin-dev/references/devtools.md new file mode 100644 index 0000000..80d7944 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/devtools.md @@ -0,0 +1,171 @@ +# DevTools (run.halo.plugin.devtools) + +A Gradle plugin for streamlined plugin development. Requires Docker. + +> - [halo-gradle-plugin repo](https://github.com/halo-sigs/halo-gradle-plugin) +> - [halo-gradle-plugin releases](https://github.com/halo-sigs/halo-gradle-plugin/releases) + +## Quick Commands + +| Command | Purpose | +| --------------------------------- | --------------------------------------------------- | +| `./gradlew haloServer` | Start Halo in Docker with plugin loaded in dev mode | +| `./gradlew reload` | Reload plugin changes without restarting Halo | +| `./gradlew watch` | Auto-reload on file changes | +| `./gradlew build` | Build plugin JAR (includes frontend build) | +| `./gradlew generateApiClient` | Generate TypeScript API client from OpenAPI | +| `./gradlew generateRoleTemplates` | Generate role template YAML from OpenAPI | + +## build.gradle Setup + +```groovy +plugins { + id 'java' + id "io.freefair.lombok" version "8.13" + id "run.halo.plugin.devtools" version "0.6.0" +} + +group = 'com.example.myplugin' + +repositories { + mavenCentral() +} + +dependencies { + implementation platform('run.halo.tools.platform:plugin:2.22.0') + compileOnly 'run.halo.app:api' + + testImplementation 'run.halo.app:api' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' +} + +test { + useJUnitPlatform() +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = "UTF-8" + options.release = 21 +} + +// UI build integration (if UI is in a separate subproject) +tasks.register('processUiResources', Copy) { + from project(':ui').layout.buildDirectory.dir('dist') + into layout.buildDirectory.dir('resources/main/console') + dependsOn project(':ui').tasks.named('assemble') + shouldRunAfter tasks.named('processResources') +} + +tasks.named('classes') { + dependsOn tasks.named('processUiResources') +} + +halo { + version = '2.22' + superAdminUsername = 'admin' + superAdminPassword = 'admin' + port = 8090 + // debug = true + // debugPort = 5005 + // suspend = true + externalUrl = 'http://localhost:8090' +} +``` + +## halo {} Block Options + +| Option | Description | Default | +| -------------------- | ------------------------------------------ | ----------------------------------------- | +| `version` | Halo Docker image version | `'2.9.1'` | +| `superAdminUsername` | Auto-created admin username | `'admin'` | +| `superAdminPassword` | Auto-created admin password | `'admin'` | +| `port` | Halo server port | `8090` | +| `externalUrl` | External access URL | `'http://localhost:8090'` | +| `debug` | Enable JDWP debug | `false` | +| `debugPort` | JDWP port | auto-assigned | +| `suspend` | Suspend on startup until debugger connects | `false` | +| `docker.url` | Docker daemon URL | `unix:///var/run/docker.sock` (Mac/Linux) | +| `docker.apiVersion` | Docker API version | `'1.42'` | + +## Watch Configuration + +```groovy +haloPlugin { + watchDomains { + consoleSource { + files files('ui/src/') + // exclude '**/node_modules/**' + } + } +} +``` + +## Generate API Client + +Requires OpenAPI grouping configuration in `build.gradle`: + +```groovy +haloPlugin { + openApi { + groupingRules { + extensionApis { + displayName = 'Extension API for MyPlugin' + pathsToMatch = ['/apis/my-plugin.halo.run/v1alpha1/**'] + } + } + groupedApiMappings = [ + '/v3/api-docs/extensionApis': 'extensionApis.json' + ] + generator { + outputDir = file("${projectDir}/ui/src/api/generated") + additionalProperties = [ + useES6: true, + useSingleRequestParameter: true, + withSeparateModelsAndApi: true, + apiPackage: "api", + modelPackage: "models" + ] + typeMappings = [ + set: "Array" + ] + } + } +} +``` + +Usage in TypeScript: + +```ts +import { axiosInstance } from "@halo-dev/api-client"; +import { MyResourceV1alpha1Api } from "./api/generated"; + +const api = new MyResourceV1alpha1Api(undefined, "", axiosInstance); +const { data } = await api.listMyResources({}); +``` + +## Generate Role Templates + +After configuring OpenApi grouping, run: + +```bash +./gradlew generateRoleTemplates +``` + +Generates `roleTemplates.yaml` in the `workplace/` directory. Review and customize before adding to `src/main/resources/extensions/`. + +## Custom Halo Config + +Place `workplace/config/application.yaml` to override Halo defaults: + +```yaml +logging: + level: + run.halo.app: DEBUG +``` diff --git a/.agents/skills/halo-plugin-dev/references/plugin-interaction.md b/.agents/skills/halo-plugin-dev/references/plugin-interaction.md new file mode 100644 index 0000000..5a583b3 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/plugin-interaction.md @@ -0,0 +1,98 @@ +# Plugin Interaction + +Use this reference when a plugin depends on another plugin, exposes Java types +for other plugins, shares events, or defines/consumes extension points. + +Official docs: + +- Dependencies: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/interaction/dependency.md +- Shared events: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/interaction/shared-events.md +- Making a plugin extensible: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/interaction/making-plugin-extensible.md +- ExtensionGetter: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/extension-getter.md + +## Dependencies + +Declare runtime plugin dependencies in `plugin.yaml` under +`spec.pluginDependencies`. + +```yaml +spec: + pluginDependencies: + required-plugin: ">=1.0.0 & <2.0.0" + optional-plugin?: "1.*" +``` + +- Dependency keys are plugin `metadata.name` values. +- Optional dependencies use a `?` suffix and require Halo 2.20.11+. +- Prefer explicit versions or ranges. Avoid broad `*` constraints for production + plugins. + +## API Modules + +When other plugins need to compile against your public Java types, put those +types in a separate API module and publish it. Keep implementation code in the +plugin module. + +Consumer plugins should normally depend on the provider API module with +`compileOnly`, not package the provider classes into their plugin jar. + +```groovy +dependencies { + compileOnly "run.halo.example:plugin-a-api:1.0.0" +} +``` + +## Shared Events + +Use Spring events for plugin-to-plugin notifications. Mark custom event classes +with `@SharedEvent` when dependent plugins should be able to listen to them. + +```java +import org.springframework.context.ApplicationEvent; +import run.halo.app.plugin.SharedEvent; + +@SharedEvent +public class CustomSharedEvent extends ApplicationEvent { + public CustomSharedEvent(Object source) { + super(source); + } +} +``` + +Listen with `@EventListener` or `ApplicationListener`. Built-in shared events +include post publish/update/delete/visibility changes, user login/logout, and +third-party login disconnection events. Check the official docs for the current +event class names before importing. + +## Extension Points + +To make a plugin extensible: + +1. Define an interface that extends `org.pf4j.ExtensionPoint`. +2. Declare an `ExtensionPointDefinition` resource under + `src/main/resources/extensions/`. +3. Publish the interface in an API module so extension plugins can compile + against it. +4. Resolve enabled implementations with `ExtensionGetter`. + +```yaml +apiVersion: plugin.halo.run/v1alpha1 +kind: ExtensionPointDefinition +metadata: + name: my-plugin-reactive-notifier +spec: + className: run.halo.example.ReactiveNotifier + displayName: "Reactive Notifier" + description: "Extends notification delivery" + type: MULTI_INSTANCE +``` + +Use a plugin-prefixed `metadata.name` to avoid collisions. Use +`SINGLE_INSTANCE` only when exactly one enabled implementation makes sense; +otherwise use `MULTI_INSTANCE`. + +```java +extensionGetter.getEnabledExtensions(ReactiveNotifier.class) + .flatMap(notifier -> notifier.notify(context)) + .then(); +``` diff --git a/.agents/skills/halo-plugin-dev/references/plugin-manifest.md b/.agents/skills/halo-plugin-dev/references/plugin-manifest.md new file mode 100644 index 0000000..534b2c3 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/plugin-manifest.md @@ -0,0 +1,102 @@ +# Plugin Manifest (plugin.yaml) + +Located at `src/main/resources/plugin.yaml`. Required. + +> - [create-halo-plugin repo](https://github.com/halo-dev/create-halo-plugin) + +## Minimal Example + +```yaml +apiVersion: plugin.halo.run/v1alpha1 +kind: Plugin +metadata: + name: hello-world +spec: + enabled: true + requires: ">=2.22.0" + author: + name: Halo + website: https://www.halo.run + logo: logo.svg + displayName: "Hello World" + description: "A minimal Halo plugin" + license: + - name: "GPL-3.0" + url: "https://github.com/example/plugin/blob/main/LICENSE" +``` + +## Field Reference + +| Field | Description | Required | +| ------------------------------------- | --------------------------------------------------------------------------------------------------------- | ----------- | +| `apiVersion` / `kind` | Fixed: `plugin.halo.run/v1alpha1` / `Plugin` | Yes | +| `metadata.name` | Unique plugin ID. Max 253 chars, lowercase letters/numbers/hyphens only, must start/end with alphanumeric | Yes | +| `spec.enabled` | Auto-enable on install. For production, prefer `false` for security | Yes | +| `spec.requires` | Supported Halo version range. SemVer ranges: `>=2.22.0`, `^2.22.0`, `2.22.*`, etc. | Yes | +| `spec.version` | Plugin version (e.g., `1.0.0`) | Recommended | +| `spec.author.name` / `author.website` | Author info | Recommended | +| `spec.logo` | Logo file (relative to `src/main/resources/`) or URL | Recommended | +| `spec.displayName` | Human-readable name | Yes | +| `spec.description` | Short description | Yes | +| `spec.homepage` | Plugin homepage/docs URL | Recommended | +| `spec.repo` | Source repository URL | Recommended | +| `spec.issues` | Issue tracker URL | Recommended | +| `spec.license` | License name + URL array | Recommended | +| `spec.settingName` | Setting resource name for plugin config form. Suffix with `-settings` | Optional | +| `spec.configMapName` | ConfigMap name for persisting config. Suffix with `-configmap`. Required if `settingName` is set | Conditional | +| `spec.pluginDependencies` | Map of `pluginName: versionRange`. Optional deps suffix name with `?` (Halo 2.20.11+) | Optional | + +## Plugin Dependencies + +For dependency design, optional dependencies, and API modules, see +[plugin-interaction.md](plugin-interaction.md). + +```yaml +spec: + pluginDependencies: + # Required dependency + some-plugin: ">=1.0.0 & <2.0.0" + # Optional dependency (Halo 2.20.11+) + optional-plugin?: "1.*" +``` + +## Settings & ConfigMap + +To provide a user-configurable form in Console: + +1. Set `spec.settingName: my-plugin-settings` and `spec.configMapName: my-plugin-configmap` in `plugin.yaml` +2. Create `src/main/resources/extensions/settings.yaml`: + +```yaml +apiVersion: v1alpha1 +kind: Setting +metadata: + name: my-plugin-settings # must match spec.settingName +spec: + forms: + - group: basic + label: Basic Settings + formSchema: + - $formkit: text + name: apiKey + label: API Key + - $formkit: switch + name: enabled + label: Enable Feature +``` + +> If `settingName` is set but the corresponding `Setting` resource does not exist, the plugin will fail to start. +> +> For full form input options and Vue component usage, see [ui-forms.md](ui-forms.md). +> +> After setting this up, read the config at runtime using [`ReactiveSettingFetcher` or `SettingFetcher`](server-shared-beans.md#reactivesettingfetcher--settingfetcher). + +## App Store Annotations + +For distribution via Halo App Store: + +```yaml +metadata: + annotations: + store.halo.run/app-id: "app-XXXXX" +``` diff --git a/.agents/skills/halo-plugin-dev/references/plugin-structure.md b/.agents/skills/halo-plugin-dev/references/plugin-structure.md new file mode 100644 index 0000000..52df5a5 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/plugin-structure.md @@ -0,0 +1,46 @@ +# Plugin Project Structure + +## Typical Directory Layout + +``` +my-halo-plugin/ +├── ui/ # Frontend source (Vue + TypeScript) +│ ├── src/ +│ │ ├── assets/ +│ │ ├── views/ # Page components +│ │ ├── components/ # Reusable components +│ │ └── index.ts # Plugin entry (definePlugin) +│ ├── package.json +│ ├── tsconfig.json +│ ├── vite.config.ts | rsbuild.config.ts +│ └── ... +├── src/main/ +│ ├── java/ +│ │ └── com/example/myplugin/ +│ │ └── MyPlugin.java # Entry class extending BasePlugin +│ └── resources/ +│ ├── plugin.yaml # Plugin manifest (required) +│ ├── console/ # Built frontend output (main.js + style.css) +│ ├── extensions/ # YAML extension declarations +│ ├── templates/ # Thymeleaf templates (optional, for theme integration) +│ └── static/ # Static assets served at /plugins/{name}/assets (optional) +├── build.gradle # Gradle build config +├── gradle.properties +├── settings.gradle +├── gradlew +└── README.md +``` + +## Backend (`src/main/java/`) + +- **Entry class**: One class extending `run.halo.app.plugin.BasePlugin`, annotated with `@Component`. It is the only lifecycle entry point. +- **Spring features supported**: Core IoC, WebFlux reactive stack, Testing. Standard annotations: `@Component`, `@Service`, `@Repository`, `@Configuration`, `@Controller`, etc. +- **Resources**: `src/main/resources/plugin.yaml` is mandatory. `src/main/resources/extensions/` holds YAML declarations for custom extensions, role templates, settings, etc. + +## Frontend (`ui/` or `console/`) + +- **Entry file**: `ui/src/index.ts` (or `console/src/index.ts`) exports a default object created by `definePlugin()`. +- **Build output**: compiled to `src/main/resources/console/main.js` + `style.css`. Halo merges all plugin JS/CSS into global bundles. +- **Build tools**: Vite or Rsbuild via `@halo-dev/ui-plugin-bundler-kit`. + +> From Halo 2.11+, UC (User Center) shares the same plugin mechanism. `resources/console` may be renamed to `resources/ui` in future but both are compatible. diff --git a/.agents/skills/halo-plugin-dev/references/server-api.md b/.agents/skills/halo-plugin-dev/references/server-api.md new file mode 100644 index 0000000..80ac9c7 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/server-api.md @@ -0,0 +1,218 @@ +# Custom APIs + +Halo plugins can define custom APIs in addition to auto-generated CRUD APIs. + +> Source references (Halo main branch): +> +> - [CustomEndpoint](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/core/extension/endpoint/CustomEndpoint.java) +> - [ApiVersion](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/plugin/ApiVersion.java) +> - [SpringdocRouteBuilder](https://github.com/halo-dev/halo/blob/main/application/src/main/java/run/halo/app/infra/utils/SpringdocRouteBuilder.java) +> - [SortableRequest](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/router/SortableRequest.java) +> - [PostEndpoint (SpringdocRouteBuilder example)](https://github.com/halo-dev/halo/blob/main/application/src/main/java/run/halo/app/core/endpoint/console/PostEndpoint.java) + +## API Group Conventions + +| Scope | URL Prefix | Example | +| ---------------- | ----------------------------------------- | ------------------------------------------------------- | +| Console | `/apis/console.api.{group}/{version}/...` | `/apis/console.api.my-plugin.halo.run/v1alpha1/persons` | +| UC (User Center) | `/apis/uc.api.{group}/{version}/...` | `/apis/uc.api.my-plugin.halo.run/v1alpha1/persons` | +| Public (theme) | `/apis/api.{group}/{version}/...` | `/apis/api.my-plugin.halo.run/v1alpha1/persons` | + +> `{group}` is the `group` value from the `@GVK` annotation. + +## Method 1: CustomEndpoint (Recommended) + +Implements `run.halo.app.core.extension.endpoint.CustomEndpoint`: + +```java +import org.springframework.stereotype.Component; +import org.springframework.web.reactive.function.server.RouterFunction; +import org.springframework.web.reactive.function.server.ServerResponse; +import reactor.core.publisher.Mono; +import run.halo.app.core.extension.endpoint.CustomEndpoint; +import run.halo.app.extension.GroupVersion; + +import static org.springframework.web.reactive.function.server.RequestPredicates.accept; +import static org.springframework.web.reactive.function.server.RouterFunctions.route; +import static org.springframework.http.MediaType.APPLICATION_JSON; + +@Component +public class PersonEndpoint implements CustomEndpoint { + + @Override + public RouterFunction endpoint() { + return route() + .GET("/persons/{name}", accept(APPLICATION_JSON), this::getPerson) + .POST("/persons", this::createPerson) + .build(); + } + + private Mono getPerson(ServerRequest request) { + String name = request.pathVariable("name"); + return ServerResponse.ok().bodyValue("Hello, " + name); + } + + private Mono createPerson(ServerRequest request) { + // ... + return ServerResponse.ok().build(); + } + + @Override + public GroupVersion groupVersion() { + return new GroupVersion("console.api.my-plugin.halo.run", "v1alpha1"); + } +} +``` + +The `endpoint()` paths are automatically prefixed with `/apis/{group}/{version}/`. + +## Method 2: MVC-style @Controller + +```java +import run.halo.app.plugin.ApiVersion; + +@ApiVersion("my-plugin.halo.run/v1alpha1") +@RestController +@RequiredArgsConstructor +@RequestMapping("/persons") +public class PersonController { + private final PersonService personService; + + @GetMapping("/{name}") + public Mono getPerson(@PathVariable("name") String name) { + return personService.getPerson(name); + } +} +``` + +> ⚠️ **@ApiVersion is required** — controllers without it will not be registered. + +## OpenAPI Documentation + +Use `SpringdocRouteBuilder` to document Functional Endpoints: + +```java +import run.halo.app.infra.utils.SpringdocRouteBuilder; + +@Override +public RouterFunction endpoint() { + final var tag = "PersonV1alpha1Console"; + return SpringdocRouteBuilder.route() + .GET("/persons", this::listPersons, + builder -> builder + .operationId("ListPersons") + .description("List all persons") + .tag(tag) + .response(responseBuilder() + .implementation(ListResult.generateGenericClass(Person.class)) + ) + ) + .build(); +} +``` + +Tag naming convention: `{Kind}{Version}{Scope}` e.g., `PersonV1alpha1Console`. + +## Query Parameters + +Extend `run.halo.app.extension.router.SortableRequest` for list queries: + +```java +import static run.halo.app.extension.index.query.Queries.equal; +import static run.halo.app.extension.index.query.Queries.contains; +import static run.halo.app.extension.index.query.Queries.or; + +public class PersonQuery extends SortableRequest { + public PersonQuery(ServerWebExchange exchange) { + super(exchange); + } + + public String getKeyword() { + return queryParams.getFirst("keyword"); + } + + @Override + public ListOptions toListOptions() { + var keyword = getKeyword(); + if (StringUtils.hasText(keyword)) { + return ListOptions.builder(super.toListOptions()) + .fieldQuery(or( + equal("metadata.name", keyword), + contains("spec.name", keyword) + )) + .build(); + } + return super.toListOptions(); + } +} +``` + +Usage: + +```java +public Mono> list(ServerRequest request) { + var query = new PersonQuery(request.exchange()); + return client.listBy(Person.class, query.toListOptions(), query.toPageRequest()); +} +``` + +## Request Validation (Bean Validation) + +```java +public class PersonParam { + @NotNull + @Size(max = 64) + private String name; + + @Min(0) + private int age; +} +``` + +Enable validator: + +```java +@Configuration +public class PluginConfig { + @Bean + public LocalValidatorFactoryBean validator() { + return new LocalValidatorFactoryBean(); + } +} +``` + +Inject and use: + +```java +@Component +@RequiredArgsConstructor +public class PersonEndpoint implements CustomEndpoint { + private final Validator validator; + + private Mono createPerson(ServerRequest request) { + return request.bodyToMono(PersonParam.class) + .doOnNext(this::validate) + .flatMap(person -> /* ... */); + } + + private void validate(PersonParam param) { + var result = new BeanPropertyBindingResult(param, "person"); + validator.validate(param, result); + if (result.hasErrors()) { + throw new RequestBodyValidationException(result); + } + } +} +``` + +## Swagger Groups + +API docs at `/swagger-ui.html` are grouped as: + +| Group | Content | +| ------------------------ | ------------------------ | +| Aggregated API V1alpha1 | All APIs combined | +| Extension API V1alpha1 | Auto-generated CRUD APIs | +| Console API V1alpha1 | Console custom APIs | +| User-center API V1alpha1 | UC custom APIs | +| Public API V1alpha1 | Public/theme custom APIs | diff --git a/.agents/skills/halo-plugin-dev/references/server-extension.md b/.agents/skills/halo-plugin-dev/references/server-extension.md new file mode 100644 index 0000000..2b43402 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/server-extension.md @@ -0,0 +1,405 @@ +# Custom Extension (Data Model) + +Halo uses a Kubernetes CRD-like system called **Extension** for custom data storage. + +> Source references (Halo main branch): +> +> - [AbstractExtension](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/AbstractExtension.java) +> - [GVK](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/GVK.java) +> - [SchemeManager](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/SchemeManager.java) +> - [IndexSpecs](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/index/IndexSpecs.java) +> - [ReactiveExtensionClient](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/ReactiveExtensionClient.java) +> - [GroupVersion](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/GroupVersion.java) +> - [GroupVersionKind](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/GroupVersionKind.java) +> - [Queries](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/index/query/Queries.java) +> - [FieldSelector](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/router/selector/FieldSelector.java) +> - [ExtensionUtil](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/ExtensionUtil.java) +> - [MetadataUtil](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/MetadataUtil.java) +> - [ExtensionOperator](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/ExtensionOperator.java) + +## Docs Routing + +This file captures the common model pattern. Verify exact APIs, query helpers, +and reconciler contracts in the official docs before depending on a recent +method or version-specific behavior. + +| Need | Official docs | +| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| Extension model, indexes, query params | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/extension.md | +| ExtensionClient / ReactiveExtensionClient | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/extension-client.md | +| Object management basics | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/basics/server/object-management.md | +| Reconciler controllers | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/reconciler.md | +| Plugin API changelog for version gates | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-changelog.md | + +When working from a local docs checkout, use the same paths under +`docs/developer-guide/...`; versioned docs live under +`versioned_docs/version-2.25/...`. + +## Quick Index + +- Basic model shape: [Creating an Extension](#creating-an-extension) +- Registration: [Registering in Lifecycle](#registering-in-lifecycle) +- Generated endpoints: [Auto-Generated CRUD APIs](#auto-generated-crud-apis) +- Indexes and queries: [Indexes](#indexes) +- Query APIs: [Querying Extensions](#querying-extensions) + +## Creating an Extension + +Three steps: + +1. Create a class extending `run.halo.app.extension.AbstractExtension` +2. Annotate with `@GVK(group, version, kind, plural, singular)` +3. Register in plugin `start()` via `SchemeManager` + +## Example + +```java +import io.swagger.v3.oas.annotations.media.Schema; +import java.time.Instant; +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import run.halo.app.extension.AbstractExtension; +import run.halo.app.extension.GVK; + +@Data +@EqualsAndHashCode(callSuper = true) +@GVK( + group = "my-plugin.halo.run", + version = "v1alpha1", + kind = "Person", + plural = "persons", + singular = "person" +) +public class Person extends AbstractExtension { + + @Schema(requiredMode = Schema.RequiredMode.REQUIRED) + private Spec spec; + + @Data + @Schema(name = "PersonSpec") + public static class Spec { + @Schema(description = "Name", maxLength = 100) + private String name; + + @Schema(description = "Slug", maxLength = 100) + private String slug; + + @Schema(description = "Age", maximum = "150", minimum = "0") + private Integer age; + + @Schema(description = "Tags") + private List tags; + + @Schema(description = "Priority") + private Integer priority; + + @Schema(description = "Pinned") + private Boolean pinned; + + @Schema(description = "Publish time") + private Instant publishTime; + } +} +``` + +## Registering in Lifecycle + +```java +@Component +public class MyPlugin extends BasePlugin { + @Autowired + private SchemeManager schemeManager; + + @Override + public void start() { + schemeManager.register(Person.class); + } + + @Override + public void stop() { + schemeManager.unregister(Scheme.buildFromType(Person.class)); + } +} +``` + +## GVK Annotation Fields + +| Field | Description | +| ---------- | ----------------------------------------------------- | +| `group` | Domain-style group, e.g., `my-plugin.halo.run` | +| `version` | API version, e.g., `v1alpha1` | +| `kind` | Resource type name (PascalCase) | +| `plural` | REST plural path segment, lowercase (e.g., `persons`) | +| `singular` | Singular name, lowercase (e.g., `person`) | + +## Auto-Generated CRUD APIs + +After registration, Halo automatically exposes: + +``` +GET /apis/{group}/{version}/{plural} # List +GET /apis/{group}/{version}/{plural}/{name} # Get by name +POST /apis/{group}/{version}/{plural} # Create +PUT /apis/{group}/{version}/{plural}/{name} # Update +DELETE /apis/{group}/{version}/{plural}/{name} # Delete +``` + +List endpoint supports: + +| Param | Description | +| --------------- | --------------------------------------------------------------------- | +| `page` | Page number (1-based) | +| `size` | Page size | +| `sort` | `field,asc\|desc`. Must be an indexed field | +| `labelSelector` | Label filtering: `key=value`, `key!=value`, `!key`, `key` | +| `fieldSelector` | Indexed field filtering: `field=value`, `field!=value`, `field=(a,b)` | + +Example: + +``` +GET /apis/my-plugin.halo.run/v1alpha1/persons?page=1&size=10&sort=metadata.name,desc&fieldSelector=spec.age=18 +``` + +## Declaring Extension Objects (YAML) + +Place YAML files in `src/main/resources/extensions/`. They are created/updated on plugin startup. + +```yaml +apiVersion: my-plugin.halo.run/v1alpha1 +kind: Person +metadata: + name: default-person +spec: + name: halo + slug: halo + age: 18 +``` + +> ⚠️ Resources here are overwritten on every plugin start. Do NOT place user-modifiable config here. + +## Validation with @Schema + +```java +@Schema(description = "Email", format = "email") +private String email; + +@Schema(requiredMode = Schema.RequiredMode.REQUIRED, minLength = 1, maxLength = 50) +private String title; +``` + +Validation is applied on create/update automatically. + +## Indexes + +Indexes improve query performance for `fieldSelector` and `sort`. + +```java +import java.time.Instant; +import java.util.Set; +import run.halo.app.extension.index.IndexSpecs; + +@Override +public void start() { + schemeManager.register(Person.class, indexSpecs -> { + // Single-value index, can return null unless nullable(false) is configured + indexSpecs.add(IndexSpecs.single("spec.name", String.class) + .indexFunc(person -> person.getSpec().getName())); + + // Multi-value index, returns a set of values + indexSpecs.add(IndexSpecs.multi("spec.tags", String.class) + .indexFunc(person -> { + var tags = person.getSpec().getTags(); + return tags == null ? Set.of() : Set.copyOf(tags); + })); + + // Index keys are not limited to String. Use Comparable types. + indexSpecs.add(IndexSpecs.single("spec.pinned", Boolean.class) + .indexFunc(person -> person.getSpec().getPinned())); + indexSpecs.add(IndexSpecs.single("spec.priority", Integer.class) + .indexFunc(person -> person.getSpec().getPriority())); + indexSpecs.add(IndexSpecs.single("spec.publishTime", Instant.class) + .indexFunc(person -> person.getSpec().getPublishTime())); + + // Optional builder flags from Halo 2.22+: unique and nullable. + indexSpecs.add(IndexSpecs.single("spec.slug", String.class) + .unique(true) + .nullable(false) + .indexFunc(person -> person.getSpec().getSlug())); + }); +} +``` + +An index spec declares an index item. Prefer building it with +`IndexSpecs.single(name, keyType)` or `IndexSpecs.multi(name, keyType)`. +Key details: + +| Property | Description | +| ----------- | --------------------------------------------------------------------------------------------------- | +| `name` | Unique index name for this extension type, usually a field path | +| `keyType` | Index key type. Must implement `Comparable`, e.g. `String`, `Boolean`, `Integer`, `Long`, `Instant` | +| `indexFunc` | Function that extracts the indexed value from the extension | +| `unique` | Optional. Enforces unique index values when set to `true` | +| `nullable` | Optional. Allows null index values by default; set `false` for required keys | + +Since Halo 2.22.0, `IndexAttributeFactory.simpleAttribute()`, +`IndexAttributeFactory.multiValueAttribute()`, and direct `new IndexSpec()` +construction are deprecated. Use `IndexSpecs.single()` and +`IndexSpecs.multi()` instead. + +Built-in indexes (do not re-declare): + +- `metadata.name` (unique) +- `metadata.labels` +- `metadata.creationTimestamp` +- `metadata.deletionTimestamp` + +## Metadata Structure + +Every extension has `metadata`: + +| Field | Description | +| ---------------------------- | ---------------------------------------------------------- | +| `metadata.name` | Unique ID, max 253 chars, lowercase alphanumeric + hyphens | +| `metadata.creationTimestamp` | Auto-set on create, immutable | +| `metadata.version` | Optimistic locking version. Mismatch on update = conflict | +| `metadata.deletionTimestamp` | Set when marked for deletion (before actual removal) | +| `metadata.finalizers` | Cleanup hooks. Extension not deleted until empty | +| `metadata.labels` | String key-value map. Auto-indexed. Use for querying | +| `metadata.annotations` | String key-value map. NOT indexed. Use for extra metadata | + +## GroupVersion & GroupVersionKind + +Programmatically construct API identifiers: + +```java +// From strings +var gv = new GroupVersion("my-plugin.halo.run", "v1alpha1"); +var gvk = GroupVersionKind.fromAPIVersionAndKind("my-plugin.halo.run/v1alpha1", "Person"); + +// From a @GVK-annotated class +var gvk = GroupVersionKind.fromExtension(Person.class); + +// Parse from API version string +var gv = GroupVersion.parseAPIVersion("my-plugin.halo.run/v1alpha1"); +``` + +## Querying Extensions + +Prefer the newer `ReactiveExtensionClient` query methods: + +```java +Flux people = client.listAll(Person.class, options, sort); +Mono> page = client.listBy(Person.class, options, pageable); +``` + +Use these methods instead of the deprecated `list(Class, Predicate, Comparator, ...)` +overloads. Common query methods include: + +| Method | Description | +| -------------- | --------------------------- | +| `listBy` | Page through matching data | +| `listNamesBy` | Page through matching names | +| `listAll` | Return all matching data | +| `listAllNames` | Return all matching names | +| `listTopNames` | Return top matching names | +| `countBy` | Count matching data | + +`ListOptions` carries label and field conditions: + +```java +import static run.halo.app.extension.index.query.Queries.equal; + +ListOptions options = ListOptions.builder() + .labelSelector() + .eq("env", "production") + .end() + .fieldQuery(equal("spec.pinned", true)) + .build(); +``` + +Call `end()` after `labelSelector()` to return to the `ListOptions` builder. +Use `andQuery` and `orQuery` when combining multiple field selector conditions +inside the builder. + +Sorting and pagination are passed separately: + +```java +import org.springframework.data.domain.Sort; +import run.halo.app.extension.PageRequestImpl; + +var sort = Sort.by(Sort.Order.asc("metadata.name")); +var pageable = PageRequestImpl.of(1, 10, sort); + +client.listBy(Person.class, options, pageable); +client.listAll(Person.class, options, sort); +``` + +Fields used in `fieldQuery` or `Sort` must be indexed, otherwise Halo rejects +the query as unsupported. Query values should match the index `keyType`; Halo +uses conversion where possible, but incompatible values fail at query time. + +## Query DSL (Field Selectors) + +Build typed queries for `ListOptions` field filtering: + +```java +import static run.halo.app.extension.index.query.Queries.*; + +ListOptions.builder() + .fieldQuery(and( + equal("spec.pinned", true), + contains("spec.name", keyword), + greaterThan("spec.priority", 10) + )) + .build(); +``` + +`QueryFactory` is deprecated since Halo 2.22.0. Use `Queries` to build query +conditions. Negation can be built with either `Queries.not(condition)` or +`condition.not()`. + +Available operators include: `empty`, `all`, `equal`, `notEqual`, +`greaterThan(field, value)`, `greaterThan(field, value, inclusive)`, +`lessThan(field, value)`, `lessThan(field, value, inclusive)`, `between`, +`in`, `isNull`, `contains`, `startsWith`, `endsWith`, `and`, `or`, `not`, +`labelExists`, `labelEqual`, `labelIn`. + +Use negation for operators that no longer have direct helper methods: + +```java +var isNotNull = isNull("metadata.deletionTimestamp").not(); +var greaterThanOrEqual = greaterThan("spec.priority", 10, true); +var lessThanOrEqual = lessThan("spec.priority", 20, true); +var labelNotEqual = labelEqual("env", "production").not(); +``` + +The HTTP `fieldSelector` parameter only supports the selector-style subset +(`=`, `!=`, and `in`, for example `fieldSelector=spec.slug=(halo,halo2)`). +For richer field and label conditions in Java code, use `ListOptions` with +`Queries`. + +## Extension Utilities + +```java +// Check deletion state +boolean deleted = ExtensionUtil.isDeleted(extension); +Predicate notDeleted = ExtensionOperator.isNotDeleted(); + +// Finalizer management +ExtensionUtil.addFinalizers(metadata, Set.of("my-plugin/finalizer")); +ExtensionUtil.removeFinalizers(metadata, Set.of("my-plugin/finalizer")); + +// Default sort +Sort sort = ExtensionUtil.defaultSort(); // creationTimestamp desc, name asc + +// Safe metadata access +Map labels = MetadataUtil.nullSafeLabels(extension); +Map annotations = MetadataUtil.nullSafeAnnotations(extension); +``` + +## Naming Rules + +- **metadata.name**: ≤253 chars, `[a-z0-9]([-a-z0-9]*[a-z0-9])?` +- **labels keys**: Optional prefix (DNS subdomain) + name (DNS label, ≤63 chars). Reserved: no-prefix keys and `halo.run/*` +- **annotations keys**: Same rules as labels, but not indexed diff --git a/.agents/skills/halo-plugin-dev/references/server-lifecycle.md b/.agents/skills/halo-plugin-dev/references/server-lifecycle.md new file mode 100644 index 0000000..4597947 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/server-lifecycle.md @@ -0,0 +1,152 @@ +# Plugin Lifecycle + +The plugin entry class extends `run.halo.app.plugin.BasePlugin` and must be annotated with `@Component`. + +> Source references (Halo main branch): +> +> - [BasePlugin](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/plugin/BasePlugin.java) +> - [PluginContext](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/plugin/PluginContext.java) + +## Entry Class Template + +```java +package com.example.myplugin; + +import org.springframework.stereotype.Component; +import run.halo.app.plugin.BasePlugin; +import run.halo.app.plugin.PluginContext; + +@Component +public class MyPlugin extends BasePlugin { + + public MyPlugin(PluginContext pluginContext) { + super(pluginContext); + } + + @Override + public void start() { + // Called after classes are loaded and before the plugin is marked active + // Register schemes, initialize caches, start watchers, etc. + } + + @Override + public void stop() { + // Called when the plugin is stopped (disabled) + // Unregister schemes, dispose watchers, clean up resources + } + + @Override + public void delete() { + // Called when the plugin is uninstalled + // Final cleanup, delete external data if needed + } +} +``` + +## Lifecycle Behavior + +| Method | When Called | Typical Actions | +| ---------- | ---------------------------------------------- | ------------------------------------------------------------------- | +| `start()` | After plugin classes loaded, before activation | `schemeManager.register()`, init caches, register watchers | +| `stop()` | When plugin is disabled | `schemeManager.unregister()`, dispose watchers, clear rate limiters | +| `delete()` | When plugin is uninstalled | Delete external resources, cleanup | + +## Important Rules + +1. **Only ONE class** may extend `BasePlugin` and be annotated with `@Component`. Multiple candidates cause startup failure. +2. **Must have `@Component`** (or other Spring stereotype). Without it, lifecycle methods are never invoked. +3. **Use constructor injection** for dependencies (preferred over `@Autowired` fields). + +## Scheme Registration / Cleanup + +```java +@Component +public class MyPlugin extends BasePlugin { + private final SchemeManager schemeManager; + + public MyPlugin(PluginContext ctx, SchemeManager schemeManager) { + super(ctx); + this.schemeManager = schemeManager; + } + + @Override + public void start() { + schemeManager.register(MyExtension.class, indexSpecs -> { + indexSpecs.add(IndexSpecs.single("spec.slug", String.class) + .indexFunc(ext -> ext.getSpec().getSlug())); + }); + } + + @Override + public void stop() { + schemeManager.unregister(Scheme.buildFromType(MyExtension.class)); + } +} +``` + +## Watchers + +Watch extension changes for cache invalidation or reactive workflows: + +```java +@Component +public class MyPlugin extends BasePlugin { + private final ReactiveExtensionClient client; + private Watcher watcher; + + // ... constructor + + @Override + public void start() { + watcher = new Watcher() { + private volatile boolean disposed = false; + + @Override + public void onAdd(Extension extension) { + if (extension instanceof MyExtension) { + // handle add + } + } + + @Override + public void onUpdate(Extension oldObj, Extension newObj) { + if (newObj instanceof MyExtension) { + // handle update + } + } + + @Override + public void onDelete(Extension extension) { + if (extension instanceof MyExtension) { + // handle delete + } + } + + @Override + public void dispose() { disposed = true; } + + @Override + public boolean isDisposed() { return disposed; } + }; + client.watch(watcher); + } + + @Override + public void stop() { + if (watcher != null) watcher.dispose(); + } +} +``` + +## RateLimiter Cleanup + +If creating rate limiters via `RateLimiterRegistry`, always clean up in `stop()`: + +```java +private final Set limiterNames = ConcurrentHashMap.newKeySet(); + +@Override +public void stop() { + limiterNames.forEach(rateLimiterRegistry::remove); +} +``` diff --git a/.agents/skills/halo-plugin-dev/references/server-reconciler.md b/.agents/skills/halo-plugin-dev/references/server-reconciler.md new file mode 100644 index 0000000..560aede --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/server-reconciler.md @@ -0,0 +1,144 @@ +# Reconciler (Controller Pattern) + +A Kubernetes-style controller that watches Extension resources and continuously reconciles their desired state. More commonly used than `Watcher` in production plugins. + +> Source: [Reconciler](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/controller/Reconciler.java) | [ControllerBuilder](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/controller/ControllerBuilder.java) | [Controller](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/controller/Controller.java) + +## Basic Pattern + +```java +@Component +public class MyReconciler implements Reconciler { + + private final ExtensionClient client; + + public MyReconciler(ExtensionClient client) { + this.client = client; + } + + @Override + public Result reconcile(Request request) { + // Fetch the extension being reconciled + var myExt = client.fetch(MyExtension.class, request.name()); + if (myExt.isEmpty()) { + return Result.doNotRetry(); + } + + // Perform reconciliation logic + var ext = myExt.get(); + // ... update annotations, labels, related resources, etc. + + // Update the extension if modified + client.update(ext); + + return Result.doNotRetry(); + } + + @Override + public Controller setupWith(ControllerBuilder builder) { + return builder + .extension(new MyExtension()) + .syncAllOnStart(false) + .build(); + } +} +``` + +## ControllerBuilder Options + +| Method | Description | +| ---------------------------------- | ----------------------------------------------------------- | +| `.extension(new MyExtension())` | The extension type to watch (required) | +| `.syncAllOnStart(true)` | Reconcile all existing instances on startup (default: true) | +| `.syncAllListOptions(listOptions)` | Filter which existing instances to sync on start | +| `.minDelay(Duration)` | Minimum retry delay (default: 5ms) | +| `.maxDelay(Duration)` | Maximum retry delay (default: 1000s) | +| `.workerCount(int)` | Number of concurrent workers (default: 1) | +| `.onAddMatcher(matcher)` | Filter which add events to process | +| `.onUpdateMatcher(matcher)` | Filter which update events to process | +| `.onDeleteMatcher(matcher)` | Filter which delete events to process | + +## Result Types + +```java +// Success, do not retry +return Result.doNotRetry(); + +// Requeue after a delay (for async operations or retry) +return Result.requeue(Duration.ofSeconds(30)); +``` + +## Lifecycle Integration + +Reconcilers are auto-discovered by Spring. If you need to start/stop manually (e.g., conditional on plugin config): + +```java +@Component +public class MyReconciler implements Reconciler, SmartLifecycle { + private Controller controller; + private boolean running = false; + + @Override + public Controller setupWith(ControllerBuilder builder) { + this.controller = builder.extension(new MyExtension()).build(); + return controller; + } + + @Override + public void start() { + if (controller != null && !running) { + controller.start(); + running = true; + } + } + + @Override + public void stop() { + if (controller != null && running) { + controller.dispose(); // or controller.stop() + running = false; + } + } + + @Override + public boolean isRunning() { return running; } +} +``` + +## Finalizers + +Use finalizers for cleanup before an extension is deleted: + +```java +@Override +public Result reconcile(Request request) { + var ext = client.fetch(MyExtension.class, request.name()).orElse(null); + if (ext == null) return Result.doNotRetry(); + + // Check if being deleted + if (ext.getMetadata().getDeletionTimestamp() != null) { + // Perform cleanup + doCleanup(ext); + // Remove finalizer to allow deletion + ExtensionUtil.removeFinalizers(ext.getMetadata(), Set.of("my-plugin/finalizer")); + client.update(ext); + return Result.doNotRetry(); + } + + // Add finalizer if not present + ExtensionUtil.addFinalizers(ext.getMetadata(), Set.of("my-plugin/finalizer")); + client.update(ext); + + // Normal reconciliation + return Result.doNotRetry(); +} +``` + +## When to Use Reconciler vs Watcher + +| | Reconciler | Watcher | +| --------------- | ---------------------------------------------------- | ----------------------- | +| **Use case** | Continuous state reconciliation, finalizers, retries | One-time event handling | +| **Persistence** | Queued, survives restarts | In-memory only | +| **Concurrency** | Configurable worker count | Single threaded | +| **Retry** | Built-in exponential backoff | No retry | diff --git a/.agents/skills/halo-plugin-dev/references/server-search.md b/.agents/skills/halo-plugin-dev/references/server-search.md new file mode 100644 index 0000000..c5c4a16 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/server-search.md @@ -0,0 +1,123 @@ +# Search Integration + +Integrate custom extensions with Halo's built-in search engine. + +> Source: [HaloDocument](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/search/HaloDocument.java) | [HaloDocumentsProvider](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/search/HaloDocumentsProvider.java) | [SearchEngine](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/search/SearchEngine.java) + +## HaloDocumentsProvider + +Implement this extension point to make your custom Extension searchable. + +```java +@Component +public class MyDocumentProvider implements HaloDocumentsProvider { + + private final ReactiveExtensionClient client; + + public MyDocumentProvider(ReactiveExtensionClient client) { + this.client = client; + } + + @Override + public Flux fetchAll() { + return client.listAll(MyExtension.class, new ListOptions(), Sort.unsorted()) + .filter(ext -> ext.getMetadata().getDeletionTimestamp() == null) + .map(this::convertToDocument); + } + + @Override + public String getType() { + return "myextension.mygroup.halo.run"; + } + + private HaloDocument convertToDocument(MyExtension ext) { + var doc = new HaloDocument(); + doc.setId(ext.getMetadata().getName()); + doc.setMetadataName(ext.getMetadata().getName()); + doc.setTitle(ext.getSpec().getTitle()); + doc.setDescription(ext.getSpec().getDescription()); + doc.setContent(stripHtml(ext.getSpec().getContent())); + doc.setOwnerName(ext.getSpec().getOwner()); + doc.setCreationTimestamp(ext.getMetadata().getCreationTimestamp()); + doc.setUpdateTimestamp(ext.getMetadata().getCreationTimestamp()); + doc.setPermalink("/my-extensions/" + ext.getSpec().getSlug()); + doc.setType(getType()); + doc.setPublished(true); + doc.setRecycled(false); + doc.setExposed(true); + return doc; + } +} +``` + +## Search Events + +Publish events to add/remove documents from the search index: + +```java +// Add or update documents +applicationEventPublisher.publishEvent( + new HaloDocumentAddRequestEvent(this, List.of(haloDoc))); + +// Delete documents by ID +applicationEventPublisher.publishEvent( + new HaloDocumentDeleteRequestEvent(this, List.of("doc-id-1", "doc-id-2"))); + +// Rebuild entire index (e.g., on plugin config change) +applicationEventPublisher.publishEvent( + new HaloDocumentRebuildRequestEvent(this)); +``` + +## SearchEngine (Replacing Default) + +To replace Halo's default search engine (e.g., with Meilisearch): + +```java +@Component +public class MeilisearchEngine implements SearchEngine { + + @Override + public boolean available() { + return meilisearchClient != null && meilisearchClient.isHealthy(); + } + + @Override + public void addOrUpdate(Iterable docs) { + // Batch index documents + } + + @Override + public void deleteDocument(Iterable ids) { + // Batch delete by ID + } + + @Override + public void deleteAll() { + // Clear index + } + + @Override + public SearchResult search(SearchOption option) { + // Execute search query + } +} +``` + +## HaloDocument Fields + +| Field | Description | Required | +| --------------------------------------- | ---------------------------- | -------- | +| `id` | Global unique document ID | Yes | +| `metadataName` | Extension metadata name | Yes | +| `title` | Document title | Yes | +| `content` | Plain text content (no HTML) | Yes | +| `description` | Short description | No | +| `permalink` | URL path | Yes | +| `type` | Document type identifier | Yes | +| `ownerName` | Owner metadata name | Yes | +| `categories` | Category metadata names | No | +| `tags` | Tag metadata names | No | +| `published` | Whether published | Yes | +| `recycled` | Whether in recycle bin | Yes | +| `exposed` | Whether publicly visible | Yes | +| `creationTimestamp` / `updateTimestamp` | Timestamps | Yes | diff --git a/.agents/skills/halo-plugin-dev/references/server-security.md b/.agents/skills/halo-plugin-dev/references/server-security.md new file mode 100644 index 0000000..1195d2b --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/server-security.md @@ -0,0 +1,179 @@ +# RBAC & Role Templates + +> ⚠️ **Not all plugins need to create RoleTemplate resources.** All plugin APIs are restricted to super-admin by default. If your plugin is intended for super-admin use only, there is no need to create or configure RoleTemplates at all. +> +> Only create RoleTemplates in the following scenarios: +> +> - When certain APIs need to be accessible to other roles (e.g., editor, contributor) +> - When certain APIs need to be publicly accessible to unauthenticated users (anonymous) +> - When the plugin UI requires role-based permission controls + +All plugin APIs (auto-generated CRUD + custom) are restricted to super-admin by default. To allow other users access, define **role templates**. + +> Source references (Halo main branch): +> +> - [Role template anonymous](https://github.com/halo-dev/halo/blob/main/application/src/main/resources/extensions/role-template-anonymous.yaml) +> - [Role template authenticated](https://github.com/halo-dev/halo/blob/main/application/src/main/resources/extensions/role-template-authenticated.yaml) +> - [Plugin photos role templates (production example)](https://github.com/halo-sigs/plugin-photos/blob/main/src/main/resources/extensions/roleTemplate.yaml) + +## Role Template File + +Place YAML files in `src/main/resources/extensions/`. + +```yaml +apiVersion: v1alpha1 +kind: Role +metadata: + name: my-plugin-role-view-persons + labels: + halo.run/role-template: "true" + annotations: + rbac.authorization.halo.run/module: "Persons Management" + rbac.authorization.halo.run/display-name: "View Persons" + rbac.authorization.halo.run/ui-permissions: | + ["plugin:my-plugin:person:view"] +rules: + - apiGroups: ["my-plugin.halo.run"] + resources: ["my-plugin/persons"] + verbs: ["get", "list"] +--- +apiVersion: v1alpha1 +kind: Role +metadata: + name: my-plugin-role-manage-persons + labels: + halo.run/role-template: "true" + annotations: + rbac.authorization.halo.run/dependencies: | + ["my-plugin-role-view-persons"] + rbac.authorization.halo.run/module: "Persons Management" + rbac.authorization.halo.run/display-name: "Manage Persons" + rbac.authorization.halo.run/ui-permissions: | + ["plugin:my-plugin:person:manage"] +rules: + - apiGroups: ["my-plugin.halo.run"] + resources: ["my-plugin/persons"] + verbs: ["*"] +``` + +## Key Rules + +| Element | Description | +| -------------------------------------------------------- | -------------------------------------------------- | +| `metadata.name` | Must use plugin name as prefix to avoid collisions | +| `labels.halo.run/role-template: "true"` | Required to mark as template | +| `annotations.rbac.authorization.halo.run/dependencies` | Other roles this role requires | +| `annotations.rbac.authorization.halo.run/module` | UI grouping name | +| `annotations.rbac.authorization.halo.run/display-name` | Human-readable name | +| `annotations.rbac.authorization.halo.run/ui-permissions` | Frontend permission strings | + +## Resource Rules + +For APIs matching `/apis///[//]`: + +```yaml +rules: + - apiGroups: ["my-plugin.halo.run"] + resources: ["my-plugin/persons"] + resourceNames: ["zhangsan"] # optional, for single resource + verbs: ["get", "list"] +``` + +## Non-Resource Rules + +For APIs not matching resource patterns (e.g., `/healthz`): + +```yaml +rules: + - nonResourceURLs: ["/healthz", "/healthz/*"] + verbs: ["get"] +``` + +## Verbs + +| Verb | HTTP Method | Description | +| ------------------ | --------------- | --------------------------------------- | +| `create` | POST | Create new resource | +| `get` | GET | Get single resource (with name in path) | +| `list` | GET | List resources (without name in path) | +| `watch` | GET (WebSocket) | Watch resource changes | +| `update` | PUT | Full update | +| `patch` | PATCH | Partial update | +| `delete` | DELETE | Delete single resource | +| `deletecollection` | DELETE | Delete collection | + +## Aggregation + +Merge plugin permissions into existing Halo roles: + +```yaml +metadata: + labels: + halo.run/role-template: "true" + halo.run/hidden: "true" # hide from UI + rbac.authorization.halo.run/aggregate-to-anonymous: "true" +rules: + - apiGroups: ["api.my-plugin.halo.run"] + resources: ["public-data"] + verbs: ["get", "list"] +``` + +Available aggregation targets: `anonymous`, `authenticated`, `editor`, etc. + +## Special Roles + +| Role | Description | +| --------------- | -------------------------------------------------------- | +| `anonymous` | Unauthenticated visitors | +| `authenticated` | All logged-in users (minimum permissions) | +| `super-role` | Full system access | +| `guest` | No explicit permissions (only anonymous + authenticated) | + +## Web Filters + +Add custom WebFlux filters for request interception. + +```java +@Component +public class MyFilter implements AdditionalWebFilter { + @Override + public int getOrder() { return Ordered.LOWEST_PRECEDENCE; } + + @Override + public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { + // Runs before security chain + return chain.filter(exchange); + } +} +``` + +`AfterSecurityWebFilter` runs after the security chain (for caching, analytics, etc.). + +## ReactiveSecurityContextHolder + +Access the current authentication in reactive code: + +```java +ReactiveSecurityContextHolder.getContext() + .map(SecurityContext::getAuthentication) + .map(Authentication::getName) + .defaultIfEmpty(AnonymousUserConst.PRINCIPAL); +``` + +## UI Permissions + +Used in frontend route guards: + +```ts +meta: { + permissions: ["plugin:my-plugin:person:view"]; +} +``` + +Check at runtime: + +```ts +import { utils } from "@halo-dev/ui-shared"; + +utils.permission.has(["plugin:my-plugin:person:view"]); // true/false +``` diff --git a/.agents/skills/halo-plugin-dev/references/server-shared-beans.md b/.agents/skills/halo-plugin-dev/references/server-shared-beans.md new file mode 100644 index 0000000..303c484 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/server-shared-beans.md @@ -0,0 +1,339 @@ +# Shared Beans (Dependency Injection) + +Halo exposes several core beans that any plugin can inject via constructor injection. + +> Source references (Halo main branch): +> +> - [ReactiveExtensionClient](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/ReactiveExtensionClient.java) +> - [ExtensionClient](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/ExtensionClient.java) +> - [SchemeManager](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/SchemeManager.java) +> - [ExtensionGetter](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/plugin/extensionpoint/ExtensionGetter.java) +> - [UserService](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/core/user/service/UserService.java) +> - [RoleService](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/core/user/service/RoleService.java) +> - [AttachmentService](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/core/extension/service/AttachmentService.java) +> - [PostContentService](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/content/PostContentService.java) +> - [ExternalLinkProcessor](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/infra/ExternalLinkProcessor.java) +> - [ExternalUrlSupplier](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/infra/ExternalUrlSupplier.java) +> - [NotificationReasonEmitter](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/notification/NotificationReasonEmitter.java) +> - [NotificationCenter](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/notification/NotificationCenter.java) +> - [CryptoService](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/security/authentication/CryptoService.java) +> - [RateLimiterRegistry](https://github.com/resilience4j/resilience4j/blob/master/resilience4j-ratelimiter/src/main/java/io/github/resilience4j/ratelimiter/RateLimiterRegistry.java) +> - [ReactiveSettingFetcher](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/plugin/ReactiveSettingFetcher.java) +> - [SettingFetcher](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/plugin/SettingFetcher.java) +> - [PluginConfigUpdatedEvent](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/plugin/PluginConfigUpdatedEvent.java) +> - [JsonUtils](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/infra/utils/JsonUtils.java) +> - [ExtensionUtil](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/ExtensionUtil.java) +> - [MetadataUtil](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/MetadataUtil.java) +> - [PageRequestImpl](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/extension/PageRequestImpl.java) +> - [SortResolver](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/core/extension/endpoint/SortResolver.java) +> - [AnonymousUserConst](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/infra/AnonymousUserConst.java) + +## Docs Routing + +This file lists frequently used beans, not every injectable type in Halo. For +method signatures and newer APIs, verify against the official docs or source +before coding. + +| Need | Official docs | +| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | +| ExtensionClient / ReactiveExtensionClient | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/extension-client.md | +| ExtensionGetter and extension points | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/extension-getter.md | +| SettingFetcher / ReactiveSettingFetcher | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/setting-fetcher.md | +| Notifications | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/notification.md | +| Reverse proxy helpers | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/reverseproxy.md | +| WebSocket helpers | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/websocket.md | +| Login handler enhancement | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/login-handler-enhancer.md | +| Template and finder helpers for themes | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/template-for-theme.md | + +When working from a local docs checkout, use the same paths under +`docs/developer-guide/...`; versioned docs live under +`versioned_docs/version-2.25/...`. + +## Quick Index + +- Custom model CRUD: [ReactiveExtensionClient](#reactiveextensionclient) +- Blocking model CRUD: [ExtensionClient](#extensionclient) +- Extension point lookup: [ExtensionGetter](#extensiongetter) +- Plugin settings: [SettingFetcher / ReactiveSettingFetcher](#settingfetcher--reactivesettingfetcher) +- Notifications: [Notifications](#notifications) +- JSON helpers: [JsonUtils](#jsonutils) + +## ReactiveExtensionClient + +Reactive CRUD for custom extensions. + +```java +private final ReactiveExtensionClient client; + +// List with options +client.listBy(Person.class, query.toListOptions(), query.toPageRequest()); + +// Get by name +client.fetch(Person.class, "person-name"); + +// Create +client.create(person); + +// Update +client.update(person); + +// Delete +client.delete(person); +``` + +## ExtensionClient + +Blocking version of `ReactiveExtensionClient`. Use only in non-NIO threads (e.g., background tasks). + +## SchemeManager + +Register/unregister custom extension types. + +```java +schemeManager.register(Person.class); +schemeManager.register(Person.class, indexSpecs -> { /* ... */ }); +schemeManager.unregister(Scheme.buildFromType(Person.class)); +``` + +## ExtensionGetter + +Retrieve implementations of an extension point. + +```java +private final ExtensionGetter extensionGetter; + +// Get all implementations +extensionGetter.getExtensions(AttachmentHandler.class); +``` + +## UserService + +User operations: get info, update password, create users. + +## ReactiveUserDetailsService + +```java +Mono findByUsername(String username); +``` + +## RoleService + +Role operations: query roles, bindings, dependencies. + +## AttachmentService + +Upload, delete, get access URLs for attachments. + +## PostContentService + +Get post content with version management. + +```java +postContentService.getHeadContent(postName); // latest draft +postContentService.getReleaseContent(postName); // published version +postContentService.getSpecifiedContent(snapshotName); +postContentService.listSnapshots(postName); +``` + +## ExternalLinkProcessor + +Convert relative URLs to absolute using configured `externalUrl`. + +```java +externalLinkProcessor.processLink("/post/1"); +// -> "https://example.com/post/1" +``` + +## ExternalUrlSupplier + +Get the configured external URL. + +## NotificationReasonEmitter / NotificationCenter + +Send notifications and manage subscriptions. + +## ServerSecurityContextRepository + +Access authentication context. Required if your filter runs before Spring Security's `ReactorContextWebFilter`. + +## CryptoService + +Decrypt login passwords or reuse the public key. + +```java +cryptoService.readPublicKey(); +cryptoService.decrypt(encryptedPassword); +``` + +## RateLimiterRegistry + +Create rate limiters (remember to clean up in `stop()`). + +```java +var rateLimiter = rateLimiterRegistry.rateLimiter(key, + new RateLimiterConfig.Builder() + .limitForPeriod(1) + .limitRefreshPeriod(Duration.ofSeconds(60)) + .build()); +``` + +## SystemInfoGetter (Halo 2.20.11+) + +```java +Mono info = systemInfoGetter.get(); +// Contains: title, subtitle, logo, favicon, url, version, seo, locale, timeZone, activatedThemeName +``` + +## ReactiveSettingFetcher / SettingFetcher + +Fetch plugin configuration defined in `plugin.yaml` (`settingName` / `configMapName`). +The fetcher caches values internally and auto-refreshes when configuration changes. + +**Reactive (WebFlux):** + +```java +private final ReactiveSettingFetcher settingFetcher; + +// Fetch a typed config object by group name +settingFetcher.fetch("seo", SeoSetting.class) + .doOnNext(seo -> { ... }); + +// Get raw JsonNode by group +settingFetcher.getSettingValue("seo"); + +// Get all groups as a map +settingFetcher.getSettingValues(); +``` + +**Blocking (background tasks / non-reactive code):** + +```java +private final SettingFetcher settingFetcher; + +Optional seo = settingFetcher.fetch("seo", SeoSetting.class); +JsonNode raw = settingFetcher.getSettingValue("seo"); +Map all = settingFetcher.getSettingValues(); +``` + +**Listen for config changes:** + +```java +@EventListener +public void onConfigUpdated(PluginConfigUpdatedEvent event) { + if (event.getNewConfig().containsKey("seo")) { + // re-apply configuration + } +} +``` + +> **Prerequisite**: In `plugin.yaml`, declare `settingName: my-settings` and `configMapName: my-configmap`, and create a corresponding `settings.yaml` extension resource defining the form schema and groups. + +## JsonUtils + +JSON serialization/deserialization utilities. + +> Note: `@Deprecated(forRemoval = true, since = "2.23.0")` — prefer `tools.jackson.databind.json.JsonMapper` in newer Halo versions. + +```java +// Object to JSON string +String json = JsonUtils.objectToJson(myObject); + +// JSON string to object +MyObject obj = JsonUtils.jsonToObject(json, MyObject.class); + +// JSON string with generics +Set tags = JsonUtils.jsonToObject(json, new TypeReference<>() {}); + +// Map to object +MyObject obj = JsonUtils.mapToObject(map, MyObject.class); + +// Deep copy +MyObject copy = JsonUtils.deepCopy(original); + +// Access the underlying ObjectMapper +ObjectMapper mapper = JsonUtils.mapper(); +mapper.convertValue(data, new TypeReference<>() {}); +``` + +## ExtensionUtil / MetadataUtil + +Utility methods for Extension lifecycle and metadata. + +```java +// Check deletion state +boolean deleted = ExtensionUtil.isDeleted(extension); + +// Query for non-deleted resources (for ListOptions) +ListOptions.builder().fieldQuery(ExtensionUtil.notDeleting()).build(); + +// Finalizer management +ExtensionUtil.addFinalizers(metadata, Set.of("my-plugin/finalizer")); +ExtensionUtil.removeFinalizers(metadata, Set.of("my-plugin/finalizer")); + +// Default sort: creationTimestamp desc, name asc +Sort sort = ExtensionUtil.defaultSort(); + +// Safe metadata access (auto-initializes null collections) +Map labels = MetadataUtil.nullSafeLabels(extension); +Map annotations = MetadataUtil.nullSafeAnnotations(extension); +``` + +## PageRequestImpl / PageRequest + +Pagination for list queries. Page numbers are **1-based**. + +```java +// Basic pagination +PageRequestImpl.of(page, size); // page >= 1, size <= 1000 +PageRequestImpl.of(page, size, Sort.by("name")); +PageRequestImpl.ofSize(size); // page 1, given size + +// With sorting +PageRequestImpl.of(1, 20, Sort.by( + Sort.Order.desc("metadata.creationTimestamp"), + Sort.Order.asc("metadata.name") +)); +``` + +## SortResolver / SortableRequest + +Resolve sorting from HTTP query parameters. + +```java +// In a CustomEndpoint handler +Sort sort = SortResolver.defaultInstance.resolve(exchange); + +// Or extend SortableRequest for standardized list queries +public class MyQuery extends SortableRequest { + public MyQuery(ServerWebExchange exchange) { super(exchange); } + + public ListOptions toListOptions() { + return labelAndFieldSelectorToListOptions(getLabelSelector(), getFieldSelector()); + } +} + +// Usage +MyQuery query = new MyQuery(request.exchange()); +client.listBy(MyExtension.class, query.toListOptions(), query.toPageRequest()); +``` + +Query parameter format: `?sort=field,asc` or `?sort=field,desc`. Multiple sorts: `?sort=field1,asc&sort=field2,desc`. + +## AnonymousUserConst + +Check for anonymous users: + +```java +if (AnonymousUserConst.isAnonymousUser(authentication.getName())) { + // Handle anonymous user +} +// Constants: AnonymousUserConst.PRINCIPAL ("anonymousUser"), AnonymousUserConst.Role ("anonymous") +``` + +## BackupRootGetter / PluginsRootGetter + +`Supplier` for backup directory and plugin directory. + +## LoginHandlerEnhancer + +Hook into login success/failure for custom logic. diff --git a/.agents/skills/halo-plugin-dev/references/theme-content-handler.md b/.agents/skills/halo-plugin-dev/references/theme-content-handler.md new file mode 100644 index 0000000..daca1a8 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/theme-content-handler.md @@ -0,0 +1,57 @@ +# Content Handlers (Post / SinglePage) + +Intercept and modify rendered post/page HTML before it reaches the theme. + +> Source: [ReactivePostContentHandler](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/theme/ReactivePostContentHandler.java) | [ReactiveSinglePageContentHandler](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/theme/ReactiveSinglePageContentHandler.java) + +## ReactivePostContentHandler + +```java +@Component +public class MyPostContentHandler implements ReactivePostContentHandler { + + @Override + public Mono handle(PostContentContext postContent) { + var content = postContent.getContent(); + + // Modify HTML content + var modified = content.replace("

", "

"); + + return Mono.just(postContent.toBuilder() + .content(modified) + .build()); + } +} +``` + +## ReactiveSinglePageContentHandler + +```java +@Component +public class MyPageContentHandler implements ReactiveSinglePageContentHandler { + + @Override + public Mono handle(SinglePageContentContext pageContent) { + // Same pattern as PostContentHandler + return Mono.just(pageContent); + } +} +``` + +## Context Fields + +| Field | Type | Description | +| --------------------- | --------------------- | ---------------------------------- | +| `post` / `singlePage` | `Post` / `SinglePage` | The extension object | +| `content` | `String` | Rendered HTML content (modifiable) | +| `raw` | `String` | Raw source content | +| `rawType` | `String` | Content format (e.g., `markdown`) | + +## Common Use Cases + +- Inject diagram rendering (Mermaid, text-diagram) +- Add anchor links to headings +- Wrap code blocks with copy buttons +- Process custom shortcodes +- Add lazy loading to images +- Watermark injection diff --git a/.agents/skills/halo-plugin-dev/references/theme-head-processor.md b/.agents/skills/halo-plugin-dev/references/theme-head-processor.md new file mode 100644 index 0000000..44b7b0e --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/theme-head-processor.md @@ -0,0 +1,68 @@ +# TemplateHeadProcessor + +Inject scripts, styles, or meta tags into the theme's `` section. + +> Source: [TemplateHeadProcessor](https://github.com/halo-dev/halo/blob/main/api/src/main/java/run/halo/app/theme/dialect/TemplateHeadProcessor.java) + +## Usage + +```java +@Component +public class MyHeadProcessor implements TemplateHeadProcessor { + + private final ReactiveSettingFetcher settingFetcher; + + public MyHeadProcessor(ReactiveSettingFetcher settingFetcher) { + this.settingFetcher = settingFetcher; + } + + @Override + public Mono process(ITemplateContext context, IModel model, + IElementModelStructureHandler structureHandler) { + return settingFetcher.fetch("basic", MyConfig.class) + .flatMap(config -> { + if (!config.isEnabled()) { + return Mono.empty(); + } + // Add script tag to + var script = createScriptTag(config.getTrackingId()); + model.add(script); + return Mono.empty(); + }) + .then(); + } + + private IModel createScriptTag(String trackingId) { + // Build Thymeleaf model with script element + var modelFactory = new ModelFactory(); + var script = modelFactory.createOpenElementTag("script"); + // ... configure attributes + var model = modelFactory.createModel(); + model.add(script); + return model; + } +} +``` + +## Ordering + +Use `@Order` to control execution order. Higher values execute first, allowing later processors to override earlier ones. + +```java +@Component +@Order(100) // Higher = earlier +public class HighPriorityHeadProcessor implements TemplateHeadProcessor { ... } + +@Component +@Order(200) // Lower = later, can override above +public class LowPriorityHeadProcessor implements TemplateHeadProcessor { ... } +``` + +## Common Use Cases + +- Analytics tracking (Google Analytics, Plausible) +- Code highlighting (highlight.js, Prism, Shiki) +- Math rendering (KaTeX, MathJax) +- SEO meta tags (OpenGraph, Twitter Cards) +- Custom CSS/JS injection +- Comment widgets diff --git a/.agents/skills/halo-plugin-dev/references/theme-integration.md b/.agents/skills/halo-plugin-dev/references/theme-integration.md new file mode 100644 index 0000000..fd2f7d7 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/theme-integration.md @@ -0,0 +1,199 @@ +# Theme Integration + +Plugins can provide data and pages to the theme frontend via Finder APIs, Thymeleaf templates, and reverse proxies. + +> - [Finder for theme (official docs)](https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/finder-for-theme.md) +> - [Template for theme (official docs)](https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/template-for-theme.md) +> - [Plugin photos Finder example](https://github.com/halo-sigs/plugin-photos/blob/main/src/main/java/run/halo/photos/finders/PhotoFinder.java) + +## Finder API + +A **Finder** is a Java class annotated with `@Component` that exposes methods callable from Thymeleaf templates. + +### Creating a Finder + +```java +package com.example.myplugin.finders; + +import org.springframework.stereotype.Component; +import reactor.core.publisher.Mono; +import run.halo.app.extension.ReactiveExtensionClient; +import run.halo.app.theme.finders.Finder; + +@Component +@Finder("myPlugin") // Template variable name: ${myPlugin} +public class MyPluginFinder { + + private final ReactiveExtensionClient client; + + public MyPluginFinder(ReactiveExtensionClient client) { + this.client = client; + } + + public Mono> listPersons(int page, int size) { + return client.listBy(Person.class, + ListOptions.builder().build(), + PageRequestImpl.of(page, size)); + } + + public Mono getPerson(String name) { + return client.fetch(Person.class, name); + } +} +``` + +### Using in Templates + +```html + +
    +
  • +
+ + +
+

+
+``` + +## Thymeleaf Templates + +Place templates in `src/main/resources/templates/`: + +``` +src/main/resources/ + templates/ + my-page.html # Accessible as a route + modules/ + my-widget.html # Partial templates +``` + +Use in a template: + +```html +
+``` + +## Reverse Proxy + +Serve plugin static resources or proxy external APIs through Halo: + +Create `src/main/resources/extensions/reverseProxy.yaml`: + +```yaml +apiVersion: plugin.halo.run/v1alpha1 +kind: ReverseProxy +metadata: + name: my-plugin-reverse-proxy +rules: + - path: /assets + file: + directory: static/dist # relative to src/main/resources/ + - path: /api/proxy + url: + url: http://localhost:8080 +``` + +Access at: `/plugins/{plugin-name}/assets/...` + +## Static Resources + +Place static files in `src/main/resources/static/`: + +``` +src/main/resources/ + static/ + dist/ + main.css + main.js +``` + +Access at: `/plugins/{plugin-name}/assets/dist/main.css` + +## Template Variables + +Plugins can contribute global template variables via a `TemplateModel` bean: + +```java +@Component +public class MyTemplateModel implements TemplateModel { + + @Override + public String getVariableName() { + return "myPluginData"; + } + + @Override + public Mono getValue() { + return Mono.just(Map.of("version", "1.0.0")); + } +} +``` + +Then in any template: + +```html +
+``` + +## CommentSubject + +Enable Halo's comment system on your custom Extension: + +```java +@Component +public class MyCommentSubject implements CommentSubject { + + private final ReactiveExtensionClient client; + + public MyCommentSubject(ReactiveExtensionClient client) { + this.client = client; + } + + @Override + public Mono get(String name) { + return client.fetch(MyExtension.class, name) + .switchIfEmpty(Mono.error(() -> new NotFoundException("Not found"))); + } + + @Override + public Mono getSubjectDisplay(String name) { + return get(name).map(ext -> new SubjectDisplay( + ext.getSpec().getTitle(), + "/my-extensions/" + ext.getSpec().getSlug(), + "My Extension" + )); + } + + @Override + public boolean supports(Ref ref) { + return GroupVersionKind.fromExtension(MyExtension.class).equals(ref.getGroupVersionKind()); + } +} +``` + +Also add a role template aggregating `comment` permissions to `anonymous`: + +```yaml +metadata: + labels: + halo.run/role-template: "true" + halo.run/hidden: "true" + rbac.authorization.halo.run/aggregate-to-anonymous: "true" +rules: + - apiGroups: ["my-plugin.halo.run"] + resources: ["my-extensions/comments"] + verbs: ["create", "list"] +``` + +## URL Conventions for Public APIs + +When building APIs consumed by the theme: + +``` +/apis/api.{group}/{version}/{resource} +``` + +Example: `/apis/api.my-plugin.halo.run/v1alpha1/persons` + +These should have role templates aggregated to `anonymous` for public access. diff --git a/.agents/skills/halo-plugin-dev/references/ui-api-request.md b/.agents/skills/halo-plugin-dev/references/ui-api-request.md new file mode 100644 index 0000000..7b84aab --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-api-request.md @@ -0,0 +1,200 @@ +# API Requests in Plugin UI + +Halo provides `@halo-dev/api-client` for making API calls from plugin Vue/TypeScript code. + +## Installation + +```bash +pnpm install @halo-dev/api-client axios +``` + +> `@halo-dev/ui-plugin-bundler-kit@2.17.0+` already excludes `@halo-dev/api-client` and `axios` from the bundle — the final build will use Halo's own copies. If using these versions, set `spec.requires: ">=2.17.0"` in `plugin.yaml`. + +## Built-in API Clients + +`@halo-dev/api-client` exports pre-configured clients for Halo's built-in APIs. They handle base URL, auth, error handling (login expiry, permission denied), etc. + +```ts +import { + coreApiClient, // CRUD for all Extensions + consoleApiClient, // Console APIs + ucApiClient, // User Center APIs + publicApiClient, // Public APIs + axiosInstance, // Raw axios instance +} from "@halo-dev/api-client"; +``` + +## Error Handling + +Halo adds global response interceptors to the shared Axios instance used by `@halo-dev/api-client`. Request failures from `coreApiClient`, `consoleApiClient`, `ucApiClient`, `publicApiClient`, generated clients constructed with `axiosInstance`, or direct `axiosInstance` calls already show Halo-managed error toasts. + +- Do not add local `try/catch`, `catch`, or `useMutation.onError` handlers that call `Toast.error` / `Toast.warning` for those Axios request failures. Doing so can show duplicate toasts. +- Keep local toasts for non-Axios errors such as client-side validation, parsing failures, missing local prerequisites, or domain-specific messages created before a request is sent. +- If a handler must run cleanup or custom logic after a failed request, guard Axios errors with `isAxiosError` and do not toast them locally. + +```ts +import { Toast } from "@halo-dev/components"; +import { isAxiosError } from "axios"; + +function toastNonAxiosError(error: unknown) { + if (isAxiosError(error)) { + return; + } + + Toast.error(error instanceof Error ? error.message : "Operation failed"); +} +``` + +### coreApiClient (Extension CRUD) + +```ts +// List posts +const { data } = await coreApiClient.content.post.listPost({ + page: 1, + size: 10, + sort: ["spec.publishTime,desc"], +}); + +// Get a config map +const { data: configMap } = await coreApiClient.extension.configMap.getv1alpha1ConfigMap({ + name: "my-plugin-configmap", +}); +``` + +### consoleApiClient / ucApiClient / publicApiClient + +```ts +// Console: list attachments +const { data } = await consoleApiClient.attachment.listAttachments({ + page: 1, + size: 20, +}); + +// UC: get current user notifications +const { data } = await ucApiClient.notification.listNotifications(); + +// Public: search +const { data } = await publicApiClient.post.searchPost({ keyword: "halo" }); +``` + +## Calling Plugin Custom APIs + +For APIs defined by your plugin (CustomEndpoint, @Controller, etc.), use the raw `axiosInstance`: + +```ts +import { axiosInstance } from "@halo-dev/api-client"; + +// GET custom endpoint +const { data } = await axiosInstance.get("/apis/console.api.my-plugin.halo.run/v1alpha1/items"); + +// POST with body +await axiosInstance.post("/apis/console.api.my-plugin.halo.run/v1alpha1/items", { + name: "new-item", +}); + +// Custom query params +const { data } = await axiosInstance.get("/apis/api.my-plugin.halo.run/v1alpha1/public/items", { + params: { page: 1, size: 10 }, +}); +``` + +## Generated API Client (Recommended for Plugin APIs) + +For plugin-defined APIs, use the DevTools `generateApiClient` Gradle task to generate a typed TypeScript client from your OpenAPI spec. + +### 1. Configure OpenAPI grouping in `build.gradle` + +```groovy +haloPlugin { + openApi { + groupingRules { + extensionApis { + displayName = 'Extension API for MyPlugin' + pathsToMatch = ['/apis/my-plugin.halo.run/v1alpha1/**'] + } + } + groupedApiMappings = [ + '/v3/api-docs/extensionApis': 'extensionApis.json' + ] + generator { + outputDir = file("${projectDir}/ui/src/api/generated") + additionalProperties = [ + useES6: true, + useSingleRequestParameter: true, + withSeparateModelsAndApi: true, + apiPackage: "api", + modelPackage: "models" + ] + typeMappings = [ + set: "Array" + ] + } + } +} +``` + +### 2. Generate the client + +```bash +./gradlew generateApiClient +``` + +### 3. Use the generated client with `axiosInstance` + +```ts +import { axiosInstance } from "@halo-dev/api-client"; +import { MyResourceV1alpha1Api } from "./api/generated"; + +const api = new MyResourceV1alpha1Api(undefined, "", axiosInstance); + +// List with typed parameters +const { data } = await api.listMyResources({ page: 1, size: 10 }); + +// Create with typed body +await api.createMyResource({ myResource: { ... } }); +``` + +> The generated client needs `axiosInstance` as its third constructor argument so it uses Halo's pre-configured axios (with auth, base URL, error handling). + +## Data Fetching with `@tanstack/vue-query` + +For managing server state (caching, refetching, mutations) in plugin Vue components, use `@tanstack/vue-query`. + +> **Version warning:** Halo plugins currently use **v4** of `@tanstack/vue-query` (e.g. `^4.44.0`). Do **not** install v5 — the API is incompatible. + +```bash +pnpm install @tanstack/vue-query@^4.44.0 +``` + +Halo's plugin runtime already provides `VueQueryPlugin` setup — plugin code can use `useQuery` / `useMutation` directly without additional configuration. + +### Usage Example + +```vue + +``` + +> Use `useQuery` for read operations and `useMutation` + `queryClient.invalidateQueries()` for create/update/delete operations. + +## When to Use Which + +| Approach | Use for | Example | +| ------------------------------------- | ---------------------------- | ----------------------------------- | +| `coreApiClient` / `consoleApiClient` | Halo built-in APIs | List posts, fetch users | +| `axiosInstance` directly | Ad-hoc plugin API calls | Simple GET/POST to custom endpoints | +| `generateApiClient` + `axiosInstance` | Plugin APIs with type safety | Full CRUD on your custom Extension | +| `@tanstack/vue-query` + API clients | Server state in Vue UI | Cached lists, mutations, loading UI | diff --git a/.agents/skills/halo-plugin-dev/references/ui-build.md b/.agents/skills/halo-plugin-dev/references/ui-build.md new file mode 100644 index 0000000..53ae939 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-build.md @@ -0,0 +1,173 @@ +# UI Build (@halo-dev/ui-plugin-bundler-kit) + +Halo plugins use `@halo-dev/ui-plugin-bundler-kit` to build Vue/TypeScript frontend code into `main.js` + `style.css`. + +> - [NPM: @halo-dev/ui-plugin-bundler-kit](https://www.npmjs.com/package/@halo-dev/ui-plugin-bundler-kit) +> - [NPM: @halo-dev/ui-shared](https://www.npmjs.com/package/@halo-dev/ui-shared) +> - [NPM: @halo-dev/api-client](https://www.npmjs.com/package/@halo-dev/api-client) + +## Build Tool Options + +| Feature | Vite | Rsbuild (recommended for complex plugins) | +| ----------------- | --------- | ----------------------------------------- | +| Code splitting | Limited | Excellent | +| Build performance | Good | Excellent | +| Vue ecosystem | Excellent | Good | +| Dev experience | Excellent | Excellent | +| Dynamic imports | Limited | Excellent | + +## Vite Setup + +```bash +pnpm install @halo-dev/ui-plugin-bundler-kit@2.22.0 vite -D +``` + +```ts +// vite.config.ts +import { viteConfig } from "@halo-dev/ui-plugin-bundler-kit"; + +export default viteConfig(); +``` + +```json +// package.json +{ + "type": "module", + "scripts": { + "dev": "vite build --watch --mode=development", + "build": "vite build" + } +} +``` + +### With Customizations + +```ts +import { viteConfig } from "@halo-dev/ui-plugin-bundler-kit"; +import path from "path"; + +export default viteConfig({ + vite: { + resolve: { + alias: { + "@": path.resolve(__dirname, "src"), + }, + }, + plugins: [ + // Additional Vite plugins (Vue plugin is pre-configured) + ], + }, +}); +``` + +## Rsbuild Setup + +```bash +pnpm install @halo-dev/ui-plugin-bundler-kit@2.22.0 @rsbuild/core -D +``` + +```ts +// rsbuild.config.ts +import { rsbuildConfig } from "@halo-dev/ui-plugin-bundler-kit"; + +export default rsbuildConfig(); +``` + +```json +// package.json +{ + "type": "module", + "scripts": { + "dev": "rsbuild build --env-mode development --watch", + "build": "rsbuild build" + } +} +``` + +### With Customizations + +```ts +import { rsbuildConfig } from "@halo-dev/ui-plugin-bundler-kit"; + +export default rsbuildConfig({ + rsbuild: { + source: { + alias: { + "@": "./src", + }, + }, + plugins: [ + // Additional Rsbuild plugins + ], + }, +}); +``` + +## Output Directories + +| Environment | Output Path | +| ----------- | ----------------------------------------------------------------------------------------- | +| Development | `build/resources/main/console/` | +| Production | `ui/build/dist/` (temporary, Gradle copies to `src/main/resources/console/` during build) | + +## Dynamic Imports (Rsbuild) + +```ts +import { definePlugin } from "@halo-dev/ui-shared"; +import { defineAsyncComponent } from "vue"; +import { VLoading } from "@halo-dev/components"; + +export default definePlugin({ + routes: [ + { + parentName: "Root", + route: { + path: "heavy-page", + name: "HeavyPage", + component: defineAsyncComponent({ + loader: () => import("./views/HeavyPage.vue"), + loadingComponent: VLoading, + }), + }, + }, + ], +}); +``` + +## Gradle Integration + +In the root `build.gradle`: + +```groovy +tasks.register('processUiResources', Copy) { + from project(':ui').layout.buildDirectory.dir('dist') + into layout.buildDirectory.dir('resources/main/console') + dependsOn project(':ui').tasks.named('assemble') + shouldRunAfter tasks.named('processResources') +} + +tasks.named('classes') { + dependsOn tasks.named('processUiResources') +} +``` + +In `ui/build.gradle`: + +```groovy +plugins { + id 'base' + id "com.github.node-gradle.node" version "7.1.0" +} + +tasks.register('buildFrontend', PnpmTask) { + group = 'build' + args = ['build'] + dependsOn tasks.named('pnpmInstall') + inputs.dir(layout.projectDirectory.dir('src')) + outputs.dir(layout.buildDirectory.dir('dist')) +} + +tasks.named('assemble') { + dependsOn tasks.named('buildFrontend') +} +``` diff --git a/.agents/skills/halo-plugin-dev/references/ui-components.md b/.agents/skills/halo-plugin-dev/references/ui-components.md new file mode 100644 index 0000000..023e45a --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-components.md @@ -0,0 +1,252 @@ +# UI Components + +Halo provides two layers of UI primitives for plugin frontends: + +1. **Base component library** (`@halo-dev/components`) — install and import explicitly +2. **Business components & directives** — globally registered, use directly without import + +> Full base component docs: https://halo-ui-components.halo-run.workers.dev +> +> For forms, see [ui-forms.md](ui-forms.md) — Halo uses FormKit (globally registered) with many custom inputs. + +## Official Docs Routing + +Component APIs change across Halo versions. Treat the lists below as common +shortcuts, not an exhaustive API reference. + +| Need | Official docs | +| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| Base components from `@halo-dev/components` | https://halo-ui-components.halo-run.workers.dev | +| Business component index | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/index.md | +| `AttachmentSelectorModal` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/attachment-selector-modal.md | +| `AttachmentFileTypeIcon` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/attachment-file-type-icon.md | +| `AnnotationsForm` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/annotations-form.md | +| `FilterDropdown` / `FilterCleanButton` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/filter-dropdown.md | +| `HasPermission` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/has-permission.md | +| `PluginDetailModal` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/plugin-detail-modal.md | +| `SearchInput` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/search-input.md | +| `UppyUpload` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/uppy-upload.md | +| `VCodemirror` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/v-codemirror.md | +| `v-permission` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/v-permission.md | +| `v-tooltip` | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/v-tooltip.md | + +## Base Component Library + +Install: + +```bash +pnpm install @halo-dev/components +``` + +Import and use: + +```vue + + + +``` + +Common exported components from `@halo-dev/components`: + +| Component | Purpose | +| ----------------------------------------------- | -------------------------------------------------------------------------- | +| `VAlert` | Alert banner | +| `VAvatar` / `VAvatarGroup` | User avatar(s) | +| `VButton` | Button with variants: `default`, `primary`, `secondary`, `danger`, `ghost` | +| `VCard` | Card container | +| `VDescription` / `VDescriptionItem` | Key-value description list | +| `VDialog` + `Dialog` (manager) | Dialog with imperative API | +| `VDropdownDivider` / `VDropdownItem` | Dropdown menu items | +| `VEmpty` | Empty state placeholder | +| `VEntity` / `VEntityContainer` / `VEntityField` | Entity list item layout | +| `VLoading` | Loading spinner/overlay | +| `VMenu` / `VMenuItem` / `VMenuLabel` | Menu navigation | +| `VModal` | Modal with `v-model:visible` | +| `VPagination` | Pagination control | +| `VPageHeader` | Page header with back button/title/actions | +| `VSpace` | Flex spacing layout | +| `VStatusDot` | Status indicator dot | +| `VSwitch` | Toggle switch | +| `VTabbar` / `VTabs` / `VTabItem` | Tab navigation | +| `VTag` | Colored tag/badge | +| `Toast` (manager) | Toast notification imperative API | +| `VTooltipComponent` / `vTooltip` | Tooltip component/directive | + +## Business Components (Globally Registered) + +These are available without import in any plugin Vue component. + +### VCodemirror + +Code editor. + +```vue + +``` + +| Prop | Type | Default | Description | +| ------------ | -------- | -------- | --------------------------------------------- | +| `modelValue` | `string` | `""` | Binding value | +| `height` | `string` | `"auto"` | Editor height | +| `language` | `string` | `"yaml"` | Language: `yaml`, `html`, `js`, `css`, `json` | +| `extensions` | `array` | `[]` | Codemirror extensions | + +### AttachmentSelectorModal + +Attachment picker modal (Console only). + +```vue + + + +``` + +| Prop | Type | Default | Description | +| ------------- | ---------- | --------- | ----------------------- | +| `visible` | `boolean` | `false` | Controlled visibility | +| `accepts` | `string[]` | `["*/*"]` | Accepted MIME types | +| `min` / `max` | `number` | — | Min/max selection count | + +### UppyUpload + +File upload component. + +```vue + +``` + +| Prop | Type | Default | Description | +| ------------- | ------------------------- | -------- | ------------------------------- | +| `endpoint` | `string` | required | Upload API endpoint | +| `meta` | `Record` | — | Extra metadata sent with upload | +| `autoProceed` | `boolean` | `false` | Auto-upload on select | +| `method` | `string` | `"post"` | HTTP method | + +### SearchInput + +Search input that only triggers on Enter (not while typing). + +```vue + +``` + +### AttachmentFileTypeIcon + +File-type icon for attachment/file lists. + +```vue + +``` + +### AnnotationsForm + +Renders the Annotations form for a given Extension group/kind. + +```vue + + + +``` + +### FilterDropdown / FilterCleanButton + +Generic filter dropdown and clear button for list pages. + +```vue + + + +``` + +### PluginDetailModal + +Open a plugin's detail/settings modal inline. + +```vue + +``` + +| Prop | Type | Description | +| ------ | -------- | -------------------- | +| `name` | `string` | Plugin metadata.name | + +### HasPermission + +Render content only when the user has the required permissions. + +```vue + + Delete + +``` + +## Directives (Globally Registered) + +### v-permission + +Conditionally render based on permissions. + +```vue +Delete +``` + +Equivalent component: `...` + +### v-tooltip + +Add tooltip to any element. + +```vue + +``` diff --git a/.agents/skills/halo-plugin-dev/references/ui-entry.md b/.agents/skills/halo-plugin-dev/references/ui-entry.md new file mode 100644 index 0000000..8cdabed --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-entry.md @@ -0,0 +1,176 @@ +# UI Entry & Routes + +The frontend entry file exports a plugin definition using `definePlugin` from `@halo-dev/ui-shared`. + +## Entry File (`ui/src/index.ts`) + +```ts +import { definePlugin } from "@halo-dev/ui-shared"; +import HomeView from "./views/HomeView.vue"; +import { IconComputer } from "@halo-dev/components"; +import { markRaw } from "vue"; + +export default definePlugin({ + components: { + // Global component registration + // "MyComponent": MyComponent + }, + routes: [ + // Console routes + { + parentName: "Root", + route: { + path: "/my-plugin", + name: "MyPluginHome", + component: HomeView, + meta: { + title: "My Plugin", + permissions: [], + menu: { + name: "My Plugin", + group: "tool", // dashboard | content | interface | system | tool + icon: markRaw(IconComputer), + priority: 40, + }, + }, + }, + }, + ], + ucRoutes: [ + // UC (User Center) routes + { + parentName: "Root", + route: { + path: "/uc-my-plugin", + name: "MyPluginUCHome", + component: HomeView, + meta: { + permissions: [], + menu: { + name: "My Plugin", + priority: 40, + }, + }, + }, + }, + ], + extensionPoints: { + // UI extension point implementations + }, + formkit: { + inputs: { + // Custom FormKit inputs (Halo 2.25+) + }, + }, +}); +``` + +## Route Definition + +### With parentName (RouteRecordAppend) + +```ts +{ + parentName: "Root", + route: { /* RouteRecordRaw */ } +} +``` + +### Without parentName (RouteRecordRaw) + +```ts +{ + path: "/standalone", + name: "StandalonePage", + component: MyView +} +``` + +## Console Parent Routes + +| parentName | Section | +| ----------------- | --------------------- | +| `Root` | Top level | +| `AttachmentsRoot` | Attachment management | +| `CommentsRoot` | Comments | +| `SinglePagesRoot` | Single pages | +| `PostsRoot` | Posts | +| `MenusRoot` | Menus | +| `ThemeRoot` | Themes | +| `OverviewRoot` | Overview | +| `BackupRoot` | Backups | +| `PluginsRoot` | Plugins | +| `SettingsRoot` | Settings | +| `UsersRoot` | Users | +| `ToolsRoot` | Tools | + +## UC Parent Routes + +| parentName | Section | +| ------------------- | ------------- | +| `PostsRoot` | Posts | +| `NotificationsRoot` | Notifications | + +## RouteMeta + +```ts +interface RouteMeta { + title?: string; // Browser tab title + searchable?: boolean; // Include in Console global search + permissions?: string[]; // Required UI permissions + menu?: { + name: string; // Menu display name + group?: CoreMenuGroupId; // Built-in group or custom group name + icon?: Component; // Vue icon component (use markRaw) + priority: number; // Sort order (lower = higher) + mobile?: boolean; // Show on mobile + }; +} +``` + +## Using markRaw for Icons + +Always wrap icon components with `markRaw`: + +```ts +import { IconComputer } from "@halo-dev/components"; +import { markRaw } from "vue"; + +icon: markRaw(IconComputer); +``` + +## Permissions in Routes + +```ts +meta: { + permissions: ["plugin:my-plugin:person:manage"]; +} +``` + +The route is hidden if the user lacks any of the listed permissions. + +## Custom FormKit Inputs + +Halo 2.25+ lets plugin UI entries register custom FormKit inputs for use in +plugin-provided FormKit Schema. + +```ts +import { createInput } from "@formkit/vue"; +import { definePlugin } from "@halo-dev/ui-shared"; +import { defineAsyncComponent } from "vue"; + +export default definePlugin({ + formkit: { + inputs: { + myPluginInput: createInput( + defineAsyncComponent(() => import("./components/MyPluginInput.vue")), + ), + }, + }, +}); +``` + +Use a plugin-prefixed input name to avoid collisions with Halo built-ins or +earlier-loaded plugins. If the input definition uses `@formkit/vue`, require +`@halo-dev/ui-plugin-bundler-kit@2.25.0+` and set `plugin.yaml` `spec.requires` +to `>=2.25.0`. diff --git a/.agents/skills/halo-plugin-dev/references/ui-extension-points.md b/.agents/skills/halo-plugin-dev/references/ui-extension-points.md new file mode 100644 index 0000000..14a2634 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-extension-points.md @@ -0,0 +1,116 @@ +# UI Extension Points + +Plugins can extend existing Console/UC UI via `extensionPoints` in `definePlugin()`. + +## ExtensionPoint Keys + +### Editor + +```ts +"editor:create": () => EditorProvider[] | Promise; +"default:editor:extension:create": () => AnyExtension[] | Promise; +``` + +### Dashboard + +```ts +"console:dashboard:widgets:create": () => DashboardWidgetDefinition[] | Promise; +"console:dashboard:widgets:internal:quick-action:item:create": () => DashboardWidgetQuickActionItem[] | Promise; +``` + +### Attachment Selector + +```ts +"attachment:selector:create": () => AttachmentSelectProvider[] | Promise; +``` + +### Comment Subject Ref + +```ts +"comment:subject-ref:create": () => CommentSubjectRefProvider[]; +``` + +### List Item Operations + +Add action buttons to list items: + +```ts +"post:list-item:operation:create": (post: Ref) => OperationItem[]; +"single-page:list-item:operation:create": (singlePage: Ref) => OperationItem[]; +"comment:list-item:operation:create": (comment: Ref) => OperationItem[]; +"reply:list-item:operation:create": (reply: Ref) => OperationItem[]; +"plugin:list-item:operation:create": (plugin: Ref) => OperationItem[]; +"backup:list-item:operation:create": (backup: Ref) => OperationItem[]; +"attachment:list-item:operation:create": (attachment: Ref) => OperationItem[]; +"theme:list-item:operation:create": (theme: Ref) => OperationItem[]; +``` + +### List Item Fields + +Add columns to list tables: + +```ts +"plugin:list-item:field:create": (plugin: Ref) => EntityFieldItem[]; +"post:list-item:field:create": (post: Ref) => EntityFieldItem[]; +"single-page:list-item:field:create": (singlePage: Ref) => EntityFieldItem[]; +``` + +### Tabs + +```ts +"plugin:self:tabs:create": () => PluginTab[] | Promise; +"backup:tabs:create": () => BackupTab[] | Promise; +"plugin:installation:tabs:create": () => PluginInstallationTab[] | Promise; +"theme:list:tabs:create": () => ThemeListTab[] | Promise; +"user:detail:tabs:create": () => UserTab[] | Promise; +"uc:user:profile:tabs:create": () => UserProfileTab[] | Promise; +``` + +## Example: Adding a Post List Operation + +```ts +import { definePlugin } from "@halo-dev/ui-shared"; +import { VButton } from "@halo-dev/components"; +import { h } from "vue"; + +export default definePlugin({ + extensionPoints: { + "post:list-item:operation:create": (post) => [ + { + priority: 10, + component: h( + VButton, + { + size: "sm", + onClick: () => { + console.log("Action on post:", post.value.metadata.name); + }, + }, + () => "My Action", + ), + }, + ], + }, +}); +``` + +## Example: Registering a Dashboard Widget + +```ts +import { definePlugin } from "@halo-dev/ui-shared"; +import MyWidget from "./components/MyWidget.vue"; + +export default definePlugin({ + extensionPoints: { + "console:dashboard:widgets:create": () => [ + { + id: "my-plugin-widget", + name: "My Widget", + component: MyWidget, + priority: 10, + permissions: [], + }, + ], + }, +}); +``` diff --git a/.agents/skills/halo-plugin-dev/references/ui-forms.md b/.agents/skills/halo-plugin-dev/references/ui-forms.md new file mode 100644 index 0000000..8b40a0e --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-forms.md @@ -0,0 +1,480 @@ +# UI Forms (FormKit) + +Halo uses [FormKit](https://formkit.com/) as its form solution. FormKit is **globally registered** in both Console and UC (User Center) — you do **not** need to install or import FormKit in plugin UI code. Use `` components directly, or define forms via Schema in `Setting` resources. + +> **Critical**: Do NOT build custom form components from scratch (e.g. raw `` elements) in plugin pages. Always use FormKit inputs so your UI stays consistent with the rest of Halo. + +## Docs Routing + +FormKit integration changes across Halo versions. Treat this file as a plugin +working guide, then verify exact input options in the official docs when using a +recent or version-sensitive field. + +| Need | Official docs | +| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| Core form schema and built-in inputs | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/form-schema.md | +| Plugin custom FormKit inputs | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/formkit.md | +| Plugin UI entry shape (`formkit.inputs`) | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/basics/ui/entry.md | +| Plugin API changelog for version gates | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-changelog.md | +| Business form components and directives | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/ui/components/index.md | +| Annotation forms for extension metadata | https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/annotations-form.md | + +When working from a local docs checkout, use the same paths under +`docs/developer-guide/...`; versioned docs live under +`versioned_docs/version-2.25/...`. + +## Quick Index + +- Plugin setting forms: [Setting Schema](#1-setting-schema-plugin-config) +- Direct plugin page forms: [Vue Component](#2-vue-component-direct-formkit) +- Built-in and Halo custom inputs: [Available Inputs](#available-inputs) +- Version-sensitive fields: [Version Notes](#version-notes) +- Validation and schema patterns: [Validation](#validation) +- Submission patterns: + [Programmatic Form Submission](#programmatic-form-submission) + +## Two Ways to Use Forms + +### 1. Setting Schema (Plugin Config) + +For plugin settings that users configure in the plugin detail page, define the form in a `Setting` resource using FormKit Schema syntax (written in YAML): + +```yaml +# src/main/resources/extensions/settings.yaml +apiVersion: v1alpha1 +kind: Setting +metadata: + name: my-plugin-settings # must match spec.settingName in plugin.yaml +spec: + forms: + - group: basic + label: Basic Settings + formSchema: + - $formkit: text + name: apiKey + label: API Key + value: "" + validation: required + - $formkit: switch + name: enabled + label: Enable Feature + value: true +``` + +Then reference it in `plugin.yaml`: + +```yaml +spec: + settingName: my-plugin-settings + configMapName: my-plugin-configmap +``` + +See [plugin-manifest.md](plugin-manifest.md#settings--configmap) for full setup. + +### 2. Vue Component (Direct ``) + +For forms inside plugin pages (e.g. a custom admin page), use `` components directly: + +```vue + + + +``` + +No `import { FormKit } from "@formkit/vue"` is needed — FormKit is globally registered. + +## Available Inputs + +### FormKit Built-ins (Official) + +All standard FormKit inputs work out of the box: + +| Input | Type | Description | +| ------------------------- | ---------------------- | ------------------------------------------ | +| `text` | `string` | Single-line text | +| `textarea` | `string` | Multi-line text (with `auto-height` addon) | +| `email` | `string` | Email with validation | +| `number` | `number` | Numeric input | +| `password` | `string` | Password (Halo disables autocomplete) | +| `date` / `datetime-local` | `string` | Date pickers | +| `checkbox` | `boolean` / `string[]` | Single or multi checkbox | +| `radio` | `string` | Radio group | +| `range` | `number` | Slider | +| `file` | `FileList` | File input | +| `group` | `object` | Nested object container | + +### Halo Custom Inputs + +Halo registers additional inputs for common CMS use cases. Use them exactly like built-ins: + +#### `select` — Enhanced Select + +Custom select with static or remote data source, multi-select, sorting, and search. + +```yaml +- $formkit: select + name: country + label: Country + searchable: true + clearable: true + options: + - label: China + value: cn + icon: /assets/flags/cn.svg + description: Chinese cuisine with rich regional styles + - label: USA + value: us +``` + +Remote data source: + +```yaml +- $formkit: select + name: post + label: Post + clearable: true + action: /apis/api.console.halo.run/v1alpha1/posts + requestOption: + method: GET + labelField: post.spec.title + valueField: post.metadata.name + iconField: post.spec.cover + descriptionField: post.status.excerpt +``` + +Key props: `options`, `action`, `requestOption`, `multiple`, `searchable`, `clearable`, `sortable`, `maxCount`. + +Halo 2.25+ supports `icon` and `description` in static options, plus +`requestOption.iconField` and `requestOption.descriptionField` for remote +options. + +#### `switch` — Toggle Switch + +```yaml +- $formkit: switch + name: enabled + label: Enable + value: false + onValue: "active" + offValue: "inactive" +``` + +#### `attachment` / `attachmentInput` — Attachment Picker + +`attachment` (Halo 2.22+): supports preview, direct upload, and library selection. + +```yaml +- $formkit: attachment + name: logo + label: Logo + accepts: + - "image/png" + - "image/jpeg" + width: "200px" + aspectRatio: "1/1" +``` + +`attachmentInput`: simpler input that opens the attachment library modal. + +```yaml +- $formkit: attachmentInput + name: cover + label: Cover + accepts: ["image/*"] + min: 1 + max: 1 +``` + +#### `code` — Code Editor + +Integrated with CodeMirror. Supports `yaml`, `html`, `javascript`, `css`, `json`. + +```yaml +- $formkit: code + name: custom_css + label: Custom CSS + language: css + height: "300px" +``` + +#### `iconify` — Icon Selector + +Based on [Iconify](https://iconify.design/). + +```yaml +- $formkit: iconify + name: social_icon + label: Social Icon + format: svg # svg | dataurl | url | name +``` + +With sizing options: + +```yaml +- $formkit: iconify + name: icon + label: Icon + format: svg + sizing: + enabled: true + default: "24" + presets: ["16", "24", "32", "48"] +``` + +#### `toggle` — Visual Toggle + +For image, color, or text option toggling. + +```yaml +- $formkit: toggle + name: theme + label: Theme + render-type: color + options: + - label: Dark + value: dark + render: "#1a1a1a" + - label: Light + value: light + render: "#ffffff" +``` + +#### `array` — Object Array (Recommended over `repeater`) + +For defining arrays of objects with add/remove/reorder. + +```yaml +- $formkit: array + name: socials + label: Social Accounts + value: [] + max: 5 + min: 1 + itemLabels: + - type: image + label: $value.logo + - type: text + label: $value.name + children: + - $formkit: attachment + name: logo + label: Icon + - $formkit: text + name: name + label: Name + validation: required + - $formkit: text + name: url + label: URL + validation: required|url +``` + +> Use `itemLabels` to show preview content on collapsed array items. `$value` refers to the current item. + +#### `list` — Primitive Array + +For arrays of primitives (strings, numbers, booleans). + +```yaml +- $formkit: list + name: tags + label: Tags + itemType: string + min: 1 + max: 10 + addLabel: Add Tag + children: + - $formkit: text + index: "$index" + validation: required +``` + +#### `verificationForm` — Remote Validation + +Wraps a group of fields and validates them against a remote endpoint. + +```yaml +- $formkit: verificationForm + action: /apis/console.api.halo.run/v1alpha1/verify/verify-password + label: Verify Account + children: + - $formkit: text + name: username + label: Username + validation: required + - $formkit: password + name: password + label: Password + validation: required +``` + +> Unlike other inputs, `verificationForm` does NOT wrap values in its own key. The saved values stay flat: `{ "username": "...", "password": "..." }`. + +#### CMS Entity Selectors + +Halo provides dedicated selectors for core CMS entities. All return the resource's `metadata.name`. + +| Input | Description | Multi-select | +| ------------------------ | -------------------------- | ------------ | +| `menuSelect` | Navigation menu selector | Yes | +| `menuCheckbox` | Menu checkbox group | Yes (array) | +| `menuRadio` | Menu radio selection | No | +| `postSelect` | Post selector | No | +| `singlePageSelect` | Single page selector | No | +| `categorySelect` | Category selector | No | +| `categoryCheckbox` | Category checkbox | Yes (array) | +| `tagSelect` | Tag selector | No | +| `tagCheckbox` | Tag checkbox | Yes (array) | +| `userSelect` | User selector | Yes | +| `roleSelect` | Role selector | Yes | +| `attachmentGroupSelect` | Attachment group selector | Yes | +| `attachmentPolicySelect` | Attachment policy selector | Yes | + +Example: + +```yaml +- $formkit: postSelect + name: featuredPost + label: Featured Post + value: "" + +- $formkit: categoryCheckbox + name: categories + label: Categories + value: [] +``` + +#### `secret` — Secret Resource Selector + +For selecting a Halo Secret resource (stores sensitive data like API keys). + +```yaml +- $formkit: secret + name: apiSecret + label: API Secret + descriptionPreset: "Token for My Plugin" + requiredKeys: + - key: apiKey + help: API Key + - key: secretKey + help: Secret Key +``` + +#### `color` — Color Picker + +```yaml +- $formkit: color + name: themeColor + label: Theme Color + value: "#1890ff" +``` + +## Custom Inputs from Plugin UI + +Halo 2.25+ lets a plugin register custom FormKit inputs from `ui/src/index.ts` +through `definePlugin({ formkit: { inputs } })`. See [ui-entry.md](ui-entry.md#custom-formkit-inputs). + +Use these only when built-in FormKit and Halo inputs cannot express the +interaction. Prefix names with the plugin identifier to avoid collisions, for +example `myPluginTokenPicker`. + +## Version Notes + +- Halo 2.25+ supports `select` option `icon` / `description`, remote + `iconField` / `descriptionField`, and plugin-registered custom FormKit inputs. +- When using 2.25-only FormKit features, raise `spec.requires` in `plugin.yaml` + and keep related UI packages on a compatible version. + +## Programmatic Form Submission + +In Vue components, trigger form submission programmatically: + +```vue + + Submit + +``` + +Or using `@formkit/core`: + +```ts +import { submitForm } from "@formkit/core"; + +submitForm("my-form-id"); +``` + +## Validation + +FormKit supports built-in validation rules. Use them in Schema or Vue components: + +```yaml +- $formkit: text + name: email + label: Email + validation: required|email +``` + +```vue + +``` + +Common rules: `required`, `email`, `url`, `number`, `min`, `max`, `matches`, `confirm`. + +## Conditional Rendering + +Use `if` in Schema to conditionally show fields: + +```yaml +- $formkit: select + name: type + label: Type + options: + - label: Internal + value: internal + - label: External + value: external + +- $formkit: text + name: url + label: URL + if: "$value.type === 'external'" + validation: required|url +``` + +> In `if` expressions, `$value` refers to the current form values object. + +## Schema vs Vue Component: When to Use Which + +| Scenario | Approach | +| ------------------------------------ | ---------------------------------------------- | +| Plugin settings (config page) | `Setting` resource with Schema | +| Custom admin page with dynamic logic | Vue `` components | +| Simple CRUD form in a modal | Vue `` components | +| Reusable form across plugins | Vue `` components in a shared package | + +## Important Notes + +- **Do NOT install FormKit in your plugin** — it's already globally registered. Installing it again can cause conflicts. +- **Do NOT use FormKit Pro inputs** — they are not included in Halo. +- Schema is JSON format natively, but Halo uses YAML for `Setting` resources. Write Schema in YAML syntax. +- When using `array` or `list`, always provide `value: []` as default to avoid undefined issues. +- For `attachment` with `multiple: true`, the value is a `string[]` of attachment URLs/names. diff --git a/.agents/skills/halo-plugin-dev/references/ui-shared.md b/.agents/skills/halo-plugin-dev/references/ui-shared.md new file mode 100644 index 0000000..6dc7df5 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-shared.md @@ -0,0 +1,103 @@ +# @halo-dev/ui-shared Utilities + +Available from Halo 2.22. Requires plugin `spec.requires: ">=2.22.0"`. + +## Stores (Pinia) + +Install Pinia: `pnpm install pinia` + +### currentUser + +```ts +import { stores } from "@halo-dev/ui-shared"; +import { storeToRefs } from "pinia"; + +const userStore = stores.currentUser(); +await userStore.fetchCurrentUser(); + +console.log(userStore.currentUser?.user.metadata.name); +console.log(userStore.isAnonymous); + +// Reactive refs +const { currentUser, isAnonymous } = storeToRefs(stores.currentUser()); +``` + +| Property | Type | Description | +| ------------- | --------------------------- | ---------------------------- | +| `currentUser` | `DetailedUser \| undefined` | Current user info | +| `isAnonymous` | `boolean` | Whether visitor is anonymous | + +### globalInfo + +```ts +const globalInfoStore = stores.globalInfo(); +await globalInfoStore.fetchGlobalInfo(); + +console.log(globalInfoStore.globalInfo?.externalUrl); +console.log(globalInfoStore.globalInfo?.siteTitle); +``` + +| Property | Type | Description | +| ------------ | ------------------------- | ------------------------------------------------------------------------------------------------------ | +| `globalInfo` | `GlobalInfo \| undefined` | Site config: externalUrl, siteTitle, timeZone, locale, allowComments, allowRegistration, favicon, etc. | + +## Utils + +### date (dayjs-based) + +Dayjs is already bundled in `@halo-dev/ui-shared` and exposed via `utils.date`. **Always use this for any date handling in plugin UI code — do NOT install `dayjs`, `date-fns`, or any other date library, and do NOT write your own date formatting functions.** + +```ts +import { utils } from "@halo-dev/ui-shared"; + +utils.date.format(new Date()); // "2025-11-05 14:30" +utils.date.format("2025-10-22", "YYYY/MM/DD"); // "2025/10/22" +utils.date.toISOString(new Date()); // ISO string +utils.date.toDatetimeLocal(new Date()); // "2025-10-22T14:30" +utils.date.timeAgo("2025-10-23"); // "1 天后" +utils.date.dayjs(); // raw dayjs instance for advanced usage +``` + +### permission + +```ts +utils.permission.has(["core:posts:manage"]); // any match +utils.permission.has(["core:posts:manage", "core:posts:delete"], false); // all match +utils.permission.getUserPermissions(); // string[] +``` + +### attachment + +```ts +// Generate thumbnail URL +utils.attachment.getThumbnailUrl("/uploads/image.jpg", "M"); // "?width=800" +// Sizes: "XL" (1600), "L" (1200), "M" (800), "S" (400) + +// Extract URL from various attachment formats +utils.attachment.getUrl(attachmentObject); + +// Convert to simplified format +utils.attachment.convertToSimple(attachmentObject); +// -> { url: "...", alt?: "...", mediaType?: "..." } +``` + +### id + +```ts +utils.id.uuid(); // UUID v7 (time-sortable) +``` + +## Events + +```ts +import { events } from "@halo-dev/ui-shared"; + +// Listen for plugin config updates +events.on("core:plugin:configMap:updated", (data) => { + console.log(`Plugin ${data.pluginName} config updated, group: ${data.group}`); +}); +``` + +| Event | Payload | Description | +| ------------------------------- | --------------------------------------- | ---------------------------- | +| `core:plugin:configMap:updated` | `{ pluginName: string, group: string }` | Plugin configuration changed | diff --git a/.agents/skills/halo-plugin-dev/references/ui-tooling.md b/.agents/skills/halo-plugin-dev/references/ui-tooling.md new file mode 100644 index 0000000..f573d72 --- /dev/null +++ b/.agents/skills/halo-plugin-dev/references/ui-tooling.md @@ -0,0 +1,168 @@ +# UI Tooling + +Recommended third-party tools for plugin frontend development that work well alongside Halo's UI framework. + +--- + +## Icons: unplugin-icons + Iconify + +[unplugin-icons](https://github.com/unplugin/unplugin-icons) provides on-demand icon imports from [Iconify](https://iconify.design/) with full IDE support (auto-completion, hover preview). + +### Installation + +```bash +pnpm add -D unplugin-icons @iconify/json +``` + +> For smaller bundles, install only the icon sets you need: `pnpm add -D @iconify-json/ri @iconify-json/mdi` + +### Vite Configuration + +```ts +// ui/vite.config.ts +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import Icons from "unplugin-icons/vite"; + +export default defineConfig({ + plugins: [ + vue(), + Icons({ + compiler: "vue3", + autoInstall: true, + }), + ], +}); +``` + +### Rsbuild Configuration + +```ts +// ui/rsbuild.config.mjs +import { defineConfig } from "@rsbuild/core"; +import { pluginVue } from "@rsbuild/plugin-vue"; +import Icons from "unplugin-icons/rspack"; + +export default defineConfig({ + plugins: [pluginVue()], + tools: { + rspack: { + plugins: [Icons({ compiler: "vue3" })], + }, + }, +}); +``` + +> Always set `compiler: 'vue3'` so icons are rendered as Vue components. + +### Usage in Vue + +Import icons directly from the `~icons/` virtual module: + +```ts +// ui/src/index.ts +import RiImage2Line from '~icons/ri/image-2-line'; +import MdiHome from '~icons/mdi/home'; + +// Use as a regular Vue component +// Common pattern: pass to markRaw() for menu icons +{ + menu: { + icon: markRaw(RiImage2Line), + }, +} +``` + +```vue + + + +``` + +> Browse icons at [icones.js.org](https://icones.js.org/) or [iconify.design](https://icon-sets.iconify.design/). + +--- + +## Atomic CSS: UnoCSS + +[UnoCSS](https://unocss.dev/) is an instant atomic CSS engine that provides Tailwind-compatible utilities with zero runtime overhead. + +### Installation + +```bash +pnpm add -D unocss @unocss/webpack +``` + +### Vite Configuration + +```ts +// ui/vite.config.ts +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import UnoCSS from "unocss/vite"; + +export default defineConfig({ + plugins: [vue(), UnoCSS()], +}); +``` + +Add the CSS import in your entry file: + +```ts +// ui/src/index.ts +import "uno.css"; +``` + +### Rsbuild Configuration + +```ts +// ui/rsbuild.config.mjs +import { defineConfig } from "@rsbuild/core"; +import { pluginVue } from "@rsbuild/plugin-vue"; +import { UnoCSSRspackPlugin } from "@unocss/webpack/rspack"; + +export default defineConfig({ + plugins: [pluginVue()], + tools: { + rspack: { + plugins: [UnoCSSRspackPlugin()], + }, + }, +}); +``` + +Add the CSS import: + +```ts +// ui/src/index.ts +import "uno.css"; +``` + +### Configuration File + +Create `ui/uno.config.ts`: + +```ts +import { defineConfig, presetWind3, transformerCompileClass } from "unocss"; + +export default defineConfig({ + presets: [presetWind3()], + transformers: [transformerCompileClass()], +}); +``` + +### Usage in Vue + +```vue + +``` + +> Use UnoCSS for layout, spacing, and any custom component styling when `@halo-dev/components` does not provide the needed primitive; use `@halo-dev/components` for standard business UI. diff --git a/.agents/skills/halo-theme-dev/SKILL.md b/.agents/skills/halo-theme-dev/SKILL.md new file mode 100644 index 0000000..2499ff9 --- /dev/null +++ b/.agents/skills/halo-theme-dev/SKILL.md @@ -0,0 +1,96 @@ +--- +name: halo-theme-dev +description: > + Use when creating or modifying a Halo CMS theme, writing Thymeleaf templates, + configuring theme.yaml or settings.yaml, calling Finder APIs, using + vite-plugin-halo-theme, defining theme settings forms, referencing static assets, + implementing halo:comment or halo:footer extension points, defining model + annotation fields (AnnotationSetting), adding i18n support, or handling error pages. + Always use this skill when the user mentions themes, templates, Thymeleaf, theme + configuration, or wants to customize the frontend appearance of a Halo site — + even if they do not explicitly say "theme." +--- + +# Halo Theme Development + +Halo is built on **Spring Boot + Spring WebFlux + Thymeleaf**. Themes use Thymeleaf templates for frontend page rendering. + +> **Important**: Halo's APIs, VO field names, and template variables evolve across versions. **Do not rely on training data for specific field names, method signatures, or type structures.** When writing code that accesses template variables or calls Finder API methods, always fetch the relevant online doc from the References section below first. + +## Thymeleaf Quick Reference + +Full docs: https://raw.githubusercontent.com/thymeleaf/thymeleaf-docs/refs/heads/master/docs/tutorials/3.1/usingthymeleaf.md + +Core syntax cheatsheet: + +```html + +

+ + +
+ + +Post link + + + +
  • + + +
    Next page
    +
    Last page
    + + +
    ...
    + + +
    + + + + + + + + +``` + +## Development Workflow + +1. Create a theme folder under `themes/` in the Halo working directory (must match `metadata.name` in `theme.yaml`) +2. Write `theme.yaml` (required) and `settings.yaml` (optional) +3. Create template files under `templates/` +4. Install and activate the theme in Console → Theme Management +5. Visit the frontend to verify + +Disable Thymeleaf caching during development: set env var `SPRING_THYMELEAF_CACHE=false` (Docker), or `spring.thymeleaf.cache: false` in config (source mode). + +## Starter Templates + +The `assets/` directory provides two ready-to-use theme templates: + +- **`assets/theme-minimal/`** — Zero-build-tool minimal theme with all 8 template files; ideal for quick prototyping or simple themes +- **`assets/theme-vite/`** — Vite project template with `vite-plugin-halo-theme` (**recommended for new themes**); includes partial layout reuse and CSS toolchain + +Usage: copy the directory into `themes/` in your Halo working directory, ensure the folder name matches `metadata.name` in `theme.yaml`, then install and activate in Console. + +## References Index + +| File | Content | When to read | +| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| [references/api-changelog.md](references/api-changelog.md) | High-impact theme API changes by Halo version, with docs routes | Before using version-sensitive APIs or raising `spec.requires` | +| [references/structure-and-config.md](references/structure-and-config.md) | Directory structure, theme.yaml fields, root screenshot, settings.yaml form definition | Creating a theme, configuring theme.yaml/settings.yaml | +| [references/vite-plugin.md](references/vite-plugin.md) | vite-plugin-halo-theme integration guide, include/slot template syntax, TailwindCSS integration | Setting up a Vite-based theme (recommended) | +| [references/templates.md](references/templates.md) | Template route mapping, available variables per template | Writing template files | +| [references/global-variables.md](references/global-variables.md) | Global variables (site, theme, theme.config) and type definitions | Accessing site info or theme setting values | +| [references/finder-apis.md](references/finder-apis.md) | All Finder APIs (postFinder, categoryFinder, tagFinder, menuFinder, singlePageFinder, etc.) | Querying data from any template | +| [references/static-resources.md](references/static-resources.md) | Static asset reference methods (`@{}`, `#theme.assets()`) | Referencing CSS/JS/images in plain HTML themes | +| [references/template-tags.md](references/template-tags.md) | Custom tags (halo:comment extension point, halo:footer injection) | Integrating comment plugins, injecting footer code | +| [references/i18n.md](references/i18n.md) | Internationalization via `.properties` files, `#messages`, `#locale`, frontend i18n injection | Adding multi-language support to a theme | +| [references/official-plugins.md](references/official-plugins.md) | Official plugin integration: pluginFinder.available(), search widget, dark mode color scheme adaptation | Adding search, adapting dark mode for plugin UI | +| [references/annotations.md](references/annotations.md) | AnnotationSetting for model custom fields, `#annotations` utility for reading metadata in templates | Adding custom fields to menu items/posts/categories and using them in templates | +| [references/packaging.md](references/packaging.md) | Packaging a theme as a ZIP using `@halo-dev/theme-package-cli` | Preparing a theme for release or upload | +| [references/thymeleaf-tips.md](references/thymeleaf-tips.md) | Halo-specific Thymeleaf best practices: literal substitutions, safe navigation, meta tag rules, permalink syntax | Writing any template file | diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/settings.yaml b/.agents/skills/halo-theme-dev/assets/theme-minimal/settings.yaml new file mode 100644 index 0000000..d5d68d5 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/settings.yaml @@ -0,0 +1,14 @@ +apiVersion: v1alpha1 +kind: Setting +metadata: + name: theme-minimal-setting +spec: + forms: + - group: basic + label: Basic Settings + formSchema: + - $formkit: text + name: custom_footer + label: Custom footer text + value: "" + placeholder: "e.g. Copyright © 2024 My Site" diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/archives.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/archives.html new file mode 100644 index 0000000..3a00bf6 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/archives.html @@ -0,0 +1,25 @@ + + + +

    Archives

    + +

    + +

    +
      +
    • + +
    • +
    +
    +
    + +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/assets/css/style.css b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/assets/css/style.css new file mode 100644 index 0000000..eb290f3 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/assets/css/style.css @@ -0,0 +1,34 @@ +body { + max-width: 800px; + margin: 0 auto; + padding: 1rem; + font-family: system-ui, sans-serif; +} +a { + color: #0070f3; +} +header { + display: flex; + gap: 1rem; + align-items: center; + padding-bottom: 1rem; + border-bottom: 1px solid #eee; +} +header a { + text-decoration: none; + color: inherit; +} +nav { + display: flex; + gap: 1rem; +} +footer { + margin-top: 2rem; + padding-top: 1rem; + border-top: 1px solid #eee; + color: #666; + font-size: 0.875rem; +} +article img { + max-width: 100%; +} diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/author.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/author.html new file mode 100644 index 0000000..1edeaa8 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/author.html @@ -0,0 +1,26 @@ + + + + + + +

    +

    + +
      +
    • + + +
    • +
    + + +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/categories.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/categories.html new file mode 100644 index 0000000..2d5bbdd --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/categories.html @@ -0,0 +1,17 @@ + + + +

    Categories

    +
      +
    • + +
    • +
    +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/category.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/category.html new file mode 100644 index 0000000..3996e65 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/category.html @@ -0,0 +1,20 @@ + + + +

    +
      +
    • + + +
    • +
    + +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/index.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/index.html new file mode 100644 index 0000000..ac44161 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/index.html @@ -0,0 +1,19 @@ + + + +
      +
    • + + +
    • +
    + +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/layout.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/layout.html new file mode 100644 index 0000000..1a46cce --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/layout.html @@ -0,0 +1,34 @@ + + + + + + Site Title + + + + + + +
    + + +
    + +
    + +
    + +
    +

    + +
    + + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/page.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/page.html new file mode 100644 index 0000000..34a8c83 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/page.html @@ -0,0 +1,23 @@ + + + + + + +
    +

    +
    +
    + +
    + +
    +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/post.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/post.html new file mode 100644 index 0000000..3c82f86 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/post.html @@ -0,0 +1,42 @@ + + + + + + +
    +

    + +
    +
    + +
    +
    + + + +
    + +
    +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/tag.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/tag.html new file mode 100644 index 0000000..d2175a9 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/tag.html @@ -0,0 +1,20 @@ + + + +

    +
      +
    • + + +
    • +
    + +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/tags.html b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/tags.html new file mode 100644 index 0000000..a7eaf04 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/templates/tags.html @@ -0,0 +1,14 @@ + + + +

    Tags

    +
      +
    • + +
    • +
    +
    + diff --git a/.agents/skills/halo-theme-dev/assets/theme-minimal/theme.yaml b/.agents/skills/halo-theme-dev/assets/theme-minimal/theme.yaml new file mode 100644 index 0000000..07ab9ed --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-minimal/theme.yaml @@ -0,0 +1,20 @@ +apiVersion: theme.halo.run/v1alpha1 +kind: Theme +metadata: + name: theme-minimal +spec: + displayName: Minimal Theme + author: + name: Your Name + website: https://example.com + description: A minimal Halo theme starter + logo: "" + homepage: "" + repo: "" + issues: "" + settingName: "theme-minimal-setting" + configMapName: "theme-minimal-configmap" + version: 1.0.0 + requires: ">=2.0.0" + license: + - name: "MIT" diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/.gitignore b/.agents/skills/halo-theme-dev/assets/theme-vite/.gitignore new file mode 100644 index 0000000..097ab26 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +templates +dist \ No newline at end of file diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/package.json b/.agents/skills/halo-theme-dev/assets/theme-vite/package.json new file mode 100644 index 0000000..6a9af15 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/package.json @@ -0,0 +1,14 @@ +{ + "type": "module", + "scripts": { + "dev": "vite build --watch", + "build": "vite build && theme-package", + "build-only": "vite build" + }, + "devDependencies": { + "@halo-dev/theme-package-cli": "^1.0.1", + "@halo-dev/vite-plugin-halo-theme": "1.0.3", + "vite": "^8.0.0" + }, + "packageManager": "pnpm@10.33.0" +} diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/public/assets/.gitkeep b/.agents/skills/halo-theme-dev/assets/theme-vite/public/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/settings.yaml b/.agents/skills/halo-theme-dev/assets/theme-vite/settings.yaml new file mode 100644 index 0000000..73161a3 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/settings.yaml @@ -0,0 +1,14 @@ +apiVersion: v1alpha1 +kind: Setting +metadata: + name: theme-vite-setting +spec: + forms: + - group: basic + label: Basic Settings + formSchema: + - $formkit: text + name: custom_footer + label: Custom footer text + value: "" + placeholder: "e.g. Copyright © 2024 My Site" diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/archives.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/archives.html new file mode 100644 index 0000000..1e6abc3 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/archives.html @@ -0,0 +1,32 @@ + + + +

    Archives

    + + +
    +

    + +

    +
      +
    • +

      + +

      + +
    • +
    +
    +
    +
    + + +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/author.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/author.html new file mode 100644 index 0000000..fffb851 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/author.html @@ -0,0 +1,16 @@ + + + +
    +

    +

    + +
      + +
    + + +
    +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/categories.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/categories.html new file mode 100644 index 0000000..1dfe11f --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/categories.html @@ -0,0 +1,22 @@ + + + +

    Categories

    +
      +
    • + +
    • +
    + + +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/category.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/category.html new file mode 100644 index 0000000..c2483a1 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/category.html @@ -0,0 +1,14 @@ + + + +

    +

    + +
      + +
    + + +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/css/main.css b/.agents/skills/halo-theme-dev/assets/theme-vite/src/css/main.css new file mode 100644 index 0000000..ae1e7bd --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/css/main.css @@ -0,0 +1,167 @@ +*, +*::before, +*::after { + box-sizing: border-box; +} + +body { + margin: 0; + font-family: + system-ui, + -apple-system, + sans-serif; + line-height: 1.6; + color: #333; +} + +a { + color: #0070f3; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.container { + max-width: 800px; + margin: 0 auto; + padding: 0 1rem; +} + +.site-header { + border-bottom: 1px solid #eee; + padding: 1rem 0; +} + +.site-header .container { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: 0.5rem; +} + +.site-title { + font-size: 1.25rem; + font-weight: 700; + color: #333; +} + +.site-nav ul { + list-style: none; + margin: 0; + padding: 0; + display: flex; + gap: 1rem; +} + +.site-main { + padding: 2rem 0; +} + +.post-list { + list-style: none; + margin: 0; + padding: 0; +} + +.post-item { + padding: 1.5rem 0; + border-bottom: 1px solid #eee; +} + +.post-item:last-child { + border-bottom: none; +} + +.post-title { + margin: 0 0 0.25rem; + font-size: 1.25rem; +} + +.post-meta { + color: #666; + font-size: 0.875rem; + margin: 0 0 0.5rem; +} + +.post-excerpt { + color: #555; + margin: 0; +} + +.pagination { + display: flex; + align-items: center; + justify-content: center; + gap: 1rem; + padding: 2rem 0; +} + +.article-header { + margin-bottom: 2rem; +} + +.article-title { + margin: 0 0 0.5rem; + font-size: 2rem; +} + +.article-meta { + color: #666; + font-size: 0.875rem; +} + +.article-content { + max-width: 100%; + line-height: 1.8; +} + +.article-content img { + max-width: 100%; +} + +.article-tags, +.article-categories { + margin-top: 1.5rem; +} + +.tag, +.category { + display: inline-block; + padding: 0.125rem 0.5rem; + background: #f0f0f0; + border-radius: 4px; + font-size: 0.875rem; + margin: 0.25rem; +} + +.post-nav { + display: flex; + justify-content: space-between; + padding: 2rem 0; + border-top: 1px solid #eee; + margin-top: 2rem; +} + +.site-footer { + border-top: 1px solid #eee; + padding: 1.5rem 0; + text-align: center; + color: #666; + font-size: 0.875rem; +} + +.archive-year { + margin-top: 2rem; +} + +.tag-list, +.category-list { + list-style: none; + padding: 0; + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/index.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/index.html new file mode 100644 index 0000000..c9800d9 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/index.html @@ -0,0 +1,12 @@ + + + +
      + +
    + + +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/index.ts b/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/index.ts new file mode 100644 index 0000000..dd2e03d --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/index.ts @@ -0,0 +1 @@ +console.log("Hello, Halo Theme!"); diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/main.ts b/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/main.ts new file mode 100644 index 0000000..0f20a91 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/main.ts @@ -0,0 +1 @@ +import "../css/main.css"; diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/post.ts b/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/post.ts new file mode 100644 index 0000000..d9387c7 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/js/post.ts @@ -0,0 +1 @@ +console.log("Hello, Halo Theme Post!"); diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/page.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/page.html new file mode 100644 index 0000000..0b7f9be --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/page.html @@ -0,0 +1,20 @@ + + + +
    +
    +

    +
    +
    +
    + +
    + +
    +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/layout.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/layout.html new file mode 100644 index 0000000..998e5de --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/layout.html @@ -0,0 +1,42 @@ + + + + + + + Site Title + + + + + + +
    +
    + +
    +
    + +
    +
    +

    + +
    +
    + + diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/pagination.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/pagination.html new file mode 100644 index 0000000..29972c1 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/pagination.html @@ -0,0 +1,5 @@ + diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/post-card.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/post-card.html new file mode 100644 index 0000000..47dd2e1 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/partials/post-card.html @@ -0,0 +1,18 @@ +
  • +

    + +

    + +

    +
  • diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/post.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/post.html new file mode 100644 index 0000000..939b435 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/post.html @@ -0,0 +1,56 @@ + + + +
    +
    +

    + +
    + +
    + + + + +
    + +
    + +
    +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/tag.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/tag.html new file mode 100644 index 0000000..567d9c0 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/tag.html @@ -0,0 +1,13 @@ + + + +

    + +
      + +
    + + +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/src/tags.html b/.agents/skills/halo-theme-dev/assets/theme-vite/src/tags.html new file mode 100644 index 0000000..2f41d5d --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/src/tags.html @@ -0,0 +1,18 @@ + + + +

    Tags

    +
      +
    • + +
    • +
    + + +
    diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/theme.yaml b/.agents/skills/halo-theme-dev/assets/theme-vite/theme.yaml new file mode 100644 index 0000000..b2792a0 --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/theme.yaml @@ -0,0 +1,20 @@ +apiVersion: theme.halo.run/v1alpha1 +kind: Theme +metadata: + name: theme-vite +spec: + displayName: Vite Theme + author: + name: Your Name + website: https://example.com + description: A Halo theme powered by vite-plugin-halo-theme + logo: "" + homepage: "" + repo: "" + issues: "" + settingName: "theme-vite-setting" + configMapName: "theme-vite-configmap" + version: 1.0.0 + requires: ">=2.0.0" + license: + - name: "MIT" diff --git a/.agents/skills/halo-theme-dev/assets/theme-vite/vite.config.ts b/.agents/skills/halo-theme-dev/assets/theme-vite/vite.config.ts new file mode 100644 index 0000000..489733f --- /dev/null +++ b/.agents/skills/halo-theme-dev/assets/theme-vite/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from "vite"; +import { haloThemePlugin } from "@halo-dev/vite-plugin-halo-theme"; + +export default defineConfig({ + plugins: [haloThemePlugin()], +}); diff --git a/.agents/skills/halo-theme-dev/references/annotations.md b/.agents/skills/halo-theme-dev/references/annotations.md new file mode 100644 index 0000000..b8012e4 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/annotations.md @@ -0,0 +1,111 @@ +# Model Metadata (Annotations) + +Themes can extend built-in Halo models with custom fields via `AnnotationSetting` resources (e.g. adding an icon to menu items, or a download URL to posts), then read those values in templates via the `#annotations` utility. + +## Defining a Metadata Form (AnnotationSetting) + +Create a file (any name) in the theme root, e.g. `annotation-setting.yaml`, and declare an `AnnotationSetting` resource: + +```yaml +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + name: theme-foo-menuitem-abc123 # recommended: add theme prefix + random suffix to avoid conflicts +spec: + targetRef: + group: "" + kind: MenuItem + formSchema: + - $formkit: text + name: icon + label: Menu icon class + value: "" +``` + +Multiple models can be declared in the same file separated by `---`: + +```yaml +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + name: theme-foo-post-abc123 +spec: + targetRef: + group: content.halo.run + kind: Post + formSchema: + - $formkit: text + name: download_url + label: Download URL + value: "" + +--- +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + name: theme-foo-menuitem-abc123 +spec: + targetRef: + group: "" + kind: MenuItem + formSchema: + - $formkit: text + name: icon + label: Icon + value: "" +``` + +### Supported Models + +| Model | `group` | `kind` | +| ------------- | ------------------ | ------------ | +| Post | `content.halo.run` | `Post` | +| Single page | `content.halo.run` | `SinglePage` | +| Post category | `content.halo.run` | `Category` | +| Post tag | `content.halo.run` | `Tag` | +| Menu item | `""` | `MenuItem` | +| User | `""` | `User` | + +### Notes + +- All values in `metadata.annotations` are **strings**, so form values must also be strings. +- Do not use components with non-string output such as `number`, `group`, or `repeater`. +- For `checkbox`, explicitly set `on-value` / `off-value` to string values (e.g. `"true"` / `"false"`). +- Use a theme-name prefix plus a random suffix for `metadata.name` to avoid conflicts with other themes/plugins, e.g. `theme-earth-post-wanfs5`. + +## Reading Metadata in Templates + +Halo provides a `#annotations` utility object in Thymeleaf with three methods: + +### `#annotations.get(object, key)` — Get a value + +```html +
    +
  • + + +
  • +
    +``` + +### `#annotations.getOrDefault(object, key, defaultValue)` — Get a value with fallback + +```html + +``` + +### `#annotations.contains(object, key)` — Check if a key exists + +```html + +``` + +## Online Docs + +> **`AnnotationSetting` spec and supported models may change across Halo versions. Fetch the relevant doc if unsure about supported `group`/`kind` combinations or form schema constraints.** + +- Using metadata in templates: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/annotations.md +- Defining annotation forms: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/annotations-form.md diff --git a/.agents/skills/halo-theme-dev/references/api-changelog.md b/.agents/skills/halo-theme-dev/references/api-changelog.md new file mode 100644 index 0000000..47f36a0 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/api-changelog.md @@ -0,0 +1,28 @@ +# Theme API Changelog + +Read the official changelog before using version-sensitive theme APIs or raising +`spec.requires`. + +Official docs: + +- Theme API changelog: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/api-changelog.md +- Form schema: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/form-schema.md + +High-impact changes: + +| Halo version | Change | Skill reference | +| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | +| 2.25.0 | `select` options support `icon` and `description`; remote selects support `requestOption.iconField` and `descriptionField` | [structure-and-config.md](structure-and-config.md) | +| 2.25.0 | Theme root may include `screenshot.png`, `screenshot.jpeg`, `screenshot.jpg`, or `screenshot.webp`; Halo exposes the first readable image as `Theme.status.screenshot` | [structure-and-config.md](structure-and-config.md) | +| 2.25.0 | `#halo.matchVersion(constraint)` supports conditional rendering for newer Halo-only fragments | [global-variables.md](global-variables.md) | +| 2.25.0 | `postFinder.cursorByCategory(postName)` returns previous/next posts in the current post's primary category | [finder-apis.md](finder-apis.md) | +| 2.24.1 | `postFinder.random(maxSize)` returns random published posts | [finder-apis.md](finder-apis.md) | +| 2.23.0 | `iconify` supports optional `sizing` config | [structure-and-config.md](structure-and-config.md) | +| 2.22.8 | `toggle` FormKit input added | [structure-and-config.md](structure-and-config.md) | +| 2.22.2 | `switch` FormKit input added | [structure-and-config.md](structure-and-config.md) | +| 2.22.0 | `array` FormKit input added and preferred over `repeater`; `attachment` was expanded and the older picker is `attachmentInput` | [structure-and-config.md](structure-and-config.md) | +| 2.22.0 | `postFinder.cursor(postName)` return shape changed: no `current`; `previous`/`next` are `ListedPostVo` | [finder-apis.md](finder-apis.md) | + +Prefer `#halo.matchVersion()` for small optional fragments that require a newer +Halo version. Raise `spec.requires` when the whole theme depends on the newer +capability. diff --git a/.agents/skills/halo-theme-dev/references/finder-apis.md b/.agents/skills/halo-theme-dev/references/finder-apis.md new file mode 100644 index 0000000..55c10a2 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/finder-apis.md @@ -0,0 +1,80 @@ +# Finder API + +Finder APIs query data from **any template location** regardless of the current route — ideal for sidebars, footers, and other global data needs. + +## Available Finders + +| Finder | Purpose | +| ------------------- | -------------------------------------------- | +| `postFinder` | Post list / detail / prev-next / archives | +| `categoryFinder` | Category list / tree structure / breadcrumbs | +| `tagFinder` | Tag list / detail | +| `menuFinder` | Menus and menu items | +| `singlePageFinder` | Single page list / detail | +| `commentFinder` | Comments and replies | +| `contributorFinder` | Contributors | +| `siteStatsFinder` | Site statistics | +| `themeFinder` | Theme information | +| `pluginFinder` | Plugin information | + +## Key Usage Pattern + +Use `th:with` to bind the result in the current scope: + +```html +
    + +
    +``` + +## Common Notes + +- `postFinder.list({...})` is the recommended unified query method (all parameters are optional); it supersedes the deprecated `list(page, size)`, `listByCategory(...)`, etc. +- Halo 2.25+ adds `postFinder.cursorByCategory(postName)` for previous/next posts inside the current post's primary category. It only matches the same category and does not include child categories. +- Halo 2.24.1+ adds `postFinder.random(maxSize)` for random published posts. +- Halo 2.22+ changed `postFinder.cursor(postName)`: the result no longer has `current`; `previous` and `next` are `ListedPostVo`. +- `metadata.name` is the unique resource identifier — it is not the display name (`displayName`/`title`). +- Pair `settings.yaml` `categorySelect`/`tagSelect` inputs with Finder queries so users can configure query parameters in Console instead of hard-coding them in templates. + +## Image Thumbnails + +Halo 2.19+ generates responsive thumbnails for attachment images. Use `thumbnail.gen(uri, size)` to get a scaled URL: + +```html + +``` + +| Size parameter | Width | +| -------------- | ------ | +| `s` | 400px | +| `m` | 800px | +| `l` | 1200px | +| `xl` | 1600px | + +> Halo 2.22+ automatically adds responsive image attributes to all `` tags on the page. Only use `thumbnail.gen()` manually when you need custom control over specific images. + +## Online Docs + +> **Do not rely on training data for Finder API method signatures — Halo evolves across versions and your training data may be outdated or incomplete. Always fetch the relevant doc before writing code that calls a specific Finder method.** + +- postFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/post.md +- categoryFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/category.md +- tagFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/tag.md +- menuFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/menu.md +- singlePageFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/single-page.md +- commentFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/comment.md +- contributorFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/contributor.md +- siteStatsFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/site-stats.md +- themeFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/finder-apis/theme.md +- pluginFinder: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/plugin/api-reference/server/finder-for-theme.md diff --git a/.agents/skills/halo-theme-dev/references/global-variables.md b/.agents/skills/halo-theme-dev/references/global-variables.md new file mode 100644 index 0000000..cf6933f --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/global-variables.md @@ -0,0 +1,162 @@ +# Global Variables + +The following variables are available in all templates without any additional declaration. + +--- + +## `site` — Site information + +Source: Console → System Settings. + +```json +{ + "title": "Site Title", + "subtitle": "Site Subtitle", + "url": "https://example.com", + "logo": "https://example.com/logo.png", + "favicon": "https://example.com/favicon.ico", + "allowRegistration": false, + "post": { + "postPageSize": 10, + "archivePageSize": 10, + "categoryPageSize": 10, + "tagPageSize": 10 + }, + "seo": { + "blockSpiders": false, + "keywords": "keywords", + "description": "Site description" + }, + "comment": { + "enable": true, + "systemUserOnly": false, + "requireReviewForNew": false + }, + "routes": { + "categoriesUri": "/categories", + "tagsUri": "/tags", + "archivesUri": "/archives" + } +} +``` + +**Common examples**: + +```html + +Logo + +``` + +--- + +## `theme` — Current theme info + +```json +{ + "metadata": { + "name": "theme-foo", + "creationTimestamp": "..." + }, + "spec": { + "displayName": "My Theme", + "version": "1.0.0", + "author": { "name": "Author", "website": "https://example.com" }, + "description": "Theme description", + "logo": "https://example.com/logo.png", + "homepage": "https://github.com/example/theme-foo", + "settingName": "theme-foo-setting", + "configMapName": "theme-foo-configMap" + }, + "config": { + "style": { "color_scheme": "system" }, + "layout": { "nav": "single" } + } +} +``` + +**Common examples**: + +```html + + + + + + +``` + +--- + +## `theme.config` — Theme settings values + +Access pattern: `theme.config.[group].[name]` + +- `group`: value of `spec.forms[].group` in `settings.yaml` +- `name`: value of `spec.forms[].formSchema[].name` + +**Example** (based on the settings.yaml in [structure-and-config.md](structure-and-config.md)): + +```html + + + + +``` + +--- + +## `#theme.assets()` — Static asset path utility + +Returns the full path to a static asset for use in non-attribute contexts (e.g. inside JavaScript). + +> Note: the path passed to this function does **not** need an `/assets/` prefix. + +```html + +``` + +--- + +## `#halo.matchVersion(constraint)` — Halo version guard + +Halo 2.25+ exposes `#halo.matchVersion(constraint)` for conditional rendering +based on semantic version ranges. Use it when only a small fragment needs a +newer Halo feature and raising the whole theme's `spec.requires` would be too +broad. + +```html +
    + +
    + +
    + +
    +``` + +Development builds with version `0.0.0` always match, which keeps local theme +debugging convenient. + +--- + +## Online Docs + +> **If you need the exact structure of `site`, `theme`, `theme.config`, or `#halo` helpers, fetch the doc below — do not guess field names from training data.** + +https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/global-variables.md + +--- + +## `haloCommentEnabled` — Comment component status + +Boolean. Evaluates both "is a comment plugin installed" and "are comments enabled for this page". Use together with the `halo:comment` custom tag: + +```html +
    + +
    +``` diff --git a/.agents/skills/halo-theme-dev/references/i18n.md b/.agents/skills/halo-theme-dev/references/i18n.md new file mode 100644 index 0000000..9e572ec --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/i18n.md @@ -0,0 +1,109 @@ +# Internationalization (i18n) + +Halo themes support i18n via `.properties` files under an `i18n/` directory. Thymeleaf provides the `#messages` object for reading translations in templates. + +--- + +## Directory Structure + +``` +my-theme/ +├── i18n/ +│ ├── default.properties # Fallback / default language +│ ├── zh_CN.properties # Simplified Chinese +│ ├── zh_TW.properties # Traditional Chinese +│ └── es.properties # Spanish +├── templates/ +└── theme.yaml +``` + +> Halo uses `default.properties` as the fallback when no locale-specific file matches the user's preference. + +--- + +## Properties File Format + +Simple key-value pairs: + +```properties +# default.properties +page.author.title=Author: {0} +common.previousPage=Previous +common.nextPage=Next +common.noPosts=No posts yet. +``` + +```properties +# zh_CN.properties +page.author.title=作者:{0} +common.previousPage=上一页 +common.nextPage=下一页 +common.noPosts=暂无文章。 +``` + +Placeholders `{0}`, `{1}` ... are filled by the arguments passed to the message function. + +--- + +## Using i18n in Templates + +### `#messages.msg(key)` — Get a message + +```html +

    +``` + +### `#messages.msgOrNull(key)` — Get a message or null if missing + +```html + +``` + +### Thymeleaf shorthand `#{key}` — Standard expression + +```html + +Previous + + + +``` + +--- + +## `#locale` — Current Locale + +Useful for rendering language-specific UI or setting ``: + +```html + + + + +``` + +--- + +## Frontend i18n Pattern + +Some themes also need translations in JavaScript. A common pattern is to inject the needed strings into a global object via inline script: + +```html + +``` + +> Note: `[(#{key})]` is Thymeleaf's unescaped inlining syntax. It evaluates the expression and inserts the raw value into the script. + +--- + +## Online Docs + +https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/global-variables.md diff --git a/.agents/skills/halo-theme-dev/references/official-plugins.md b/.agents/skills/halo-theme-dev/references/official-plugins.md new file mode 100644 index 0000000..92b42d2 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/official-plugins.md @@ -0,0 +1,65 @@ +# Official Plugin Integration + +Halo's official plugins can extend the frontend UI. Themes should adapt to these plugins rather than re-implementing the same functionality. + +## Checking Plugin Availability + +Use `pluginFinder.available(pluginName)` to conditionally render plugin-dependent UI. This prevents broken UI when the plugin is not installed. + +```html + +``` + +Always guard plugin-dependent elements with `th:if="${pluginFinder.available('...')}"`. + +## Search Widget (PluginSearchWidget) + +The official search plugin provides a ready-made search UI. Themes do not need to build their own search — just add a trigger button: + +```html + +``` + +## Dark Mode Adaptation + +Official plugins that provide UI components (search widget, comment component, etc.) support a shared color scheme system. Themes that implement dark mode should apply the appropriate class or `data-color-scheme` attribute to `` or `` so plugin UI matches the theme's color scheme automatically. + +### Method 1: CSS class on `` or `` + +| Class | Effect | +| ------------------------------- | ------------------------------------ | +| `color-scheme-auto` | Follows system dark/light preference | +| `color-scheme-dark` or `dark` | Force dark mode | +| `color-scheme-light` or `light` | Force light mode | + +```html + + + + + +``` + +### Method 2: `data-color-scheme` attribute on `` or `` + +| Value | Effect | +| ------- | ------------------------- | +| `auto` | Follows system preference | +| `dark` | Force dark mode | +| `light` | Force light mode | + +```html + +``` + +> Both methods achieve the same result. Dark mode switching is typically handled by frontend JavaScript (toggling the class/attribute at runtime). This applies to all official plugins that render UI (search widget, comment component, etc.). diff --git a/.agents/skills/halo-theme-dev/references/packaging.md b/.agents/skills/halo-theme-dev/references/packaging.md new file mode 100644 index 0000000..faef299 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/packaging.md @@ -0,0 +1,39 @@ +# Theme Packaging + +Use [`@halo-dev/theme-package-cli`](https://github.com/halo-dev/theme-package-cli) to package a theme into a ZIP file for uploading to Halo Console or distributing to others. + +## Installation + +```bash +npm install -g @halo-dev/theme-package-cli +``` + +Or run without installing via `npx`: + +```bash +npx @halo-dev/theme-package-cli +``` + +## Usage + +Run in the theme root directory (the one containing `theme.yaml`): + +```bash +# Package only essential files (recommended) +theme-package + +# Package all files (excluding node_modules, dist, .git, etc.) +theme-package --all +``` + +## Default Package Contents (without `--all`) + +| Included | Description | +| ------------------ | ------------------------------------------------- | +| `templates/` | Templates and static assets | +| `*.yaml` / `*.yml` | Config files: `theme.yaml`, `settings.yaml`, etc. | +| `i18n/` | Internationalization files (if present) | +| `README.md` | Documentation file (if present) | +| `LICENSE` | License file (if present) | + +> For Vite-based themes, run `npm run build` first to generate the `templates/` output, then run the packaging command. diff --git a/.agents/skills/halo-theme-dev/references/static-resources.md b/.agents/skills/halo-theme-dev/references/static-resources.md new file mode 100644 index 0000000..a91107b --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/static-resources.md @@ -0,0 +1,69 @@ +# Static Assets & Build Tooling + +## Static Asset Directory + +All theme static assets **must** be placed under `templates/assets/`: + +``` +templates/ +└── assets/ + ├── css/ + │ └── style.css + ├── js/ + │ └── main.js + └── images/ + └── logo.png +``` + +--- + +## Referencing Static Assets in Templates + +### Method 1: HTML tag attributes (recommended) + +Use Thymeleaf's `@{}` expression: + +```html + + + + + + + +Logo +``` + +The path `@{/assets/dist/style.css}` maps to `templates/assets/dist/style.css` and renders as `/themes/theme-foo/assets/dist/style.css`. + +**With version query string (strongly recommended — prevents caching)**: + +```html + + +``` + +### Method 2: `#theme.assets()` utility + +Use when you need the asset path in a non-attribute context (e.g. a JavaScript variable or inline CSS). + +> Note: do **not** include `/assets/` prefix in the path argument. + +```html + +``` + +--- + +## Vite Integration + +For themes using a modern frontend stack (TypeScript, Sass, PostCSS, TailwindCSS, etc.) or needing HTML template reuse (`include`/`slot`), the official Vite plugin is strongly recommended: + +**`vite-plugin-halo-theme`**: https://github.com/halo-sigs/vite-plugin-halo-theme + +See [vite-plugin.md](vite-plugin.md) for the full integration guide, template syntax, and configuration examples. diff --git a/.agents/skills/halo-theme-dev/references/structure-and-config.md b/.agents/skills/halo-theme-dev/references/structure-and-config.md new file mode 100644 index 0000000..a2b6320 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/structure-and-config.md @@ -0,0 +1,271 @@ +# Directory Structure & Configuration + +## Directory Structure + +``` +my-theme/ +├── templates/ +│ ├── assets/ # Static assets (CSS/JS/images etc.) — must be placed here +│ │ ├── css/ +│ │ │ └── style.css +│ │ └── js/ +│ │ └── main.js +│ ├── index.html # Home page +│ ├── post.html # Post detail +│ ├── page.html # Single page detail +│ ├── archives.html # Post archives +│ ├── tags.html # Tag listing +│ ├── tag.html # Tag archive +│ ├── categories.html # Category listing +│ └── category.html # Category archive +├── screenshot.png # Optional Console preview image (Halo 2.25+) +├── theme.yaml # Theme configuration (required) +└── settings.yaml # Theme settings form definition (optional) +``` + +> **Important**: The theme folder name must match the `metadata.name` field in `theme.yaml`; otherwise some assets may fail to load. + +Halo 2.25+ recognizes the first readable root preview image in this order: +`screenshot.png`, `screenshot.jpeg`, `screenshot.jpg`, `screenshot.webp`. The +resolved URL is exposed as `Theme.status.screenshot`. + +## theme.yaml + +The theme root directory must contain `theme.yaml`. Minimal runnable config: + +```yaml +apiVersion: theme.halo.run/v1alpha1 +kind: Theme +metadata: + name: theme-foo # must match the theme folder name +spec: + displayName: My Theme + version: 1.0.0 + requires: ">=2.0.0" +``` + +Full field example: + +```yaml +apiVersion: theme.halo.run/v1alpha1 +kind: Theme +metadata: + name: theme-foo +spec: + displayName: My Theme + author: + name: Author Name + website: https://example.com + description: An example theme + logo: https://example.com/logo.png + homepage: https://github.com/example/theme-foo + repo: https://github.com/example/theme-foo.git + issues: https://github.com/example/theme-foo/issues + settingName: "theme-foo-setting" # must match metadata.name in settings.yaml + configMapName: "theme-foo-configMap" + customTemplates: # optional + post: + - name: Documentation + description: Article in documentation format + screenshot: + file: post_documentation.html + category: + - name: Knowledge Base + description: Knowledge base category + screenshot: + file: category_knowledge.html + page: + - name: About + description: About page + screenshot: + file: page_about.html + version: 1.0.0 + requires: ">=2.0.0" + license: + - name: "GPL-3.0" + url: "https://github.com/example/theme-foo/blob/main/LICENSE" +``` + +### Key Fields + +| Field | Description | Required | +| ---------------------- | ------------------------------------------------------------------- | ---------------------------------------- | +| `metadata.name` | Unique theme identifier — **must match the folder name** | Yes | +| `spec.displayName` | Display name | Yes | +| `spec.version` | Theme version | Yes | +| `spec.requires` | Minimum required Halo version | Yes | +| `spec.settingName` | Setting resource name — must match `metadata.name` in settings.yaml | No | +| `spec.configMapName` | ConfigMap name for persisting settings | No (configure together with settingName) | +| `spec.customTemplates` | Custom template configuration | No | + +> After modifying `theme.yaml`, click "Reload Theme Configuration" on the theme page in Console for changes to take effect. + +## settings.yaml + +Defines a form that is auto-rendered on the theme settings page in Console, using [FormKit](https://github.com/formkit/formkit). + +```yaml +apiVersion: v1alpha1 +kind: Setting +metadata: + name: theme-foo-setting # must match spec.settingName in theme.yaml +spec: + forms: + - group: style # group name (accessed in templates as theme.config.style.xxx) + label: Style + formSchema: + - $formkit: radio + name: color_scheme # field name (accessed as theme.config.style.color_scheme) + label: Default color scheme + value: system + options: + - label: Follow system + value: system + - label: Dark + value: dark + - label: Light + value: light + - $formkit: color + name: background_color + label: Background color + value: "#f2f2f2" + - group: layout + label: Layout + formSchema: + - $formkit: radio + name: nav + label: Navigation layout + value: "single" + options: + - label: Single column + value: "single" + - label: Double column + value: "double" +``` + +### Using Settings Values in Templates + +Pattern: `theme.config.[group].[name]` + +```html + + +
      + Single-column nav +
    +
    Double-column nav
    + +``` + +### Native FormKit Input Types + +Commonly used native input components in theme settings (see links for full docs): + +| `$formkit` value | Purpose | Docs | +| ---------------- | --------------------------------- | -------------------------------------------- | +| `text` | Single-line text | https://formkit.com/inputs/text.md | +| `textarea` | Multi-line text | https://formkit.com/inputs/textarea.md | +| `number` | Number input | https://formkit.com/inputs/number.md | +| `password` | Password input | https://formkit.com/inputs/password.md | +| `radio` | Radio buttons (options list) | https://formkit.com/inputs/radio.md | +| `checkbox` | Checkbox (single or multi-select) | https://formkit.com/inputs/checkbox.md | +| `color` | Color picker (returns hex value) | https://formkit.com/inputs/color.md | +| `range` | Slider range | https://formkit.com/inputs/range.md | +| `date` | Date picker | https://formkit.com/inputs/date.md | +| `datetime-local` | Date-time picker | https://formkit.com/inputs/datetime-local.md | +| `button` | Button | https://formkit.com/inputs/button.md | +| `email` | Email input | https://formkit.com/inputs/email.md | +| `group` | Group (for grouping fields) | https://formkit.com/inputs/group.md | +| `url` | URL input | https://formkit.com/inputs/url.md | + +FormKit Inputs overview: https://formkit.com/inputs + +FormKit Schema (conditional rendering, loops, expressions, advanced usage): https://formkit.com/essentials/schema.md + +> Note: FormKit Pro input components are not supported. + +### Halo Extended Input Types + +Additional input components provided by Halo on top of FormKit: + +| `$formkit` value | Purpose | +| ------------------ | ------------------------------------------------------------------- | +| `select` | Enhanced dropdown with multi-select, search, and remote data source | +| `switch` | Toggle switch (boolean or custom on/off values) | +| `toggle` | Visual toggle supporting image/color/text options | +| `attachment` | Attachment picker (preview, direct upload, select from library) | +| `attachmentInput` | Attachment picker (library popup only) | +| `code` | Code editor (supports yaml/html/js/css/json) | +| `array` | Object array (add/remove/reorder — recommended over repeater) | +| `list` | Primitive array (strings, numbers, etc.) | +| `categorySelect` | Post category selector (returns `metadata.name`) | +| `categoryCheckbox` | Post category checkbox (returns array of `metadata.name`) | +| `tagSelect` | Post tag selector (returns `metadata.name`) | +| `tagCheckbox` | Post tag checkbox (returns array of `metadata.name`) | +| `postSelect` | Post selector | +| `singlePageSelect` | Single page selector | +| `menuSelect` | Menu selector (supports multi-select) | +| `menuCheckbox` | Menu checkbox | +| `menuRadio` | Menu radio | +| `iconify` | Icon picker (Iconify-based, supports svg/dataurl/url/name formats) | +| `secret` | Secret resource selector | +| `verificationForm` | Remote verification form group | + +Full parameter reference: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/form-schema.md + +Version-sensitive FormKit notes: + +- Halo 2.25+: `select` option objects support `icon` and `description`; remote + select data can map those fields via `requestOption.iconField` and + `requestOption.descriptionField`. +- Halo 2.25+: `secret` supports `descriptionPreset`. +- Halo 2.23+: `iconify` supports optional `sizing`. +- Halo 2.22.8+: `toggle` is available. +- Halo 2.22.2+: `switch` is available. +- Halo 2.22+: prefer `array` over `repeater`; the newer `attachment` supports + preview/direct upload/library selection, while the older library-only picker + is `attachmentInput`. + +### FormKit Schema Gotchas + +**1. Inside `array` / `list` children, use `$value` — not `$get()`** + +Within the `children` of an `array`, `list`, or `repeater`, access the current item's data via `$value`, not `$get(id).value`. `$get()` can only reference standalone named input nodes by `id`; it cannot reach the current item in a nested context. + +```yaml +# ✅ Correct: use $value.[name] to reference a sibling field +- $formkit: array + name: socials + children: + - $formkit: text + name: platform + label: Platform + - $formkit: text + name: url + label: URL + if: "$value.platform !== ''" # references sibling field "platform" + + # ❌ Wrong: $get(platform).value does not work in a nested context + - $formkit: text + name: url + if: "$get(platform).value !== ''" +``` + +**2. Nodes using `if` must also declare a `key`** + +Any `$formkit`/`$el`/`$cmp` node with an `if` attribute must declare a unique `key`. Without it, Vue reuses DOM nodes when the condition toggles, causing stale form values or rendering glitches. + +```yaml +# ✅ Correct: add key whenever if is present +- $formkit: text + key: url-field + name: url + label: URL + if: "$value.show_link === true" + +# ❌ Wrong: missing key may cause value leakage on toggle +- $formkit: text + name: url + label: URL + if: "$value.show_link === true" +``` diff --git a/.agents/skills/halo-theme-dev/references/template-tags.md b/.agents/skills/halo-theme-dev/references/template-tags.md new file mode 100644 index 0000000..a09f127 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/template-tags.md @@ -0,0 +1,71 @@ +# Custom Template Tags + +Halo provides proprietary custom tags for code injection and extension points. + +--- + +## `` — Comment extension point + +### Description + +Extension point tag for the comment component. When a plugin (such as the official comment plugin) implements this extension point, it renders the comment component at this tag's location. + +### Usage + +```html title="templates/post.html" + +
    + +
    +``` + +```html title="templates/page.html" +
    + +
    +``` + +### Attributes + +| Attribute | Description | +| --------- | -------------------------------------------- | +| `group` | Resource group | +| `kind` | Resource type | +| `name` | Unique resource identifier (`metadata.name`) | + +### Supported Resource Types + +| Resource | `group` | `kind` | +| ----------- | ------------------ | ------------ | +| Post | `content.halo.run` | `Post` | +| Single page | `content.halo.run` | `SinglePage` | + +--- + +## `` — Footer code injection + +### Description + +Renders the "Footer Code" configured in Console → System Settings → Code Injection at this tag's location. All themes should include this tag in the footer to ensure full Halo functionality (e.g. analytics scripts injected by plugins). + +### Usage + +```html title="templates/index.html (bottom of any template)" + + + +
    + +

    © 2024 My Site

    + + + +
    + +``` + +> For complete Halo functionality, include this tag in every template that contains a `` element. diff --git a/.agents/skills/halo-theme-dev/references/templates.md b/.agents/skills/halo-theme-dev/references/templates.md new file mode 100644 index 0000000..987ca6d --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/templates.md @@ -0,0 +1,83 @@ +# Template Route Mapping & Template Variables + +## Template Route Mapping + +| Template file | URL path | Main variables | `_templateId` | +| --------------------------- | ---------------------------- | ------------------- | ------------- | +| `templates/index.html` | `/` | `posts` | `index` | +| `templates/post.html` | `/archives/:slug` | `post` | `post` | +| `templates/page.html` | `/:slug` | `singlePage` | `page` | +| `templates/archives.html` | `/archives[/:year[/:month]]` | `archives` | `archives` | +| `templates/tags.html` | `/tags` | `tags` | `tags` | +| `templates/tag.html` | `/tags/:slug` | `tag`, `posts` | `tag` | +| `templates/categories.html` | `/categories` | `categories` | `categories` | +| `templates/category.html` | `/categories/:slug` | `category`, `posts` | `category` | +| `templates/author.html` | `/authors/:slug` | `author`, `posts` | `author` | + +> Route prefixes (`/archives`, `/tags`, `/categories`) can be customized by users in Console system settings. + +## Error Templates + +Halo supports custom error pages under `templates/error/`: + +| Template file | Status code match | +| ---------------------------- | ------------------------------- | +| `templates/error/404.html` | Exact 404 | +| `templates/error/4xx.html` | Any 4xx client error (fallback) | +| `templates/error/500.html` | Exact 500 | +| `templates/error/5xx.html` | Any 5xx server error (fallback) | +| `templates/error/error.html` | Catch-all default | + +Resolution order for a 404: `404.html` → `4xx.html` → `error.html` + +### Error template variables + +```html +
    +

    404

    +

    +

    +
    +``` + +| Variable | Type | Description | +| ---------------- | ------ | ------------------ | +| `error.status` | number | HTTP status code | +| `error.title` | string | Error title | +| `error.detail` | string | Detailed message | +| `error.instance` | string | Error instance URI | +| `error.type` | string | Error type URI | + +## Custom Templates + +Register additional rendering templates for posts, single pages, or category archives via `spec.customTemplates` in `theme.yaml`. Supported types: `post`, `page`, `category`. + +```yaml +spec: + customTemplates: + post: + - name: Documentation + file: post_documentation.html # create under templates/ +``` + +> After modifying theme.yaml, click "Reload Theme Configuration" on the theme page in Console. + +## Key Notes + +- Use `th:utext` (unescaped) to render post/page body content — never `th:text`. +- List variables (`posts`, `archives`, etc.) are `UrlContextListResult`; use `.hasPrevious()`/`.hasNext()`/`.prevUrl`/`.nextUrl` for pagination. +- `post.content.content` is only available automatically in `post.html`; in other templates fetch it separately via `postFinder.content(postName)`. + +## Online Docs + +> **Halo's VO types (field names, nested structures) change across versions. Do not guess field names from training data. Always fetch the doc for the relevant template before accessing specific fields on template variables.** + +- index: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/index_.md +- post: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/post.md +- page: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/page.md +- archives: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/archives.md +- tag: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/tag.md +- tags: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/tags.md +- category: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/category.md +- categories: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/categories.md +- author: https://raw.githubusercontent.com/halo-dev/docs/refs/heads/main/docs/developer-guide/theme/template-variables/author.md diff --git a/.agents/skills/halo-theme-dev/references/thymeleaf-tips.md b/.agents/skills/halo-theme-dev/references/thymeleaf-tips.md new file mode 100644 index 0000000..15dfe98 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/thymeleaf-tips.md @@ -0,0 +1,85 @@ +# Thymeleaf Best Practices for Halo Themes + +**1. Prefer literal substitutions over string concatenation** + +```html + + + + + +``` + +**2. Use safe navigation `?.` to avoid NullPointerException** + +```html + + +``` + +**3. Use Elvis operator `?:` for default values** + +```html +

    +``` + +**4. Use `th:block` to group without adding extra DOM elements** + +```html + +

    +
      + ... +
    +
    +``` + +**5. Use `th:classappend` for conditional classes** + +```html + +... + + +... +``` + +**6. Use `#lists.isEmpty()` and `#strings.isEmpty()` for null-safe checks** + +```html +
    + +
    +``` + +**7. Do not manually add meta tags — Halo injects them automatically** + +Only `` needs to be in the theme. Halo automatically injects at runtime: + +- `<meta name="description">` and `<meta name="keywords">` +- Open Graph tags (`og:title`, `og:description`, `og:image`, etc.) +- Twitter Card tags and canonical URL + +```html +<!-- ✅ correct --> +<head> + <title th:text="${site.title}">Site Title + + + + + Site Title + + + +``` + +**8. Use `@{${url}}` for dynamic permalink URLs** + +```html + +... + + +... +``` diff --git a/.agents/skills/halo-theme-dev/references/vite-plugin.md b/.agents/skills/halo-theme-dev/references/vite-plugin.md new file mode 100644 index 0000000..f499174 --- /dev/null +++ b/.agents/skills/halo-theme-dev/references/vite-plugin.md @@ -0,0 +1,294 @@ +# Vite Integration (Recommended) + +> **Strongly recommended** for building theme projects. Compared to plain Thymeleaf, this approach provides a modern frontend development experience (TypeScript, Sass, PostCSS, TailwindCSS) plus lightweight HTML component reuse (`include`/`slot`) — significantly reducing the verbosity of Thymeleaf's native fragment system. + +--- + +## vite-plugin-halo-theme + +- GitHub: https://github.com/halo-sigs/vite-plugin-halo-theme +- NPM: `@halo-dev/vite-plugin-halo-theme` + +### Key Features + +1. **HTML template reuse**: supports ``, `` (default and named), and `` syntax, preprocessed at Vite build time — fully independent of Thymeleaf. +2. **Automatic multi-page entry scanning**: automatically discovers all `.html` files under `src/` (except `src/partials/`) as Vite build entries, with output going to `templates/`. +3. **Static asset handling**: CSS/JS in `src/` is bundled by Vite into `templates/assets/`; files in `public/` are copied directly to `templates/assets/` without processing. + +--- + +## Directory Convention + +``` +my-theme/ +├── src/ +│ ├── css/ +│ │ └── main.css # CSS source +│ ├── js/ +│ │ └── main.ts # TypeScript source +│ ├── partials/ # Not treated as page entries; referenced via include +│ │ ├── layout.html # Shared layout +│ │ └── post-card.html # Reusable post card component +│ ├── index.html # Home page entry → templates/index.html +│ ├── post.html # → templates/post.html +│ ├── page.html +│ ├── archives.html +│ ├── tags.html +│ ├── tag.html +│ ├── categories.html +│ └── category.html +├── public/ # Copied directly to templates/assets/ (no Vite processing) +├── templates/ # Build output directory (add to .gitignore) +├── vite.config.ts +├── package.json +├── .gitignore +├── theme.yaml +└── settings.yaml +``` + +--- + +## Quick Setup + +### package.json + +```json +{ + "type": "module", + "scripts": { + "dev": "vite build --watch", + "build": "vite build" + }, + "devDependencies": { + "@halo-dev/vite-plugin-halo-theme": "latest", + "vite": "^6.0.0" + } +} +``` + +### vite.config.ts + +```ts +import { defineConfig } from "vite"; +import { haloThemePlugin } from "@halo-dev/vite-plugin-halo-theme"; + +export default defineConfig({ + plugins: [haloThemePlugin()], +}); +``` + +### .gitignore + +```gitignore +node_modules/ +templates/ +!templates/.gitkeep +``` + +--- + +## Template Syntax (build-time only — independent of Thymeleaf) + +> **Important**: `include`/`slot` syntax is processed at **Vite build time**; Thymeleaf syntax is processed at **server runtime**. The two systems are fully isolated and can be mixed freely. + +### `` — Import a partial + +```html + +
    Page content
    +
    +``` + +### Named Slots + +Declare slots in a partial (`src/partials/layout.html`): + +```html + + + Default title + + + + + +``` + +Use in a page: + +```html + + +
    +
    +``` + +### Include Path Resolution + +| Syntax | Resolves to | +| ------------------- | ----------------------------------- | +| `foo.html` | `src/partials/foo.html` (preferred) | +| `partials/foo.html` | `src/partials/foo.html` | +| `./foo.html` | Relative to current file | +| `/foo.html` | Relative to `src/` root | + +### Static Asset Paths + +**All HTML files — both `src/*.html` and `src/partials/*.html` — resolve static asset references relative to `src/`**, regardless of the file's actual location. + +```html + + + + + + + + + +``` + +Always write asset paths as if the file is in `src/`, even when it is inside `src/partials/`. + +--- + +## Full Example: Shared Layout + +### `src/partials/layout.html` + +```html + + + + + + + Site title + + + + +
    + + +
    + +
    + +
    + +
    + +
    + + +``` + +### `src/index.html` + +```html + + + +
    +
      +
    • + + +

      +
    • +
    + +
    +
    +``` + +### `src/post.html` + +```html + + + + + +``` + +--- + +## TailwindCSS Integration + +```bash +pnpm add -D tailwindcss @tailwindcss/vite +``` + +```ts +// vite.config.ts +import tailwindcss from "@tailwindcss/vite"; +import { haloThemePlugin } from "@halo-dev/vite-plugin-halo-theme"; +import { defineConfig } from "vite"; + +export default defineConfig({ + plugins: [tailwindcss(), haloThemePlugin()], +}); +``` + +```css +/* src/css/main.css */ +@import "tailwindcss"; +``` + +--- + +## Ready-to-use Templates + +The skill's `assets/` directory provides two ready-to-use templates: + +- `assets/theme-minimal/` — Zero-build-tool minimal theme; good for quick prototyping or plain HTML/CSS themes +- `assets/theme-vite/` — Full Vite project with vite-plugin-halo-theme; recommended as the starting point for new themes + +Usage: copy the directory into `themes/` in your Halo working directory, ensure the folder name matches `metadata.name` in `theme.yaml`, then install and activate in Console. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9056b00 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +.gradle/ +build/ +!gradle/wrapper/gradle-wrapper.jar +*.class +*.jar +*.war +*.log +*.tmp +.idea/ +*.iml +.DS_Store +node_modules/ +dist/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3b66410 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..20d40b6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e09d5ed --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# dark-mode + +dark-mode - Halo 插件 + +## 简介 + +这是一个基于 Halo 的插件项目。 + +## 开发环境 + +- Java 21+ +- Node.js 18+ +- pnpm + +## 开发 + +```bash +# 启用插件 +./gradlew haloServer +# 开发前端 +cd ui +pnpm install +pnpm dev +``` + +## 构建 + +```bash +./gradlew build +``` + +构建完成后,可以在 `build/libs` 目录找到插件 jar 文件。 + +## 许可证 + +[GPL-3.0](./LICENSE) © LHY \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ed1f8e5 --- /dev/null +++ b/build.gradle @@ -0,0 +1,55 @@ +plugins { + id 'java' + id "io.freefair.lombok" version "9.2.0" + id "run.halo.plugin.devtools" version "0.8.0" +} + +group 'run.halo.darkmode' + +repositories { + mavenCentral() +} + +dependencies { + implementation platform('run.halo.tools.platform:plugin:2.25.0') + compileOnly 'run.halo.app:api' + + testImplementation 'run.halo.app:api' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' +} + +test { + useJUnitPlatform() +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = "UTF-8" + options.release = 21 +} + +tasks.register('processUiResources', Copy) { + from project(':ui').layout.buildDirectory.dir('dist') + into layout.buildDirectory.dir('resources/main/ui') + dependsOn project(':ui').tasks.named('assemble') + shouldRunAfter tasks.named('processResources') +} + +tasks.named('classes') { + dependsOn tasks.named('processUiResources') +} + +tasks.named('generatePluginComponentsIdx') { + notCompatibleWithConfigurationCache('This task invokes "Task.project" at execution time, which is not supported with configuration cache.') +} + +halo { + version = '2.25' +} + diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8d0c7be --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +version=1.0.0-SNAPSHOT diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..dbc3ce4 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..0262dcb --- /dev/null +++ b/gradlew @@ -0,0 +1,248 @@ +#!/bin/sh + +# +# Copyright © 2015 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..c4bdd3a --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,93 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..b8d2f22 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,7 @@ +pluginManagement { + repositories { + gradlePluginPortal() + } +} +rootProject.name = 'plugin-dark-mode' +include 'ui' diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 0000000..00f88c3 --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "skills": { + "halo-plugin-dev": { + "source": "halo-dev/dev-skills", + "sourceType": "github", + "skillPath": "skills/halo-plugin-dev/SKILL.md", + "computedHash": "cacdbde0d53b6d062b3acbe237c6dbe60fd564d7bb70172b22eb4cfbf43117dd" + }, + "halo-theme-dev": { + "source": "halo-dev/dev-skills", + "sourceType": "github", + "skillPath": "skills/halo-theme-dev/SKILL.md", + "computedHash": "19045f67d7f115d68fdba5704ef332606caf35f67f1be3ba0c7b20fea7704767" + } + } +} diff --git a/src/main/java/run/halo/darkmode/DarkModePlugin.java b/src/main/java/run/halo/darkmode/DarkModePlugin.java new file mode 100644 index 0000000..696440f --- /dev/null +++ b/src/main/java/run/halo/darkmode/DarkModePlugin.java @@ -0,0 +1,31 @@ +package run.halo.darkmode; + +import org.springframework.stereotype.Component; +import run.halo.app.plugin.BasePlugin; +import run.halo.app.plugin.PluginContext; + +/** + *

    Plugin main class to manage the lifecycle of the plugin.

    + *

    This class must be public and have a public constructor.

    + *

    Only one main class extending {@link BasePlugin} is allowed per plugin.

    + * + * @author LHY + * @since 1.0.0 + */ +@Component +public class DarkModePlugin extends BasePlugin { + + public DarkModePlugin(PluginContext pluginContext) { + super(pluginContext); + } + + @Override + public void start() { + System.out.println("插件启动成功!"); + } + + @Override + public void stop() { + System.out.println("插件停止!"); + } +} diff --git a/src/main/resources/logo.png b/src/main/resources/logo.png new file mode 100644 index 0000000..411f5cd Binary files /dev/null and b/src/main/resources/logo.png differ diff --git a/src/main/resources/plugin.yaml b/src/main/resources/plugin.yaml new file mode 100644 index 0000000..909f086 --- /dev/null +++ b/src/main/resources/plugin.yaml @@ -0,0 +1,22 @@ +# Refer https://docs.halo.run/developer-guide/plugin/basics/manifest + +apiVersion: plugin.halo.run/v1alpha1 +kind: Plugin +metadata: + # The name defines how the plugin is invoked, A unique name + name: dark-mode +spec: + enabled: true + requires: ">=2.25.0" + author: + name: LHY + website: https://github.com/LHY + logo: logo.png + homepage: https://github.com/LHY/dark-mode#readme + repo: https://github.com/LHY/dark-mode + issues: https://github.com/LHY/dark-mode/issues + displayName: "深色模式" + description: "为 Halo 后台管理面板提供深色/浅色模式切换,支持跟随系统、手动切换和偏好记忆" + license: + - name: "GPL-3.0" + url: "https://github.com/LHY/dark-mode/blob/main/LICENSE" diff --git a/src/test/java/run/halo/darkmode/DarkModePluginTest.java b/src/test/java/run/halo/darkmode/DarkModePluginTest.java new file mode 100644 index 0000000..c51d1ca --- /dev/null +++ b/src/test/java/run/halo/darkmode/DarkModePluginTest.java @@ -0,0 +1,24 @@ +package run.halo.darkmode; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import run.halo.app.plugin.PluginContext; + +@ExtendWith(MockitoExtension.class) +class DarkModePluginTest { + + @Mock + PluginContext context; + + @InjectMocks + DarkModePlugin plugin; + + @Test + void contextLoads() { + plugin.start(); + plugin.stop(); + } +} diff --git a/ui/build.gradle b/ui/build.gradle new file mode 100644 index 0000000..f97bde3 --- /dev/null +++ b/ui/build.gradle @@ -0,0 +1,33 @@ +plugins { + id 'base' + id "com.github.node-gradle.node" version "7.1.0" +} + +group 'run.halo.darkmode.ui' + +tasks.register('pnpmBuild', PnpmTask) { + group = 'build' + description = 'Build the UI project using pnpm' + args = ['build'] + dependsOn tasks.named('pnpmInstall') + inputs.dir(layout.projectDirectory.dir('src')) + inputs.files(fileTree( + dir: layout.projectDirectory, + includes: ['*.cjs', '*.ts', '*.js', '*.json', '*.yaml'])) + outputs.dir(layout.buildDirectory.dir('dist')) +} + +tasks.register('pnpmCheck', PnpmTask) { + group = 'verification' + description = 'Run unit tests for the UI project using pnpm' + args = ['test:unit'] + dependsOn tasks.named('pnpmInstall') +} + +tasks.named('check') { + dependsOn tasks.named('pnpmCheck') +} + +tasks.named('assemble') { + dependsOn tasks.named('pnpmBuild') +} diff --git a/ui/env.d.ts b/ui/env.d.ts new file mode 100644 index 0000000..ab11073 --- /dev/null +++ b/ui/env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/ui/eslint.config.ts b/ui/eslint.config.ts new file mode 100644 index 0000000..899a13f --- /dev/null +++ b/ui/eslint.config.ts @@ -0,0 +1,30 @@ +import { globalIgnores } from 'eslint/config' +import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript' +import pluginVue from 'eslint-plugin-vue' +import pluginVitest from '@vitest/eslint-plugin' +import pluginOxlint from 'eslint-plugin-oxlint' +import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' + +// To allow more languages other than `ts` in `.vue` files, uncomment the following lines: +// import { configureVueProject } from '@vue/eslint-config-typescript' +// configureVueProject({ scriptLangs: ['ts', 'tsx'] }) +// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup + +export default defineConfigWithVueTs( + { + name: 'app/files-to-lint', + files: ['**/*.{ts,mts,tsx,vue}'], + }, + + globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']), + + pluginVue.configs['flat/essential'], + vueTsConfigs.recommended, + + { + ...pluginVitest.configs.recommended, + files: ['src/**/__tests__/*'], + }, + ...pluginOxlint.configs['flat/recommended'], + skipFormatting, +) diff --git a/ui/package.json b/ui/package.json new file mode 100644 index 0000000..8827382 --- /dev/null +++ b/ui/package.json @@ -0,0 +1,55 @@ +{ + "type": "module", + "scripts": { + "build": "run-p type-check \"build-only {@}\" --", + "build-only": "vite build", + "dev": "vite build --watch --mode=development", + "lint:oxlint": "oxlint . --fix -D correctness --ignore-path ../.gitignore", + "lint:eslint": "eslint . --fix", + "lint": "run-s lint:*", + "prettier": "prettier --write src/", + "test:unit": "vitest --passWithNoTests", + "type-check": "vue-tsc --build" + }, + "prettier": { + "printWidth": 100, + "semi": false, + "singleQuote": true, + "tabWidth": 2 + }, + "dependencies": { + "@halo-dev/api-client": "^2.25.1", + "@halo-dev/components": "^2.25.1", + "@halo-dev/ui-shared": "^2.25.1", + "axios": "^1.13.5", + "canvas-confetti": "^1.9.3", + "vue": "^3.5.28" + }, + "devDependencies": { + "vite": "^8.0.16", + "@halo-dev/ui-plugin-bundler-kit": "^2.25.1", + "@iconify-json/ri": "^1.2.10", + "@tsconfig/node20": "^20.1.6", + "@types/canvas-confetti": "^1.9.0", + "@types/jsdom": "^21.1.7", + "@types/node": "^24.13.1", + "@vitest/eslint-plugin": "^1.2.7", + "@vue/eslint-config-prettier": "^10.2.0", + "@vue/eslint-config-typescript": "^14.5.1", + "@vue/test-utils": "^2.4.6", + "@vue/tsconfig": "^0.7.0", + "eslint": "^9.29.0", + "eslint-plugin-oxlint": "^0.16.12", + "eslint-plugin-vue": "~10.0.1", + "jsdom": "^26.1.0", + "npm-run-all2": "^7.0.2", + "oxlint": "^0.16.12", + "prettier": "^3.8.3", + "sass": "^1.89.2", + "typescript": "~5.8.3", + "unplugin-icons": "^23.0.1", + "vitest": "^4.1.0", + "vue-tsc": "^3.3.3" + }, + "packageManager": "pnpm@10.12.4" +} diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml new file mode 100644 index 0000000..e28b0d0 --- /dev/null +++ b/ui/pnpm-lock.yaml @@ -0,0 +1,4486 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@halo-dev/api-client': + specifier: ^2.25.1 + version: 2.25.2(axios@1.19.0) + '@halo-dev/components': + specifier: ^2.25.1 + version: 2.25.2(vue-router@5.2.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)))(vue@3.5.41(typescript@5.8.3)) + '@halo-dev/ui-shared': + specifier: ^2.25.1 + version: 2.25.2(@tiptap/pm@3.29.2)(axios@1.19.0)(vue-router@5.2.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)))(vue@3.5.41(typescript@5.8.3)) + axios: + specifier: ^1.13.5 + version: 1.19.0 + canvas-confetti: + specifier: ^1.9.3 + version: 1.9.4 + vue: + specifier: ^3.5.28 + version: 3.5.41(typescript@5.8.3) + devDependencies: + '@halo-dev/ui-plugin-bundler-kit': + specifier: ^2.25.1 + version: 2.25.2(@rsbuild/core@2.1.10)(@rsbuild/plugin-vue@2.0.1(@rsbuild/core@2.1.10)(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(vue@3.5.41(typescript@5.8.3)))(@vitejs/plugin-vue@6.0.8(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)))(axios@1.19.0)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)) + '@iconify-json/ri': + specifier: ^1.2.10 + version: 1.2.10 + '@tsconfig/node20': + specifier: ^20.1.6 + version: 20.1.9 + '@types/canvas-confetti': + specifier: ^1.9.0 + version: 1.9.0 + '@types/jsdom': + specifier: ^21.1.7 + version: 21.1.7 + '@types/node': + specifier: ^24.13.1 + version: 24.13.3 + '@vitest/eslint-plugin': + specifier: ^1.2.7 + version: 1.6.26(@typescript-eslint/eslint-plugin@8.66.0(@typescript-eslint/parser@8.66.0(eslint@9.39.5)(typescript@5.8.3))(eslint@9.39.5)(typescript@5.8.3))(eslint@9.39.5)(typescript@5.8.3)(vitest@4.1.10(@types/node@24.13.3)(jsdom@26.1.0)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))) + '@vue/eslint-config-prettier': + specifier: ^10.2.0 + version: 10.2.0(eslint@9.39.5)(prettier@3.9.6) + '@vue/eslint-config-typescript': + specifier: ^14.5.1 + version: 14.9.0(eslint-plugin-vue@10.0.1(eslint@9.39.5)(vue-eslint-parser@10.4.1(eslint@9.39.5)))(eslint@9.39.5)(typescript@5.8.3) + '@vue/test-utils': + specifier: ^2.4.6 + version: 2.4.11(@vue/compiler-dom@3.5.41)(@vue/server-renderer@3.5.41)(vue@3.5.41(typescript@5.8.3)) + '@vue/tsconfig': + specifier: ^0.7.0 + version: 0.7.0(typescript@5.8.3)(vue@3.5.41(typescript@5.8.3)) + eslint: + specifier: ^9.29.0 + version: 9.39.5 + eslint-plugin-oxlint: + specifier: ^0.16.12 + version: 0.16.12 + eslint-plugin-vue: + specifier: ~10.0.1 + version: 10.0.1(eslint@9.39.5)(vue-eslint-parser@10.4.1(eslint@9.39.5)) + jsdom: + specifier: ^26.1.0 + version: 26.1.0 + npm-run-all2: + specifier: ^7.0.2 + version: 7.0.2 + oxlint: + specifier: ^0.16.12 + version: 0.16.12 + prettier: + specifier: ^3.8.3 + version: 3.9.6 + sass: + specifier: ^1.89.2 + version: 1.102.0 + typescript: + specifier: ~5.8.3 + version: 5.8.3 + unplugin-icons: + specifier: ^23.0.1 + version: 23.0.1(@vue/compiler-sfc@3.5.41) + vite: + specifier: ^8.0.16 + version: 8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0) + vitest: + specifier: ^4.1.0 + version: 4.1.10(@types/node@24.13.3)(jsdom@26.1.0)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)) + vue-tsc: + specifier: ^3.3.3 + version: 3.3.9(typescript@5.8.3) + +packages: + + '@antfu/install-pkg@1.1.0': + resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==} + + '@asamuzakjp/css-color@3.2.0': + resolution: {integrity: sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==} + + '@babel/generator@8.0.0': + resolution: {integrity: sha512-NT9NrVwJsbSV6Y2FSstWa71EETOnzrjkL5/wX3D2mYHtKM+qvqB1DvR4D0Setb/gDBsHzRICifwEWMO8CnTF6g==} + engines: {node: ^22.18.0 || >=24.11.0} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@8.0.0': + resolution: {integrity: sha512-6mJgmFFFIIO82vvoLt9XtRC7/TkzXfts1t/SpRX4IHSzMgqoPYCWesVu1udUPUWioAE/2fcG6WuI8zrkE1gwrg==} + engines: {node: ^22.18.0 || >=24.11.0} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@8.0.4': + resolution: {integrity: sha512-4wFaiLd0bVo4cIoTXI3zKI038NIWE/cr3jvBjejOVYVxV/m8Ltav1USiGzG1fmS5J2RhgEOgXNNK46cRPnRsrg==} + engines: {node: ^22.18.0 || >=24.11.0} + + '@babel/parser@7.29.8': + resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/parser@8.0.4': + resolution: {integrity: sha512-srpptsAkEbbNIC/q8nT7o+m6CQe8CJUTV/t7MYc9NnWlgYVtHOb7JH6SorxMhN0kuRJjVqXbKClG6xSbPtzz+g==} + engines: {node: ^22.18.0 || >=24.11.0} + hasBin: true + + '@babel/types@7.29.8': + resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} + engines: {node: '>=6.9.0'} + + '@babel/types@8.0.4': + resolution: {integrity: sha512-eY+Yn3dCqTGmyiq2QRU66lA5FL8lqqqvecHt0fF3uHONIa7ToYsaCiWV8lOKqAs0Rb2SjixiKFROngnulPtt2g==} + engines: {node: ^22.18.0 || >=24.11.0} + + '@csstools/color-helpers@5.1.0': + resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} + engines: {node: '>=18'} + + '@csstools/css-calc@2.1.4': + resolution: {integrity: sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-color-parser@3.1.0': + resolution: {integrity: sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-parser-algorithms@3.0.5': + resolution: {integrity: sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-tokenizer@3.0.4': + resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} + engines: {node: '>=18'} + + '@emnapi/core@1.11.3': + resolution: {integrity: sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==} + + '@emnapi/runtime@1.11.3': + resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + + '@emnapi/wasi-threads@1.2.3': + resolution: {integrity: sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==} + + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.6': + resolution: {integrity: sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.5': + resolution: {integrity: sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@floating-ui/core@1.8.0': + resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} + + '@floating-ui/dom@1.1.1': + resolution: {integrity: sha512-TpIO93+DIujg3g7SykEAGZMDtbJRrmnYRCNYSjJlvIbGhBjRSNTLVbNeDQBrzy9qDgUbiWdc7KA0uZHZ2tJmiw==} + + '@floating-ui/utils@0.2.12': + resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} + + '@halo-dev/api-client@2.25.2': + resolution: {integrity: sha512-9FkxGu1N4Ct5TuSXyR8ktY6HzpDbgpFqqC67OqpSCGsX45/8iOm4+oXBqbHAhCWrRbMh1zHPxIE4zadWh7H1Qw==} + peerDependencies: + axios: ^1.16.0 + + '@halo-dev/components@2.25.2': + resolution: {integrity: sha512-54DqfDQE+6yaqObUKNvIiVvxaa33WorNe/RH/Zke4I2+0GGG1NKt8sfp4asQlnMjSTXs95yCLgT1Hju3QRiaTg==} + peerDependencies: + vue: ^3.5.x + vue-router: ^5.0.x + + '@halo-dev/ui-plugin-bundler-kit@2.25.2': + resolution: {integrity: sha512-IfauzRYtfghF53p1qYwTWXuxWTEQW+k5RWjWENou68uLj0R6nuAkxWo577EWNanPxmh4+P3bUFu+a4JGwKjXOg==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + '@rsbuild/core': ^1.0.0 || ^2.0.0 + '@rsbuild/plugin-vue': ^1.0.0 || ^2.0.0 + '@vitejs/plugin-vue': ^5.0.0 || ^6.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + + '@halo-dev/ui-shared@2.25.2': + resolution: {integrity: sha512-5VlIzlhrENXkc3s6FujTjN3jDIXCISLm4YtXc5/WBecSQaKlavE5N06ixDccuTVMs3sztRST6TdgvNRcMLEN6g==} + peerDependencies: + vue: ^3.5.x + vue-router: ^5.0.x + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@iconify-json/ri@1.2.10': + resolution: {integrity: sha512-WWMhoncVVM+Xmu9T5fgu2lhYRrKTEWhKk3Com0KiM111EeEsRLiASjpsFKnC/SrB6covhUp95r2mH8tGxhgd5Q==} + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@iconify/utils@3.1.4': + resolution: {integrity: sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw==} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@napi-rs/wasm-runtime@1.1.6': + resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@one-ini/wasm@0.1.1': + resolution: {integrity: sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==} + + '@oxc-project/types@0.143.0': + resolution: {integrity: sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==} + + '@oxlint/darwin-arm64@0.16.12': + resolution: {integrity: sha512-G7phYhlIA4ke2nW7tHLl+E5+rvdzgGA6830D+e+y1RGllT0w2ONGdKcVTj+2pXGCw6yPmCC5fDsDEn2+RPTfxg==} + cpu: [arm64] + os: [darwin] + + '@oxlint/darwin-x64@0.16.12': + resolution: {integrity: sha512-P/LSOgJ6SzQ3OKEIf3HsebgokZiZ5nDuTgIL4LpNCHlkOLDu/fT8XL9pSkR5y+60v0SOxUF/+aN0Q8EmxblrCw==} + cpu: [x64] + os: [darwin] + + '@oxlint/linux-arm64-gnu@0.16.12': + resolution: {integrity: sha512-0N/ZsW+cL7ZAUvOHbzMp3iApt5b/Q81q2e9RgEzkI6gUDCJK8/blWg0se/i6y9e24WH0ZC4bcxY1+Qz4ZQ+mFw==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxlint/linux-arm64-musl@0.16.12': + resolution: {integrity: sha512-MoG1SIw4RGowsOsPjm5HjRWymisRZWBea7ewMoXA5xIVQ3eqECifG0KJW0OZp96Ad8DFBEavdlNuImB2uXsMwg==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxlint/linux-x64-gnu@0.16.12': + resolution: {integrity: sha512-STho8QdMLfn/0lqRU94tGPaYX8lGJccPbqeUcEr3eK5gZ5ZBdXmiHlvkcngXFEXksYC8/5VoJN7Vf3HsmkEskw==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxlint/linux-x64-musl@0.16.12': + resolution: {integrity: sha512-i7pzSoj9nCg/ZzOe8dCZeFWyRRWDylR9tIX04xRTq3G6PBLm6i9VrOdEkxbgM9+pCkRzUc0a9D7rbtCF34TQUA==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxlint/win32-arm64@0.16.12': + resolution: {integrity: sha512-wcxq3IBJ7ZlONlXJxQM+7EMx+LX1nkz3ZS3R0EtDM76EOZaqe8BMkW5cXVhF8jarZTZC18oKAckW4Ng9d8adBg==} + cpu: [arm64] + os: [win32] + + '@oxlint/win32-x64@0.16.12': + resolution: {integrity: sha512-Ae1fx7wmAcMVqzS8rLINaFRpAdh29QzHh133bEYMHzfWBYyK/hLu9g4GLwC/lEIVQu9884b8qutGfdOk6Qia3w==} + cpu: [x64] + os: [win32] + + '@parcel/watcher-android-arm64@2.6.0': + resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [android] + + '@parcel/watcher-darwin-arm64@2.6.0': + resolution: {integrity: sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [darwin] + + '@parcel/watcher-darwin-x64@2.6.0': + resolution: {integrity: sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [darwin] + + '@parcel/watcher-freebsd-x64@2.6.0': + resolution: {integrity: sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [freebsd] + + '@parcel/watcher-linux-arm-glibc@2.6.0': + resolution: {integrity: sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-arm-musl@2.6.0': + resolution: {integrity: sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + libc: [musl] + + '@parcel/watcher-linux-arm64-glibc@2.6.0': + resolution: {integrity: sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-arm64-musl@2.6.0': + resolution: {integrity: sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@parcel/watcher-linux-x64-glibc@2.6.0': + resolution: {integrity: sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@parcel/watcher-linux-x64-musl@2.6.0': + resolution: {integrity: sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@parcel/watcher-win32-arm64@2.6.0': + resolution: {integrity: sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [win32] + + '@parcel/watcher-win32-x64@2.6.0': + resolution: {integrity: sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [win32] + + '@parcel/watcher@2.6.0': + resolution: {integrity: sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==} + engines: {node: '>= 10.0.0'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@pkgr/core@0.3.6': + resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} + engines: {node: ^14.18.0 || >=16.0.0} + + '@rolldown/binding-android-arm64@1.2.3': + resolution: {integrity: sha512-zrJtHDcaZJ1Fp7xf4hNl+7seH9Cn/N5TwLYkhgXREtBwAd/jaqW3uqeHxpDugJLVICWg4eW44kOQEGJ1r6jCGw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.3': + resolution: {integrity: sha512-ieIiibVCp0tX7TLu2cafoNPv8wJyYi01ekXpbf8q2j7F4rGAhhXb/eQh7ge9DRBY78GwmRQtvjZDux7EDbA8kA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.3': + resolution: {integrity: sha512-Zh9tCon19eDXJoihx0rqKhMUlMYqzwj3aPsSuHmI4RWZh62dWUL+DJN4C5YQya5TcQBJU/Fe8+rY0jhXTQITqA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.3': + resolution: {integrity: sha512-nGbJWewA1wrXXZiQhjAT5rhibGfns5ZNkDVqxsO6zJ3f3YvpoDNNmGMSbbhLuXKjNScaBJVOAboztAWVespQMg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.3': + resolution: {integrity: sha512-QNniJr5Kml0kDEB98jiDOJjXNroxIIi0IXIbdYzY26Xt1pVbeP62+KnoIZLwirOymX/0jDk/2gI/bNUv7A7OIw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.3': + resolution: {integrity: sha512-TkqEAcmmvH3I/q4114NB4RVt6241Dao48pF45uLcFGrwAaIn0iITgTAKP/dLjbN0R4buJjGb91+UHSoFmpgIWw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.3': + resolution: {integrity: sha512-NHqjnxpsndf4MPymxteFAWHHfkTL8HjWh1KB7z23ofZ6QO2euONuxDXjat69dKZRALnGypg8k8SsK8vZJoXv1Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.3': + resolution: {integrity: sha512-6tbrbwfz5GB9DQ4Jwo6hy9v+vR31xZlvzZ6n5Xut6Hhx5PvrA9q/HsK8KMaYQp063iqZGXwNvZtYNLD7EM/x0w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.3': + resolution: {integrity: sha512-oyuXxXmoZHjXC917IAPFAAv4wWAa0cM9afk8nx1+9/jNNOX1uPf8yDA6p7G0RypOfw/X0PQt5IfoquY1um+zSg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.3': + resolution: {integrity: sha512-TytMwF2KVGqP2tgd0I1OY0PAv78dZRAYcF5ssDzjM34SUXCED3uXvSd5+lHoC0bTD6eEdFz7LdQNCO1y0oVk9w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.3': + resolution: {integrity: sha512-/E9m3qstrJFVPoULV25mVQblSNExY2+kBsYe4sy0Tn0yOOgJ8wZbZt3KnRbF/XeU2Gl1STKUQnDNTqhIE5MD4A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.3': + resolution: {integrity: sha512-Kr0OcsoQI816i6HOl3vFHpd1K0eZyh76zgfj4c1nTyaTsd5r2Mj1lwM4R90y/qaCfmTn9eHy0SKwi98eitRxug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.3': + resolution: {integrity: sha512-hOtMwTqnME+/gJcH/PCZ0wn0zPUjiWOgkHpxbSJpfGKMezHltx1S7/k1SitzVa7Ww2cqrDDaFbZEhcJZO8o+Jw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.3': + resolution: {integrity: sha512-ekcqMMkI2PlhYnfzQnB/cEdYUVVJViWvoUyLrbzgDoi3Snfc1mVBwdnc306ufA5ejy8JSPjT2RlW1nQSjW7efg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@rsbuild/core@2.1.10': + resolution: {integrity: sha512-lwxC5w88U2AMv6aNwG3VH7+AV33N4JJQjD//egVWFsMbV+OE/bnfCsurSpX8s3lGyRYkJMwUVN+YXMbmmYZFfw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + core-js: '>= 3.0.0' + peerDependenciesMeta: + core-js: + optional: true + + '@rsbuild/plugin-vue@2.0.1': + resolution: {integrity: sha512-JbQ/e4J7lICXC6JpovJS9PHlIT0Vl1XngTni3HuVkXF82Q18k8nd0RmRDVRDFcb/mvqij5ITwZsez9h3DoYcQQ==} + peerDependencies: + '@rsbuild/core': ^2.0.0 + peerDependenciesMeta: + '@rsbuild/core': + optional: true + + '@rspack/binding-darwin-arm64@2.1.8': + resolution: {integrity: sha512-kia+eWtyWPvR4ntg1bWYoVU8nLPbUg2fG3zgBEocsTcsh5ZENSiEPxEKymDgMyIMONUqj611E0775cdUBoNmqw==} + cpu: [arm64] + os: [darwin] + + '@rspack/binding-darwin-x64@2.1.8': + resolution: {integrity: sha512-08pBkFhlD3Y3Qzh94w/Fc3skaIE3e96kl2P14m8+tnYTcglpOfpA2OwS3iHt9fOqy0HjoAVe6/MW3cBgs5iabA==} + cpu: [x64] + os: [darwin] + + '@rspack/binding-linux-arm64-gnu@2.1.8': + resolution: {integrity: sha512-KLniMc9GzhKpVqhPzaJo3KJwzdAllXVVqZIk/uL1QipXOxs57fgM4u7IexKPFVla0o/u1PQG/Ah2YLDmda24Ow==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-arm64-musl@2.1.8': + resolution: {integrity: sha512-yUKAxHNGnICtw5RnxFWu4dHtsz/tdt7rbeFcsINNVre9HcrRxf5XP+FbOGL/SMxd9oM9XCo10paU2WckTKwbEA==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rspack/binding-linux-riscv64-gnu@2.1.8': + resolution: {integrity: sha512-gg4S1jaitwYPHR9HZ3zNGH1EK2GXINm66p4kEpOP1gbc+akyOouVF/dMcu9NGPlRg58FbEhVRZYKu7Z/zcpKHg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-riscv64-musl@2.1.8': + resolution: {integrity: sha512-b/aU5j1h368SLNyz5u+flqpZVhzSZ1UIslaj9sZJuAvqkGWv3xsjc/28/PTo/RYXCxd0FNVAxTxWHKvRiAAS8w==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rspack/binding-linux-x64-gnu@2.1.8': + resolution: {integrity: sha512-EyegohSx0BJRqieCg9f/caCqFARRWkqI5hwJt6k530MoOTLeq8I3vsbeg24/2MktwIC1dmJi8bl0+WhPKQs4eQ==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rspack/binding-linux-x64-musl@2.1.8': + resolution: {integrity: sha512-I6E+goN+UQ297q4r1qdbiAyNCI3t0+a5Y0xDIAPOZfRDRxDTnH/LF8/y65gjsJoKRKyn7zxRC0T/NURTkRNQ9A==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rspack/binding-wasm32-wasi@2.1.8': + resolution: {integrity: sha512-om7GAKWAU3lcSvbCon2m7mzw8v9OTrO2LW2MZ1lGe/uVJJmwGGkl9HVoXFyWFLrN6YVFyx8iP+AkN4owDWB9Cw==} + cpu: [wasm32] + + '@rspack/binding-win32-arm64-msvc@2.1.8': + resolution: {integrity: sha512-WDnsP/SUb9zbxyGX9XjPw5AXrX86u5oidn0MDdfJduOOqdCSpHwmRjlQ8NUJhbBq9WqVJMFlcab7NwZVWX/yyg==} + cpu: [arm64] + os: [win32] + + '@rspack/binding-win32-ia32-msvc@2.1.8': + resolution: {integrity: sha512-QiMQMPNDiY3dhhaIdaFPzcPDC06cEYkNY89ea+EmDvNVgZq6V+2mFS/WnzZVMeEbGAYJCjsv/ABhhLT1hlYMvg==} + cpu: [ia32] + os: [win32] + + '@rspack/binding-win32-x64-msvc@2.1.8': + resolution: {integrity: sha512-b7sA5eB64vo2mbsuc//MOYzVLeCKHPn0dfP/GmNEoHdWbhRgZ/orZLWurYMQj04ELTLW6YCJEy59g5KRzNYHfw==} + cpu: [x64] + os: [win32] + + '@rspack/binding@2.1.8': + resolution: {integrity: sha512-tmAyHzDbPiy8V7HvQqtuPsbs6dPgwV0YjzW5XrPRV9gzf+Hdm7pvsZJKE1QKO9WV5RuvGYav98xIX6O+abZxzQ==} + + '@rspack/core@2.1.8': + resolution: {integrity: sha512-na1kyA6Mj8/LWw9O3A8NsrG9rNKN3Iq2WiXrEuIwsU5r/Nl/evm3hO7bWKHxgsRyydI6W7okwx3MXgf8rzel6g==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 + '@swc/helpers': ^0.5.23 + peerDependenciesMeta: + '@module-federation/runtime-tools': + optional: true + '@swc/helpers': + optional: true + + '@rspack/lite-tapable@1.1.5': + resolution: {integrity: sha512-uzB782zJbFTM3ta+e2Glikx36dca/6Y+DXyvFN+wb0Tx5ItIW+g03A0t3amP3LGzPHSkb0k81VHCm4jxLQwfag==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@swc/helpers@0.5.23': + resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} + + '@tiptap/core@3.29.2': + resolution: {integrity: sha512-oKUkiPUB7noilVYxI9lNzUD4rX17sHub+PYjMfHMWHG9A3nvIy+FdePIVIIhThKWF7ijhr3eIqHY51Bn+GAFtw==} + peerDependencies: + '@tiptap/pm': 3.29.2 + + '@tiptap/pm@3.29.2': + resolution: {integrity: sha512-GCOme7xHaS+DSoaA4CDcAD3l6JyBlvZhvCyfsy2Vp6j8tEoBkZWio7soYVosmlyn7zq8/64VeFZP5s47yfG7fQ==} + + '@tsconfig/node20@20.1.9': + resolution: {integrity: sha512-IjlTv1RsvnPtUcjTqtVsZExKVq+KQx4g5pCP5tI7rAs6Xesl2qFwSz/tPDBC4JajkL/MlezBu3gPUwqRHl+RIg==} + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + + '@types/canvas-confetti@1.9.0': + resolution: {integrity: sha512-aBGj/dULrimR1XDZLtG9JwxX1b4HPRF6CX9Yfwh3NvstZEm1ZL7RBnel4keCPSqs1ANRu1u2Aoz9R+VmtjYuTg==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/esrecurse@4.3.1': + resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/jsdom@21.1.7': + resolution: {integrity: sha512-yOriVnggzrnQ3a9OKOCxaVuSug3w3/SbOj5i7VwXWZEyUNl3bLF9V3MfxGbZKuwqJOQyRfqXyROBB1CoZLFWzA==} + + '@types/jsesc@2.5.1': + resolution: {integrity: sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/node@24.13.3': + resolution: {integrity: sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==} + + '@types/tough-cookie@4.0.5': + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + + '@typescript-eslint/eslint-plugin@8.66.0': + resolution: {integrity: sha512-p088eaGrzYz1s+7cov0aMOCkNGTJlVxF4jgubf28c8L0Cv9Rloj8YBHnv4hXLq6IIEE1AsjNWavO+k+8kP2Y0A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.66.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/parser@8.66.0': + resolution: {integrity: sha512-X6ypGChaWYk6PBtUg2BwuTZEFFcHJAtGTVJ9/lCTOufhZ4i9fNolQNnktq+kkMCwMj7V8Svsq7+TxSDslmhE0g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/project-service@8.66.0': + resolution: {integrity: sha512-7MthGPTt4BP69lSryqpqq8HQqxuzynssckL/jyDyk3+TNMQ3y2jFWkptCrktWvBrP+EH787Nl5N5Qpw7WZg+5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/scope-manager@8.66.0': + resolution: {integrity: sha512-8TGcH25j9zqJ/IULB/ppyhRvxA8QYfFEZ7nfbg6/BN9spDgb8fPWQXlE5l8TWBL50EtUx007uZ1o9VOwrq2/9g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.66.0': + resolution: {integrity: sha512-9D5gLYZG4rOjcoag8MQ/fWI8WqA9wcPDyOGyWtWFhvM1lHRbliqUSPIY5J3zqCU1tvSwzXxnnjhQhz5Ne7mJ4g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/type-utils@8.66.0': + resolution: {integrity: sha512-LG2dWfjZQQp0ADtAu/EWJVayefGL2UEZ3CDeI44D9v3rXB/WYUqE/jpO28KrEKul5AySrmI+Zh1v6v+xW2U9+g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/types@8.66.0': + resolution: {integrity: sha512-H6gcYaSDOyvL3AD/jHUtUFo2jqGgn/F6nuyuZSu0QTesxL+cP4dQoIMrODRofuJC09g64+WgZ6tE19Y1N2YIFQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.66.0': + resolution: {integrity: sha512-8/x4INiiQb10jGgXYD7116/zQ+OL84ZIFn0za68wwFHCanT/VLbBEroWht8RV8fn0/ZCAoazHLQgwUC0UQcDfg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/utils@8.66.0': + resolution: {integrity: sha512-jasearZPolBw5NJNYGMwxzHMF83niVWmMU1VdHzG1CyfI2VS7f7nZltnKtHcg20hW+7Uo5GfK4MeDPoU3qI8EA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/visitor-keys@8.66.0': + resolution: {integrity: sha512-dkKR8q+lKciskj1Y3vthHktl+3cMLWGyVUP23bRiPZ5O9BRT++4EqDDV+TVeIKBL1VXVEqrJlz8MYbcnvJcAlg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitejs/plugin-vue@6.0.8': + resolution: {integrity: sha512-0ZjgOg7oO6farnNGup7yvoM/YXZV84OZxHAwtflItNa/6zzQyVb5LNxyea3FEKEX2XlagIKzrlH7wwxkKgtiew==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + vue: ^3.2.25 + + '@vitest/eslint-plugin@1.6.26': + resolution: {integrity: sha512-2eawZk4MZvkEtMZFdScmCE0R1Rti85uRZpmbe9eAv5Q3blDZ5OxlrC9IHlSnxhDCqOO2xKNaD3oufl9BUlI0yA==} + engines: {node: '>=18'} + peerDependencies: + '@typescript-eslint/eslint-plugin': '*' + eslint: '>=8.57.0' + typescript: '>=5.0.0' + vitest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + typescript: + optional: true + vitest: + optional: true + + '@vitest/expect@4.1.10': + resolution: {integrity: sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==} + + '@vitest/mocker@4.1.10': + resolution: {integrity: sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.10': + resolution: {integrity: sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==} + + '@vitest/runner@4.1.10': + resolution: {integrity: sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==} + + '@vitest/snapshot@4.1.10': + resolution: {integrity: sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==} + + '@vitest/spy@4.1.10': + resolution: {integrity: sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==} + + '@vitest/utils@4.1.10': + resolution: {integrity: sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==} + + '@volar/language-core@2.4.28': + resolution: {integrity: sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==} + + '@volar/source-map@2.4.28': + resolution: {integrity: sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==} + + '@volar/typescript@2.4.28': + resolution: {integrity: sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==} + + '@vue-macros/common@3.1.4': + resolution: {integrity: sha512-/5Fv+6DgIcM9ajY05ZmKBv+LMX1M9A0X+IUwDRVdt67ciw8OV9bvG2r34p3RiEadlsQybjhKPRKNXDC8Bp23cw==} + engines: {node: '>=20.19.0'} + peerDependencies: + vue: ^2.7.0 || ^3.2.25 + peerDependenciesMeta: + vue: + optional: true + + '@vue/compiler-core@3.5.41': + resolution: {integrity: sha512-q0Xtv/F9w2YO/7htQhtiL+Ev2WCJbe5N2hc+XfgyKkEKqWpSxknmT8QOuGdEKNdjPq0c3F7rNpFkTo3Kfrm7pg==} + + '@vue/compiler-dom@3.5.41': + resolution: {integrity: sha512-oKacVfNglLvGjnS6BXOlGL7EyG2h8X03pqXCjzotRZUaXGjbrTJUnVAQjrCqUnS+lyu31nwQjZY/d817GmCnfw==} + + '@vue/compiler-sfc@3.5.41': + resolution: {integrity: sha512-XJhip7R2wy6vX3knCxdZN4KracFaZUef58s1KYewqluedHIJaPIVfXoYT7MF1F8nCvv6k8bWWxDC8opMkg1VTQ==} + + '@vue/compiler-ssr@3.5.41': + resolution: {integrity: sha512-U3v5OejKEGqOI0Wy0+Sz7hGuIFZHA4LSXzrNM3IMIeDyJEBBfTpX26n3SDgToRpP2bLc9FfI2j/kSgcJ8Emq5A==} + + '@vue/devtools-api@8.2.1': + resolution: {integrity: sha512-6u4vXBlIBAC1wMplIZgpyPn7uh/s4Bf6F5bMzvLv+EdJ0aHs/+4B7Ygv864EStQSjRbsRzTko/kUG1A1IejQ3A==} + + '@vue/devtools-kit@8.2.1': + resolution: {integrity: sha512-FIGIuq3AWReEpbAHY/cRGeHDfI0qOb8OCQ3YjbEAX04uaxIDbGc9rhkbVcG7rnfHPXE3RsU5KrWOu9V/okd8AQ==} + + '@vue/devtools-shared@8.2.1': + resolution: {integrity: sha512-Fkac7lUdGReh6pVOi3AYPRGe82LQqRmAfThW7RRligOAP0ZA/Z1z9XLHDM9dv34pV2HRc79DK8uKPeG2fLnA/g==} + + '@vue/eslint-config-prettier@10.2.0': + resolution: {integrity: sha512-GL3YBLwv/+b86yHcNNfPJxOTtVFJ4Mbc9UU3zR+KVoG7SwGTjPT+32fXamscNumElhcpXW3mT0DgzS9w32S7Bw==} + peerDependencies: + eslint: '>= 8.21.0' + prettier: '>= 3.0.0' + + '@vue/eslint-config-typescript@14.9.0': + resolution: {integrity: sha512-E3j9hDlfVf10F30MRcLTPY2IIhWIx1nsvkVukk14kTcuA+oBVot9zsP1hzsO+PAMDxV3Fd9FimBJtUBNBL5KFA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + eslint: ^9.10.0 || ^10.0.0 + eslint-plugin-vue: ^9.28.0 || ^10.0.0 + typescript: '>=4.8.4' + peerDependenciesMeta: + typescript: + optional: true + + '@vue/language-core@3.3.9': + resolution: {integrity: sha512-in/68oAa4BCtVY6n/nkuhLIkV8DHYd2UivedJ6cMZ6UYtlq9jaoaSNUBHYCVO44z3nKg7MdE5OBoHKt5SxeBKQ==} + + '@vue/reactivity@3.5.41': + resolution: {integrity: sha512-rznsqKM0np0x18EjzF8x88MpEhdNsffbvFbckLL5+oUKz1BxAImEmO7J1ArRYSyo6aQaVoBDp7jEkT91OOxydA==} + + '@vue/runtime-core@3.5.41': + resolution: {integrity: sha512-Vcry58hiAKwGen9Z1jUZE0feFsNArPCMOImYI8el48A9Idf6DuQYD0U05zZIF2Iad1hGhPSvcbBbAOhNr55fhg==} + + '@vue/runtime-dom@3.5.41': + resolution: {integrity: sha512-3vVBahVBS9+U6cmXBLyb8nE6/yYo4J/CGI9eVFs3KiMc0YHuudwKyShTD65jtJy/L9PUUxNAFu4cj4LiJ0UFbw==} + + '@vue/server-renderer@3.5.41': + resolution: {integrity: sha512-n6hx/pNFfbD6SuyeuMVkvqox8bwf/ET9JlA/kAz/imw8sw++wkqKe2mHX5KutjPpbKE4Z56yTHszoOjGMI9igQ==} + + '@vue/shared@3.5.41': + resolution: {integrity: sha512-IOnwSCma8j+9xJT6b8H0dEYidC80NsYmNMlZxRsukYcSoGaDBohog5hDxzeUXdFeGWFA++vWvxqOmrr96VlqMA==} + + '@vue/test-utils@2.4.11': + resolution: {integrity: sha512-GDqaqZsA6m2E5vNzej0aYiIb6BX8xV9pNSbbbXKOfEYwg7ZNblVX8suyqmUBThq8VIrgAJNxn+z72hVtUeiWHA==} + peerDependencies: + '@vue/compiler-dom': 3.x + '@vue/server-renderer': 3.x + vue: 3.x + peerDependenciesMeta: + '@vue/server-renderer': + optional: true + + '@vue/tsconfig@0.7.0': + resolution: {integrity: sha512-ku2uNz5MaZ9IerPPUyOHzyjhXoX2kVJaVf7hL315DC17vS6IiZRmmCPfggNbU16QTvM80+uYYy3eYJB59WCtvg==} + peerDependencies: + typescript: 5.x + vue: ^3.4.0 + peerDependenciesMeta: + typescript: + optional: true + vue: + optional: true + + abbrev@2.0.0: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.18.0: + resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + alien-signals@3.2.1: + resolution: {integrity: sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + ast-kit@2.2.0: + resolution: {integrity: sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==} + engines: {node: '>=20.19.0'} + + ast-walker-scope@0.9.0: + resolution: {integrity: sha512-IJdzo2vLiElBxKzwS36VsCue/62d6IdWjnPB2v3nuPKeWGynp6FF/CYoLa5i/3jXH/z97ZDdsXz6abpgM6w07A==} + engines: {node: '>=20.19.0'} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + axios@1.19.0: + resolution: {integrity: sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + birpc@2.9.0: + resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==} + + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + + brace-expansion@1.1.18: + resolution: {integrity: sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==} + + brace-expansion@2.1.4: + resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} + + brace-expansion@5.0.9: + resolution: {integrity: sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==} + engines: {node: 20 || >=22} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + canvas-confetti@1.9.4: + resolution: {integrity: sha512-yxQbJkAVrFXWNbTUjPqjF7G+g6pDotOUHGbkZq2NELZUMDpiJ85rIEazVb8GTaAptNW2miJAXbs1BtioA251Pw==} + + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + + confbox@0.2.4: + resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==} + + config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + + cssstyle@4.6.0: + resolution: {integrity: sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==} + engines: {node: '>=18'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + data-urls@5.0.0: + resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} + engines: {node: '>=18'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + editorconfig@1.0.7: + resolution: {integrity: sha512-e0GOtq/aTQhVdNyDU9e02+wz9oDDM+SIOQxWME2QRjzRX5yyLAuHDE+0aE8vHb9XRC8XD37eO2u57+F09JqFhw==} + engines: {node: '>=14'} + hasBin: true + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@2.3.1: + resolution: {integrity: sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-config-prettier@10.1.8: + resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-plugin-oxlint@0.16.12: + resolution: {integrity: sha512-41nSsLHg2oOnl7E/Bb5dypPuIAlMDTobo71+HeRVn1wipC5VXU8GBPVXiwi2RVcnwpEHy3TwEYcatrDMjKd3Sg==} + + eslint-plugin-prettier@5.5.6: + resolution: {integrity: sha512-ifetmTcxWfz+4qRW3pH/ujdTq2jQIj59AxJMIN26K5avYgU8dxycUETQonWiW+wPrYXA0j3Try0l1CnwVQtDqQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + + eslint-plugin-vue@10.0.1: + resolution: {integrity: sha512-A5dRYc3eQ5i2rJFBW8J6F69ur/H7YfYg+5SCg6v829FU0BhM4fUTrRVR2d4MdZgzw0ioJEk6otYHEAnoGFqO4A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + vue-eslint-parser: ^10.0.0 + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-scope@9.1.2: + resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint@9.39.5: + resolution: {integrity: sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + espree@11.2.0: + resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + exsolve@1.1.1: + resolution: {integrity: sha512-9U/jZUgjnSGyntRr6y5Muu1MJcwFl6kPu7k8qLF0IMNfLqvw0NZ4nnVDq0RVoZ0RvCyumib4Ez3KYrVfilrw+g==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.20.1: + resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.4.4: + resolution: {integrity: sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==} + + floating-vue@5.2.2: + resolution: {integrity: sha512-afW+h2CFafo+7Y9Lvw/xsqjaQlKLdJV7h1fCHfcYQ1C4SVMlu7OAekqWgu5d4SgvkBVU0pVpLlVsrSTBURFRkg==} + peerDependencies: + '@nuxt/kit': ^3.2.0 + vue: ^3.2.0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + + follow-redirects@1.16.0: + resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + + html-encoding-sniffer@4.0.0: + resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} + engines: {node: '>=18'} + + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.6: + resolution: {integrity: sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==} + engines: {node: '>= 4'} + + immutable@5.1.9: + resolution: {integrity: sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + import-meta-resolve@4.2.0: + resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + isexe@3.1.5: + resolution: {integrity: sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==} + engines: {node: '>=18'} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + js-beautify@1.15.4: + resolution: {integrity: sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==} + engines: {node: '>=14'} + hasBin: true + + js-cookie@3.0.8: + resolution: {integrity: sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==} + + js-yaml@4.3.1: + resolution: {integrity: sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==} + hasBin: true + + jsdom@26.1.0: + resolution: {integrity: sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==} + engines: {node: '>=18'} + peerDependencies: + canvas: ^3.0.0 + peerDependenciesMeta: + canvas: + optional: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-even-better-errors@4.0.0: + resolution: {integrity: sha512-lR4MXjGNgkJc7tkQ97kb2nuEMnNCyU//XYVH0MKTGcXEiSudQ5MKGKen3C5QubYy0vmq+JGitUg92uuywGEwIA==} + engines: {node: ^18.17.0 || >=20.5.0} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + local-pkg@1.2.1: + resolution: {integrity: sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q==} + engines: {node: '>=14'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + magic-string-ast@1.0.3: + resolution: {integrity: sha512-CvkkH1i81zl7mmb94DsRiFeG9V2fR2JeuK8yDgS8oiZSFa++wWLEgZ5ufEOyLHbvSbD1gTRKv9NdX69Rnvr9JA==} + engines: {node: '>=20.19.0'} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + memorystream@0.3.1: + resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} + engines: {node: '>= 0.10.0'} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} + + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + + mlly@1.8.2: + resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + + nanoid@3.3.17: + resolution: {integrity: sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + node-addon-api@7.1.1: + resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} + + nopt@7.2.1: + resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true + + nostics@1.2.0: + resolution: {integrity: sha512-FGqEfhQjrvo1lL8KFifdTQiNwwQHJxC1jtYE1Rc54qF/jxONUNL+kC9gS1krX8Q65PgrQ5fCqH/I4NhWBvdSqg==} + + npm-normalize-package-bin@4.0.0: + resolution: {integrity: sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==} + engines: {node: ^18.17.0 || >=20.5.0} + + npm-run-all2@7.0.2: + resolution: {integrity: sha512-7tXR+r9hzRNOPNTvXegM+QzCuMjzUIIq66VDunL6j60O4RrExx32XUhlrS7UK4VcdGw5/Wxzb3kfNcFix9JKDA==} + engines: {node: ^18.17.0 || >=20.5.0, npm: '>= 9'} + hasBin: true + + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + + nwsapi@2.2.24: + resolution: {integrity: sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + obug@2.1.4: + resolution: {integrity: sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==} + engines: {node: '>=12.20.0'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + orderedmap@2.1.1: + resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==} + + oxlint@0.16.12: + resolution: {integrity: sha512-1oN3P9bzE90zkbjLTc+uICVLwSR+eQaDaYVipS0BtmtmEd3ccQue0y7npCinb35YqKzIv1LZxhoU9nm5fgmQuw==} + engines: {node: '>=8.*'} + hasBin: true + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + package-manager-detector@1.8.0: + resolution: {integrity: sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} + + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + + pidtree@0.6.1: + resolution: {integrity: sha512-e0F9AOF1JMrCfBsyJOwU9lNvQ0WtXTq0j/4jk0BQ5JSI9VAybPXmDpPRw/2FQ3e5d3ZFN1mLh7jW99m/jjaptw==} + engines: {node: '>=0.10'} + hasBin: true + + pkg-types@1.3.1: + resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + + pkg-types@2.3.1: + resolution: {integrity: sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==} + + postcss-selector-parser@6.1.4: + resolution: {integrity: sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==} + engines: {node: '>=4'} + + postcss@8.5.26: + resolution: {integrity: sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-linter-helpers@1.0.1: + resolution: {integrity: sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==} + engines: {node: '>=6.0.0'} + + prettier@3.9.6: + resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} + engines: {node: '>=14'} + hasBin: true + + prosemirror-changeset@2.4.1: + resolution: {integrity: sha512-96WBLhOaYhJ+kPhLg3uW359Tz6I/MfcrQfL4EGv4SrcqKEMC1gmoGrXHecPE8eOwTVCJ4IwgfzM8fFad25wNfw==} + + prosemirror-commands@1.7.2: + resolution: {integrity: sha512-q6Q6szxqdu9Xd6EcdKsqXghu5nQdZTpB4Q9yd04WRc7/jt763e/rT60Owh0L1GYY+T46o5rD+9lEN36dZS43tw==} + + prosemirror-dropcursor@1.8.3: + resolution: {integrity: sha512-FoYbsJR8gK+DGlqhNoE29Loa38eIZPzQRIb1VMaDNBoo4OLP6vVof/jR8qFY/6XvUd6Dhug8MDCHl2a/h8RTfQ==} + + prosemirror-gapcursor@1.4.1: + resolution: {integrity: sha512-pMdYaEnjNMSwl11yjEGtgTmLkR08m/Vl+Jj443167p9eB3HVQKhYCc4gmHVDsLPODfZfjr/MmirsdyZziXbQKw==} + + prosemirror-history@1.5.0: + resolution: {integrity: sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==} + + prosemirror-inputrules@1.5.1: + resolution: {integrity: sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==} + + prosemirror-keymap@1.2.3: + resolution: {integrity: sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==} + + prosemirror-model@1.25.11: + resolution: {integrity: sha512-QWg9RhnpLlogAmp3p96uEFrE5txQpFynd4vhBAELkwgOCWQs/X0yCzB3/hrHqiPwf91RG5KyWq6553zs9JqIOQ==} + + prosemirror-schema-list@1.5.1: + resolution: {integrity: sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==} + + prosemirror-state@1.4.4: + resolution: {integrity: sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==} + + prosemirror-tables@1.8.5: + resolution: {integrity: sha512-V/0cDCsHKHe/tfWkeCmthNUcEp1IVO3p6vwN8XtwE9PZQLAZJigbw3QoraAdfJPir4NKJtNvOB8oYGKRl+t0Dw==} + + prosemirror-transform@1.12.0: + resolution: {integrity: sha512-GxboyN4AMIsoHNtz5uf2r2Ru551i5hWeCMD6E2Ib4Eogqoub0NflniaBPVQ4MrGE5yZ8JV9tUHg9qcZTTrcN4w==} + + prosemirror-view@1.42.2: + resolution: {integrity: sha512-Pdg0l5kXm8aLDquFAnQFTCITg0q44sLqBlHlpsVLD9segdOao8TOfQdAhCrCXyVgPSRr6UDDROOIWA3bIrN9YQ==} + + proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + + proxy-from-env@2.1.0: + resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} + engines: {node: '>=10'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qs@6.15.3: + resolution: {integrity: sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==} + engines: {node: '>=0.6'} + + quansync@0.2.11: + resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + read-package-json-fast@4.0.0: + resolution: {integrity: sha512-qpt8EwugBWDw2cgE2W+/3oxC+KTez2uSVR8JU9Q36TXPAGCaozfQUs59v4j4GFpWTaw0i6hAZSvOmu1J0uOEUg==} + engines: {node: ^18.17.0 || >=20.5.0} + + readdirp@5.1.1: + resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==} + engines: {node: '>= 20.19.0'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rolldown@1.2.3: + resolution: {integrity: sha512-rn9wpmxplLf7NLNyCk9FyWh3FM43DbY8jOzCdEPzH7uflhTftRbCEpqi6Ly2osgoU8OwObtmavMbWLaWy4LX7A==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + rope-sequence@1.3.4: + resolution: {integrity: sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==} + + rrweb-cssom@0.8.0: + resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} + + rspack-vue-loader@17.6.2: + resolution: {integrity: sha512-ojnONLyFz0SCLYSDrC8NwHqUBgj/lHFNVmv1hCWk4vaPYjfdBRCLJEGla+P7PtkBkc4eKFgfRSMbSNVyM8EwaQ==} + peerDependencies: + '@rspack/core': ^1.0.0 || ^2.0.0 + '@vue/compiler-sfc': '*' + vue: '*' + peerDependenciesMeta: + '@rspack/core': + optional: true + '@vue/compiler-sfc': + optional: true + vue: + optional: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + sass@1.102.0: + resolution: {integrity: sha512-NSOyTnaQF7rTAEOtI2fwb386vL+akyiQLBZu8Na7hXCb+umJy0GAqlcMIaqACZ6Z1VgTBS4K9PG6B3IdjHGJsw==} + engines: {node: '>=20.19.0'} + hasBin: true + + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + + scule@1.3.0: + resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + shell-quote@1.10.0: + resolution: {integrity: sha512-w1aiOKwKuRgtwAReIIj89puqg+I7GvX4IbLrvmhXbzQsj1+Zwi4VO3+fa6ZF91TWSjIxoEkKnMeHcLEODK5ZXA==} + engines: {node: '>= 0.4'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@4.2.0: + resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + symbol-tree@3.2.4: + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + + synckit@0.11.13: + resolution: {integrity: sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==} + engines: {node: ^14.18.0 || >=16.0.0} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@1.3.0: + resolution: {integrity: sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinyrainbow@3.1.1: + resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==} + engines: {node: '>=14.0.0'} + + tldts-core@6.1.86: + resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} + + tldts@6.1.86: + resolution: {integrity: sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==} + hasBin: true + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tough-cookie@5.1.2: + resolution: {integrity: sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==} + engines: {node: '>=16'} + + tr46@5.1.1: + resolution: {integrity: sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==} + engines: {node: '>=18'} + + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + typescript-eslint@8.66.0: + resolution: {integrity: sha512-QlEbBPz/RuJ1XUHj29nm3t0F/O/cSlEnntozqPOYHnnTGAXFamnMBu5i9Vn6vhUPHGAjR+Vl+5J8vPN/BMUrJw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} + + undici-types@7.18.2: + resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} + + unplugin-icons@23.0.1: + resolution: {integrity: sha512-rv0XEJepajKzDLvRUWASM8K+8+/CCfZn2jtogXqg6RIp7kpatRc/aFrVJn8ANQA09e++lPEEv9yX8cC9enc+QQ==} + peerDependencies: + '@svgr/core': '>=7.0.0' + '@svgx/core': ^1.0.1 + '@vue/compiler-sfc': ^3.0.2 + svelte: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + '@svgr/core': + optional: true + '@svgx/core': + optional: true + '@vue/compiler-sfc': + optional: true + svelte: + optional: true + + unplugin-utils@0.3.2: + resolution: {integrity: sha512-xVToRh2CTmLk2HnEG7ac4rl1MJTT3RFkpS8B++/SnB0kXvuaavD+n3m/vrzyWQOdJNSZQACnbz01pnppbwV5BA==} + engines: {node: '>=20.19.0'} + + unplugin@2.3.11: + resolution: {integrity: sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==} + engines: {node: '>=18.12.0'} + + unplugin@3.3.0: + resolution: {integrity: sha512-qa66K+crbfyE6JK10GjvbJeRrOsuC/JpbnHctfyp/i4oBTxWOzJfRZyDiOk1PtErMFRu8JhsU/wPvOdBNWe5Rg==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@farmfe/core': '*' + '@rspack/core': '*' + bun-types-no-globals: '*' + esbuild: '*' + rolldown: '*' + rollup: '*' + unloader: '*' + vite: '*' + webpack: '*' + peerDependenciesMeta: + '@farmfe/core': + optional: true + '@rspack/core': + optional: true + bun-types-no-globals: + optional: true + esbuild: + optional: true + rolldown: + optional: true + rollup: + optional: true + unloader: + optional: true + vite: + optional: true + webpack: + optional: true + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + vite@8.2.0: + resolution: {integrity: sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.4.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@4.1.10: + resolution: {integrity: sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.10 + '@vitest/browser-preview': 4.1.10 + '@vitest/browser-webdriverio': 4.1.10 + '@vitest/coverage-istanbul': 4.1.10 + '@vitest/coverage-v8': 4.1.10 + '@vitest/ui': 4.1.10 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + vscode-uri@3.1.0: + resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} + + vue-component-type-helpers@3.3.9: + resolution: {integrity: sha512-3c/UfMe0SqyEfcGTyH7mfshHagJ9QTCbppCb0/uGpHZpFug7+If3GeGZN7I0YheKEExemx3xldQPoO7PQSOLQg==} + + vue-eslint-parser@10.4.1: + resolution: {integrity: sha512-Gk6gRDj0n/fkRa3C3l0bBheoBckUq/Rs0F/TvMWIS6nzzx67amAViMe9CkNgsP2tXyQONvGiHQESHwFtZ3aYDA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + + vue-resize@2.0.0-alpha.1: + resolution: {integrity: sha512-7+iqOueLU7uc9NrMfrzbG8hwMqchfVfSzpVlCMeJQe4pyibqyoifDNbKTZvwxZKDvGkB+PdFeKvnGZMoEb8esg==} + peerDependencies: + vue: ^3.0.0 + + vue-router@5.2.0: + resolution: {integrity: sha512-QAC5i0LEb1GLG0LXDQmHu8L7FX12j0KwU/JTKmLQUJMrn04gQdKP6Du+p0QwpHb3iy71vBlqnHQ8WAfOSAWhqw==} + peerDependencies: + '@pinia/colada': '>=0.21.2' + '@vue/compiler-sfc': ^3.5.34 || ^4.0.0 + pinia: ^3.0.4 || ^4.0.2 + vite: ^7.3.0 || ^8.0.0 + vue: ^3.5.34 || ^4.0.0 + peerDependenciesMeta: + '@pinia/colada': + optional: true + '@vue/compiler-sfc': + optional: true + pinia: + optional: true + vite: + optional: true + + vue-tsc@3.3.9: + resolution: {integrity: sha512-TS3Y1ux/IRoE8OCP2PpACAeOseuIs0UvWrcr7u+w3PmfY+SlCfEf8zjrBgnQksHUgLpthi5vHlffcQTQTdPBZA==} + hasBin: true + peerDependencies: + typescript: '>=5.0.0' + + vue@3.5.41: + resolution: {integrity: sha512-2laE0p+aK+/AOPG/XL/WepOs/GlK755LJ1XECi9kDUrz1FKNw8rb2Xzlw9JS1rqEV55nb0ttsKxVlTCcd+R5cg==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + w3c-keyname@2.2.8: + resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==} + + w3c-xmlserializer@5.0.0: + resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} + engines: {node: '>=18'} + + webidl-conversions@7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} + + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + + whatwg-encoding@3.1.1: + resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} + engines: {node: '>=18'} + deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation + + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + + whatwg-url@14.2.0: + resolution: {integrity: sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==} + engines: {node: '>=18'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + which@5.0.0: + resolution: {integrity: sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==} + engines: {node: ^18.17.0 || >=20.5.0} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + ws@8.21.2: + resolution: {integrity: sha512-54dMVAo4WIe6SKy3vBgN+9bJZqqQ8IMRevAkOLQALhi49qkkQDQfWdAZ8KQlXiEabw88ARXXdUrlvtbKQX+aKw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@antfu/install-pkg@1.1.0': + dependencies: + package-manager-detector: 1.8.0 + tinyexec: 1.3.0 + + '@asamuzakjp/css-color@3.2.0': + dependencies: + '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + lru-cache: 10.4.3 + + '@babel/generator@8.0.0': + dependencies: + '@babel/parser': 8.0.4 + '@babel/types': 8.0.4 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + '@types/jsesc': 2.5.1 + jsesc: 3.1.0 + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-string-parser@8.0.0': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-identifier@8.0.4': {} + + '@babel/parser@7.29.8': + dependencies: + '@babel/types': 7.29.8 + + '@babel/parser@8.0.4': + dependencies: + '@babel/types': 8.0.4 + + '@babel/types@7.29.8': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@babel/types@8.0.4': + dependencies: + '@babel/helper-string-parser': 8.0.0 + '@babel/helper-validator-identifier': 8.0.4 + + '@csstools/color-helpers@5.1.0': {} + + '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/css-color-parser@3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/color-helpers': 5.1.0 + '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/css-tokenizer@3.0.4': {} + + '@emnapi/core@1.11.3': + dependencies: + '@emnapi/wasi-threads': 1.2.3 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.5)': + dependencies: + eslint: 9.39.5 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.2': {} + + '@eslint/config-array@0.21.2': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3 + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.6': + dependencies: + ajv: 6.15.0 + debug: 4.4.3 + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.1 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.5': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + + '@floating-ui/core@1.8.0': + dependencies: + '@floating-ui/utils': 0.2.12 + + '@floating-ui/dom@1.1.1': + dependencies: + '@floating-ui/core': 1.8.0 + + '@floating-ui/utils@0.2.12': {} + + '@halo-dev/api-client@2.25.2(axios@1.19.0)': + dependencies: + axios: 1.19.0 + qs: 6.15.3 + + '@halo-dev/components@2.25.2(vue-router@5.2.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)))(vue@3.5.41(typescript@5.8.3))': + dependencies: + floating-vue: 5.2.2(vue@3.5.41(typescript@5.8.3)) + vue: 3.5.41(typescript@5.8.3) + vue-router: 5.2.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)) + transitivePeerDependencies: + - '@nuxt/kit' + + '@halo-dev/ui-plugin-bundler-kit@2.25.2(@rsbuild/core@2.1.10)(@rsbuild/plugin-vue@2.0.1(@rsbuild/core@2.1.10)(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(vue@3.5.41(typescript@5.8.3)))(@vitejs/plugin-vue@6.0.8(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)))(axios@1.19.0)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))': + dependencies: + '@halo-dev/api-client': 2.25.2(axios@1.19.0) + '@rsbuild/core': 2.1.10 + '@rsbuild/plugin-vue': 2.0.1(@rsbuild/core@2.1.10)(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(vue@3.5.41(typescript@5.8.3)) + '@vitejs/plugin-vue': 6.0.8(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)) + js-yaml: 4.3.1 + semver: 7.8.5 + vite: 8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0) + transitivePeerDependencies: + - axios + + '@halo-dev/ui-shared@2.25.2(@tiptap/pm@3.29.2)(axios@1.19.0)(vue-router@5.2.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)))(vue@3.5.41(typescript@5.8.3))': + dependencies: + '@halo-dev/api-client': 2.25.2(axios@1.19.0) + '@tiptap/core': 3.29.2(@tiptap/pm@3.29.2) + mitt: 3.0.1 + vue: 3.5.41(typescript@5.8.3) + vue-router: 5.2.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)) + transitivePeerDependencies: + - '@tiptap/pm' + - axios + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@iconify-json/ri@1.2.10': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify/types@2.0.0': {} + + '@iconify/utils@3.1.4': + dependencies: + '@antfu/install-pkg': 1.1.0 + '@iconify/types': 2.0.0 + import-meta-resolve: 4.2.0 + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)': + dependencies: + '@emnapi/core': 1.11.3 + '@emnapi/runtime': 1.11.3 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.20.1 + + '@one-ini/wasm@0.1.1': {} + + '@oxc-project/types@0.143.0': {} + + '@oxlint/darwin-arm64@0.16.12': + optional: true + + '@oxlint/darwin-x64@0.16.12': + optional: true + + '@oxlint/linux-arm64-gnu@0.16.12': + optional: true + + '@oxlint/linux-arm64-musl@0.16.12': + optional: true + + '@oxlint/linux-x64-gnu@0.16.12': + optional: true + + '@oxlint/linux-x64-musl@0.16.12': + optional: true + + '@oxlint/win32-arm64@0.16.12': + optional: true + + '@oxlint/win32-x64@0.16.12': + optional: true + + '@parcel/watcher-android-arm64@2.6.0': + optional: true + + '@parcel/watcher-darwin-arm64@2.6.0': + optional: true + + '@parcel/watcher-darwin-x64@2.6.0': + optional: true + + '@parcel/watcher-freebsd-x64@2.6.0': + optional: true + + '@parcel/watcher-linux-arm-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-arm-musl@2.6.0': + optional: true + + '@parcel/watcher-linux-arm64-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-arm64-musl@2.6.0': + optional: true + + '@parcel/watcher-linux-x64-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-x64-musl@2.6.0': + optional: true + + '@parcel/watcher-win32-arm64@2.6.0': + optional: true + + '@parcel/watcher-win32-x64@2.6.0': + optional: true + + '@parcel/watcher@2.6.0': + dependencies: + detect-libc: 2.1.2 + is-glob: 4.0.3 + node-addon-api: 7.1.1 + picomatch: 4.0.5 + optionalDependencies: + '@parcel/watcher-android-arm64': 2.6.0 + '@parcel/watcher-darwin-arm64': 2.6.0 + '@parcel/watcher-darwin-x64': 2.6.0 + '@parcel/watcher-freebsd-x64': 2.6.0 + '@parcel/watcher-linux-arm-glibc': 2.6.0 + '@parcel/watcher-linux-arm-musl': 2.6.0 + '@parcel/watcher-linux-arm64-glibc': 2.6.0 + '@parcel/watcher-linux-arm64-musl': 2.6.0 + '@parcel/watcher-linux-x64-glibc': 2.6.0 + '@parcel/watcher-linux-x64-musl': 2.6.0 + '@parcel/watcher-win32-arm64': 2.6.0 + '@parcel/watcher-win32-x64': 2.6.0 + optional: true + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@pkgr/core@0.3.6': {} + + '@rolldown/binding-android-arm64@1.2.3': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.3': + optional: true + + '@rolldown/binding-darwin-x64@1.2.3': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.3': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.3': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.3': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.3': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.3': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.3': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.3': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.3': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.3': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.3': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.3': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@rsbuild/core@2.1.10': + dependencies: + '@rspack/core': 2.1.8(@swc/helpers@0.5.23) + '@swc/helpers': 0.5.23 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + + '@rsbuild/plugin-vue@2.0.1(@rsbuild/core@2.1.10)(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(vue@3.5.41(typescript@5.8.3))': + dependencies: + rspack-vue-loader: 17.6.2(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(vue@3.5.41(typescript@5.8.3)) + optionalDependencies: + '@rsbuild/core': 2.1.10 + transitivePeerDependencies: + - '@rspack/core' + - '@vue/compiler-sfc' + - vue + + '@rspack/binding-darwin-arm64@2.1.8': + optional: true + + '@rspack/binding-darwin-x64@2.1.8': + optional: true + + '@rspack/binding-linux-arm64-gnu@2.1.8': + optional: true + + '@rspack/binding-linux-arm64-musl@2.1.8': + optional: true + + '@rspack/binding-linux-riscv64-gnu@2.1.8': + optional: true + + '@rspack/binding-linux-riscv64-musl@2.1.8': + optional: true + + '@rspack/binding-linux-x64-gnu@2.1.8': + optional: true + + '@rspack/binding-linux-x64-musl@2.1.8': + optional: true + + '@rspack/binding-wasm32-wasi@2.1.8': + dependencies: + '@emnapi/core': 1.11.3 + '@emnapi/runtime': 1.11.3 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3) + optional: true + + '@rspack/binding-win32-arm64-msvc@2.1.8': + optional: true + + '@rspack/binding-win32-ia32-msvc@2.1.8': + optional: true + + '@rspack/binding-win32-x64-msvc@2.1.8': + optional: true + + '@rspack/binding@2.1.8': + optionalDependencies: + '@rspack/binding-darwin-arm64': 2.1.8 + '@rspack/binding-darwin-x64': 2.1.8 + '@rspack/binding-linux-arm64-gnu': 2.1.8 + '@rspack/binding-linux-arm64-musl': 2.1.8 + '@rspack/binding-linux-riscv64-gnu': 2.1.8 + '@rspack/binding-linux-riscv64-musl': 2.1.8 + '@rspack/binding-linux-x64-gnu': 2.1.8 + '@rspack/binding-linux-x64-musl': 2.1.8 + '@rspack/binding-wasm32-wasi': 2.1.8 + '@rspack/binding-win32-arm64-msvc': 2.1.8 + '@rspack/binding-win32-ia32-msvc': 2.1.8 + '@rspack/binding-win32-x64-msvc': 2.1.8 + + '@rspack/core@2.1.8(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.1.8 + optionalDependencies: + '@swc/helpers': 0.5.23 + + '@rspack/lite-tapable@1.1.5': {} + + '@standard-schema/spec@1.1.0': {} + + '@swc/helpers@0.5.23': + dependencies: + tslib: 2.8.1 + + '@tiptap/core@3.29.2(@tiptap/pm@3.29.2)': + dependencies: + '@tiptap/pm': 3.29.2 + + '@tiptap/pm@3.29.2': + dependencies: + prosemirror-changeset: 2.4.1 + prosemirror-commands: 1.7.2 + prosemirror-dropcursor: 1.8.3 + prosemirror-gapcursor: 1.4.1 + prosemirror-history: 1.5.0 + prosemirror-inputrules: 1.5.1 + prosemirror-keymap: 1.2.3 + prosemirror-model: 1.25.11 + prosemirror-schema-list: 1.5.1 + prosemirror-state: 1.4.4 + prosemirror-tables: 1.8.5 + prosemirror-transform: 1.12.0 + prosemirror-view: 1.42.2 + + '@tsconfig/node20@20.1.9': {} + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@types/canvas-confetti@1.9.0': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/esrecurse@4.3.1': {} + + '@types/estree@1.0.9': {} + + '@types/jsdom@21.1.7': + dependencies: + '@types/node': 24.13.3 + '@types/tough-cookie': 4.0.5 + parse5: 7.3.0 + + '@types/jsesc@2.5.1': {} + + '@types/json-schema@7.0.15': {} + + '@types/node@24.13.3': + dependencies: + undici-types: 7.18.2 + + '@types/tough-cookie@4.0.5': {} + + '@typescript-eslint/eslint-plugin@8.66.0(@typescript-eslint/parser@8.66.0(eslint@9.39.5)(typescript@5.8.3))(eslint@9.39.5)(typescript@5.8.3)': + dependencies: + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.66.0 + '@typescript-eslint/type-utils': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + '@typescript-eslint/utils': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.66.0 + eslint: 9.39.5 + ignore: 7.0.6 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.66.0(eslint@9.39.5)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.66.0 + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/typescript-estree': 8.66.0(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.66.0 + debug: 4.4.3 + eslint: 9.39.5 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.66.0(typescript@5.8.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.66.0(typescript@5.8.3) + '@typescript-eslint/types': 8.66.0 + debug: 4.4.3 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.66.0': + dependencies: + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/visitor-keys': 8.66.0 + + '@typescript-eslint/tsconfig-utils@8.66.0(typescript@5.8.3)': + dependencies: + typescript: 5.8.3 + + '@typescript-eslint/type-utils@8.66.0(eslint@9.39.5)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/typescript-estree': 8.66.0(typescript@5.8.3) + '@typescript-eslint/utils': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + debug: 4.4.3 + eslint: 9.39.5 + ts-api-utils: 2.5.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.66.0': {} + + '@typescript-eslint/typescript-estree@8.66.0(typescript@5.8.3)': + dependencies: + '@typescript-eslint/project-service': 8.66.0(typescript@5.8.3) + '@typescript-eslint/tsconfig-utils': 8.66.0(typescript@5.8.3) + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/visitor-keys': 8.66.0 + debug: 4.4.3 + minimatch: 10.2.6 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.66.0(eslint@9.39.5)(typescript@5.8.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.5) + '@typescript-eslint/scope-manager': 8.66.0 + '@typescript-eslint/types': 8.66.0 + '@typescript-eslint/typescript-estree': 8.66.0(typescript@5.8.3) + eslint: 9.39.5 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.66.0': + dependencies: + '@typescript-eslint/types': 8.66.0 + eslint-visitor-keys: 5.0.1 + + '@vitejs/plugin-vue@6.0.8(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3))': + dependencies: + '@rolldown/pluginutils': 1.0.1 + vite: 8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0) + vue: 3.5.41(typescript@5.8.3) + + '@vitest/eslint-plugin@1.6.26(@typescript-eslint/eslint-plugin@8.66.0(@typescript-eslint/parser@8.66.0(eslint@9.39.5)(typescript@5.8.3))(eslint@9.39.5)(typescript@5.8.3))(eslint@9.39.5)(typescript@5.8.3)(vitest@4.1.10(@types/node@24.13.3)(jsdom@26.1.0)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)))': + dependencies: + '@typescript-eslint/scope-manager': 8.66.0 + '@typescript-eslint/utils': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + eslint: 9.39.5 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 8.66.0(@typescript-eslint/parser@8.66.0(eslint@9.39.5)(typescript@5.8.3))(eslint@9.39.5)(typescript@5.8.3) + typescript: 5.8.3 + vitest: 4.1.10(@types/node@24.13.3)(jsdom@26.1.0)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)) + transitivePeerDependencies: + - supports-color + + '@vitest/expect@4.1.10': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.10 + '@vitest/utils': 4.1.10 + chai: 6.2.2 + tinyrainbow: 3.1.1 + + '@vitest/mocker@4.1.10(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))': + dependencies: + '@vitest/spy': 4.1.10 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0) + + '@vitest/pretty-format@4.1.10': + dependencies: + tinyrainbow: 3.1.1 + + '@vitest/runner@4.1.10': + dependencies: + '@vitest/utils': 4.1.10 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.10': + dependencies: + '@vitest/pretty-format': 4.1.10 + '@vitest/utils': 4.1.10 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.10': {} + + '@vitest/utils@4.1.10': + dependencies: + '@vitest/pretty-format': 4.1.10 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.1 + + '@volar/language-core@2.4.28': + dependencies: + '@volar/source-map': 2.4.28 + + '@volar/source-map@2.4.28': {} + + '@volar/typescript@2.4.28': + dependencies: + '@volar/language-core': 2.4.28 + path-browserify: 1.0.1 + vscode-uri: 3.1.0 + + '@vue-macros/common@3.1.4(vue@3.5.41(typescript@5.8.3))': + dependencies: + '@vue/compiler-sfc': 3.5.41 + ast-kit: 2.2.0 + local-pkg: 1.2.1 + magic-string-ast: 1.0.3 + unplugin-utils: 0.3.2 + optionalDependencies: + vue: 3.5.41(typescript@5.8.3) + + '@vue/compiler-core@3.5.41': + dependencies: + '@babel/parser': 7.29.8 + '@vue/shared': 3.5.41 + entities: 7.0.1 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.41': + dependencies: + '@vue/compiler-core': 3.5.41 + '@vue/shared': 3.5.41 + + '@vue/compiler-sfc@3.5.41': + dependencies: + '@babel/parser': 7.29.8 + '@vue/compiler-core': 3.5.41 + '@vue/compiler-dom': 3.5.41 + '@vue/compiler-ssr': 3.5.41 + '@vue/shared': 3.5.41 + estree-walker: 2.0.2 + magic-string: 0.30.21 + postcss: 8.5.26 + source-map-js: 1.2.1 + + '@vue/compiler-ssr@3.5.41': + dependencies: + '@vue/compiler-dom': 3.5.41 + '@vue/shared': 3.5.41 + + '@vue/devtools-api@8.2.1': + dependencies: + '@vue/devtools-kit': 8.2.1 + + '@vue/devtools-kit@8.2.1': + dependencies: + '@vue/devtools-shared': 8.2.1 + birpc: 2.9.0 + hookable: 5.5.3 + perfect-debounce: 2.1.0 + + '@vue/devtools-shared@8.2.1': {} + + '@vue/eslint-config-prettier@10.2.0(eslint@9.39.5)(prettier@3.9.6)': + dependencies: + eslint: 9.39.5 + eslint-config-prettier: 10.1.8(eslint@9.39.5) + eslint-plugin-prettier: 5.5.6(eslint-config-prettier@10.1.8(eslint@9.39.5))(eslint@9.39.5)(prettier@3.9.6) + prettier: 3.9.6 + transitivePeerDependencies: + - '@types/eslint' + + '@vue/eslint-config-typescript@14.9.0(eslint-plugin-vue@10.0.1(eslint@9.39.5)(vue-eslint-parser@10.4.1(eslint@9.39.5)))(eslint@9.39.5)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/utils': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + eslint: 9.39.5 + eslint-plugin-vue: 10.0.1(eslint@9.39.5)(vue-eslint-parser@10.4.1(eslint@9.39.5)) + fast-glob: 3.3.3 + typescript-eslint: 8.66.0(eslint@9.39.5)(typescript@5.8.3) + vue-eslint-parser: 10.4.1(eslint@9.39.5) + optionalDependencies: + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@vue/language-core@3.3.9': + dependencies: + '@volar/language-core': 2.4.28 + '@vue/compiler-dom': 3.5.41 + '@vue/shared': 3.5.41 + alien-signals: 3.2.1 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + picomatch: 4.0.5 + + '@vue/reactivity@3.5.41': + dependencies: + '@vue/shared': 3.5.41 + + '@vue/runtime-core@3.5.41': + dependencies: + '@vue/reactivity': 3.5.41 + '@vue/shared': 3.5.41 + + '@vue/runtime-dom@3.5.41': + dependencies: + '@vue/reactivity': 3.5.41 + '@vue/runtime-core': 3.5.41 + '@vue/shared': 3.5.41 + csstype: 3.2.3 + + '@vue/server-renderer@3.5.41': + dependencies: + '@vue/compiler-ssr': 3.5.41 + '@vue/runtime-dom': 3.5.41 + '@vue/shared': 3.5.41 + + '@vue/shared@3.5.41': {} + + '@vue/test-utils@2.4.11(@vue/compiler-dom@3.5.41)(@vue/server-renderer@3.5.41)(vue@3.5.41(typescript@5.8.3))': + dependencies: + '@vue/compiler-dom': 3.5.41 + js-beautify: 1.15.4 + vue: 3.5.41(typescript@5.8.3) + vue-component-type-helpers: 3.3.9 + optionalDependencies: + '@vue/server-renderer': 3.5.41 + + '@vue/tsconfig@0.7.0(typescript@5.8.3)(vue@3.5.41(typescript@5.8.3))': + optionalDependencies: + typescript: 5.8.3 + vue: 3.5.41(typescript@5.8.3) + + abbrev@2.0.0: {} + + acorn-jsx@5.3.2(acorn@8.18.0): + dependencies: + acorn: 8.18.0 + + acorn@8.18.0: {} + + agent-base@6.0.2: + dependencies: + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + agent-base@7.1.4: {} + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + alien-signals@3.2.1: {} + + ansi-regex@5.0.1: {} + + ansi-regex@6.2.2: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + argparse@2.0.1: {} + + assertion-error@2.0.1: {} + + ast-kit@2.2.0: + dependencies: + '@babel/parser': 7.29.8 + pathe: 2.0.3 + + ast-walker-scope@0.9.0: + dependencies: + '@babel/parser': 7.29.8 + '@babel/types': 7.29.8 + ast-kit: 2.2.0 + + asynckit@0.4.0: {} + + axios@1.19.0: + dependencies: + follow-redirects: 1.16.0 + form-data: 4.0.6 + https-proxy-agent: 5.0.1 + proxy-from-env: 2.1.0 + transitivePeerDependencies: + - debug + - supports-color + + balanced-match@1.0.2: {} + + balanced-match@4.0.4: {} + + birpc@2.9.0: {} + + boolbase@1.0.0: {} + + brace-expansion@1.1.18: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.1.4: + dependencies: + balanced-match: 1.0.2 + + brace-expansion@5.0.9: + dependencies: + balanced-match: 4.0.4 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + callsites@3.1.0: {} + + canvas-confetti@1.9.4: {} + + chai@6.2.2: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@5.0.0: + dependencies: + readdirp: 5.1.1 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@10.0.1: {} + + concat-map@0.0.1: {} + + confbox@0.1.8: {} + + confbox@0.2.4: {} + + config-chain@1.1.13: + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + + convert-source-map@2.0.0: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + cssesc@3.0.0: {} + + cssstyle@4.6.0: + dependencies: + '@asamuzakjp/css-color': 3.2.0 + rrweb-cssom: 0.8.0 + + csstype@3.2.3: {} + + data-urls@5.0.0: + dependencies: + whatwg-mimetype: 4.0.0 + whatwg-url: 14.2.0 + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decimal.js@10.6.0: {} + + deep-is@0.1.4: {} + + delayed-stream@1.0.0: {} + + detect-libc@2.1.2: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + eastasianwidth@0.2.0: {} + + editorconfig@1.0.7: + dependencies: + '@one-ini/wasm': 0.1.1 + commander: 10.0.1 + minimatch: 9.0.9 + semver: 7.8.5 + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + entities@6.0.1: {} + + entities@7.0.1: {} + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@2.3.1: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + + escape-string-regexp@4.0.0: {} + + eslint-config-prettier@10.1.8(eslint@9.39.5): + dependencies: + eslint: 9.39.5 + + eslint-plugin-oxlint@0.16.12: + dependencies: + jsonc-parser: 3.3.1 + + eslint-plugin-prettier@5.5.6(eslint-config-prettier@10.1.8(eslint@9.39.5))(eslint@9.39.5)(prettier@3.9.6): + dependencies: + eslint: 9.39.5 + prettier: 3.9.6 + prettier-linter-helpers: 1.0.1 + synckit: 0.11.13 + optionalDependencies: + eslint-config-prettier: 10.1.8(eslint@9.39.5) + + eslint-plugin-vue@10.0.1(eslint@9.39.5)(vue-eslint-parser@10.4.1(eslint@9.39.5)): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.5) + eslint: 9.39.5 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.1.4 + semver: 7.8.5 + vue-eslint-parser: 10.4.1(eslint@9.39.5) + xml-name-validator: 4.0.0 + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-scope@9.1.2: + dependencies: + '@types/esrecurse': 4.3.1 + '@types/estree': 1.0.9 + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint-visitor-keys@5.0.1: {} + + eslint@9.39.5: + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.5) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.21.2 + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.6 + '@eslint/js': 9.39.5 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.9 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3 + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@10.4.0: + dependencies: + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) + eslint-visitor-keys: 4.2.1 + + espree@11.2.0: + dependencies: + acorn: 8.18.0 + acorn-jsx: 5.3.2(acorn@8.18.0) + eslint-visitor-keys: 5.0.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@2.0.2: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + esutils@2.0.3: {} + + expect-type@1.4.0: {} + + exsolve@1.1.1: {} + + fast-deep-equal@3.1.3: {} + + fast-diff@1.3.0: {} + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastq@1.20.1: + dependencies: + reusify: 1.1.0 + + fdir@6.5.0(picomatch@4.0.5): + optionalDependencies: + picomatch: 4.0.5 + + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.4.4 + keyv: 4.5.4 + + flatted@3.4.4: {} + + floating-vue@5.2.2(vue@3.5.41(typescript@5.8.3)): + dependencies: + '@floating-ui/dom': 1.1.1 + vue: 3.5.41(typescript@5.8.3) + vue-resize: 2.0.0-alpha.1(vue@3.5.41(typescript@5.8.3)) + + follow-redirects@1.16.0: {} + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@10.4.5: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + globals@14.0.0: {} + + gopd@1.2.0: {} + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + hookable@5.5.3: {} + + html-encoding-sniffer@4.0.0: + dependencies: + whatwg-encoding: 3.1.1 + + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ignore@5.3.2: {} + + ignore@7.0.6: {} + + immutable@5.1.9: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + import-meta-resolve@4.2.0: {} + + imurmurhash@0.1.4: {} + + ini@1.3.8: {} + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + is-potential-custom-element-name@1.0.1: {} + + isexe@2.0.0: {} + + isexe@3.1.5: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-beautify@1.15.4: + dependencies: + config-chain: 1.1.13 + editorconfig: 1.0.7 + glob: 10.4.5 + js-cookie: 3.0.8 + nopt: 7.2.1 + + js-cookie@3.0.8: {} + + js-yaml@4.3.1: + dependencies: + argparse: 2.0.1 + + jsdom@26.1.0: + dependencies: + cssstyle: 4.6.0 + data-urls: 5.0.0 + decimal.js: 10.6.0 + html-encoding-sniffer: 4.0.0 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + is-potential-custom-element-name: 1.0.1 + nwsapi: 2.2.24 + parse5: 7.3.0 + rrweb-cssom: 0.8.0 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 5.1.2 + w3c-xmlserializer: 5.0.0 + webidl-conversions: 7.0.0 + whatwg-encoding: 3.1.1 + whatwg-mimetype: 4.0.0 + whatwg-url: 14.2.0 + ws: 8.21.2 + xml-name-validator: 5.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + jsesc@3.1.0: {} + + json-buffer@3.0.1: {} + + json-parse-even-better-errors@4.0.0: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + json5@2.2.3: {} + + jsonc-parser@3.3.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + local-pkg@1.2.1: + dependencies: + mlly: 1.8.2 + pkg-types: 2.3.1 + quansync: 0.2.11 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + lru-cache@10.4.3: {} + + magic-string-ast@1.0.3: + dependencies: + magic-string: 0.30.21 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + math-intrinsics@1.1.0: {} + + memorystream@0.3.1: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.2 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + minimatch@10.2.6: + dependencies: + brace-expansion: 5.0.9 + + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.18 + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.4 + + minipass@7.1.3: {} + + mitt@3.0.1: {} + + mlly@1.8.2: + dependencies: + acorn: 8.18.0 + pathe: 2.0.3 + pkg-types: 1.3.1 + ufo: 1.6.4 + + ms@2.1.3: {} + + muggle-string@0.4.1: {} + + nanoid@3.3.17: {} + + natural-compare@1.4.0: {} + + node-addon-api@7.1.1: + optional: true + + nopt@7.2.1: + dependencies: + abbrev: 2.0.0 + + nostics@1.2.0: {} + + npm-normalize-package-bin@4.0.0: {} + + npm-run-all2@7.0.2: + dependencies: + ansi-styles: 6.2.3 + cross-spawn: 7.0.6 + memorystream: 0.3.1 + minimatch: 9.0.9 + pidtree: 0.6.1 + read-package-json-fast: 4.0.0 + shell-quote: 1.10.0 + which: 5.0.0 + + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 + + nwsapi@2.2.24: {} + + object-inspect@1.13.4: {} + + obug@2.1.4: {} + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + orderedmap@2.1.1: {} + + oxlint@0.16.12: + optionalDependencies: + '@oxlint/darwin-arm64': 0.16.12 + '@oxlint/darwin-x64': 0.16.12 + '@oxlint/linux-arm64-gnu': 0.16.12 + '@oxlint/linux-arm64-musl': 0.16.12 + '@oxlint/linux-x64-gnu': 0.16.12 + '@oxlint/linux-x64-musl': 0.16.12 + '@oxlint/win32-arm64': 0.16.12 + '@oxlint/win32-x64': 0.16.12 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + package-manager-detector@1.8.0: {} + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse5@7.3.0: + dependencies: + entities: 6.0.1 + + path-browserify@1.0.1: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + pathe@2.0.3: {} + + perfect-debounce@2.1.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.2: {} + + picomatch@4.0.5: {} + + pidtree@0.6.1: {} + + pkg-types@1.3.1: + dependencies: + confbox: 0.1.8 + mlly: 1.8.2 + pathe: 2.0.3 + + pkg-types@2.3.1: + dependencies: + confbox: 0.2.4 + exsolve: 1.1.1 + pathe: 2.0.3 + + postcss-selector-parser@6.1.4: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + + postcss@8.5.26: + dependencies: + nanoid: 3.3.17 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prelude-ls@1.2.1: {} + + prettier-linter-helpers@1.0.1: + dependencies: + fast-diff: 1.3.0 + + prettier@3.9.6: {} + + prosemirror-changeset@2.4.1: + dependencies: + prosemirror-transform: 1.12.0 + + prosemirror-commands@1.7.2: + dependencies: + prosemirror-model: 1.25.11 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.0 + + prosemirror-dropcursor@1.8.3: + dependencies: + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.0 + prosemirror-view: 1.42.2 + + prosemirror-gapcursor@1.4.1: + dependencies: + prosemirror-keymap: 1.2.3 + prosemirror-model: 1.25.11 + prosemirror-state: 1.4.4 + prosemirror-view: 1.42.2 + + prosemirror-history@1.5.0: + dependencies: + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.0 + prosemirror-view: 1.42.2 + rope-sequence: 1.3.4 + + prosemirror-inputrules@1.5.1: + dependencies: + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.0 + + prosemirror-keymap@1.2.3: + dependencies: + prosemirror-state: 1.4.4 + w3c-keyname: 2.2.8 + + prosemirror-model@1.25.11: + dependencies: + orderedmap: 2.1.1 + + prosemirror-schema-list@1.5.1: + dependencies: + prosemirror-model: 1.25.11 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.0 + + prosemirror-state@1.4.4: + dependencies: + prosemirror-model: 1.25.11 + prosemirror-transform: 1.12.0 + prosemirror-view: 1.42.2 + + prosemirror-tables@1.8.5: + dependencies: + prosemirror-keymap: 1.2.3 + prosemirror-model: 1.25.11 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.0 + prosemirror-view: 1.42.2 + + prosemirror-transform@1.12.0: + dependencies: + prosemirror-model: 1.25.11 + + prosemirror-view@1.42.2: + dependencies: + prosemirror-model: 1.25.11 + prosemirror-state: 1.4.4 + prosemirror-transform: 1.12.0 + + proto-list@1.2.4: {} + + proxy-from-env@2.1.0: {} + + punycode@2.3.1: {} + + qs@6.15.3: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + + quansync@0.2.11: {} + + queue-microtask@1.2.3: {} + + read-package-json-fast@4.0.0: + dependencies: + json-parse-even-better-errors: 4.0.0 + npm-normalize-package-bin: 4.0.0 + + readdirp@5.1.1: {} + + resolve-from@4.0.0: {} + + reusify@1.1.0: {} + + rolldown@1.2.3: + dependencies: + '@oxc-project/types': 0.143.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.2.3 + '@rolldown/binding-darwin-arm64': 1.2.3 + '@rolldown/binding-darwin-x64': 1.2.3 + '@rolldown/binding-freebsd-x64': 1.2.3 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.3 + '@rolldown/binding-linux-arm64-gnu': 1.2.3 + '@rolldown/binding-linux-arm64-musl': 1.2.3 + '@rolldown/binding-linux-ppc64-gnu': 1.2.3 + '@rolldown/binding-linux-s390x-gnu': 1.2.3 + '@rolldown/binding-linux-x64-gnu': 1.2.3 + '@rolldown/binding-linux-x64-musl': 1.2.3 + '@rolldown/binding-openharmony-arm64': 1.2.3 + '@rolldown/binding-win32-arm64-msvc': 1.2.3 + '@rolldown/binding-win32-x64-msvc': 1.2.3 + + rope-sequence@1.3.4: {} + + rrweb-cssom@0.8.0: {} + + rspack-vue-loader@17.6.2(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(vue@3.5.41(typescript@5.8.3)): + dependencies: + '@rspack/lite-tapable': 1.1.5 + chalk: 4.1.2 + optionalDependencies: + '@rspack/core': 2.1.8(@swc/helpers@0.5.23) + '@vue/compiler-sfc': 3.5.41 + vue: 3.5.41(typescript@5.8.3) + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + safer-buffer@2.1.2: {} + + sass@1.102.0: + dependencies: + chokidar: 5.0.0 + immutable: 5.1.9 + source-map-js: 1.2.1 + optionalDependencies: + '@parcel/watcher': 2.6.0 + + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + + scule@1.3.0: {} + + semver@7.8.5: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + shell-quote@1.10.0: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + siginfo@2.0.0: {} + + signal-exit@4.1.0: {} + + source-map-js@1.2.1: {} + + stackback@0.0.2: {} + + std-env@4.2.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.2.2 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + symbol-tree@3.2.4: {} + + synckit@0.11.13: + dependencies: + '@pkgr/core': 0.3.6 + + tinybench@2.9.0: {} + + tinyexec@1.3.0: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.5) + picomatch: 4.0.5 + + tinyrainbow@3.1.1: {} + + tldts-core@6.1.86: {} + + tldts@6.1.86: + dependencies: + tldts-core: 6.1.86 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tough-cookie@5.1.2: + dependencies: + tldts: 6.1.86 + + tr46@5.1.1: + dependencies: + punycode: 2.3.1 + + ts-api-utils@2.5.0(typescript@5.8.3): + dependencies: + typescript: 5.8.3 + + tslib@2.8.1: {} + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + typescript-eslint@8.66.0(eslint@9.39.5)(typescript@5.8.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.66.0(@typescript-eslint/parser@8.66.0(eslint@9.39.5)(typescript@5.8.3))(eslint@9.39.5)(typescript@5.8.3) + '@typescript-eslint/parser': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.66.0(typescript@5.8.3) + '@typescript-eslint/utils': 8.66.0(eslint@9.39.5)(typescript@5.8.3) + eslint: 9.39.5 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + typescript@5.8.3: {} + + ufo@1.6.4: {} + + undici-types@7.18.2: {} + + unplugin-icons@23.0.1(@vue/compiler-sfc@3.5.41): + dependencies: + '@antfu/install-pkg': 1.1.0 + '@iconify/utils': 3.1.4 + local-pkg: 1.2.1 + obug: 2.1.4 + unplugin: 2.3.11 + optionalDependencies: + '@vue/compiler-sfc': 3.5.41 + + unplugin-utils@0.3.2: + dependencies: + pathe: 2.0.3 + picomatch: 4.0.5 + + unplugin@2.3.11: + dependencies: + '@jridgewell/remapping': 2.3.5 + acorn: 8.18.0 + picomatch: 4.0.5 + webpack-virtual-modules: 0.6.2 + + unplugin@3.3.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)): + dependencies: + '@jridgewell/remapping': 2.3.5 + picomatch: 4.0.5 + webpack-virtual-modules: 0.6.2 + optionalDependencies: + '@rspack/core': 2.1.8(@swc/helpers@0.5.23) + rolldown: 1.2.3 + vite: 8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0) + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + util-deprecate@1.0.2: {} + + vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.5 + postcss: 8.5.26 + rolldown: 1.2.3 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 24.13.3 + fsevents: 2.3.3 + sass: 1.102.0 + yaml: 2.9.0 + + vitest@4.1.10(@types/node@24.13.3)(jsdom@26.1.0)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)): + dependencies: + '@vitest/expect': 4.1.10 + '@vitest/mocker': 4.1.10(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.10 + '@vitest/runner': 4.1.10 + '@vitest/snapshot': 4.1.10 + '@vitest/spy': 4.1.10 + '@vitest/utils': 4.1.10 + es-module-lexer: 2.3.1 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.1.4 + pathe: 2.0.3 + picomatch: 4.0.5 + std-env: 4.2.0 + tinybench: 2.9.0 + tinyexec: 1.3.0 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.1 + vite: 8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 24.13.3 + jsdom: 26.1.0 + transitivePeerDependencies: + - msw + + vscode-uri@3.1.0: {} + + vue-component-type-helpers@3.3.9: {} + + vue-eslint-parser@10.4.1(eslint@9.39.5): + dependencies: + debug: 4.4.3 + eslint: 9.39.5 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 + esquery: 1.7.0 + semver: 7.8.5 + transitivePeerDependencies: + - supports-color + + vue-resize@2.0.0-alpha.1(vue@3.5.41(typescript@5.8.3)): + dependencies: + vue: 3.5.41(typescript@5.8.3) + + vue-router@5.2.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(@vue/compiler-sfc@3.5.41)(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0))(vue@3.5.41(typescript@5.8.3)): + dependencies: + '@babel/generator': 8.0.0 + '@vue-macros/common': 3.1.4(vue@3.5.41(typescript@5.8.3)) + '@vue/devtools-api': 8.2.1 + ast-walker-scope: 0.9.0 + chokidar: 5.0.0 + json5: 2.2.3 + local-pkg: 1.2.1 + magic-string: 0.30.21 + mlly: 1.8.2 + muggle-string: 0.4.1 + nostics: 1.2.0 + pathe: 2.0.3 + picomatch: 4.0.5 + scule: 1.3.0 + tinyglobby: 0.2.17 + unplugin: 3.3.0(@rspack/core@2.1.8(@swc/helpers@0.5.23))(rolldown@1.2.3)(vite@8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0)) + unplugin-utils: 0.3.2 + vue: 3.5.41(typescript@5.8.3) + yaml: 2.9.0 + optionalDependencies: + '@vue/compiler-sfc': 3.5.41 + vite: 8.2.0(@types/node@24.13.3)(sass@1.102.0)(yaml@2.9.0) + transitivePeerDependencies: + - '@farmfe/core' + - '@rspack/core' + - bun-types-no-globals + - esbuild + - rolldown + - rollup + - unloader + - webpack + + vue-tsc@3.3.9(typescript@5.8.3): + dependencies: + '@volar/typescript': 2.4.28 + '@vue/language-core': 3.3.9 + typescript: 5.8.3 + + vue@3.5.41(typescript@5.8.3): + dependencies: + '@vue/compiler-dom': 3.5.41 + '@vue/compiler-sfc': 3.5.41 + '@vue/runtime-dom': 3.5.41 + '@vue/server-renderer': 3.5.41 + '@vue/shared': 3.5.41 + optionalDependencies: + typescript: 5.8.3 + + w3c-keyname@2.2.8: {} + + w3c-xmlserializer@5.0.0: + dependencies: + xml-name-validator: 5.0.0 + + webidl-conversions@7.0.0: {} + + webpack-virtual-modules@0.6.2: {} + + whatwg-encoding@3.1.1: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@4.0.0: {} + + whatwg-url@14.2.0: + dependencies: + tr46: 5.1.1 + webidl-conversions: 7.0.0 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + which@5.0.0: + dependencies: + isexe: 3.1.5 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + word-wrap@1.2.5: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + ws@8.21.2: {} + + xml-name-validator@4.0.0: {} + + xml-name-validator@5.0.0: {} + + xmlchars@2.2.0: {} + + yaml@2.9.0: {} + + yocto-queue@0.1.0: {} diff --git a/ui/src/assets/logo.svg b/ui/src/assets/logo.svg new file mode 100644 index 0000000..86fbed9 --- /dev/null +++ b/ui/src/assets/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ui/src/components/ThemeToggle.vue b/ui/src/components/ThemeToggle.vue new file mode 100644 index 0000000..e05d6d6 --- /dev/null +++ b/ui/src/components/ThemeToggle.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/ui/src/composables/useDarkMode.ts b/ui/src/composables/useDarkMode.ts new file mode 100644 index 0000000..8ce9931 --- /dev/null +++ b/ui/src/composables/useDarkMode.ts @@ -0,0 +1,86 @@ +import { computed, ref, watch } from 'vue' +import { useSystemPreference } from './useSystemPreference' + +const STORAGE_KEY = 'halo-dark-mode-theme' +export type ThemeMode = 'light' | 'dark' | 'auto' + +/** 从 localStorage 读取持久化的主题偏好 */ +function loadPersistedTheme(): ThemeMode { + try { + const stored = localStorage.getItem(STORAGE_KEY) + if (stored === 'light' || stored === 'dark' || stored === 'auto') { + return stored + } + } catch { + // localStorage 不可用时忽略 + } + return 'auto' +} + +/** 持久化主题偏好到 localStorage */ +function persistTheme(theme: ThemeMode): void { + try { + localStorage.setItem(STORAGE_KEY, theme) + } catch { + // localStorage 不可用时忽略 + } +} + +/** 将 data-halo-theme 属性应用到 元素 */ +function applyHtmlAttribute(isDark: boolean): void { + if (isDark) { + document.documentElement.setAttribute('data-halo-theme', 'dark') + } else { + document.documentElement.removeAttribute('data-halo-theme') + } +} + +// 模块级单例 — 所有组件共享同一个状态 +const theme = ref(loadPersistedTheme()) +const { isSystemDark, onChange } = useSystemPreference() + +const isDark = computed(() => { + if (theme.value === 'dark') return true + if (theme.value === 'light') return false + // 'auto' — 跟随系统偏好 + return isSystemDark.value +}) + +// 监听 isDark 变化 → 同步到 DOM +watch(isDark, (dark) => applyHtmlAttribute(dark), { immediate: true }) + +// 监听 theme 变化 → 持久化 +watch(theme, (t) => persistTheme(t)) + +// 监听系统偏好变化 → 仅在 'auto' 模式下响应 +onChange((systemDark) => { + if (theme.value === 'auto') { + applyHtmlAttribute(systemDark) + } +}) + +/** + * 核心 dark mode composable。 + * 模块级单例 — 所有使用者共享同一份状态。 + */ +export function useDarkMode() { + function setTheme(t: ThemeMode): void { + theme.value = t + } + + function toggle(): void { + // 在 light 和 dark 之间切换,如果当前是 auto 则切换到与系统相反 + if (theme.value === 'auto') { + theme.value = isSystemDark.value ? 'light' : 'dark' + } else { + theme.value = theme.value === 'dark' ? 'light' : 'dark' + } + } + + return { + theme, + isDark, + setTheme, + toggle, + } +} diff --git a/ui/src/composables/useSystemPreference.ts b/ui/src/composables/useSystemPreference.ts new file mode 100644 index 0000000..0bd8148 --- /dev/null +++ b/ui/src/composables/useSystemPreference.ts @@ -0,0 +1,19 @@ +import { ref } from 'vue' + +/** + * 监听系统级 prefers-color-scheme 偏好。 + * matchMedia 查询 + 事件监听,支持运行时切换响应。 + */ +export function useSystemPreference() { + const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)') + const isSystemDark = ref(mediaQuery.matches) + + function onChange(callback: (isDark: boolean) => void): void { + mediaQuery.addEventListener('change', (event: MediaQueryListEvent) => { + isSystemDark.value = event.matches + callback(event.matches) + }) + } + + return { isSystemDark, onChange } +} diff --git a/ui/src/index.ts b/ui/src/index.ts new file mode 100644 index 0000000..2c96458 --- /dev/null +++ b/ui/src/index.ts @@ -0,0 +1,29 @@ +import { definePlugin } from '@halo-dev/ui-shared' +import { IconMoon } from '@halo-dev/components' +import { markRaw } from 'vue' +import './styles/index.css' + +export default definePlugin({ + components: {}, + routes: [ + { + parentName: 'Root', + route: { + path: '/dark-mode-settings', + name: 'DarkModeSettings', + component: () => import('./views/SettingsView.vue'), + meta: { + title: '深色模式设置', + searchable: true, + menu: { + name: '深色模式', + group: '偏好设置', + icon: markRaw(IconMoon), + priority: 50, + }, + }, + }, + }, + ], + extensionPoints: {}, +}) diff --git a/ui/src/styles/index.css b/ui/src/styles/index.css new file mode 100644 index 0000000..abb1923 --- /dev/null +++ b/ui/src/styles/index.css @@ -0,0 +1,12 @@ +/* ============================================================ + Halo Dark Mode — 样式入口 + 按加载顺序导入所有样式文件 + ============================================================ */ + +@import './variables.css'; +@import './overrides/utilities.css'; +@import './overrides/layout.css'; +@import './overrides/components.css'; +@import './overrides/forms.css'; +@import './overrides/editor.css'; +@import './overrides/scrollbar.css'; diff --git a/ui/src/styles/overrides/components.css b/ui/src/styles/overrides/components.css new file mode 100644 index 0000000..f7fb4c6 --- /dev/null +++ b/ui/src/styles/overrides/components.css @@ -0,0 +1,142 @@ +/* ============================================================ + Halo Dark Mode — @halo-dev/components 组件库覆盖 + 覆盖 Halo 组件库中的 VCard, VModal, VDropdown, VTag 等 + ============================================================ */ + +[data-halo-theme="dark"] { + /* ===== 卡片 VCard ===== */ + .v-card, + [class*="v-card"] { + background-color: var(--halo-bg-card); + border-color: var(--halo-border-base); + color: var(--halo-text-primary); + } + + /* ===== 模态框 VModal ===== */ + .v-modal, + .modal-container, + [class*="modal"] { + background-color: var(--halo-bg-card); + color: var(--halo-text-primary); + } + + /* ===== 下拉菜单 VDropdown ===== */ + .v-dropdown, + .dropdown-menu, + [class*="dropdown"] { + background-color: var(--halo-bg-dropdown); + border-color: var(--halo-border-base); + color: var(--halo-text-primary); + } + + .v-dropdown-item:hover, + .dropdown-item:hover { + background-color: var(--halo-bg-hover); + } + + /* ===== 提示框 VTooltip ===== */ + .v-tooltip, + [class*="tooltip"] { + background-color: var(--halo-bg-tooltip); + color: var(--halo-text-inverse); + } + + /* ===== 标签/徽章 VTag, VBadge ===== */ + .v-tag, + [class*="tag"], + .v-badge, + [class*="badge"] { + background-color: var(--halo-tag-bg); + color: var(--halo-tag-text); + } + + /* ===== 按钮 ===== */ + .btn-default, + .btn-secondary, + button:not([class*="btn-primary"]):not([class*="btn-danger"]) { + background-color: var(--halo-bg-card); + color: var(--halo-text-primary); + border-color: var(--halo-border-base); + } + + .btn-default:hover, + .btn-secondary:hover { + background-color: var(--halo-bg-hover); + } + + /* ===== 表格 VTable ===== */ + table, + .v-table, + [class*="table"] { + background-color: var(--halo-bg-card); + color: var(--halo-text-primary); + } + + thead, + .table-header { + background-color: var(--halo-table-header-bg); + } + + thead th, + .table-header th { + color: var(--halo-text-secondary); + border-color: var(--halo-table-border); + } + + tbody td, + .table-body td { + border-color: var(--halo-table-border); + } + + tbody tr:hover, + .table-row:hover { + background-color: var(--halo-table-row-hover); + } + + /* ===== 分页 ===== */ + .pagination, + .v-pagination { + color: var(--halo-text-secondary); + } + + .pagination .active, + .v-pagination .active { + background-color: var(--halo-accent-primary); + color: var(--halo-accent-primary-text); + } + + /* ===== 面包屑 ===== */ + .breadcrumb, + .v-breadcrumb { + color: var(--halo-text-secondary); + } + + .breadcrumb a, + .v-breadcrumb a { + color: var(--halo-text-link); + } + + /* ===== Toast / 通知 ===== */ + .v-toast, + .toast-notification, + [class*="toast"] { + background-color: var(--halo-bg-card); + color: var(--halo-text-primary); + border-color: var(--halo-border-base); + } + + /* ===== 步骤条 ===== */ + .v-steps, + [class*="steps"] { + color: var(--halo-text-secondary); + } + + /* ===== 开关 VSwitch ===== */ + .v-switch-track { + background-color: var(--halo-bg-disabled); + } + + .v-switch-track[aria-checked="true"] { + background-color: var(--halo-accent-primary); + } +} diff --git a/ui/src/styles/overrides/editor.css b/ui/src/styles/overrides/editor.css new file mode 100644 index 0000000..0e0a057 --- /dev/null +++ b/ui/src/styles/overrides/editor.css @@ -0,0 +1,71 @@ +/* ============================================================ + Halo Dark Mode — 富文本编辑器覆盖 + @halo-dev/richtext-editor + TipTap / ProseMirror + ============================================================ */ + +[data-halo-theme="dark"] { + /* ===== ProseMirror / TipTap 编辑器主体 ===== */ + .ProseMirror, + .tiptap, + [class*="editor-content"] { + color: var(--halo-text-primary); + background-color: var(--halo-bg-input); + } + + /* ===== 编辑器菜单栏 ===== */ + .editor-toolbar, + .editor-menubar, + [class*="editor-toolbar"], + [class*="editor-menubar"] { + background-color: var(--halo-bg-card); + border-color: var(--halo-border-base); + } + + .editor-toolbar button, + .editor-menubar button { + color: var(--halo-text-secondary); + } + + .editor-toolbar button:hover, + .editor-menubar button:hover, + .editor-toolbar button.is-active, + .editor-menubar button.is-active { + background-color: var(--halo-bg-hover); + color: var(--halo-text-primary); + } + + /* ===== 代码块 ===== */ + .ProseMirror pre, + .ProseMirror code, + .tiptap pre, + .tiptap code { + background-color: oklch(20% 0.015 250); + color: oklch(85% 0.03 160); + } + + /* ===== Bubble menu / floating menu ===== */ + .tippy-box, + .tiptap-bubble-menu, + .floating-menu { + background-color: var(--halo-bg-dropdown); + border-color: var(--halo-border-base); + color: var(--halo-text-primary); + } + + /* ===== 编辑器占位符 ===== */ + .ProseMirror p.is-editor-empty:first-child::before { + color: var(--halo-text-tertiary); + } + + /* ===== 链接 ===== */ + .ProseMirror a, + .tiptap a { + color: var(--halo-text-link); + } + + /* ===== 选中文字 ===== */ + .ProseMirror ::selection, + .tiptap ::selection { + background-color: oklch(30% 0.04 160 / 50%); + } +} diff --git a/ui/src/styles/overrides/forms.css b/ui/src/styles/overrides/forms.css new file mode 100644 index 0000000..f569f61 --- /dev/null +++ b/ui/src/styles/overrides/forms.css @@ -0,0 +1,89 @@ +/* ============================================================ + Halo Dark Mode — FormKit 表单组件覆盖 + 覆盖输入框、选择器、开关、复选框等表单元素 + ============================================================ */ + +[data-halo-theme="dark"] { + /* ===== 输入框 ===== */ + input[type="text"], + input[type="password"], + input[type="email"], + input[type="number"], + input[type="search"], + input[type="url"], + input[type="tel"], + textarea, + select, + .formkit-input, + [data-formkit-input] { + background-color: var(--halo-bg-input); + color: var(--halo-text-primary); + border-color: var(--halo-border-input); + } + + input:focus, + textarea:focus, + select:focus, + .formkit-input:focus { + border-color: var(--halo-border-focus); + outline-color: var(--halo-border-focus); + } + + input::placeholder, + textarea::placeholder, + .formkit-input::placeholder { + color: var(--halo-text-tertiary); + } + + input:disabled, + textarea:disabled, + select:disabled { + background-color: var(--halo-bg-disabled); + color: var(--halo-text-tertiary); + } + + /* ===== 复选框/单选框 ===== */ + input[type="checkbox"], + input[type="radio"], + .formkit-checkbox, + .formkit-radio { + accent-color: var(--halo-accent-primary); + } + + /* ===== FormKit 标签和帮助文本 ===== */ + .formkit-label, + .formkit-legend { + color: var(--halo-text-secondary); + } + + .formkit-help, + .formkit-message { + color: var(--halo-text-tertiary); + } + + /* ===== FormKit 外层 ===== */ + .formkit-outer { + color: var(--halo-text-primary); + } + + /* ===== FormKit 前缀/后缀 ===== */ + .formkit-prefix, + .formkit-suffix { + background-color: var(--halo-bg-hover); + color: var(--halo-text-secondary); + border-color: var(--halo-border-input); + } + + /* ===== 选择器下拉 ===== */ + select option { + background-color: var(--halo-bg-dropdown); + color: var(--halo-text-primary); + } + + /* ===== 代码块 in forms ===== */ + .formkit-code { + background-color: var(--halo-bg-hover); + color: var(--halo-text-primary); + border-color: var(--halo-border-base); + } +} diff --git a/ui/src/styles/overrides/layout.css b/ui/src/styles/overrides/layout.css new file mode 100644 index 0000000..a18d87d --- /dev/null +++ b/ui/src/styles/overrides/layout.css @@ -0,0 +1,62 @@ +/* ============================================================ + Halo Dark Mode — 核心布局覆盖 + 覆盖 BasicLayout.vue 的硬编码颜色 + ============================================================ */ + +[data-halo-theme="dark"] { + /* ===== 页面整体 ===== */ + .layout { + background-color: var(--halo-bg-body); + } + + /* ===== 侧边栏 ===== */ + .sidebar { + background-color: var(--halo-bg-sidebar); + box-shadow: var(--halo-shadow-sm); + } + + .sidebar__search { + background-color: var(--halo-search-bg); + color: var(--halo-search-placeholder); + } + + .sidebar__search:hover { + color: var(--halo-search-text); + } + + .sidebar__search-icon { + color: inherit; + } + + .sidebar__search-shortcut { + color: var(--halo-text-tertiary); + } + + .sidebar__logo { + filter: brightness(0.9) invert(0); + } + + .sidebar__profile { + border-top-color: var(--halo-border-light); + } + + /* ===== 内容区 ===== */ + .main-content { + background-color: var(--halo-bg-content); + color: var(--halo-text-primary); + } + + .main-content__footer-text { + color: var(--halo-text-tertiary); + } + + .main-content__footer-link { + color: var(--halo-text-link); + } + + /* ===== 页面标题 ===== */ + .page-title, + .v-card-title { + color: var(--halo-text-primary); + } +} diff --git a/ui/src/styles/overrides/scrollbar.css b/ui/src/styles/overrides/scrollbar.css new file mode 100644 index 0000000..77397ce --- /dev/null +++ b/ui/src/styles/overrides/scrollbar.css @@ -0,0 +1,48 @@ +/* ============================================================ + Halo Dark Mode — 滚动条覆盖 + OverlayScrollbars + 原生滚动条 + ============================================================ */ + +[data-halo-theme="dark"] { + /* ===== OverlayScrollbars ===== */ + .os-scrollbar .os-scrollbar-handle { + background-color: var(--halo-scrollbar-thumb); + } + + .os-scrollbar .os-scrollbar-track { + background-color: var(--halo-scrollbar-track); + } + + .os-scrollbar .os-scrollbar-handle:hover { + background-color: oklch(45% 0.03 250); + } + + /* ===== 原生滚动条(Firefox) ===== */ + * { + scrollbar-color: var(--halo-scrollbar-thumb) var(--halo-scrollbar-track); + scrollbar-width: thin; + } + + /* ===== 原生滚动条(Webkit:Chrome/Edge/Safari) ===== */ + ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + ::-webkit-scrollbar-track { + background: var(--halo-scrollbar-track); + } + + ::-webkit-scrollbar-thumb { + background: var(--halo-scrollbar-thumb); + border-radius: 4px; + } + + ::-webkit-scrollbar-thumb:hover { + background: oklch(45% 0.03 250); + } + + ::-webkit-scrollbar-corner { + background: var(--halo-scrollbar-track); + } +} diff --git a/ui/src/styles/overrides/utilities.css b/ui/src/styles/overrides/utilities.css new file mode 100644 index 0000000..83bdfa7 --- /dev/null +++ b/ui/src/styles/overrides/utilities.css @@ -0,0 +1,77 @@ +/* ============================================================ + Halo Dark Mode — Tailwind 工具类覆盖 + 覆盖 Tailwind 的颜色类和常见 UI 原子类 + ============================================================ */ + +[data-halo-theme="dark"] { + /* ===== 背景色 ===== */ + .bg-white { + background-color: var(--halo-bg-card); + } + + .bg-gray-50, + .bg-gray-100 { + background-color: var(--halo-bg-content); + } + + .bg-gray-200 { + background-color: var(--halo-bg-hover); + } + + /* ===== 文字色 ===== */ + .text-gray-900, + .text-gray-800 { + color: var(--halo-text-primary); + } + + .text-gray-700, + .text-gray-600, + .text-gray-500 { + color: var(--halo-text-secondary); + } + + .text-gray-400, + .text-gray-300 { + color: var(--halo-text-tertiary); + } + + /* ===== 边框 ===== */ + .border, + .border-gray-200, + .border-gray-300 { + border-color: var(--halo-border-base); + } + + .divide-y > :not([hidden]) ~ :not([hidden]), + .divide-x > :not([hidden]) ~ :not([hidden]) { + border-color: var(--halo-border-light); + } + + /* ===== 阴影 ===== */ + .shadow { + box-shadow: var(--halo-shadow-base); + } + + .shadow-sm { + box-shadow: var(--halo-shadow-sm); + } + + .shadow-lg, + .shadow-xl { + box-shadow: var(--halo-shadow-lg); + } + + /* ===== 链接 ===== */ + a:not([class*="text-"]), + .hover\:text-gray-900:hover, + .hover\:text-gray-800:hover, + .hover\:text-gray-700:hover { + color: var(--halo-text-link); + } + + /* ===== 通用悬停 ===== */ + .hover\:bg-gray-50:hover, + .hover\:bg-gray-100:hover { + background-color: var(--halo-bg-hover); + } +} diff --git a/ui/src/styles/variables.css b/ui/src/styles/variables.css new file mode 100644 index 0000000..97a3db0 --- /dev/null +++ b/ui/src/styles/variables.css @@ -0,0 +1,116 @@ +/* ============================================================ + Halo Dark Mode — CSS Variables + 配色策略: OKLCH 颜色空间 | 中性色微蓝着色调 | 亮度层次替代阴影 + ============================================================ */ + +/* ===== 浅色模式(Halo 默认,此处定义为显式回退) ===== */ +:root { + --halo-bg-body: oklch(97% 0.005 250); + --halo-bg-sidebar: oklch(100% 0 0); + --halo-bg-content: oklch(97% 0.005 250); + --halo-bg-card: oklch(100% 0 0); + --halo-bg-input: oklch(100% 0 0); + --halo-bg-hover: oklch(95% 0.01 250); + --halo-bg-active: oklch(90% 0.02 160); + --halo-bg-disabled: oklch(95% 0.005 250); + --halo-bg-tooltip: oklch(20% 0.01 250); + --halo-bg-modal: oklch(0% 0 0 / 60%); + --halo-bg-dropdown: oklch(100% 0 0); + + --halo-text-primary: oklch(20% 0.01 250); + --halo-text-secondary: oklch(45% 0.01 250); + --halo-text-tertiary: oklch(60% 0.01 250); + --halo-text-link: oklch(45% 0.15 160); + --halo-text-inverse: oklch(100% 0 0); + + --halo-border-base: oklch(88% 0.01 250); + --halo-border-light: oklch(93% 0.005 250); + --halo-border-input: oklch(80% 0.01 250); + --halo-border-focus: oklch(55% 0.15 160); + + --halo-accent-primary: oklch(55% 0.14 160); + --halo-accent-primary-hover: oklch(48% 0.15 160); + --halo-accent-primary-text: oklch(100% 0 0); + --halo-accent-danger: oklch(45% 0.18 25); + --halo-accent-danger-hover: oklch(40% 0.19 25); + --halo-accent-success: oklch(50% 0.16 150); + --halo-accent-warning: oklch(60% 0.16 85); + + --halo-shadow-sm: 0 1px 2px oklch(0% 0 0 / 6%); + --halo-shadow-base: 0 2px 8px oklch(0% 0 0 / 10%); + --halo-shadow-lg: 0 4px 16px oklch(0% 0 0 / 14%); + + --halo-scrollbar-thumb: oklch(80% 0.01 250); + --halo-scrollbar-track: oklch(95% 0.005 250); + + --halo-search-bg: oklch(95% 0.01 250); + --halo-search-text: oklch(45% 0.01 250); + --halo-search-placeholder: oklch(60% 0.01 250); + + --halo-menu-item-hover: oklch(93% 0.02 160); + --halo-menu-item-active: oklch(88% 0.03 160); + --halo-menu-group-title: oklch(55% 0.01 250); + + --halo-table-header-bg: oklch(96% 0.005 250); + --halo-table-row-hover: oklch(93% 0.015 250); + --halo-table-border: oklch(88% 0.01 250); + + --halo-tag-bg: oklch(90% 0.04 160); + --halo-tag-text: oklch(40% 0.1 160); +} + +/* ===== 深色模式 ===== */ +[data-halo-theme="dark"] { + --halo-bg-body: oklch(14% 0.01 250); + --halo-bg-sidebar: oklch(16% 0.015 250); + --halo-bg-content: oklch(14% 0.01 250); + --halo-bg-card: oklch(18% 0.015 250); + --halo-bg-input: oklch(20% 0.015 250); + --halo-bg-hover: oklch(24% 0.02 250); + --halo-bg-active: oklch(28% 0.03 160); + --halo-bg-disabled: oklch(16% 0.005 250); + --halo-bg-tooltip: oklch(25% 0.01 250); + --halo-bg-modal: oklch(0% 0 0 / 60%); + --halo-bg-dropdown: oklch(20% 0.015 250); + + --halo-text-primary: oklch(92% 0.005 250); + --halo-text-secondary: oklch(70% 0.01 250); + --halo-text-tertiary: oklch(50% 0.01 250); + --halo-text-link: oklch(72% 0.14 160); + --halo-text-inverse: oklch(14% 0.01 250); + + --halo-border-base: oklch(28% 0.015 250); + --halo-border-light: oklch(22% 0.01 250); + --halo-border-input: oklch(30% 0.015 250); + --halo-border-focus: oklch(65% 0.14 160); + + --halo-accent-primary: oklch(60% 0.13 160); + --halo-accent-primary-hover: oklch(66% 0.12 160); + --halo-accent-primary-text: oklch(14% 0.02 160); + --halo-accent-danger: oklch(50% 0.18 25); + --halo-accent-danger-hover: oklch(56% 0.17 25); + --halo-accent-success: oklch(58% 0.16 150); + --halo-accent-warning: oklch(65% 0.16 85); + + --halo-shadow-sm: 0 1px 2px oklch(0% 0 0 / 30%); + --halo-shadow-base: 0 2px 8px oklch(0% 0 0 / 40%); + --halo-shadow-lg: 0 4px 16px oklch(0% 0 0 / 50%); + + --halo-scrollbar-thumb: oklch(35% 0.02 250); + --halo-scrollbar-track: oklch(18% 0.01 250); + + --halo-search-bg: oklch(20% 0.015 250); + --halo-search-text: oklch(70% 0.01 250); + --halo-search-placeholder: oklch(50% 0.01 250); + + --halo-menu-item-hover: oklch(22% 0.02 160); + --halo-menu-item-active: oklch(28% 0.04 160); + --halo-menu-group-title: oklch(55% 0.01 250); + + --halo-table-header-bg: oklch(18% 0.01 250); + --halo-table-row-hover: oklch(22% 0.015 250); + --halo-table-border: oklch(26% 0.015 250); + + --halo-tag-bg: oklch(22% 0.03 160); + --halo-tag-text: oklch(80% 0.08 160); +} diff --git a/ui/src/views/SettingsView.vue b/ui/src/views/SettingsView.vue new file mode 100644 index 0000000..5b441a7 --- /dev/null +++ b/ui/src/views/SettingsView.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/ui/tsconfig.app.json b/ui/tsconfig.app.json new file mode 100644 index 0000000..913b8f2 --- /dev/null +++ b/ui/tsconfig.app.json @@ -0,0 +1,12 @@ +{ + "extends": "@vue/tsconfig/tsconfig.dom.json", + "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], + "exclude": ["src/**/__tests__/*"], + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + + "paths": { + "@/*": ["./src/*"] + } + } +} diff --git a/ui/tsconfig.json b/ui/tsconfig.json new file mode 100644 index 0000000..100cf6a --- /dev/null +++ b/ui/tsconfig.json @@ -0,0 +1,14 @@ +{ + "files": [], + "references": [ + { + "path": "./tsconfig.node.json" + }, + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.vitest.json" + } + ] +} diff --git a/ui/tsconfig.node.json b/ui/tsconfig.node.json new file mode 100644 index 0000000..e8d2b67 --- /dev/null +++ b/ui/tsconfig.node.json @@ -0,0 +1,15 @@ +{ + "extends": "@tsconfig/node20/tsconfig.json", + "include": [ + "vite.config.*", + "vitest.config.*" + ], + "compilerOptions": { + "composite": true, + "noEmit": true, + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "module": "ESNext", + "moduleResolution": "Bundler", + "types": ["node"] + } +} diff --git a/ui/tsconfig.vitest.json b/ui/tsconfig.vitest.json new file mode 100644 index 0000000..7d1d8ce --- /dev/null +++ b/ui/tsconfig.vitest.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.app.json", + "include": ["src/**/__tests__/*", "env.d.ts"], + "exclude": [], + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo", + + "lib": [], + "types": ["node", "jsdom"] + } +} diff --git a/ui/vite.config.ts b/ui/vite.config.ts new file mode 100644 index 0000000..2f2e885 --- /dev/null +++ b/ui/vite.config.ts @@ -0,0 +1,25 @@ +import { fileURLToPath, URL } from 'url' + +import { viteConfig } from '@halo-dev/ui-plugin-bundler-kit' +import Icons from 'unplugin-icons/vite' +import { configDefaults } from 'vitest/config' + +// For more info, +// please see https://github.com/halo-dev/halo/tree/main/ui/packages/ui-plugin-bundler-kit +export default viteConfig({ + vite: { + plugins: [Icons({ compiler: 'vue3' })], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)), + }, + }, + + // If you don't use Vitest, you can remove the following configuration + test: { + environment: 'jsdom', + exclude: [...configDefaults.exclude, 'e2e/**'], + root: fileURLToPath(new URL('./', import.meta.url)), + }, + }, +}) diff --git a/设计文档.md b/设计文档.md new file mode 100644 index 0000000..ebf24be --- /dev/null +++ b/设计文档.md @@ -0,0 +1,893 @@ +# Halo 黑暗模式插件 — 设计文档 + +> 版本:v0.2.0-draft(基于 create-halo-plugin + dev-skills 调查更新) +> 日期:2026-08-06 +> 状态:待审阅 +> 上一步:[调查文档](./调查文档.md)(含 0.4 节补充调查更新) + +--- + +## 目录 + +1. [设计目标与范围](#1-设计目标与范围) +2. [技术架构](#2-技术架构) +3. [CSS 变量体系设计](#3-css-变量体系设计) +4. [黑暗模式调色板](#4-黑暗模式调色板) +5. [组件覆盖策略](#5-组件覆盖策略) +6. [切换器 UI 设计](#6-切换器-ui-设计) +7. [路由与菜单](#7-路由与菜单) +8. [偏好持久化](#8-偏好持久化) +9. [项目文件结构](#9-项目文件结构) +10. [实现阶段划分](#10-实现阶段划分) +11. [测试策略](#11-测试策略) +12. [兼容性矩阵](#12-兼容性矩阵) + +--- + +## 1. 设计目标与范围 + +### 1.1 核心目标 + +将 Halo 后台管理面板(Console)从纯浅色模式改造为支持浅色/黑暗双模式,**不修改 Halo 核心代码**,完全通过插件机制实现。 + +### 1.2 范围界定 + +| 范围 | 包含 | 不包含 | +|------|------|--------| +| 页面 | Halo Console(后台管理)全体页面 | 用户中心 (uc-src)、前台主题 | +| 组件 | Halo 核心组件 + `@halo-dev/components` 组件库 | 第三方插件自有 UI | +| 编辑器 | FormKit 表单 + 富文本编辑器 | 编辑器内容区自定义样式 | +| 模式 | 浅色 ↔ 黑暗手动切换 + 跟随系统 | 定时切换、多主题 | + +### 1.3 非功能性目标 + +- **性能**:CSS 变量切换应 < 50ms,无可见闪烁(FOUC) +- **可访问性**:黑暗模式下所有文本满足 WCAG AA 对比度要求(≥ 4.5:1) +- **兼容性**:支持 Halo ≥ 2.23.0(对应 plugin-starter 的版本约束) +- **可维护性**:CSS 变量体系命名清晰,一个语义变量对应一个视觉属性 + +### 1.4 反目标(明确不做) + +- ❌ 不美化 UI(不改变布局、圆角、间距、字体等) +- ❌ 不添加任何视觉装饰效果 +- ❌ 不修改 Halo 组件库源码 +- ❌ 不支持前台主题的暗色化 + +--- + +## 2. 技术架构 + +### 2.1 整体架构图 + +``` +┌──────────────────────────────────────────────────────────┐ +│ 插件边界 │ +│ │ +│ ┌─────────────┐ ┌──────────────────────────────────┐ │ +│ │ Java 后端 │ │ 前端 (ui/) │ │ +│ │ │ │ │ │ +│ │ BasePlugin │ │ ┌────────────────────────────┐ │ │ +│ │ ├ start() │ │ │ index.ts (definePlugin) │ │ │ +│ │ └ stop() │ │ │ ├ components: { │ │ │ +│ │ │ │ │ │ ThemeToggle │ │ │ +│ │ (极简骨架) │ │ │ │ } │ │ │ +│ └─────────────┘ │ │ ├ routes: [设置页面] │ │ │ +│ │ │ └ extensionPoints: {} │ │ │ +│ │ └────────────────────────────┘ │ │ +│ │ │ │ +│ │ ┌────────────────────────────┐ │ │ +│ │ │ composables/ │ │ │ +│ │ │ ├ useDarkMode.ts │ │ │ +│ │ │ └ useSystemPreference.ts │ │ │ +│ │ └────────────────────────────┘ │ │ +│ │ │ │ +│ │ ┌────────────────────────────┐ │ │ +│ │ │ styles/ │ │ │ +│ │ │ ├ variables.css │ │ │ +│ │ │ ├ dark-theme.css │ │ │ +│ │ │ ├ overrides/ │ │ │ +│ │ │ │ ├ layout.css │ │ │ +│ │ │ │ ├ components.css │ │ │ +│ │ │ │ ├ formkit.css │ │ │ +│ │ │ │ ├ editor.css │ │ │ +│ │ │ │ └ scrollbar.css │ │ │ +│ │ │ └ index.css │ │ │ +│ │ └────────────────────────────┘ │ │ +│ └──────────────────────────────────┘ │ +│ │ +│ ┌──────────────────────────────────────────────────┐ │ +│ │ 注入方式(Halo 插件加载机制自动处理) │ │ +│ │ CSS → /apis/.../ui-plugins/-/bundle.css │ │ +│ │ JS → /apis/.../ui-plugins/-/bundle.js │ │ +│ └──────────────────────────────────────────────────┘ │ +└──────────────────────────────────────────────────────────┘ +``` + +### 2.2 运行时数据流 + +``` + ┌──────────────┐ + │ App 启动 │ + └──────┬───────┘ + │ + ┌──────▼───────┐ + │ 读取持久化偏好 │ + │ localStorage │ + │ (默认: system)│ + └──────┬───────┘ + │ + ┌────────────┼────────────┐ + ▼ ▼ ▼ + ┌─────────┐ ┌─────────┐ ┌─────────┐ + │ 浅色 │ │ 黑暗 │ │ 跟随系统 │ + │ theme= │ │ theme= │ │ theme= │ + │ "light" │ │ "dark" │ │ "auto" │ + └────┬────┘ └────┬────┘ └────┬────┘ + │ │ │ + │ │ ┌─────▼──────┐ + │ │ │ 监听 match │ + │ │ │ Media query│ + │ │ └─────┬──────┘ + │ │ │ + └────────────┼────────────┘ + │ + ┌──────▼───────┐ + │ 设置 │ + │ document │ + │ .documentEl │ + │ 的 data attr │ + │ data-halo- │ + │ theme="dark" │ + │ 或移除该属性 │ + └──────┬───────┘ + │ + ┌──────▼───────┐ + │ CSS 变量切换 │ + │ :root vs │ + │ [data-halo- │ + │ theme="dark"]│ + └──────────────┘ +``` + +### 2.3 关键技术决策 + +| 决策点 | 选择 | 理由 | +|--------|------|------| +| 主题切换方式 | `data-halo-theme` 属性 | 前缀避免冲突,属性选择器高效 | +| 颜色系统 | CSS Variables + OKLCH 颜色空间 | 感知均匀,暗色模式天然适配 | +| 切换状态管理 | Vue composable (`useDarkMode`) | 轻量,无 Pinia 依赖,方便跨组件复用 | +| 持久化存储 | `localStorage` | 极简,零后端依赖,立即可用 | +| 系统偏好监听 | `matchMedia('prefers-color-scheme: dark')` | 标准 API,所有现代浏览器支持 | +| 初始加载防闪烁 | ` +``` + +**注意**:由于插件 bundle 是异步加载的(`useScriptTag`),FOUC 风险需要通过以下方式缓解: +- CSS 变量切换是瞬时的(< 1 帧),即使有短暂浅色闪现,用户体感为"页面加载完成" +- 后续可通过向 Halo 提交 PR 在 `console.html` 添加 `