@jskit-ai/agent-docs 0.1.149 → 0.1.150
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/guide/agent/app-setup/existing-application-migration.md +8 -6
- package/guide/agent/app-setup/initial-scaffolding.md +9 -7
- package/guide/agent/app-setup/quickstart.md +9 -6
- package/guide/agent/framework/application-operations.md +91 -0
- package/guide/agent/framework/crud-operations.md +83 -0
- package/guide/agent/framework/material-3.md +112 -0
- package/guide/agent/framework/ui-operations.md +78 -0
- package/guide/agent/index.md +13 -3
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/example/AGENTS.md +8 -8
- package/patterns/minimal-foundation/example/package.json +4 -5
- package/patterns/shell-foundation/example/AGENTS.md +8 -8
- package/patterns/shell-foundation/example/package.json +5 -6
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +61 -61
- package/skills/jskit/SKILL.md +8 -5
- package/skills/jskit/references/app-operations.md +12 -11
- package/skills/jskit/references/crud-operations.md +10 -6
- package/skills/jskit/references/existing-application-migration.md +9 -12
- package/skills/jskit/references/material-3.md +2 -0
- package/skills/jskit/references/pattern-index.md +61 -61
- package/skills/jskit/references/patterns/app/minimal-foundation/PATTERN.md +105 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/.nvmrc +1 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/AGENTS.md +17 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/Procfile +2 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/app.json +14 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/bin/develop.js +71 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/bin/server.js +8 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/config/public.js +40 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/config/server.js +1 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/eslint.config.mjs +19 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/favicon.svg +7 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/gitignore +9 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/index.html +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/jsconfig.json +8 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +62 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/packages/main/package.json +42 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/packages/main/src/shared/index.js +10 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/playwright.config.mjs +31 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/server.js +195 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/App.vue +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/main.js +85 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/pages/home/index.vue +48 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/pages/home.vue +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/src/views/NotFound.vue +13 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/tests/server/smoke.test.js +16 -0
- package/skills/jskit/references/patterns/app/minimal-foundation/example/vite.config.mjs +80 -0
- package/skills/jskit/references/patterns/app/shell-foundation/PATTERN.md +111 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/.nvmrc +1 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/AGENTS.md +17 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/Procfile +2 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/app.json +14 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/bin/develop.js +71 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/bin/server.js +8 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/config/public.js +40 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/config/server.js +1 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/eslint.config.mjs +19 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/favicon.svg +7 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/gitignore +9 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/index.html +13 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/jsconfig.json +8 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +64 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +56 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/client/index.js +9 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/client/providers/MainClientProvider.js +18 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/shared/index.js +10 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/playwright.config.mjs +31 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/server.js +195 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/App.vue +11 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/ShellLayout.vue +12 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/menus/MenuLinkItem.vue +30 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/menus/TabLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/error.js +19 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/main.js +85 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/index.vue +116 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings/general/index.vue +40 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings/index.vue +7 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home/settings.vue +109 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/pages/home.vue +20 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/placement.js +56 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/placementTopology.js +149 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/views/NotFound.vue +13 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/e2e/adaptive-shell.spec.ts +10 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/tests/server/smoke.test.js +16 -0
- package/skills/jskit/references/patterns/app/shell-foundation/example/vite.config.mjs +80 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/PATTERN.md +77 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/config/public.js +19 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/config/server.js +9 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/pages/admin/assistant/index.vue +7 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/pages/admin/settings/assistant/index.vue +7 -0
- package/skills/jskit/references/patterns/assistant/assistant-surface/example/src/placement.js +38 -0
- package/skills/jskit/references/patterns/auth/auth-surface/PATTERN.md +90 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/login.vue +17 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/reset-password.vue +17 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/pages/auth/signout.vue +17 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/runtime/authGuardRuntime.js +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/runtime/authHttpClient.js +1 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/runtime/useSignOut.js +1 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/LoginView.vue +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/ResetPasswordView.vue +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/src/views/auth/SignOutView.vue +7 -0
- package/skills/jskit/references/patterns/auth/auth-surface/example/tools/preview-identity +5 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/PATTERN.md +67 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/.env.example +4 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/config/server.js +11 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +7 -0
- package/skills/jskit/references/patterns/console/console-surface/PATTERN.md +58 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/index.vue +62 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/settings/index.vue +17 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console/settings.vue +95 -0
- package/skills/jskit/references/patterns/console/console-surface/example/src/pages/console.vue +20 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/PATTERN.md +88 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookEditPage.vue +54 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookFormFields.vue +52 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookListPage.vue +54 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookNewPage.vue +45 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookViewPage.vue +50 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/formFields.js +31 -0
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/listExtensions.js +9 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/PATTERN.md +160 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/migrations/20260815000000_books.cjs +22 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +41 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/src/server/BooksFeature.js +13 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/src/shared/bookResource.js +83 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/src/shared/index.js +1 -0
- package/skills/jskit/references/patterns/crud/resource-contract/PATTERN.md +102 -0
- package/skills/jskit/references/patterns/crud/resource-contract/example/bookResource.js +87 -0
- package/skills/jskit/references/patterns/database/mysql-application/PATTERN.md +80 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/.env.example +5 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/.github/workflows/verify.yml +39 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/knexfile.js +11 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +13 -0
- package/skills/jskit/references/patterns/database/mysql-application/example/scripts/prepare-database.js +3 -0
- package/skills/jskit/references/patterns/database/postgres-application/PATTERN.md +80 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/.env.example +5 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/.github/workflows/verify.yml +38 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/knexfile.js +11 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +13 -0
- package/skills/jskit/references/patterns/database/postgres-application/example/scripts/prepare-database.js +3 -0
- package/skills/jskit/references/patterns/mobile/android-application/PATTERN.md +71 -0
- package/skills/jskit/references/patterns/mobile/android-application/example/capacitor.config.json +10 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/PATTERN.md +69 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/example/.env.example +1 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +8 -0
- package/skills/jskit/references/patterns/realtime/realtime-application/example/src/placement.js +17 -0
- package/skills/jskit/references/patterns/server/feature-package/PATTERN.md +108 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +48 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/src/server/BookingEngineProvider.js +33 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/src/server/actions.js +26 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/src/server/inputSchemas.js +19 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/AvailabilityEngineProvider.js +31 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/InvoiceRollupProvider.js +36 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/customKnexRepository.js +34 -0
- package/skills/jskit/references/patterns/server/feature-package/example/variations/orchestratorService.js +23 -0
- package/skills/jskit/references/patterns/shell/application-shell/PATTERN.md +66 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/App.vue +13 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/pages/home/index.vue +48 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/expected-existing/src/pages/home.vue +13 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/App.vue +11 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/ShellLayout.vue +13 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/menus/MenuLinkItem.vue +30 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/menus/TabLinkItem.vue +42 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/error.js +19 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/index.vue +106 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings/general/index.vue +40 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings/index.vue +7 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home/settings.vue +109 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/pages/home.vue +20 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/placement.js +56 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/src/placementTopology.js +149 -0
- package/skills/jskit/references/patterns/shell/application-shell/example/tests/e2e/adaptive-shell.spec.ts +10 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/PATTERN.md +76 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/packages/main/src/client/providers/MainClientProvider.js +14 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/components/SyncStatusElement.vue +16 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/activity.vue +8 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/index.vue +7 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports/overview.vue +8 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/pages/home/reports.vue +33 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/placement.js +52 -0
- package/skills/jskit/references/patterns/ui/page-and-placement/example/src/placementTopology.js +29 -0
- package/skills/jskit/references/patterns/users/account-settings/PATTERN.md +61 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsNotificationsSection.vue +81 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsPreferencesSection.vue +151 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsProfileSection.vue +120 -0
- package/skills/jskit/references/patterns/users/account-settings/example/src/pages/account/index.vue +17 -0
- package/skills/jskit/references/patterns/users/user-administration-server/PATTERN.md +64 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +42 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/src/server/UsersFeature.js +13 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/src/shared/index.js +1 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/src/shared/userResource.js +69 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +43 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/src/server/UsersWorkspaceFeature.js +22 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/src/shared/index.js +1 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/src/shared/userResource.js +56 -0
- package/skills/jskit/references/patterns/workspaces/workspace-server/PATTERN.md +60 -0
- package/skills/jskit/references/patterns/workspaces/workspace-server/example/config/roles.js +27 -0
- package/skills/jskit/references/patterns/workspaces/workspace-server/example/packages/main/src/server/email/workspaceInviteEmail.js +23 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/PATTERN.md +63 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/packages/main/src/client/components/AccountPendingInvitesCue.vue +106 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/packages/main/src/client/components/AccountSettingsInvitesSection.vue +7 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/components/WorkspaceNotFoundCard.vue +53 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/composables/useWorkspaceNotFoundState.js +41 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/members/index.vue +7 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/workspace/settings/index.vue +23 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/admin/workspace/settings.vue +95 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/pages/invite/[token].vue +7 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/admin/index.vue +85 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/admin/root.vue +20 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/app/index.vue +46 -0
- package/skills/jskit/references/patterns/workspaces/workspace-surfaces/example/src/surfaces/app/root.vue +20 -0
- package/skills/jskit/references/ui-operations.md +5 -3
- package/templates/app/AGENTS.md +8 -8
package/skills/jskit/references/patterns/realtime/realtime-application/example/src/placement.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createPlacementRegistry } from "@jskit-ai/shell-web/client/placement";
|
|
2
|
+
|
|
3
|
+
const registry = createPlacementRegistry();
|
|
4
|
+
const { addPlacement } = registry;
|
|
5
|
+
|
|
6
|
+
addPlacement({
|
|
7
|
+
id: "realtime.connection.indicator",
|
|
8
|
+
target: "shell.status",
|
|
9
|
+
kind: "component",
|
|
10
|
+
surfaces: ["*"],
|
|
11
|
+
order: 950,
|
|
12
|
+
componentToken: "realtime.web.connection.indicator"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export default function getPlacements() {
|
|
16
|
+
return registry.build();
|
|
17
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: server/feature-package
|
|
3
|
+
title: App-local server feature package
|
|
4
|
+
summary: Define a server feature through explicit capabilities and first-class actions, adding services or repositories only when its domain earns them.
|
|
5
|
+
keywords: actions, feature, json-rest, knex, orchestration, package, provider, repository, routes, server
|
|
6
|
+
requires: @jskit-ai/kernel
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# App-local server feature package
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use this pattern when a server capability has its own product language and
|
|
14
|
+
should not grow inside `packages/main`. It shows the smallest normal shape: a
|
|
15
|
+
feature declaration, named capability inputs and outputs, and first-class
|
|
16
|
+
actions whose implementations capture those exact dependencies.
|
|
17
|
+
|
|
18
|
+
The concrete `booking-engine` example is intentionally repository-free. The
|
|
19
|
+
`variations/` directory preserves the two important escalations: a meaningful
|
|
20
|
+
orchestration service and an explicit custom Knex repository for a domain that
|
|
21
|
+
cannot fit the normal resource APIs.
|
|
22
|
+
|
|
23
|
+
## Do not use when
|
|
24
|
+
|
|
25
|
+
Do not create a package for a tiny composition callback or one route with no
|
|
26
|
+
domain behavior. Use the CRUD resource patterns when ordinary resource
|
|
27
|
+
operations fit. Do not select custom Knex merely because SQL is familiar; it
|
|
28
|
+
is an explicit exception for persistence behavior the higher-level APIs cannot
|
|
29
|
+
express.
|
|
30
|
+
|
|
31
|
+
## Product decisions
|
|
32
|
+
|
|
33
|
+
Decide the feature's public operations, access surface, authentication policy,
|
|
34
|
+
input and output contracts, transactional boundary, and whether it truly owns
|
|
35
|
+
persistence. Decide whether HTTP routes are needed or another package will call
|
|
36
|
+
its actions internally. These decisions come from the product, not a JSKIT
|
|
37
|
+
questionnaire.
|
|
38
|
+
|
|
39
|
+
## Invariants
|
|
40
|
+
|
|
41
|
+
- `packages/main` composes the application; substantial feature logic lives in
|
|
42
|
+
the feature package.
|
|
43
|
+
- `defineFeature()` receives only declared capabilities and returns only
|
|
44
|
+
declared feature APIs.
|
|
45
|
+
- Actions define the public operation contract and close over the feature APIs
|
|
46
|
+
they need. They never resolve arbitrary dependencies at execution time.
|
|
47
|
+
- The service orchestrates the feature and does not issue SQL directly.
|
|
48
|
+
- A repository owns persistence and accepts transaction/context options.
|
|
49
|
+
- The normal persistence lane uses a public or documented high-level resource
|
|
50
|
+
API; custom Knex is an explicit, reviewed exception.
|
|
51
|
+
- Ordinary HTTP and assistant exposure is projected from actions. Explicit
|
|
52
|
+
route code exists only for a genuinely custom transport.
|
|
53
|
+
- Register routes, actions, contributors, and other catalogue entries during
|
|
54
|
+
`setup()`. Runtime catalogues may be sealed before provider `boot()` begins.
|
|
55
|
+
Reserve `boot()` for starting long-lived work such as consumers, schedulers,
|
|
56
|
+
or notification loops after the application structure is complete.
|
|
57
|
+
- Application source contains no scaffold-shape, lane, provenance, receipt, or
|
|
58
|
+
authoring-history metadata.
|
|
59
|
+
|
|
60
|
+
## Framework APIs
|
|
61
|
+
|
|
62
|
+
The provider uses `defineFeature()` from
|
|
63
|
+
`@jskit-ai/kernel/server/features`. The runtime supplies named capabilities
|
|
64
|
+
and the feature publishes its actions through the dedicated action catalogue.
|
|
65
|
+
The custom persistence variation uses `createWithTransaction()` from
|
|
66
|
+
`@jskit-ai/database-runtime/shared`.
|
|
67
|
+
|
|
68
|
+
## Example files
|
|
69
|
+
|
|
70
|
+
`example/booking-engine/` is a concrete app-local package showing the preferred
|
|
71
|
+
small-feature boundary. Its status query is deliberately small: product logic
|
|
72
|
+
can grow inside the returned feature API without creating ceremonial layers.
|
|
73
|
+
|
|
74
|
+
`example/variations/AvailabilityEngineProvider.js` and
|
|
75
|
+
`example/variations/orchestratorService.js` show the repository-free lane.
|
|
76
|
+
`example/variations/InvoiceRollupProvider.js` and
|
|
77
|
+
`example/variations/customKnexRepository.js` show the explicit custom
|
|
78
|
+
persistence lane.
|
|
79
|
+
|
|
80
|
+
## Variation points
|
|
81
|
+
|
|
82
|
+
Rename the package, capability id, actions, validators, and domain methods.
|
|
83
|
+
Select the correct channels and surfaces in `actionDefaults`, overriding them
|
|
84
|
+
only for exceptional actions. Add a service when orchestration is shared or
|
|
85
|
+
stateful. Add a repository only when the feature owns persistence. Replace the
|
|
86
|
+
illustrative status query with narrow product language before shipping.
|
|
87
|
+
|
|
88
|
+
## Verification
|
|
89
|
+
|
|
90
|
+
- Import the feature and verify its declared capability inputs and outputs.
|
|
91
|
+
- Exercise actions through the action runtime, including invalid input and
|
|
92
|
+
denied access.
|
|
93
|
+
- Exercise HTTP routes only when the package owns them.
|
|
94
|
+
- Test service orchestration independently from persistence.
|
|
95
|
+
- Test repository transaction and context forwarding.
|
|
96
|
+
- Rebuild any schema from immutable migrations in a disposable database.
|
|
97
|
+
- Run the app's package, server, and integration verification.
|
|
98
|
+
|
|
99
|
+
## Avoid
|
|
100
|
+
|
|
101
|
+
- product logic in the provider or `packages/main`
|
|
102
|
+
- registering routes or action catalogue entries from `boot()`
|
|
103
|
+
- direct SQL in actions, routes, or services
|
|
104
|
+
- a repository for an orchestration-only feature
|
|
105
|
+
- generic `execute(anything)` operations in finished product code
|
|
106
|
+
- `app.make()`, `scope.make()`, container tokens, or service-location helpers
|
|
107
|
+
- metadata claiming which authoring tool or pattern created the package
|
|
108
|
+
- field questionnaires, overwrite switches, or durable operation records
|
package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@local/booking-engine",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "App-local booking orchestration package.",
|
|
5
|
+
"private": true,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@jskit-ai/kernel": "0.1.178",
|
|
9
|
+
"json-rest-schema": "^1.0.17"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
"./server/actions": "./src/server/actions.js"
|
|
13
|
+
},
|
|
14
|
+
"jskit": {
|
|
15
|
+
"kind": "runtime",
|
|
16
|
+
"capabilities": {
|
|
17
|
+
"provides": [
|
|
18
|
+
"feature.booking-engine"
|
|
19
|
+
],
|
|
20
|
+
"requires": [
|
|
21
|
+
"runtime.actions"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"runtime": {
|
|
25
|
+
"server": {
|
|
26
|
+
"providers": [
|
|
27
|
+
{
|
|
28
|
+
"entrypoint": "src/server/BookingEngineProvider.js",
|
|
29
|
+
"export": "BookingEngineProvider"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"client": {
|
|
34
|
+
"providers": []
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"metadata": {
|
|
38
|
+
"apiSummary": {
|
|
39
|
+
"surfaces": [
|
|
40
|
+
{
|
|
41
|
+
"subpath": "./server/actions",
|
|
42
|
+
"summary": "Exports booking-engine action definitions."
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineFeature } from "@jskit-ai/kernel/server/features";
|
|
2
|
+
import { createActions } from "./actions.js";
|
|
3
|
+
|
|
4
|
+
const BookingEngineProvider = defineFeature({
|
|
5
|
+
id: "feature.booking-engine",
|
|
6
|
+
domain: "booking",
|
|
7
|
+
provides: {
|
|
8
|
+
bookingEngine: "feature.booking-engine"
|
|
9
|
+
},
|
|
10
|
+
actionDefaults: {
|
|
11
|
+
channels: ["api", "assistant", "internal"],
|
|
12
|
+
surfaces: ["app"]
|
|
13
|
+
},
|
|
14
|
+
setup() {
|
|
15
|
+
return {
|
|
16
|
+
bookingEngine: Object.freeze({
|
|
17
|
+
async readStatus(input = {}) {
|
|
18
|
+
return {
|
|
19
|
+
ok: true,
|
|
20
|
+
feature: "booking-engine",
|
|
21
|
+
scope: input.scope || "default",
|
|
22
|
+
verbose: input.verbose === true
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
actions({ bookingEngine }) {
|
|
29
|
+
return createActions({ bookingEngine });
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export { BookingEngineProvider };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { statusQueryInputValidator } from "./inputSchemas.js";
|
|
2
|
+
|
|
3
|
+
const ACTION_GET_STATUS = "feature.booking-engine.status.read";
|
|
4
|
+
function createActions({ bookingEngine } = {}) {
|
|
5
|
+
if (!bookingEngine || typeof bookingEngine.readStatus !== "function") {
|
|
6
|
+
throw new TypeError("createActions requires bookingEngine.readStatus().");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
return Object.freeze([
|
|
10
|
+
{
|
|
11
|
+
id: ACTION_GET_STATUS,
|
|
12
|
+
version: 1,
|
|
13
|
+
kind: "query",
|
|
14
|
+
input: statusQueryInputValidator,
|
|
15
|
+
output: null,
|
|
16
|
+
idempotency: "none",
|
|
17
|
+
audit: { actionName: ACTION_GET_STATUS },
|
|
18
|
+
observability: {},
|
|
19
|
+
async execute(input) {
|
|
20
|
+
return bookingEngine.readStatus(input);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { ACTION_GET_STATUS, createActions };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { deepFreeze } from "@jskit-ai/kernel/shared/support/deepFreeze";
|
|
2
|
+
import { createSchema } from "json-rest-schema";
|
|
3
|
+
|
|
4
|
+
const statusQueryInputValidator = deepFreeze({
|
|
5
|
+
schema: createSchema({
|
|
6
|
+
scope: {
|
|
7
|
+
type: "string",
|
|
8
|
+
required: false,
|
|
9
|
+
minLength: 1
|
|
10
|
+
},
|
|
11
|
+
verbose: {
|
|
12
|
+
type: "boolean",
|
|
13
|
+
required: false
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
mode: "patch"
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export { statusQueryInputValidator };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineFeature } from "@jskit-ai/kernel/server/features";
|
|
2
|
+
import { emptyInputValidator } from "@jskit-ai/kernel/shared/actions/actionContributorHelpers";
|
|
3
|
+
import { createService } from "./orchestratorService.js";
|
|
4
|
+
|
|
5
|
+
const AvailabilityEngineProvider = defineFeature({
|
|
6
|
+
id: "feature.availability-engine",
|
|
7
|
+
domain: "availability",
|
|
8
|
+
provides: {
|
|
9
|
+
availabilityEngine: "feature.availability-engine"
|
|
10
|
+
},
|
|
11
|
+
actionDefaults: {
|
|
12
|
+
channels: ["api", "assistant", "internal"],
|
|
13
|
+
surfaces: ["app"]
|
|
14
|
+
},
|
|
15
|
+
setup() {
|
|
16
|
+
return { availabilityEngine: createService() };
|
|
17
|
+
},
|
|
18
|
+
actions({ availabilityEngine }) {
|
|
19
|
+
return [{
|
|
20
|
+
id: "availability.status.read",
|
|
21
|
+
kind: "query",
|
|
22
|
+
input: emptyInputValidator,
|
|
23
|
+
idempotency: "none",
|
|
24
|
+
async execute(input) {
|
|
25
|
+
return availabilityEngine.getStatus(input);
|
|
26
|
+
}
|
|
27
|
+
}];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export { AvailabilityEngineProvider };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineFeature } from "@jskit-ai/kernel/server/features";
|
|
2
|
+
import { emptyInputValidator } from "@jskit-ai/kernel/shared/actions/actionContributorHelpers";
|
|
3
|
+
import { createRepository } from "./repository.js";
|
|
4
|
+
|
|
5
|
+
const InvoiceRollupProvider = defineFeature({
|
|
6
|
+
id: "feature.invoice-rollup",
|
|
7
|
+
domain: "invoices",
|
|
8
|
+
requires: {
|
|
9
|
+
database: "runtime.database"
|
|
10
|
+
},
|
|
11
|
+
provides: {
|
|
12
|
+
invoiceRollup: "feature.invoice-rollup"
|
|
13
|
+
},
|
|
14
|
+
actionDefaults: {
|
|
15
|
+
channels: ["api", "assistant", "internal"],
|
|
16
|
+
surfaces: ["admin"]
|
|
17
|
+
},
|
|
18
|
+
setup({ database }) {
|
|
19
|
+
return {
|
|
20
|
+
invoiceRollup: createRepository({ knex: database.knex })
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
actions({ invoiceRollup }) {
|
|
24
|
+
return [{
|
|
25
|
+
id: "invoices.rollup.status.read",
|
|
26
|
+
kind: "query",
|
|
27
|
+
input: emptyInputValidator,
|
|
28
|
+
idempotency: "none",
|
|
29
|
+
async execute(input, context) {
|
|
30
|
+
return invoiceRollup.getStatus(input, { context });
|
|
31
|
+
}
|
|
32
|
+
}];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export { InvoiceRollupProvider };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createWithTransaction } from "@jskit-ai/database-runtime/shared";
|
|
2
|
+
|
|
3
|
+
function createRepository({ knex } = {}) {
|
|
4
|
+
if (!knex) {
|
|
5
|
+
throw new TypeError("createRepository requires knex.");
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return Object.freeze({
|
|
9
|
+
withTransaction: createWithTransaction(knex),
|
|
10
|
+
async getStatus(input = {}, options = {}) {
|
|
11
|
+
return {
|
|
12
|
+
ok: true,
|
|
13
|
+
feature: "invoice-rollup",
|
|
14
|
+
persistence: "custom-knex",
|
|
15
|
+
tableName: "invoice_rollups",
|
|
16
|
+
hasTransaction: Boolean(options.trx),
|
|
17
|
+
input
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
async execute(input = {}, options = {}) {
|
|
21
|
+
return {
|
|
22
|
+
accepted: false,
|
|
23
|
+
feature: "invoice-rollup",
|
|
24
|
+
persistence: "custom-knex",
|
|
25
|
+
tableName: "invoice_rollups",
|
|
26
|
+
hasTransaction: Boolean(options.trx),
|
|
27
|
+
input,
|
|
28
|
+
message: "Replace this example with the reviewed domain-specific query."
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { createRepository };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function createService() {
|
|
2
|
+
return Object.freeze({
|
|
3
|
+
async getStatus(input = {}) {
|
|
4
|
+
return {
|
|
5
|
+
ok: true,
|
|
6
|
+
feature: "availability-engine",
|
|
7
|
+
mode: "orchestrator",
|
|
8
|
+
input
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
async execute(input = {}) {
|
|
12
|
+
return {
|
|
13
|
+
accepted: false,
|
|
14
|
+
feature: "availability-engine",
|
|
15
|
+
mode: "orchestrator",
|
|
16
|
+
input,
|
|
17
|
+
message: "Replace this example with calls to the feature's injected collaborators."
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { createService };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: shell/application-shell
|
|
3
|
+
title: Responsive application shell
|
|
4
|
+
summary: Compose the JSKIT responsive shell, semantic placements, settings navigation, and accessible adaptive-shell browser checks.
|
|
5
|
+
keywords: adaptive, app, layout, navigation, placement, responsive, settings, shell
|
|
6
|
+
requires: @jskit-ai/kernel, @jskit-ai/shell-web
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Responsive application shell
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use this pattern when adding the standard responsive JSKIT shell to an existing
|
|
14
|
+
application foundation.
|
|
15
|
+
|
|
16
|
+
## Do not use when
|
|
17
|
+
|
|
18
|
+
Do not copy the entire shell into an application that already has a coherent
|
|
19
|
+
JSKIT shell. Use the narrower page-and-placement pattern for incremental UI.
|
|
20
|
+
|
|
21
|
+
## Product decisions
|
|
22
|
+
|
|
23
|
+
Choose the product navigation, settings sections, surfaces, labels, icons, and
|
|
24
|
+
which controls remain visible at compact, medium, and expanded widths.
|
|
25
|
+
|
|
26
|
+
## Framework APIs
|
|
27
|
+
|
|
28
|
+
Use the shell provider, `ShellLayout`, `ShellOutlet`, link components,
|
|
29
|
+
placement registry, topology, and adaptive smoke helper exported by
|
|
30
|
+
`@jskit-ai/shell-web`.
|
|
31
|
+
|
|
32
|
+
## Invariants
|
|
33
|
+
|
|
34
|
+
- `App.vue`, the shell layout, placements, topology, and route pages agree.
|
|
35
|
+
- Navigation uses semantic placements rather than direct component injection.
|
|
36
|
+
- Compact controls have accessible names and at least 48 CSS-pixel targets.
|
|
37
|
+
- Cached route/resource state hydrates writable UI state synchronously or with
|
|
38
|
+
immediate watchers.
|
|
39
|
+
- Loading uses stable skeletons, not spinners or shifting status banners.
|
|
40
|
+
- The adaptive browser check closes navigation through its public close control.
|
|
41
|
+
|
|
42
|
+
## Example files
|
|
43
|
+
|
|
44
|
+
`example/src/` contains the complete shell composition, standard link
|
|
45
|
+
components, settings routes, placement registry, and topology. The browser
|
|
46
|
+
example under `example/tests/` exercises the public adaptive-shell contract.
|
|
47
|
+
The `expected-existing/` files show the minimal foundation shapes replaced by
|
|
48
|
+
the complete shell; they are reference inputs, not merge instructions.
|
|
49
|
+
|
|
50
|
+
## Variation points
|
|
51
|
+
|
|
52
|
+
Change product navigation, surfaces, routes, settings sections, placements,
|
|
53
|
+
responsive outlet mappings, labels, icons, and application-owned components.
|
|
54
|
+
|
|
55
|
+
## Verification
|
|
56
|
+
|
|
57
|
+
Exercise direct navigation, browser back/forward with a warm cache, keyboard
|
|
58
|
+
navigation, current-link state, and compact/medium/expanded layouts. Run client
|
|
59
|
+
tests and a production build.
|
|
60
|
+
|
|
61
|
+
## Avoid
|
|
62
|
+
|
|
63
|
+
- custom navigation registries beside placements
|
|
64
|
+
- clicking Vuetify scrims or coordinates in browser tests
|
|
65
|
+
- magic generated-page classes
|
|
66
|
+
- source mutation or overwrite machinery
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="home-start-screen d-flex flex-column ga-4">
|
|
3
|
+
<header>
|
|
4
|
+
<p class="text-overline text-medium-emphasis mb-1">Home</p>
|
|
5
|
+
<h1 class="home-start-screen__title">Home base</h1>
|
|
6
|
+
<p class="text-body-2 text-medium-emphasis mb-0">
|
|
7
|
+
The app runtime is online and ready for the first real workflow.
|
|
8
|
+
</p>
|
|
9
|
+
</header>
|
|
10
|
+
|
|
11
|
+
<v-sheet rounded="lg" border class="home-start-screen__panel">
|
|
12
|
+
<h2 class="text-h6 mb-2">No activity yet</h2>
|
|
13
|
+
<p class="text-body-2 text-medium-emphasis mb-0">
|
|
14
|
+
Recent work, saved records, and next actions will appear here once this app has data.
|
|
15
|
+
</p>
|
|
16
|
+
</v-sheet>
|
|
17
|
+
</section>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<style scoped>
|
|
21
|
+
.home-start-screen {
|
|
22
|
+
--home-start-title-size: 2rem;
|
|
23
|
+
--home-start-panel-padding: 1rem;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.home-start-screen {
|
|
27
|
+
margin-inline: auto;
|
|
28
|
+
max-width: 48rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.home-start-screen__title {
|
|
32
|
+
font-size: var(--home-start-title-size);
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
letter-spacing: 0;
|
|
35
|
+
line-height: 1.08;
|
|
36
|
+
margin: 0 0 0.45rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.home-start-screen__panel {
|
|
40
|
+
padding: var(--home-start-panel-padding);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (max-width: 640px) {
|
|
44
|
+
.home-start-screen {
|
|
45
|
+
--home-start-title-size: 1.5rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { h } from "vue";
|
|
3
|
+
import PackageShellLayout from "@jskit-ai/shell-web/client/components/ShellLayout";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: "ShellLayout",
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
setup(_, { attrs, slots }) {
|
|
9
|
+
// Keep drawerWidth, railWidth, navigationItemSpacing, and future shell props package-owned.
|
|
10
|
+
return () => h(PackageShellLayout, attrs, slots);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ShellMenuLinkItem from "@jskit-ai/shell-web/client/components/ShellMenuLinkItem";
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
label: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
to: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
icon: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
exact: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<ShellMenuLinkItem v-bind="props" />
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ShellSurfaceAwareMenuLinkItem from "@jskit-ai/shell-web/client/components/ShellSurfaceAwareMenuLinkItem";
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
label: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
to: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
icon: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
surface: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
scopedSuffix: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "/"
|
|
24
|
+
},
|
|
25
|
+
unscopedSuffix: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "/"
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
exact: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<ShellSurfaceAwareMenuLinkItem v-bind="props" />
|
|
42
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ShellTabLinkItem from "@jskit-ai/shell-web/client/components/ShellTabLinkItem";
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
label: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
to: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
icon: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
surface: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
scopedSuffix: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "/"
|
|
24
|
+
},
|
|
25
|
+
unscopedSuffix: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "/"
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
exact: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<ShellTabLinkItem v-bind="props" />
|
|
42
|
+
</template>
|