@origen-ui/admin-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +17 -0
- package/bin/og-admin.mjs +131 -0
- package/package.json +28 -0
- package/templates/current/clean/.codebuddy/AGENTS.md +18 -0
- package/templates/current/clean/.codebuddy/rules/01-feature-architecture.md +12 -0
- package/templates/current/clean/.codebuddy/rules/02-vue-typescript.md +12 -0
- package/templates/current/clean/.codebuddy/rules/03-component-policy.md +30 -0
- package/templates/current/clean/.codebuddy/rules/04-api-auth-router.md +12 -0
- package/templates/current/clean/.codebuddy/rules/05-style.md +12 -0
- package/templates/current/clean/.codebuddy/rules/06-quality.md +12 -0
- package/templates/current/clean/.codebuddy/skills/build-admin-feature/SKILL.md +17 -0
- package/templates/current/clean/.codebuddy/skills/style-og-origen-ui/SKILL.md +14 -0
- package/templates/current/clean/.codebuddy/skills/use-og-dialog/SKILL.md +15 -0
- package/templates/current/clean/.codebuddy/skills/use-og-editor/SKILL.md +28 -0
- package/templates/current/clean/.codebuddy/skills/use-og-form/SKILL.md +15 -0
- package/templates/current/clean/.codebuddy/skills/use-og-form-table/SKILL.md +28 -0
- package/templates/current/clean/.codebuddy/skills/use-og-http/SKILL.md +16 -0
- package/templates/current/clean/.codebuddy/skills/use-og-router-tabs/SKILL.md +14 -0
- package/templates/current/clean/.codebuddy/skills/use-og-search/SKILL.md +17 -0
- package/templates/current/clean/.codebuddy/skills/use-og-table/SKILL.md +19 -0
- package/templates/current/clean/.codebuddy/skills/use-og-upload/SKILL.md +28 -0
- package/templates/current/clean/.codex/AGENTS.md +15 -0
- package/templates/current/clean/.codex/rules/01-feature-architecture.md +6 -0
- package/templates/current/clean/.codex/rules/02-vue-typescript.md +6 -0
- package/templates/current/clean/.codex/rules/03-component-policy.md +24 -0
- package/templates/current/clean/.codex/rules/04-api-auth-router.md +6 -0
- package/templates/current/clean/.codex/rules/05-style.md +6 -0
- package/templates/current/clean/.codex/rules/06-quality.md +6 -0
- package/templates/current/clean/.codex/skills/build-admin-feature/SKILL.md +14 -0
- package/templates/current/clean/.codex/skills/build-admin-feature/references/component-selection.md +25 -0
- package/templates/current/clean/.codex/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/clean/.codex/skills/style-og-origen-ui/agents/openai.yaml +4 -0
- package/templates/current/clean/.codex/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/clean/.codex/skills/use-og-dialog/agents/openai.yaml +4 -0
- package/templates/current/clean/.codex/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/clean/.codex/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/clean/.codex/skills/use-og-form-table/SKILL.md +25 -0
- package/templates/current/clean/.codex/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/clean/.codex/skills/use-og-http/agents/openai.yaml +4 -0
- package/templates/current/clean/.codex/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/clean/.codex/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/clean/.codex/skills/use-og-table/SKILL.md +16 -0
- package/templates/current/clean/.codex/skills/use-og-upload/SKILL.md +25 -0
- package/templates/current/clean/.cursor/AGENTS.md +18 -0
- package/templates/current/clean/.cursor/rules/01-feature-architecture.mdc +12 -0
- package/templates/current/clean/.cursor/rules/02-vue-typescript.mdc +12 -0
- package/templates/current/clean/.cursor/rules/03-component-policy.mdc +30 -0
- package/templates/current/clean/.cursor/rules/04-api-auth-router.mdc +12 -0
- package/templates/current/clean/.cursor/rules/05-style.mdc +12 -0
- package/templates/current/clean/.cursor/rules/06-quality.mdc +12 -0
- package/templates/current/clean/.cursor/skills/build-admin-feature/SKILL.md +14 -0
- package/templates/current/clean/.cursor/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/clean/.cursor/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/clean/.cursor/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/clean/.cursor/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/clean/.cursor/skills/use-og-form-table/SKILL.md +25 -0
- package/templates/current/clean/.cursor/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/clean/.cursor/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/clean/.cursor/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/clean/.cursor/skills/use-og-table/SKILL.md +16 -0
- package/templates/current/clean/.cursor/skills/use-og-upload/SKILL.md +25 -0
- package/templates/current/clean/.env.example +7 -0
- package/templates/current/clean/.env.production.example +31 -0
- package/templates/current/clean/.qoder/AGENTS.md +15 -0
- package/templates/current/clean/.qoder/rules/01-feature-architecture.md +12 -0
- package/templates/current/clean/.qoder/rules/02-vue-typescript.md +12 -0
- package/templates/current/clean/.qoder/rules/03-component-policy.md +30 -0
- package/templates/current/clean/.qoder/rules/04-api-auth-router.md +12 -0
- package/templates/current/clean/.qoder/rules/05-style.md +12 -0
- package/templates/current/clean/.qoder/rules/06-quality.md +12 -0
- package/templates/current/clean/.qoder/skills/build-admin-feature/SKILL.md +14 -0
- package/templates/current/clean/.qoder/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/clean/.qoder/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/clean/.qoder/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/clean/.qoder/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/clean/.qoder/skills/use-og-form-table/SKILL.md +25 -0
- package/templates/current/clean/.qoder/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/clean/.qoder/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/clean/.qoder/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/clean/.qoder/skills/use-og-table/SKILL.md +16 -0
- package/templates/current/clean/.qoder/skills/use-og-upload/SKILL.md +25 -0
- package/templates/current/clean/AGENTS.md +16 -0
- package/templates/current/clean/README.md +116 -0
- package/templates/current/clean/component-catalog.json +765 -0
- package/templates/current/clean/e2e/admin-shell.spec.ts +150 -0
- package/templates/current/clean/e2e/demo-shell.spec.ts +328 -0
- package/templates/current/clean/evals/component-selection.json +29 -0
- package/templates/current/clean/gitignore +3 -0
- package/templates/current/clean/index.html +13 -0
- package/templates/current/clean/openapi.json +1623 -0
- package/templates/current/clean/package.json +65 -0
- package/templates/current/clean/playwright.config.ts +31 -0
- package/templates/current/clean/playwright.demo.config.ts +25 -0
- package/templates/current/clean/recipes/README.md +7 -0
- package/templates/current/clean/recipes/remote-crud-dialog-form.json +15 -0
- package/templates/current/clean/recipes/remote-crud-dialog-form.vue +66 -0
- package/templates/current/clean/scaffold.lock.json +12 -0
- package/templates/current/clean/scripts/check-admin-bundle.mjs +214 -0
- package/templates/current/clean/scripts/check-admin-scaffold.mjs +168 -0
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/Forbidden.vue +26 -0
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/NotFound.vue +26 -0
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/ServerError.vue +26 -0
- package/templates/current/clean/scripts/clean-overlay/src/features/errors/pages/error-pages.spec.ts +32 -0
- package/templates/current/clean/scripts/clean-overlay/src/main.ts +91 -0
- package/templates/current/clean/scripts/clean-overlay/src/router/componentRegistry.ts +25 -0
- package/templates/current/clean/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +47 -0
- package/templates/current/clean/scripts/clean-overlay/src/router/staticRoutes.ts +63 -0
- package/templates/current/clean/scripts/demo-api.ts +797 -0
- package/templates/current/clean/scripts/generate-api.ts +27 -0
- package/templates/current/clean/scripts/performance/baselines/bundle-gzip-v2-pre-entry-unification.json +38 -0
- package/templates/current/clean/scripts/remove-examples.mjs +54 -0
- package/templates/current/clean/src/App.vue +67 -0
- package/templates/current/clean/src/api/client.spec.ts +66 -0
- package/templates/current/clean/src/api/client.ts +72 -0
- package/templates/current/clean/src/api/generated/data-contracts.ts +268 -0
- package/templates/current/clean/src/api/generated/http-client.ts +266 -0
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +147 -0
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +53 -0
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +66 -0
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +171 -0
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +181 -0
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +169 -0
- package/templates/current/clean/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +170 -0
- package/templates/current/clean/src/api/generated//350/256/244/350/257/201.ts +98 -0
- package/templates/current/clean/src/api/http-adapter.spec.ts +33 -0
- package/templates/current/clean/src/api/http-adapter.ts +83 -0
- package/templates/current/clean/src/api/index.ts +41 -0
- package/templates/current/clean/src/app/createAdminUi.spec.ts +110 -0
- package/templates/current/clean/src/app/createAdminUi.ts +78 -0
- package/templates/current/clean/src/app/menu.spec.ts +255 -0
- package/templates/current/clean/src/app/menu.ts +268 -0
- package/templates/current/clean/src/app/menuTypes.ts +17 -0
- package/templates/current/clean/src/app/origenUiLocale.spec.ts +14 -0
- package/templates/current/clean/src/app/origenUiLocale.ts +65 -0
- package/templates/current/clean/src/app/permission.ts +9 -0
- package/templates/current/clean/src/app/runtimeConfig.ts +77 -0
- package/templates/current/clean/src/demo-api.spec.ts +167 -0
- package/templates/current/clean/src/env.d.ts +14 -0
- package/templates/current/clean/src/features/appearance/components/ThemePanel.vue +200 -0
- package/templates/current/clean/src/features/appearance/composables/useTheme.ts +17 -0
- package/templates/current/clean/src/features/appearance/store/theme.ts +140 -0
- package/templates/current/clean/src/features/auth/pages/Login.vue +159 -0
- package/templates/current/clean/src/features/auth/store/auth.spec.ts +131 -0
- package/templates/current/clean/src/features/auth/store/auth.ts +210 -0
- package/templates/current/clean/src/features/errors/pages/Forbidden.vue +26 -0
- package/templates/current/clean/src/features/errors/pages/NotFound.vue +26 -0
- package/templates/current/clean/src/features/errors/pages/ServerError.vue +26 -0
- package/templates/current/clean/src/features/errors/pages/error-pages.spec.ts +32 -0
- package/templates/current/clean/src/features/security/components/DevtoolsProtectionOverlay.vue +56 -0
- package/templates/current/clean/src/features/security/devtoolsProtection.spec.ts +211 -0
- package/templates/current/clean/src/features/security/devtoolsProtection.ts +242 -0
- package/templates/current/clean/src/features/shell/components/AdminWatermark.spec.ts +90 -0
- package/templates/current/clean/src/features/shell/components/AdminWatermark.vue +47 -0
- package/templates/current/clean/src/features/shell/components/RouteProgress.vue +68 -0
- package/templates/current/clean/src/features/shell/composables/useRouteProgress.spec.ts +95 -0
- package/templates/current/clean/src/features/shell/composables/useRouteProgress.ts +52 -0
- package/templates/current/clean/src/features/shell/store/sidebar.ts +55 -0
- package/templates/current/clean/src/features/system/access/api/admin-repository.ts +279 -0
- package/templates/current/clean/src/features/system/access/api/rbac.spec.ts +72 -0
- package/templates/current/clean/src/features/system/access/api/rbac.ts +272 -0
- package/templates/current/clean/src/features/system/access/composables/useAuthorizationRefresh.ts +15 -0
- package/templates/current/clean/src/features/workspace/pages/Empty.vue +18 -0
- package/templates/current/clean/src/features/workspace/pages/Profile.vue +183 -0
- package/templates/current/clean/src/layouts/AdminLayout.vue +61 -0
- package/templates/current/clean/src/layouts/BreadcrumbBar.vue +27 -0
- package/templates/current/clean/src/layouts/SideMenu.vue +119 -0
- package/templates/current/clean/src/layouts/TopBar.vue +301 -0
- package/templates/current/clean/src/layouts/WorkspaceTabs.vue +44 -0
- package/templates/current/clean/src/layouts/topBarMenuSearch.spec.ts +31 -0
- package/templates/current/clean/src/layouts/topBarMenuSearch.ts +21 -0
- package/templates/current/clean/src/locales/en-US.ts +55 -0
- package/templates/current/clean/src/locales/index.ts +119 -0
- package/templates/current/clean/src/locales/messages.spec.ts +23 -0
- package/templates/current/clean/src/locales/zh-CN.ts +55 -0
- package/templates/current/clean/src/locales/zh-TW.ts +44 -0
- package/templates/current/clean/src/main.ts +91 -0
- package/templates/current/clean/src/router/bootstrap.ts +76 -0
- package/templates/current/clean/src/router/componentRegistry.ts +25 -0
- package/templates/current/clean/src/router/dynamicRoutes.spec.ts +47 -0
- package/templates/current/clean/src/router/dynamicRoutes.ts +162 -0
- package/templates/current/clean/src/router/guards.ts +5 -0
- package/templates/current/clean/src/router/queryEncryption.spec.ts +82 -0
- package/templates/current/clean/src/router/queryEncryption.ts +133 -0
- package/templates/current/clean/src/router/routeQuery.spec.ts +11 -0
- package/templates/current/clean/src/router/routeQuery.ts +3 -0
- package/templates/current/clean/src/router/runtimeErrorRecovery.spec.ts +161 -0
- package/templates/current/clean/src/router/runtimeErrorRecovery.ts +108 -0
- package/templates/current/clean/src/router/staticRoutes.ts +63 -0
- package/templates/current/clean/src/router/useRouteQueryDefaults.spec.ts +90 -0
- package/templates/current/clean/src/router/useRouteQueryDefaults.ts +51 -0
- package/templates/current/clean/src/router/useRouteQueryDefaults.types.ts +19 -0
- package/templates/current/clean/src/store/index.ts +3 -0
- package/templates/current/clean/src/styles/element/index.scss +33 -0
- package/templates/current/clean/src/styles/index.css +39 -0
- package/templates/current/clean/src/styles/layout.css +115 -0
- package/templates/current/clean/src/styles/shell.css +196 -0
- package/templates/current/clean/src/styles/source-package-style-compat.css +1 -0
- package/templates/current/clean/src/templates/og-form.ts +48 -0
- package/templates/current/clean/src/templates/og-table.ts +212 -0
- package/templates/current/clean/src/templates/router.ts +51 -0
- package/templates/current/clean/src/templates/templates.spec.ts +90 -0
- package/templates/current/clean/src/theme/index.ts +7 -0
- package/templates/current/clean/src/utils/__tests__/color-mix.spec.ts +39 -0
- package/templates/current/clean/src/utils/color-mix.ts +76 -0
- package/templates/current/clean/src/utils/permissions.ts +6 -0
- package/templates/current/clean/tsconfig.json +40 -0
- package/templates/current/clean/tsconfig.node.json +9 -0
- package/templates/current/clean/vite.build-policy.ts +405 -0
- package/templates/current/clean/vite.config.ts +37 -0
- package/templates/current/examples/.codebuddy/AGENTS.md +18 -0
- package/templates/current/examples/.codebuddy/rules/01-feature-architecture.md +12 -0
- package/templates/current/examples/.codebuddy/rules/02-vue-typescript.md +12 -0
- package/templates/current/examples/.codebuddy/rules/03-component-policy.md +30 -0
- package/templates/current/examples/.codebuddy/rules/04-api-auth-router.md +12 -0
- package/templates/current/examples/.codebuddy/rules/05-style.md +12 -0
- package/templates/current/examples/.codebuddy/rules/06-quality.md +12 -0
- package/templates/current/examples/.codebuddy/skills/build-admin-feature/SKILL.md +17 -0
- package/templates/current/examples/.codebuddy/skills/style-og-origen-ui/SKILL.md +14 -0
- package/templates/current/examples/.codebuddy/skills/use-og-dialog/SKILL.md +15 -0
- package/templates/current/examples/.codebuddy/skills/use-og-editor/SKILL.md +28 -0
- package/templates/current/examples/.codebuddy/skills/use-og-form/SKILL.md +15 -0
- package/templates/current/examples/.codebuddy/skills/use-og-form-table/SKILL.md +28 -0
- package/templates/current/examples/.codebuddy/skills/use-og-http/SKILL.md +16 -0
- package/templates/current/examples/.codebuddy/skills/use-og-router-tabs/SKILL.md +14 -0
- package/templates/current/examples/.codebuddy/skills/use-og-search/SKILL.md +17 -0
- package/templates/current/examples/.codebuddy/skills/use-og-table/SKILL.md +19 -0
- package/templates/current/examples/.codebuddy/skills/use-og-upload/SKILL.md +28 -0
- package/templates/current/examples/.codex/AGENTS.md +15 -0
- package/templates/current/examples/.codex/rules/01-feature-architecture.md +6 -0
- package/templates/current/examples/.codex/rules/02-vue-typescript.md +6 -0
- package/templates/current/examples/.codex/rules/03-component-policy.md +24 -0
- package/templates/current/examples/.codex/rules/04-api-auth-router.md +6 -0
- package/templates/current/examples/.codex/rules/05-style.md +6 -0
- package/templates/current/examples/.codex/rules/06-quality.md +6 -0
- package/templates/current/examples/.codex/skills/build-admin-feature/SKILL.md +14 -0
- package/templates/current/examples/.codex/skills/build-admin-feature/references/component-selection.md +25 -0
- package/templates/current/examples/.codex/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.codex/skills/style-og-origen-ui/agents/openai.yaml +4 -0
- package/templates/current/examples/.codex/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.codex/skills/use-og-dialog/agents/openai.yaml +4 -0
- package/templates/current/examples/.codex/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.codex/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.codex/skills/use-og-form-table/SKILL.md +25 -0
- package/templates/current/examples/.codex/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.codex/skills/use-og-http/agents/openai.yaml +4 -0
- package/templates/current/examples/.codex/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.codex/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.codex/skills/use-og-table/SKILL.md +16 -0
- package/templates/current/examples/.codex/skills/use-og-upload/SKILL.md +25 -0
- package/templates/current/examples/.cursor/AGENTS.md +18 -0
- package/templates/current/examples/.cursor/rules/01-feature-architecture.mdc +12 -0
- package/templates/current/examples/.cursor/rules/02-vue-typescript.mdc +12 -0
- package/templates/current/examples/.cursor/rules/03-component-policy.mdc +30 -0
- package/templates/current/examples/.cursor/rules/04-api-auth-router.mdc +12 -0
- package/templates/current/examples/.cursor/rules/05-style.mdc +12 -0
- package/templates/current/examples/.cursor/rules/06-quality.mdc +12 -0
- package/templates/current/examples/.cursor/skills/build-admin-feature/SKILL.md +14 -0
- package/templates/current/examples/.cursor/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.cursor/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.cursor/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.cursor/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.cursor/skills/use-og-form-table/SKILL.md +25 -0
- package/templates/current/examples/.cursor/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.cursor/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.cursor/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.cursor/skills/use-og-table/SKILL.md +16 -0
- package/templates/current/examples/.cursor/skills/use-og-upload/SKILL.md +25 -0
- package/templates/current/examples/.env.example +7 -0
- package/templates/current/examples/.env.production.example +31 -0
- package/templates/current/examples/.qoder/AGENTS.md +15 -0
- package/templates/current/examples/.qoder/rules/01-feature-architecture.md +12 -0
- package/templates/current/examples/.qoder/rules/02-vue-typescript.md +12 -0
- package/templates/current/examples/.qoder/rules/03-component-policy.md +30 -0
- package/templates/current/examples/.qoder/rules/04-api-auth-router.md +12 -0
- package/templates/current/examples/.qoder/rules/05-style.md +12 -0
- package/templates/current/examples/.qoder/rules/06-quality.md +12 -0
- package/templates/current/examples/.qoder/skills/build-admin-feature/SKILL.md +14 -0
- package/templates/current/examples/.qoder/skills/style-og-origen-ui/SKILL.md +11 -0
- package/templates/current/examples/.qoder/skills/use-og-dialog/SKILL.md +12 -0
- package/templates/current/examples/.qoder/skills/use-og-editor/SKILL.md +25 -0
- package/templates/current/examples/.qoder/skills/use-og-form/SKILL.md +12 -0
- package/templates/current/examples/.qoder/skills/use-og-form-table/SKILL.md +25 -0
- package/templates/current/examples/.qoder/skills/use-og-http/SKILL.md +13 -0
- package/templates/current/examples/.qoder/skills/use-og-router-tabs/SKILL.md +11 -0
- package/templates/current/examples/.qoder/skills/use-og-search/SKILL.md +14 -0
- package/templates/current/examples/.qoder/skills/use-og-table/SKILL.md +16 -0
- package/templates/current/examples/.qoder/skills/use-og-upload/SKILL.md +25 -0
- package/templates/current/examples/AGENTS.md +16 -0
- package/templates/current/examples/README.md +116 -0
- package/templates/current/examples/component-catalog.json +765 -0
- package/templates/current/examples/e2e/admin-shell.spec.ts +150 -0
- package/templates/current/examples/e2e/demo-shell.spec.ts +328 -0
- package/templates/current/examples/evals/component-selection.json +29 -0
- package/templates/current/examples/gitignore +3 -0
- package/templates/current/examples/index.html +13 -0
- package/templates/current/examples/openapi.json +1623 -0
- package/templates/current/examples/package.json +65 -0
- package/templates/current/examples/playwright.config.ts +31 -0
- package/templates/current/examples/playwright.demo.config.ts +25 -0
- package/templates/current/examples/recipes/README.md +7 -0
- package/templates/current/examples/recipes/remote-crud-dialog-form.json +15 -0
- package/templates/current/examples/recipes/remote-crud-dialog-form.vue +66 -0
- package/templates/current/examples/scaffold.lock.json +12 -0
- package/templates/current/examples/scripts/check-admin-bundle.mjs +214 -0
- package/templates/current/examples/scripts/check-admin-scaffold.mjs +168 -0
- package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/Forbidden.vue +26 -0
- package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/NotFound.vue +26 -0
- package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/ServerError.vue +26 -0
- package/templates/current/examples/scripts/clean-overlay/src/features/errors/pages/error-pages.spec.ts +32 -0
- package/templates/current/examples/scripts/clean-overlay/src/main.ts +91 -0
- package/templates/current/examples/scripts/clean-overlay/src/router/componentRegistry.ts +25 -0
- package/templates/current/examples/scripts/clean-overlay/src/router/dynamicRoutes.spec.ts +47 -0
- package/templates/current/examples/scripts/clean-overlay/src/router/staticRoutes.ts +63 -0
- package/templates/current/examples/scripts/demo-api.ts +797 -0
- package/templates/current/examples/scripts/generate-api.ts +27 -0
- package/templates/current/examples/scripts/performance/baselines/bundle-gzip-v2-pre-entry-unification.json +38 -0
- package/templates/current/examples/scripts/remove-examples.mjs +54 -0
- package/templates/current/examples/src/App.vue +67 -0
- package/templates/current/examples/src/api/client.spec.ts +66 -0
- package/templates/current/examples/src/api/client.ts +72 -0
- package/templates/current/examples/src/api/generated/data-contracts.ts +268 -0
- package/templates/current/examples/src/api/generated/http-client.ts +266 -0
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/206/205/345/256/271/346/226/207/347/253/240.ts +147 -0
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/345/256/241/350/256/241.ts +53 -0
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/346/226/207/344/273/266/344/270/212/344/274/240.ts +66 -0
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/347/224/250/346/210/267.ts +171 -0
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/217/234/345/215/225.ts +181 -0
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/247/222/350/211/262.ts +169 -0
- package/templates/current/examples/src/api/generated//347/263/273/347/273/237/347/256/241/347/220/206/350/256/242/345/215/225/350/215/211/347/250/277.ts +170 -0
- package/templates/current/examples/src/api/generated//350/256/244/350/257/201.ts +98 -0
- package/templates/current/examples/src/api/http-adapter.spec.ts +33 -0
- package/templates/current/examples/src/api/http-adapter.ts +83 -0
- package/templates/current/examples/src/api/index.ts +41 -0
- package/templates/current/examples/src/app/createAdminUi.spec.ts +110 -0
- package/templates/current/examples/src/app/createAdminUi.ts +78 -0
- package/templates/current/examples/src/app/menu.spec.ts +255 -0
- package/templates/current/examples/src/app/menu.ts +268 -0
- package/templates/current/examples/src/app/menuTypes.ts +17 -0
- package/templates/current/examples/src/app/origenUiLocale.spec.ts +14 -0
- package/templates/current/examples/src/app/origenUiLocale.ts +65 -0
- package/templates/current/examples/src/app/permission.ts +9 -0
- package/templates/current/examples/src/app/runtimeConfig.ts +77 -0
- package/templates/current/examples/src/demo-api.spec.ts +167 -0
- package/templates/current/examples/src/env.d.ts +14 -0
- package/templates/current/examples/src/features/appearance/components/ThemePanel.vue +200 -0
- package/templates/current/examples/src/features/appearance/composables/useTheme.ts +17 -0
- package/templates/current/examples/src/features/appearance/store/theme.ts +140 -0
- package/templates/current/examples/src/features/auth/pages/Login.vue +159 -0
- package/templates/current/examples/src/features/auth/store/auth.spec.ts +131 -0
- package/templates/current/examples/src/features/auth/store/auth.ts +210 -0
- package/templates/current/examples/src/features/errors/pages/Forbidden.vue +26 -0
- package/templates/current/examples/src/features/errors/pages/NotFound.vue +26 -0
- package/templates/current/examples/src/features/errors/pages/ServerError.vue +26 -0
- package/templates/current/examples/src/features/errors/pages/error-pages.spec.ts +32 -0
- package/templates/current/examples/src/features/feature-composables.spec.ts +208 -0
- package/templates/current/examples/src/features/security/components/DevtoolsProtectionOverlay.vue +56 -0
- package/templates/current/examples/src/features/security/devtoolsProtection.spec.ts +211 -0
- package/templates/current/examples/src/features/security/devtoolsProtection.ts +242 -0
- package/templates/current/examples/src/features/shell/components/AdminWatermark.spec.ts +90 -0
- package/templates/current/examples/src/features/shell/components/AdminWatermark.vue +47 -0
- package/templates/current/examples/src/features/shell/components/RouteProgress.vue +68 -0
- package/templates/current/examples/src/features/shell/composables/useRouteProgress.spec.ts +95 -0
- package/templates/current/examples/src/features/shell/composables/useRouteProgress.ts +52 -0
- package/templates/current/examples/src/features/shell/store/sidebar.ts +55 -0
- package/templates/current/examples/src/features/system/access/api/admin-repository.ts +279 -0
- package/templates/current/examples/src/features/system/access/api/rbac.spec.ts +72 -0
- package/templates/current/examples/src/features/system/access/api/rbac.ts +272 -0
- package/templates/current/examples/src/features/system/access/composables/useAuthorizationRefresh.ts +15 -0
- package/templates/current/examples/src/features/system/audit/composables/useAuditManagement.ts +117 -0
- package/templates/current/examples/src/features/system/audit/pages/AuditList.vue +20 -0
- package/templates/current/examples/src/features/system/menus/components/MenuEditorForm.vue +189 -0
- package/templates/current/examples/src/features/system/menus/composables/useMenuManagement.ts +327 -0
- package/templates/current/examples/src/features/system/menus/pages/MenuList.vue +49 -0
- package/templates/current/examples/src/features/system/roles/components/RoleEditorForm.vue +112 -0
- package/templates/current/examples/src/features/system/roles/composables/useRoleManagement.ts +198 -0
- package/templates/current/examples/src/features/system/roles/pages/RoleList.vue +45 -0
- package/templates/current/examples/src/features/system/users/components/UserEditorForm.vue +101 -0
- package/templates/current/examples/src/features/system/users/composables/useUserManagement.ts +233 -0
- package/templates/current/examples/src/features/system/users/pages/UserList.vue +49 -0
- package/templates/current/examples/src/features/workspace/pages/Dashboard.spec.ts +32 -0
- package/templates/current/examples/src/features/workspace/pages/Dashboard.vue +297 -0
- package/templates/current/examples/src/features/workspace/pages/Empty.vue +18 -0
- package/templates/current/examples/src/features/workspace/pages/Profile.vue +183 -0
- package/templates/current/examples/src/layouts/AdminLayout.vue +61 -0
- package/templates/current/examples/src/layouts/BreadcrumbBar.vue +27 -0
- package/templates/current/examples/src/layouts/SideMenu.vue +119 -0
- package/templates/current/examples/src/layouts/TopBar.vue +301 -0
- package/templates/current/examples/src/layouts/WorkspaceTabs.vue +44 -0
- package/templates/current/examples/src/layouts/topBarMenuSearch.spec.ts +31 -0
- package/templates/current/examples/src/layouts/topBarMenuSearch.ts +21 -0
- package/templates/current/examples/src/locales/en-US.ts +55 -0
- package/templates/current/examples/src/locales/index.ts +119 -0
- package/templates/current/examples/src/locales/messages.spec.ts +23 -0
- package/templates/current/examples/src/locales/zh-CN.ts +55 -0
- package/templates/current/examples/src/locales/zh-TW.ts +44 -0
- package/templates/current/examples/src/main.ts +91 -0
- package/templates/current/examples/src/router/bootstrap.ts +76 -0
- package/templates/current/examples/src/router/componentRegistry.ts +83 -0
- package/templates/current/examples/src/router/dynamicRoutes.spec.ts +109 -0
- package/templates/current/examples/src/router/dynamicRoutes.ts +162 -0
- package/templates/current/examples/src/router/guards.ts +5 -0
- package/templates/current/examples/src/router/queryEncryption.spec.ts +82 -0
- package/templates/current/examples/src/router/queryEncryption.ts +133 -0
- package/templates/current/examples/src/router/routeQuery.spec.ts +11 -0
- package/templates/current/examples/src/router/routeQuery.ts +3 -0
- package/templates/current/examples/src/router/runtimeErrorRecovery.spec.ts +161 -0
- package/templates/current/examples/src/router/runtimeErrorRecovery.ts +108 -0
- package/templates/current/examples/src/router/staticRoutes.ts +63 -0
- package/templates/current/examples/src/router/useRouteQueryDefaults.spec.ts +90 -0
- package/templates/current/examples/src/router/useRouteQueryDefaults.ts +51 -0
- package/templates/current/examples/src/router/useRouteQueryDefaults.types.ts +19 -0
- package/templates/current/examples/src/store/index.ts +3 -0
- package/templates/current/examples/src/styles/element/index.scss +33 -0
- package/templates/current/examples/src/styles/index.css +39 -0
- package/templates/current/examples/src/styles/layout.css +115 -0
- package/templates/current/examples/src/styles/shell.css +196 -0
- package/templates/current/examples/src/styles/source-package-style-compat.css +1 -0
- package/templates/current/examples/src/templates/og-form.ts +48 -0
- package/templates/current/examples/src/templates/og-table.ts +212 -0
- package/templates/current/examples/src/templates/router.ts +51 -0
- package/templates/current/examples/src/templates/templates.spec.ts +90 -0
- package/templates/current/examples/src/theme/index.ts +7 -0
- package/templates/current/examples/src/utils/__tests__/color-mix.spec.ts +39 -0
- package/templates/current/examples/src/utils/color-mix.ts +76 -0
- package/templates/current/examples/src/utils/permissions.ts +6 -0
- package/templates/current/examples/tsconfig.json +40 -0
- package/templates/current/examples/tsconfig.node.json +9 -0
- package/templates/current/examples/vite.build-policy.ts +405 -0
- package/templates/current/examples/vite.config.ts +37 -0
package/templates/current/clean/.codex/skills/build-admin-feature/references/component-selection.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Component selection
|
|
2
|
+
|
|
3
|
+
<!-- component-catalog:start -->
|
|
4
|
+
| Use case | Required API | Skill | Avoid |
|
|
5
|
+
| --- | --- | --- | --- |
|
|
6
|
+
| Parent-controlled dialog UI | `OgDialog` from `@origen-ui/dialog` | `use-og-dialog` | Element Plus ElDialog in business features |
|
|
7
|
+
| Awaitable or manager-owned dialog workflows | `createOgDialog`, `useDialog`, `OgDialogHost` from `@origen-ui/dialog` | `use-og-dialog` | createApp or a global fallback manager |
|
|
8
|
+
| Rich text authoring | `OgEditor`, `OgEditorSetup` from `@origen-ui/editor` | `use-og-editor` | Unsanitized HTML persistence or direct DOM insertion |
|
|
9
|
+
| Readonly rich text rendering | `OgEditorViewer` from `@origen-ui/editor` | `use-og-editor` | Rendering untrusted HTML without server sanitization |
|
|
10
|
+
| Schema-driven create, edit, or readonly forms | `OgForm` from `@origen-ui/form` | `use-og-form` | Element Plus ElForm or removed legacy APIs |
|
|
11
|
+
| Editable array fields and line-item forms | `OgFormTable`, `createOgFormTableField` from `@origen-ui/form-table` | `use-og-form-table` | Mutating parent form arrays or duplicate remote table fetching |
|
|
12
|
+
| Standalone query/filter panels | `OgSearch` from `@origen-ui/search` | `use-og-search` | Owning list loading or pagination |
|
|
13
|
+
| Typed local or remote data tables | `OgTable` from `@origen-ui/table` | `use-og-table` | Legacy fetch/searchSchema APIs or ElTable |
|
|
14
|
+
| Editable local tables embedded in a form or workflow | `OgTableLocal` from `@origen-ui/table` | `use-og-table` | Treating local rows as an implicit remote data source |
|
|
15
|
+
| Remote CRUD lists with search and paging | `OgTableWithSearch` from `@origen-ui/table-search` | `use-og-table` | Separate ad-hoc search and table state |
|
|
16
|
+
| Page-local business tabs | `OgTabs` from `@origen-ui/tabs` | `use-og-router-tabs` | Using page-local tabs for route workspace state |
|
|
17
|
+
| Validated file uploads and URL projection | `OgUpload`, `createXhrUploadAdapter` from `@origen-ui/upload` | `use-og-upload` | Package-level transport clients or mutating internal files |
|
|
18
|
+
| A single schema-aware field needs to participate in an existing OgForm context | `OgFormItem` from `@origen-ui/form` | `use-og-form` | Using it as a transparent Element Plus ElFormItem replacement |
|
|
19
|
+
| An advanced integration needs the registered OgForm control renderer | `FieldRenderer` from `@origen-ui/form` | `use-og-form` | Treating it as a general-purpose Element Plus control wrapper |
|
|
20
|
+
| Rendering a project SVG sprite icon | `SvgIcon` from `@origen-ui/icons` | `style-og-origen-ui` | Passing untrusted or arbitrary symbol identifiers |
|
|
21
|
+
| Rendering a route workspace with keep-alive semantics | `RouterViewHost` from `@origen-ui/router` | `use-og-router-tabs` | Using it as a transparent vue-router RouterView replacement |
|
|
22
|
+
<!-- component-catalog:end -->
|
|
23
|
+
|
|
24
|
+
Route menu, breadcrumbs, and workspace tabs use `@origen-ui/router`; application
|
|
25
|
+
HTTP uses `ApiClient` from `@origen-ui/http`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: style-og-origen-ui
|
|
3
|
+
description: Style a standalone @origen-ui Admin page with origen-ui CSS entries, Element Plus design tokens, dark-mode variables, and responsive enterprise layout conventions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Style Admin UI
|
|
7
|
+
|
|
8
|
+
Load `origen-ui/style.css` by default. Use an explicit component entry such as
|
|
9
|
+
`origen-ui/table-search.css` only when the application intentionally adopts
|
|
10
|
+
on-demand styles. Use Element Plus variables and application tokens, keep local styles
|
|
11
|
+
scoped, and verify light/dark rendering before finishing.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-dialog
|
|
3
|
+
description: Build parent-controlled dialogs or awaitable edit workflows with @origen-ui/dialog. Use for dialog confirmation, close guards, dynamic form content, manager-owned sessions, and typed dialog outcomes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgDialog
|
|
7
|
+
|
|
8
|
+
Use `<OgDialog v-model>` for parent-owned visibility. For workflows, call
|
|
9
|
+
`app.use(createOgDialog())` once, render `OgDialogHost` in the application tree, and
|
|
10
|
+
open through `useDialog().open`. Handle the discriminated `DialogOutcome` and
|
|
11
|
+
keep dynamic content in the current Vue application context. Never call
|
|
12
|
+
`createApp()` or use a global fallback manager.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-editor
|
|
3
|
+
description: Build rich text authoring and readonly content surfaces with @origen-ui/editor. Use for HTML editing, toolbar presets, media uploads, source mode, and content limits.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgEditor
|
|
7
|
+
|
|
8
|
+
Use `OgEditor` with `v-model` for authoring and `OgEditorViewer` for readonly
|
|
9
|
+
content. Load `@origen-ui/editor/style.css` (or the matching explicit
|
|
10
|
+
`origen-ui/editor.css` entry). Choose editor initialization through
|
|
11
|
+
the discriminated `setup` prop, then use `maxLength`, `readonly`, or `disabled` rather than wrapping
|
|
12
|
+
the editor in ad-hoc state.
|
|
13
|
+
|
|
14
|
+
Configure image, video, and attachment uploads independently through
|
|
15
|
+
`EditorUploadOptions`. Each `request` must honor the supplied `AbortSignal`,
|
|
16
|
+
report progress, and return an `EditorUploadResult`; keep transport and auth in
|
|
17
|
+
the application service. The component pipeline is
|
|
18
|
+
`validate -> transform -> request -> insert` for selection, drag/drop, and
|
|
19
|
+
pasted media, so do not bypass it with direct DOM insertion.
|
|
20
|
+
|
|
21
|
+
Treat initial HTML, pasted content, and source-mode edits as untrusted. Keep the
|
|
22
|
+
package sanitizer enabled and sanitize again on the server before persistence or
|
|
23
|
+
rendering. Use exposed methods such as `focus`, `setContent`, `retryUpload`, and
|
|
24
|
+
`cancelUpload` through a typed template ref, and handle upload events for
|
|
25
|
+
telemetry without duplicating upload state.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-form
|
|
3
|
+
description: Build schema-driven create, edit, and readonly business forms with @origen-ui/form. Use for typed fields, permissions, validation, linkage, async options, custom renderers, and submission transforms.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgForm
|
|
7
|
+
|
|
8
|
+
Use `FormField<T>` with `prop: keyof T & string`. Prefer visible, disabled, readonly,
|
|
9
|
+
dependencies plus linkage, compute, valueChange, or validators for cross-field behavior.
|
|
10
|
+
Use `type: 'custom'` with an instance `RendererRegistry`; unknown renderers must fail.
|
|
11
|
+
Custom controls must update the supplied model. Do not use removed `resetFields` or
|
|
12
|
+
`dependsOn` APIs.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-form-table
|
|
3
|
+
description: Build typed editable array fields with @origen-ui/form-table. Use for line-item forms, local row editing, row creation/removal, and OgForm-linked table validation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgFormTable
|
|
7
|
+
|
|
8
|
+
Create the field with `createOgFormTableField<T, K, TRow>()` and keep `prop`
|
|
9
|
+
typed as a key of the parent form model. Declare a stable `tableId`, unique
|
|
10
|
+
`rowKey`, typed `columns`, and an optional async `createRow`; use `span` or
|
|
11
|
+
`newline` only for intentional OgForm grid placement. The helper defaults to
|
|
12
|
+
`span: 24` and writes every row addition, edit, and removal back to the parent
|
|
13
|
+
field immediately.
|
|
14
|
+
|
|
15
|
+
Use a `DataColumn` editor for editable cells and configure it with the same
|
|
16
|
+
OgForm field contract (`required`, `requiredWhen`, `validator`, `rules`,
|
|
17
|
+
`valueChange`, and `compute`). Cell commits include the complete computed row;
|
|
18
|
+
hidden, disabled, and readonly editors are excluded from validation. Preserve a
|
|
19
|
+
stable renderer registry when custom editors are needed, and ensure custom
|
|
20
|
+
controls update the supplied model.
|
|
21
|
+
|
|
22
|
+
The table is local state: use the existing OgTable column, filter, sort,
|
|
23
|
+
selection, persistence, and export configuration as needed, but do not add a
|
|
24
|
+
second remote fetch or mutate the parent form object directly. Keep row keys
|
|
25
|
+
unique and test add/edit/remove plus validation and computed-field behavior.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-http
|
|
3
|
+
description: Configure or consume @origen-ui/http in a standalone Admin app. Use for API clients, business services, token refresh, CSRF, retry, cancellation, and authentication-expiry handling.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use @origen-ui/http
|
|
7
|
+
|
|
8
|
+
Create application-owned `TokenManager` and `ApiClient` instances with an explicit
|
|
9
|
+
response adapter. Keep auth URLs, cookie access, refresh, and navigation in the
|
|
10
|
+
application adapter. Pass AbortSignal from callers, let rejected business errors
|
|
11
|
+
reach feature composables, and do not create package-level client singletons.
|
|
12
|
+
|
|
13
|
+
Only idempotent reads retry. Use `silent` only for expected failures.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-router-tabs
|
|
3
|
+
description: Configure @origen-ui/router dynamic routes, access policies, backend menus, breadcrumbs, keep-alive metadata, and workspace tabs in the standalone Admin scaffold.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use router and tabs
|
|
7
|
+
|
|
8
|
+
Transform validated backend menu data into local route component keys. Mark login
|
|
9
|
+
and error routes public and hidden. Keep permission checks in the access policy,
|
|
10
|
+
not page conditionals. Use `RouterViewHost` for the outlet and `RouterTabs` for
|
|
11
|
+
route workspace behavior; use `OgTabs` only for page-local tabs.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-search
|
|
3
|
+
description: Build a typed standalone query panel with @origen-ui/search. Use for filter forms, async option loading, responsive search layout, reset behavior, and parameter transformation outside a OgTable list.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgSearch
|
|
7
|
+
|
|
8
|
+
Keep list loading and pagination outside OgSearch. Type every field against the
|
|
9
|
+
query model, make `options` and `optionsApi` mutually exclusive, and pass the
|
|
10
|
+
provided AbortSignal to async option requests. Defaults initialize the component
|
|
11
|
+
once; later controlled model updates are authoritative. Submit explicitly; reset
|
|
12
|
+
is configured only through the `reset` object, clears every search field, and does
|
|
13
|
+
not silently load a list. Bind expansion through `v-model:expanded`; do not put
|
|
14
|
+
expansion state in `config` or use an imperative expansion setter.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-table
|
|
3
|
+
description: Build typed remote lists, CRUD tables, paging, search, row actions, batch actions, drafts, exports, or virtual tables with @origen-ui/table and OgTableWithSearch.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgTable
|
|
7
|
+
|
|
8
|
+
Declare `tableId`, `rowKey`, typed columns, and `dataSource` explicitly. Implement
|
|
9
|
+
`dataSource.list(request, context)` as the only read entry and pass
|
|
10
|
+
`context.signal` to the service. Use `config.search.fields`, action columns, and
|
|
11
|
+
`config.actions.batch`; do not restore `fetch`, `searchSchema`, or legacy search
|
|
12
|
+
v-model APIs. Configure built-ins only through named config blocks: state is
|
|
13
|
+
under `config.state`, while masking and analytics keep their own named blocks.
|
|
14
|
+
Register application extensions with `createOgTable({ extensions })` and
|
|
15
|
+
configure them only through `config.extensions`; never put built-in IDs there.
|
|
16
|
+
Provide `config.permissions.has` whenever permissions are declared.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-upload
|
|
3
|
+
description: Build validated file workflows with @origen-ui/upload. Use for adapter-backed uploads, URL projection, retries, progress, file actions, and coordinated form submission.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgUpload
|
|
7
|
+
|
|
8
|
+
Prefer an application-owned `OgUploadAdapter` for business endpoints. Its
|
|
9
|
+
`upload` and optional `remove`, `preview`, and `download` callbacks must honor
|
|
10
|
+
the provided `AbortSignal`; pass progress through `onProgress` and keep auth and
|
|
11
|
+
request mapping in the application service. For conventional XHR endpoints,
|
|
12
|
+
create the same transport explicitly with `createXhrUploadAdapter(options)` and
|
|
13
|
+
pass the returned adapter; response mapping remains in `resolveResponse`.
|
|
14
|
+
|
|
15
|
+
Choose `valueType` intentionally: `fileList` exposes `OgUploadFile[]`, `url`
|
|
16
|
+
projects one URL, and `urls` projects a URL list. Set `accept`, `maxSize`,
|
|
17
|
+
`limit`, `multiple`, `duplicate`, and `beforeUpload` for validation. Use
|
|
18
|
+
`variant="drag"` or `"picture-card"` for the selection surface and keep
|
|
19
|
+
`showFileList` and labels accessible.
|
|
20
|
+
|
|
21
|
+
Leave `autoUpload` enabled unless a parent workflow needs an explicit submit;
|
|
22
|
+
then call the typed `submit()` expose and inspect its `successful`, `failed`, and
|
|
23
|
+
`pending` files. Configure retry deliberately, handle emitted validation and
|
|
24
|
+
operation errors, and use `abort`, `retry`, `remove`, or `clearFiles` through a
|
|
25
|
+
template ref instead of mutating internal files.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: og-admin-scaffold
|
|
3
|
+
description: Official guidance for the standalone @origen-ui Admin scaffold.
|
|
4
|
+
globs:
|
|
5
|
+
- '**/*'
|
|
6
|
+
alwaysApply: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# @origen-ui Admin scaffold
|
|
10
|
+
|
|
11
|
+
Read `AGENTS.local.md` when it exists. Keep product code in `src/app` and
|
|
12
|
+
`src/features`; do not modify managed files or generated agent files without an
|
|
13
|
+
upgrade migration. Run `pnpm type-check` and `pnpm test` for every application change.
|
|
14
|
+
|
|
15
|
+
Use `build-admin-feature` before adding a feature. Use matching `use-og-*` skills
|
|
16
|
+
for tables, search, forms, dialogs, routing, or HTTP. Remote lists must use
|
|
17
|
+
`OgTableWithSearch`; forms use `OgForm`; dialogs use `OgDialog`; network
|
|
18
|
+
requests use `@origen-ui/http`. Do not replace these with Element Plus equivalents.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 01-feature-architecture
|
|
3
|
+
globs:
|
|
4
|
+
- '**/*'
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
# Feature architecture
|
|
8
|
+
|
|
9
|
+
- Keep route pages thin composition surfaces under `src/features/<feature>/pages`.
|
|
10
|
+
- Put UI sections in `components`, stateful side effects in `composables`, and API adapters in `api`.
|
|
11
|
+
- Keep data flow as props down and typed events up. Do not mutate props.
|
|
12
|
+
- `src/app` owns application integration; `src/features` owns business behavior; examples never become feature dependencies.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 02-vue-typescript
|
|
3
|
+
globs:
|
|
4
|
+
- '**/*'
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
# Vue and TypeScript
|
|
8
|
+
|
|
9
|
+
- Use Vue 3 `<script setup lang="ts">` and Composition API.
|
|
10
|
+
- Keep source state minimal, derive values with `computed`, and use watchers only for side effects.
|
|
11
|
+
- Type props, emits, exposed APIs, composable inputs, API payloads, and route metadata.
|
|
12
|
+
- Use `useTemplateRef` for imperative component APIs and keep templates declarative.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 03-component-policy
|
|
3
|
+
globs:
|
|
4
|
+
- '**/*'
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
# @origen-ui component policy
|
|
8
|
+
|
|
9
|
+
<!-- component-catalog:start -->
|
|
10
|
+
- `OgDialog` (@origen-ui/dialog): Parent-controlled dialog UI; avoid Element Plus ElDialog in business features.
|
|
11
|
+
- `createOgDialog` (@origen-ui/dialog): Awaitable or manager-owned dialog workflows; avoid createApp or a global fallback manager.
|
|
12
|
+
- `OgEditor` (@origen-ui/editor): Rich text authoring; avoid Unsanitized HTML persistence or direct DOM insertion.
|
|
13
|
+
- `OgEditorViewer` (@origen-ui/editor): Readonly rich text rendering; avoid Rendering untrusted HTML without server sanitization.
|
|
14
|
+
- `OgForm` (@origen-ui/form): Schema-driven create, edit, or readonly forms; avoid Element Plus ElForm or removed legacy APIs.
|
|
15
|
+
- `OgFormTable` (@origen-ui/form-table): Editable array fields and line-item forms; avoid Mutating parent form arrays or duplicate remote table fetching.
|
|
16
|
+
- `OgSearch` (@origen-ui/search): Standalone query/filter panels; avoid Owning list loading or pagination.
|
|
17
|
+
- `OgTable` (@origen-ui/table): Typed local or remote data tables; avoid Legacy fetch/searchSchema APIs or ElTable.
|
|
18
|
+
- `OgTableLocal` (@origen-ui/table): Editable local tables embedded in a form or workflow; avoid Treating local rows as an implicit remote data source.
|
|
19
|
+
- `OgTableWithSearch` (@origen-ui/table-search): Remote CRUD lists with search and paging; avoid Separate ad-hoc search and table state.
|
|
20
|
+
- `OgTabs` (@origen-ui/tabs): Page-local business tabs; avoid Using page-local tabs for route workspace state.
|
|
21
|
+
- `OgUpload` (@origen-ui/upload): Validated file uploads and URL projection; avoid Package-level transport clients or mutating internal files.
|
|
22
|
+
- `OgFormItem` (@origen-ui/form): A single schema-aware field needs to participate in an existing OgForm context; avoid Using it as a transparent Element Plus ElFormItem replacement.
|
|
23
|
+
- `FieldRenderer` (@origen-ui/form): An advanced integration needs the registered OgForm control renderer; avoid Treating it as a general-purpose Element Plus control wrapper.
|
|
24
|
+
- `SvgIcon` (@origen-ui/icons): Rendering a project SVG sprite icon; avoid Passing untrusted or arbitrary symbol identifiers.
|
|
25
|
+
- `RouterViewHost` (@origen-ui/router): Rendering a route workspace with keep-alive semantics; avoid Using it as a transparent vue-router RouterView replacement.
|
|
26
|
+
<!-- component-catalog:end -->
|
|
27
|
+
|
|
28
|
+
- Route workspace: `@origen-ui/router`; page-local business tabs: `OgTabs`.
|
|
29
|
+
- Use Element Plus only for primitives. Do not add `ElTable`, `ElForm`, `ElDialog`, axios, or raw fetch to a business feature.
|
|
30
|
+
- Pass AbortSignal through every list and async-options implementation. Configure permissions explicitly when a component declares them.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 04-api-auth-router
|
|
3
|
+
globs:
|
|
4
|
+
- '**/*'
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
# API, authentication, and routing
|
|
8
|
+
|
|
9
|
+
- Create application-owned `ApiClient` instances with explicit response adapters.
|
|
10
|
+
- Keep token, refresh URL, CSRF source, and login navigation in the application adapter.
|
|
11
|
+
- Resolve backend component keys through the local registry; never import a backend-supplied path.
|
|
12
|
+
- Local authentication and menu providers are development-only. Remote failures must reach the caller.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 05-style
|
|
3
|
+
globs:
|
|
4
|
+
- '**/*'
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
# Styling
|
|
8
|
+
|
|
9
|
+
- Use Element Plus CSS variables and the application theme tokens.
|
|
10
|
+
- Keep component styles scoped and use class selectors.
|
|
11
|
+
- Load only required `origen-ui/*.css` entries. `origen-ui/style.css` does not exist.
|
|
12
|
+
- Preserve responsive layouts and avoid hard-coded theme colors outside token definitions.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 06-quality
|
|
3
|
+
globs:
|
|
4
|
+
- '**/*'
|
|
5
|
+
alwaysApply: false
|
|
6
|
+
---
|
|
7
|
+
# Quality gates
|
|
8
|
+
|
|
9
|
+
- Run `pnpm type-check`, `pnpm test`, and `pnpm build` for application changes.
|
|
10
|
+
- Run `pnpm agents:check` after changing official rules or Skills.
|
|
11
|
+
- Do not use deprecated component APIs such as `resetFields`, `dependsOn`, global renderer registration, or legacy OgTable read APIs.
|
|
12
|
+
- Add focused unit or browser coverage for user-visible behavior and failed requests.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-admin-feature
|
|
3
|
+
description: Build a typed Vue Admin business feature. Use when adding a page, CRUD workflow, feature folder, business API adapter, permissioned menu, or route in the standalone @origen-ui Admin scaffold.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Build an Admin feature
|
|
7
|
+
|
|
8
|
+
1. Define the feature model, permissions, API contract, and route before writing a page.
|
|
9
|
+
2. Create `api`, `composables`, `components`, and `pages` only when the responsibility exists.
|
|
10
|
+
3. Select the mandatory @origen-ui business component before writing view code.
|
|
11
|
+
4. Register a local component key for a remote menu; never trust a backend import path.
|
|
12
|
+
5. Add a focused test and run application quality gates.
|
|
13
|
+
|
|
14
|
+
Read `references/component-selection.md` before choosing a UI primitive.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: style-og-origen-ui
|
|
3
|
+
description: Style a standalone @origen-ui Admin page with origen-ui CSS entries, Element Plus design tokens, dark-mode variables, and responsive enterprise layout conventions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Style Admin UI
|
|
7
|
+
|
|
8
|
+
Load `origen-ui/style.css` by default. Use an explicit component entry such as
|
|
9
|
+
`origen-ui/table-search.css` only when the application intentionally adopts
|
|
10
|
+
on-demand styles. Use Element Plus variables and application tokens, keep local styles
|
|
11
|
+
scoped, and verify light/dark rendering before finishing.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-dialog
|
|
3
|
+
description: Build parent-controlled dialogs or awaitable edit workflows with @origen-ui/dialog. Use for dialog confirmation, close guards, dynamic form content, manager-owned sessions, and typed dialog outcomes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgDialog
|
|
7
|
+
|
|
8
|
+
Use `<OgDialog v-model>` for parent-owned visibility. For workflows, call
|
|
9
|
+
`app.use(createOgDialog())` once, render `OgDialogHost` in the application tree, and
|
|
10
|
+
open through `useDialog().open`. Handle the discriminated `DialogOutcome` and
|
|
11
|
+
keep dynamic content in the current Vue application context. Never call
|
|
12
|
+
`createApp()` or use a global fallback manager.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-editor
|
|
3
|
+
description: Build rich text authoring and readonly content surfaces with @origen-ui/editor. Use for HTML editing, toolbar presets, media uploads, source mode, and content limits.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgEditor
|
|
7
|
+
|
|
8
|
+
Use `OgEditor` with `v-model` for authoring and `OgEditorViewer` for readonly
|
|
9
|
+
content. Load `@origen-ui/editor/style.css` (or the matching explicit
|
|
10
|
+
`origen-ui/editor.css` entry). Choose editor initialization through
|
|
11
|
+
the discriminated `setup` prop, then use `maxLength`, `readonly`, or `disabled` rather than wrapping
|
|
12
|
+
the editor in ad-hoc state.
|
|
13
|
+
|
|
14
|
+
Configure image, video, and attachment uploads independently through
|
|
15
|
+
`EditorUploadOptions`. Each `request` must honor the supplied `AbortSignal`,
|
|
16
|
+
report progress, and return an `EditorUploadResult`; keep transport and auth in
|
|
17
|
+
the application service. The component pipeline is
|
|
18
|
+
`validate -> transform -> request -> insert` for selection, drag/drop, and
|
|
19
|
+
pasted media, so do not bypass it with direct DOM insertion.
|
|
20
|
+
|
|
21
|
+
Treat initial HTML, pasted content, and source-mode edits as untrusted. Keep the
|
|
22
|
+
package sanitizer enabled and sanitize again on the server before persistence or
|
|
23
|
+
rendering. Use exposed methods such as `focus`, `setContent`, `retryUpload`, and
|
|
24
|
+
`cancelUpload` through a typed template ref, and handle upload events for
|
|
25
|
+
telemetry without duplicating upload state.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-form
|
|
3
|
+
description: Build schema-driven create, edit, and readonly business forms with @origen-ui/form. Use for typed fields, permissions, validation, linkage, async options, custom renderers, and submission transforms.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgForm
|
|
7
|
+
|
|
8
|
+
Use `FormField<T>` with `prop: keyof T & string`. Prefer visible, disabled, readonly,
|
|
9
|
+
dependencies plus linkage, compute, valueChange, or validators for cross-field behavior.
|
|
10
|
+
Use `type: 'custom'` with an instance `RendererRegistry`; unknown renderers must fail.
|
|
11
|
+
Custom controls must update the supplied model. Do not use removed `resetFields` or
|
|
12
|
+
`dependsOn` APIs.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-form-table
|
|
3
|
+
description: Build typed editable array fields with @origen-ui/form-table. Use for line-item forms, local row editing, row creation/removal, and OgForm-linked table validation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgFormTable
|
|
7
|
+
|
|
8
|
+
Create the field with `createOgFormTableField<T, K, TRow>()` and keep `prop`
|
|
9
|
+
typed as a key of the parent form model. Declare a stable `tableId`, unique
|
|
10
|
+
`rowKey`, typed `columns`, and an optional async `createRow`; use `span` or
|
|
11
|
+
`newline` only for intentional OgForm grid placement. The helper defaults to
|
|
12
|
+
`span: 24` and writes every row addition, edit, and removal back to the parent
|
|
13
|
+
field immediately.
|
|
14
|
+
|
|
15
|
+
Use a `DataColumn` editor for editable cells and configure it with the same
|
|
16
|
+
OgForm field contract (`required`, `requiredWhen`, `validator`, `rules`,
|
|
17
|
+
`valueChange`, and `compute`). Cell commits include the complete computed row;
|
|
18
|
+
hidden, disabled, and readonly editors are excluded from validation. Preserve a
|
|
19
|
+
stable renderer registry when custom editors are needed, and ensure custom
|
|
20
|
+
controls update the supplied model.
|
|
21
|
+
|
|
22
|
+
The table is local state: use the existing OgTable column, filter, sort,
|
|
23
|
+
selection, persistence, and export configuration as needed, but do not add a
|
|
24
|
+
second remote fetch or mutate the parent form object directly. Keep row keys
|
|
25
|
+
unique and test add/edit/remove plus validation and computed-field behavior.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-http
|
|
3
|
+
description: Configure or consume @origen-ui/http in a standalone Admin app. Use for API clients, business services, token refresh, CSRF, retry, cancellation, and authentication-expiry handling.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use @origen-ui/http
|
|
7
|
+
|
|
8
|
+
Create application-owned `TokenManager` and `ApiClient` instances with an explicit
|
|
9
|
+
response adapter. Keep auth URLs, cookie access, refresh, and navigation in the
|
|
10
|
+
application adapter. Pass AbortSignal from callers, let rejected business errors
|
|
11
|
+
reach feature composables, and do not create package-level client singletons.
|
|
12
|
+
|
|
13
|
+
Only idempotent reads retry. Use `silent` only for expected failures.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-router-tabs
|
|
3
|
+
description: Configure @origen-ui/router dynamic routes, access policies, backend menus, breadcrumbs, keep-alive metadata, and workspace tabs in the standalone Admin scaffold.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use router and tabs
|
|
7
|
+
|
|
8
|
+
Transform validated backend menu data into local route component keys. Mark login
|
|
9
|
+
and error routes public and hidden. Keep permission checks in the access policy,
|
|
10
|
+
not page conditionals. Use `RouterViewHost` for the outlet and `RouterTabs` for
|
|
11
|
+
route workspace behavior; use `OgTabs` only for page-local tabs.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-search
|
|
3
|
+
description: Build a typed standalone query panel with @origen-ui/search. Use for filter forms, async option loading, responsive search layout, reset behavior, and parameter transformation outside a OgTable list.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgSearch
|
|
7
|
+
|
|
8
|
+
Keep list loading and pagination outside OgSearch. Type every field against the
|
|
9
|
+
query model, make `options` and `optionsApi` mutually exclusive, and pass the
|
|
10
|
+
provided AbortSignal to async option requests. Defaults initialize the component
|
|
11
|
+
once; later controlled model updates are authoritative. Submit explicitly; reset
|
|
12
|
+
is configured only through the `reset` object, clears every search field, and does
|
|
13
|
+
not silently load a list. Bind expansion through `v-model:expanded`; do not put
|
|
14
|
+
expansion state in `config` or use an imperative expansion setter.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-table
|
|
3
|
+
description: Build typed remote lists, CRUD tables, paging, search, row actions, batch actions, drafts, exports, or virtual tables with @origen-ui/table and OgTableWithSearch.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgTable
|
|
7
|
+
|
|
8
|
+
Declare `tableId`, `rowKey`, typed columns, and `dataSource` explicitly. Implement
|
|
9
|
+
`dataSource.list(request, context)` as the only read entry and pass
|
|
10
|
+
`context.signal` to the service. Use `config.search.fields`, action columns, and
|
|
11
|
+
`config.actions.batch`; do not restore `fetch`, `searchSchema`, or legacy search
|
|
12
|
+
v-model APIs. Configure built-ins only through named config blocks: state is
|
|
13
|
+
under `config.state`, while masking and analytics keep their own named blocks.
|
|
14
|
+
Register application extensions with `createOgTable({ extensions })` and
|
|
15
|
+
configure them only through `config.extensions`; never put built-in IDs there.
|
|
16
|
+
Provide `config.permissions.has` whenever permissions are declared.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-og-upload
|
|
3
|
+
description: Build validated file workflows with @origen-ui/upload. Use for adapter-backed uploads, URL projection, retries, progress, file actions, and coordinated form submission.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use OgUpload
|
|
7
|
+
|
|
8
|
+
Prefer an application-owned `OgUploadAdapter` for business endpoints. Its
|
|
9
|
+
`upload` and optional `remove`, `preview`, and `download` callbacks must honor
|
|
10
|
+
the provided `AbortSignal`; pass progress through `onProgress` and keep auth and
|
|
11
|
+
request mapping in the application service. For conventional XHR endpoints,
|
|
12
|
+
create the same transport explicitly with `createXhrUploadAdapter(options)` and
|
|
13
|
+
pass the returned adapter; response mapping remains in `resolveResponse`.
|
|
14
|
+
|
|
15
|
+
Choose `valueType` intentionally: `fileList` exposes `OgUploadFile[]`, `url`
|
|
16
|
+
projects one URL, and `urls` projects a URL list. Set `accept`, `maxSize`,
|
|
17
|
+
`limit`, `multiple`, `duplicate`, and `beforeUpload` for validation. Use
|
|
18
|
+
`variant="drag"` or `"picture-card"` for the selection surface and keep
|
|
19
|
+
`showFileList` and labels accessible.
|
|
20
|
+
|
|
21
|
+
Leave `autoUpload` enabled unless a parent workflow needs an explicit submit;
|
|
22
|
+
then call the typed `submit()` expose and inspect its `successful`, `failed`, and
|
|
23
|
+
`pending` files. Configure retry deliberately, handle emitted validation and
|
|
24
|
+
operation errors, and use `abort`, `retry`, `remove`, or `clearFiles` through a
|
|
25
|
+
template ref instead of mutating internal files.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ============================================
|
|
2
|
+
# Production Environment Configuration
|
|
3
|
+
# ============================================
|
|
4
|
+
# Copy this file to .env.production and fill in the values.
|
|
5
|
+
# DO NOT commit .env.production to version control.
|
|
6
|
+
|
|
7
|
+
# Application title shown in the browser tab
|
|
8
|
+
VITE_APP_TITLE=禾数运营控制台
|
|
9
|
+
|
|
10
|
+
# API base URL (use relative path for CDN deployments)
|
|
11
|
+
VITE_API_BASE_URL=/api
|
|
12
|
+
|
|
13
|
+
# API backend target server
|
|
14
|
+
VITE_API_TARGET=https://api.example.com
|
|
15
|
+
|
|
16
|
+
# Default locale
|
|
17
|
+
VITE_DEFAULT_LOCALE=zh-CN
|
|
18
|
+
|
|
19
|
+
# Scaffolding Gitee API configuration
|
|
20
|
+
VITE_SCAFFOLD_GITEE_API_BASE=https://gitee.com/api/v5
|
|
21
|
+
VITE_SCAFFOLD_GITEE_OWNER=zapcenter
|
|
22
|
+
VITE_SCAFFOLD_GITEE_REPO=origen-ui
|
|
23
|
+
|
|
24
|
+
# Optional: use a fixed CDN or Release manifest URL
|
|
25
|
+
# VITE_SCAFFOLD_MANIFEST_URL=https://cdn.example.com/manifest.json
|
|
26
|
+
|
|
27
|
+
# Optional: enable analytics
|
|
28
|
+
# VITE_ANALYTICS_ID=UA-XXXXXXXX-X
|
|
29
|
+
|
|
30
|
+
# Optional: enable error tracking (e.g., Sentry)
|
|
31
|
+
# VITE_SENTRY_DSN=https://xxxxx@sentry.io/xxxxx
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
description: Official guidance for the standalone @origen-ui Admin scaffold.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @origen-ui Admin scaffold
|
|
7
|
+
|
|
8
|
+
Read `AGENTS.local.md` when it exists. Keep product code in `src/app` and
|
|
9
|
+
`src/features`; do not modify managed files or generated agent files without an
|
|
10
|
+
upgrade migration. Run `pnpm type-check` and `pnpm test` for every application change.
|
|
11
|
+
|
|
12
|
+
Use `build-admin-feature` before adding a feature. Use matching `use-og-*` skills
|
|
13
|
+
for tables, search, forms, dialogs, routing, or HTTP. Remote lists must use
|
|
14
|
+
`OgTableWithSearch`; forms use `OgForm`; dialogs use `OgDialog`; network
|
|
15
|
+
requests use `@origen-ui/http`. Do not replace these with Element Plus equivalents.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: glob
|
|
3
|
+
description: 01-feature-architecture
|
|
4
|
+
paths:
|
|
5
|
+
- '**/*'
|
|
6
|
+
---
|
|
7
|
+
# Feature architecture
|
|
8
|
+
|
|
9
|
+
- Keep route pages thin composition surfaces under `src/features/<feature>/pages`.
|
|
10
|
+
- Put UI sections in `components`, stateful side effects in `composables`, and API adapters in `api`.
|
|
11
|
+
- Keep data flow as props down and typed events up. Do not mutate props.
|
|
12
|
+
- `src/app` owns application integration; `src/features` owns business behavior; examples never become feature dependencies.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: glob
|
|
3
|
+
description: 02-vue-typescript
|
|
4
|
+
paths:
|
|
5
|
+
- '**/*'
|
|
6
|
+
---
|
|
7
|
+
# Vue and TypeScript
|
|
8
|
+
|
|
9
|
+
- Use Vue 3 `<script setup lang="ts">` and Composition API.
|
|
10
|
+
- Keep source state minimal, derive values with `computed`, and use watchers only for side effects.
|
|
11
|
+
- Type props, emits, exposed APIs, composable inputs, API payloads, and route metadata.
|
|
12
|
+
- Use `useTemplateRef` for imperative component APIs and keep templates declarative.
|