@antelopejs/dms 0.25.7-next.1111.gaba637e → 0.25.7
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/CHANGELOG.md +73 -0
- package/README.md +2 -2
- package/data/mockup-spec.schema.json +303 -223
- package/dist/implementations/dms-auth/account-emails.js +2 -2
- package/dist/implementations/dms-auth/account-emails.js.map +1 -1
- package/dist/implementations/dms-auth/index.js +1 -2
- package/dist/implementations/dms-auth/index.js.map +1 -1
- package/dist/implementations/dms-base/group-order.d.ts +18 -0
- package/dist/implementations/dms-base/group-order.js +66 -0
- package/dist/implementations/dms-base/group-order.js.map +1 -0
- package/dist/implementations/dms-base/search-route.js +8 -5
- package/dist/implementations/dms-base/search-route.js.map +1 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js +4 -1
- package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js +5 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-emit.js +4 -0
- package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme-assets.js +5 -17
- package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +0 -1
- package/dist/mcp/index.js +0 -5
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/page-verify/index.d.ts +0 -14
- package/dist/mcp/page-verify/index.js +5 -9
- package/dist/mcp/page-verify/index.js.map +1 -1
- package/dist/mcp/page-verify/mockup.d.ts +1 -2
- package/dist/mcp/page-verify/mockup.js +0 -1
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/page-verify/playwright.d.ts +4 -22
- package/dist/mcp/page-verify/playwright.js.map +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js.map +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-read-spec.js +3 -10
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-write-spec.js +1 -1
- package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
- package/dist/mcp/tools/mockup.js +0 -2
- package/dist/mcp/tools/mockup.js.map +1 -1
- package/dist/mcp/tools/page-verify.d.ts +0 -1
- package/dist/mcp/tools/page-verify.js +1 -5
- package/dist/mcp/tools/page-verify.js.map +1 -1
- package/dist/mockup/apply-notes.d.ts +1 -1
- package/dist/mockup/apply-notes.js +2 -1
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/apply-plan.js +3 -0
- package/dist/mockup/apply-plan.js.map +1 -1
- package/dist/mockup/{fixture-routes.d.ts → capture-routes.d.ts} +6 -11
- package/dist/mockup/capture-routes.js +101 -0
- package/dist/mockup/capture-routes.js.map +1 -0
- package/dist/mockup/capture.d.ts +10 -0
- package/dist/mockup/capture.js +64 -0
- package/dist/mockup/capture.js.map +1 -0
- package/dist/mockup/compile.d.ts +1 -6
- package/dist/mockup/compile.js +25 -29
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/controller-blocks.js +62 -10
- package/dist/mockup/controller-blocks.js.map +1 -1
- package/dist/mockup/display-values.js +1 -1
- package/dist/mockup/display-values.js.map +1 -1
- package/dist/mockup/files.d.ts +2 -2
- package/dist/mockup/files.js +2 -2
- package/dist/mockup/files.js.map +1 -1
- package/dist/mockup/fixture-answers.d.ts +0 -1
- package/dist/mockup/fixture-answers.js +1 -1
- package/dist/mockup/fixture-answers.js.map +1 -1
- package/dist/mockup/fixtures.d.ts +3 -1
- package/dist/mockup/fixtures.js +25 -2
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/form-fields.js +10 -1
- package/dist/mockup/form-fields.js.map +1 -1
- package/dist/mockup/generate.js +1 -4
- package/dist/mockup/generate.js.map +1 -1
- package/dist/mockup/header-action.d.ts +47 -0
- package/dist/mockup/header-action.js +46 -0
- package/dist/mockup/header-action.js.map +1 -0
- package/dist/mockup/history-routes.js +17 -2
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/index.d.ts +0 -3
- package/dist/mockup/index.js +0 -3
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema-header.d.ts +2 -0
- package/dist/mockup/json-schema-header.js +69 -0
- package/dist/mockup/json-schema-header.js.map +1 -0
- package/dist/mockup/json-schema-layout.d.ts +2 -0
- package/dist/mockup/json-schema-layout.js +61 -0
- package/dist/mockup/json-schema-layout.js.map +1 -0
- package/dist/mockup/json-schema.js +24 -23
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/manage.js +1 -1
- package/dist/mockup/manage.js.map +1 -1
- package/dist/mockup/model.d.ts +255 -106
- package/dist/mockup/model.js +82 -86
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/modules.d.ts +9 -20
- package/dist/mockup/modules.js +22 -146
- package/dist/mockup/modules.js.map +1 -1
- package/dist/mockup/page-links.d.ts +2 -1
- package/dist/mockup/page-links.js +14 -3
- package/dist/mockup/page-links.js.map +1 -1
- package/dist/mockup/refusals.d.ts +1 -4
- package/dist/mockup/refusals.js +1 -15
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.d.ts +5 -1
- package/dist/mockup/routes.js +171 -9
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/sample-rows.js +4 -0
- package/dist/mockup/sample-rows.js.map +1 -1
- package/dist/mockup/store.d.ts +2 -1
- package/dist/mockup/store.js +22 -16
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/{store-summary.js → summary-fields.js} +1 -1
- package/dist/mockup/summary-fields.js.map +1 -0
- package/dist/mockup/table-columns.js +9 -3
- package/dist/mockup/table-columns.js.map +1 -1
- package/dist/mockup/table-options.d.ts +4 -1
- package/dist/mockup/table-options.js +40 -2
- package/dist/mockup/table-options.js.map +1 -1
- package/dist/mockup/table-param-filters.d.ts +52 -0
- package/dist/mockup/table-param-filters.js +83 -0
- package/dist/mockup/table-param-filters.js.map +1 -0
- package/dist/mockup/table-row-actions.d.ts +2 -0
- package/dist/mockup/table-row-actions.js +85 -0
- package/dist/mockup/table-row-actions.js.map +1 -0
- package/dist/mockup/unknown-keys.d.ts +3 -0
- package/dist/mockup/unknown-keys.js +45 -0
- package/dist/mockup/unknown-keys.js.map +1 -0
- package/dist/mockup/validate.d.ts +7 -1
- package/dist/mockup/validate.js +76 -3
- package/dist/mockup/validate.js.map +1 -1
- package/dist/pages/account.d.ts +1 -0
- package/dist/pages/account.js +1 -0
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/settings/overview/account-summary.d.ts +2 -0
- package/dist/pages/settings/overview/account-summary.js +17 -8
- package/dist/pages/settings/overview/account-summary.js.map +1 -1
- package/dist/pages/settings/settings-index.js +2 -1
- package/dist/pages/settings/settings-index.js.map +1 -1
- package/dist/realtime/sse.js +2 -4
- package/dist/realtime/sse.js.map +1 -1
- package/dist/store/internal/frontend/dev-reload.js +7 -1
- package/dist/store/internal/frontend/dev-reload.js.map +1 -1
- package/dist/utils/account-notifications.js +1 -0
- package/dist/utils/account-notifications.js.map +1 -1
- package/dist/utils/email-change-mail.js +2 -2
- package/dist/utils/email-change-mail.js.map +1 -1
- package/dist/utils/email-plain-text.d.ts +1 -0
- package/dist/utils/email-plain-text.js +95 -0
- package/dist/utils/email-plain-text.js.map +1 -0
- package/dist/utils/export-jobs.js +2 -2
- package/dist/utils/export-jobs.js.map +1 -1
- package/dist/utils/html-email.d.ts +8 -0
- package/dist/utils/html-email.js +9 -0
- package/dist/utils/html-email.js.map +1 -0
- package/dist/utils/image-signatures.d.ts +3 -0
- package/dist/utils/image-signatures.js +22 -0
- package/dist/utils/image-signatures.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/sse-keepalive/index.d.ts +3 -0
- package/dist/utils/sse-keepalive/index.js +8 -0
- package/dist/utils/sse-keepalive/index.js.map +1 -0
- package/dist/validation/allowed-keys.d.ts +2 -0
- package/dist/validation/allowed-keys.js +16 -0
- package/dist/validation/allowed-keys.js.map +1 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/index.js.map +1 -1
- package/frontend-vue/eslint-globals.generated.mjs +2 -2
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +4 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +3 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +17 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +3 -0
- package/frontend-vue/layers/dms-auth/i18n/locales/auth-fr-FR.json +10 -10
- package/frontend-vue/layers/dms-core/app/build/composables/api-error.ts +8 -0
- package/frontend-vue/layers/dms-core/app/build/composables/field-errors.ts +485 -0
- package/frontend-vue/layers/dms-core/app/build/composables/useHydrated.ts +27 -0
- package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +3 -2
- package/frontend-vue/layers/dms-core/app/composables/translation/useUniqueLocales.ts +23 -5
- package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +1 -0
- package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +12 -443
- package/frontend-vue/layers/dms-core/app/entries/composables/useHydrated.ts +1 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +8 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +8 -0
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/app.config.ts +1 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +7 -4
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +14 -29
- package/frontend-vue/layers/dms-layout/app/build/components/layout/EmptyLayoutBrand.vue +49 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/LayoutFooter.vue +2 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +6 -21
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +19 -3
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +9 -110
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +8 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxItem.vue +6 -9
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixCategory.vue +6 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationMatrixSubject.vue +27 -22
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +8 -10
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/notificationDisplay.ts +39 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +38 -5
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +1 -3
- package/frontend-vue/layers/dms-layout/app/build/utils/dev-reload-stream.ts +23 -4
- package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +39 -31
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +60 -9
- package/frontend-vue/layers/dms-layout/app/entries/components/pages/settings/shell/SettingsShell.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/error.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +7 -1
- package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +14 -1
- package/frontend-vue/layers/dms-layout/app/utils/breadcrumb.ts +13 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +1 -1
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +5 -5
- package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/StepPlatform.vue +3 -0
- package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/StepRegister.vue +3 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHeaderActions.vue +1 -4
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIssues.vue +22 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +6 -11
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +125 -182
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewArrows.vue +110 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewFrameImage.vue +75 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +114 -12
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewZoom.vue +67 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +10 -4
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +8 -76
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +9 -65
- package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +26 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +247 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCaptureAssets.ts +181 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +8 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewRaster.ts +45 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +46 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +109 -35
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +5 -18
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +4 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +3 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +0 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +137 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +68 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewLinks.ts +17 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/fetchedConfirmDialog.ts +6 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultDisplayComponents.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultPrimitiveTypes.ts +38 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerFieldTypes.ts +69 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/useColumnValueRenderer.ts +20 -7
- package/frontend-vue/layers/dms-ui/app/build/composables/form/keyValueRows.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useInstantForm.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewGrouping.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewListing.ts +21 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewSorting.ts +8 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +32 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/displayOptions.ts +16 -2
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +67 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +73 -48
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +18 -11
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +35 -124
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +7 -3
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewCapture.ts +96 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +84 -149
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +61 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/dotGrid.ts +37 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/legalIdentifier.ts +279 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +43 -72
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +130 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +8 -92
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +35 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +44 -17
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +3 -14
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +26 -14
- package/frontend-vue/layers/dms-ui/app/build/utils/previewHeader.ts +154 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +149 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +42 -0
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +56 -6
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +0 -3
- package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +7 -7
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +4 -7
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputIdentifier.vue +90 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +5 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +2 -20
- package/frontend-vue/layers/dms-ui/app/components/key-value-list/KeyValueList.vue +51 -15
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +3 -8
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCapture.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewCaptureAssets.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePreviewFrame.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/table-view/utils/displayOptions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/mockups/manage.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/legalIdentifier.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCaptures.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/types/table/query.ts +5 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +2 -28
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +12 -38
- package/frontend-vue/package.json +3 -3
- package/frontend-vue/scripts/check-invariants.mjs +101 -0
- package/package.json +9 -8
- package/skills/dms/SKILL.md +4 -2
- package/skills/dms-module/SKILL.md +3 -0
- package/dist/mcp/mockup-export/capture.d.ts +0 -15
- package/dist/mcp/mockup-export/capture.js +0 -97
- package/dist/mcp/mockup-export/capture.js.map +0 -1
- package/dist/mcp/mockup-export/document.d.ts +0 -4
- package/dist/mcp/mockup-export/document.js +0 -199
- package/dist/mcp/mockup-export/document.js.map +0 -1
- package/dist/mcp/mockup-export/index.d.ts +0 -23
- package/dist/mcp/mockup-export/index.js +0 -90
- package/dist/mcp/mockup-export/index.js.map +0 -1
- package/dist/mcp/mockup-export/plan.d.ts +0 -78
- package/dist/mcp/mockup-export/plan.js +0 -257
- package/dist/mcp/mockup-export/plan.js.map +0 -1
- package/dist/mcp/mockup-export/route.d.ts +0 -13
- package/dist/mcp/mockup-export/route.js +0 -66
- package/dist/mcp/mockup-export/route.js.map +0 -1
- package/dist/mcp/tools/mockup-export-pdf.d.ts +0 -1
- package/dist/mcp/tools/mockup-export-pdf.js +0 -71
- package/dist/mcp/tools/mockup-export-pdf.js.map +0 -1
- package/dist/mockup/database-manifest.d.ts +0 -2
- package/dist/mockup/database-manifest.js +0 -75
- package/dist/mockup/database-manifest.js.map +0 -1
- package/dist/mockup/entities.d.ts +0 -20
- package/dist/mockup/entities.js +0 -213
- package/dist/mockup/entities.js.map +0 -1
- package/dist/mockup/fixture-routes.js +0 -155
- package/dist/mockup/fixture-routes.js.map +0 -1
- package/dist/mockup/json-schema-entities.d.ts +0 -5
- package/dist/mockup/json-schema-entities.js +0 -141
- package/dist/mockup/json-schema-entities.js.map +0 -1
- package/dist/mockup/json.d.ts +0 -8
- package/dist/mockup/json.js +0 -20
- package/dist/mockup/json.js.map +0 -1
- package/dist/mockup/manifest-blocks.d.ts +0 -19
- package/dist/mockup/manifest-blocks.js +0 -65
- package/dist/mockup/manifest-blocks.js.map +0 -1
- package/dist/mockup/module-manifests.d.ts +0 -22
- package/dist/mockup/module-manifests.js +0 -28
- package/dist/mockup/module-manifests.js.map +0 -1
- package/dist/mockup/modules-schema.d.ts +0 -2
- package/dist/mockup/modules-schema.js +0 -42
- package/dist/mockup/modules-schema.js.map +0 -1
- package/dist/mockup/saas-manifest.d.ts +0 -2
- package/dist/mockup/saas-manifest.js +0 -496
- package/dist/mockup/saas-manifest.js.map +0 -1
- package/dist/mockup/state.d.ts +0 -76
- package/dist/mockup/state.js +0 -22
- package/dist/mockup/state.js.map +0 -1
- package/dist/mockup/store-summary.js.map +0 -1
- package/dist/mockup/tenancy.d.ts +0 -19
- package/dist/mockup/tenancy.js +0 -73
- package/dist/mockup/tenancy.js.map +0 -1
- package/dist/mockup/tenant-rows.d.ts +0 -4
- package/dist/mockup/tenant-rows.js +0 -19
- package/dist/mockup/tenant-rows.js.map +0 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +0 -165
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +0 -48
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +0 -142
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +0 -175
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +0 -76
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +0 -63
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +0 -119
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +0 -80
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +0 -177
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +0 -151
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +0 -23
- package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +0 -15
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +0 -1
- /package/dist/mockup/{store-summary.d.ts → summary-fields.d.ts} +0 -0
package/dist/mockup/model.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { ButtonVariant } from "@antelopejs/interface-dms/base/types/button";
|
|
2
1
|
import { z } from "zod";
|
|
3
|
-
import { type
|
|
4
|
-
|
|
5
|
-
export * from "./state";
|
|
2
|
+
import { type MockupModule } from "./modules";
|
|
3
|
+
import { type MockupHeaderAction } from "./header-action";
|
|
6
4
|
export * from "./route-patterns";
|
|
7
5
|
export * from "./modules";
|
|
8
|
-
export * from "./
|
|
9
|
-
export
|
|
10
|
-
export
|
|
6
|
+
export * from "./header-action";
|
|
7
|
+
export type Json = string | number | boolean | null | Json[] | JsonObject;
|
|
8
|
+
export interface JsonObject {
|
|
9
|
+
[key: string]: Json;
|
|
10
|
+
}
|
|
11
|
+
export declare const jsonSchema: z.ZodType<Json>;
|
|
12
|
+
export declare const jsonObjectSchema: z.ZodType<JsonObject>;
|
|
11
13
|
export declare const SLUG_PATTERN: RegExp;
|
|
12
14
|
export declare const KEY_PATTERN: RegExp;
|
|
13
15
|
export declare const MAX_PAGES = 50;
|
|
@@ -36,26 +38,55 @@ declare const pageOptionsSchema: z.ZodObject<{
|
|
|
36
38
|
padding: z.ZodOptional<z.ZodBoolean>;
|
|
37
39
|
}, z.core.$strict>;
|
|
38
40
|
export type MockupPageOptions = z.infer<typeof pageOptionsSchema>;
|
|
41
|
+
export declare const MOCKUP_LAYOUTS: readonly ["default", "form-page", "settings", "empty"];
|
|
42
|
+
export type MockupLayoutType = (typeof MOCKUP_LAYOUTS)[number];
|
|
43
|
+
declare const layoutObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
44
|
+
type: z.ZodLiteral<"default">;
|
|
45
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
49
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"form-page">;
|
|
55
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
56
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
59
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
}, z.core.$strict>>;
|
|
63
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
64
|
+
type: z.ZodLiteral<"settings">;
|
|
65
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
66
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
69
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
74
|
+
type: z.ZodLiteral<"empty">;
|
|
75
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
79
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
}, z.core.$strict>>;
|
|
83
|
+
}, z.core.$strict>], "type">;
|
|
84
|
+
export type MockupPageLayout = z.infer<typeof layoutObjectSchema>;
|
|
39
85
|
declare const livePageSchema: z.ZodObject<{
|
|
40
86
|
ref: z.ZodString;
|
|
41
87
|
version: z.ZodString;
|
|
42
88
|
}, z.core.$strict>;
|
|
43
89
|
export type MockupLivePage = z.infer<typeof livePageSchema>;
|
|
44
|
-
declare const headerActionSchema: z.ZodObject<{
|
|
45
|
-
label: z.ZodString;
|
|
46
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
47
|
-
color: z.ZodOptional<z.ZodEnum<{
|
|
48
|
-
error: "error";
|
|
49
|
-
info: "info";
|
|
50
|
-
neutral: "neutral";
|
|
51
|
-
primary: "primary";
|
|
52
|
-
secondary: "secondary";
|
|
53
|
-
success: "success";
|
|
54
|
-
warning: "warning";
|
|
55
|
-
}>>;
|
|
56
|
-
variant: z.ZodOptional<z.ZodEnum<typeof ButtonVariant>>;
|
|
57
|
-
}, z.core.$strict>;
|
|
58
|
-
export type MockupHeaderAction = z.infer<typeof headerActionSchema>;
|
|
59
90
|
declare const categorySchema: z.ZodObject<{
|
|
60
91
|
id: z.ZodString;
|
|
61
92
|
title: z.ZodString;
|
|
@@ -104,8 +135,85 @@ declare const pageSchema: z.ZodObject<{
|
|
|
104
135
|
success: "success";
|
|
105
136
|
warning: "warning";
|
|
106
137
|
}>>;
|
|
107
|
-
variant: z.ZodOptional<z.ZodEnum<typeof ButtonVariant>>;
|
|
138
|
+
variant: z.ZodOptional<z.ZodEnum<typeof import("@antelopejs/interface-dms/base").ButtonVariant>>;
|
|
139
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"page">;
|
|
141
|
+
url: z.ZodString;
|
|
142
|
+
}, z.core.$strict>>;
|
|
143
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
title: z.ZodString;
|
|
145
|
+
description: z.ZodOptional<z.ZodString>;
|
|
146
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
147
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
148
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
error: "error";
|
|
150
|
+
info: "info";
|
|
151
|
+
neutral: "neutral";
|
|
152
|
+
primary: "primary";
|
|
153
|
+
secondary: "secondary";
|
|
154
|
+
success: "success";
|
|
155
|
+
warning: "warning";
|
|
156
|
+
}>>;
|
|
157
|
+
confirmLabel: z.ZodOptional<z.ZodString>;
|
|
158
|
+
cancelLabel: z.ZodOptional<z.ZodString>;
|
|
159
|
+
impact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
160
|
+
icon: z.ZodString;
|
|
161
|
+
label: z.ZodString;
|
|
162
|
+
count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
163
|
+
}, z.core.$strict>>>;
|
|
164
|
+
blocked: z.ZodOptional<z.ZodBoolean>;
|
|
165
|
+
confirmText: z.ZodOptional<z.ZodString>;
|
|
166
|
+
confirmTextCaseInsensitive: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
}, z.core.$strict>>;
|
|
108
168
|
}, z.core.$strict>>>;
|
|
169
|
+
layout: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodEnum<{
|
|
170
|
+
default: "default";
|
|
171
|
+
empty: "empty";
|
|
172
|
+
"form-page": "form-page";
|
|
173
|
+
settings: "settings";
|
|
174
|
+
}>, z.ZodTransform<{
|
|
175
|
+
type: "default" | "empty" | "form-page" | "settings";
|
|
176
|
+
}, "default" | "empty" | "form-page" | "settings">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"default">;
|
|
178
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
182
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
+
}, z.core.$strict>>;
|
|
186
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
187
|
+
type: z.ZodLiteral<"form-page">;
|
|
188
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
190
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
192
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"settings">;
|
|
198
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
202
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
205
|
+
}, z.core.$strict>>;
|
|
206
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
207
|
+
type: z.ZodLiteral<"empty">;
|
|
208
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
211
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
212
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
214
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
}, z.core.$strict>], "type">]>>;
|
|
109
217
|
options: z.ZodOptional<z.ZodObject<{
|
|
110
218
|
theme: z.ZodOptional<z.ZodEnum<{
|
|
111
219
|
dark: "dark";
|
|
@@ -128,14 +236,6 @@ declare const pageSchema: z.ZodObject<{
|
|
|
128
236
|
tree: z.ZodDefault<z.ZodArray<z.ZodType<MockupNode, unknown, z.core.$ZodTypeInternals<MockupNode, unknown>>>>;
|
|
129
237
|
}, z.core.$strict>;
|
|
130
238
|
export type MockupSpecPage = z.infer<typeof pageSchema>;
|
|
131
|
-
declare const customModuleSchema: z.ZodObject<{
|
|
132
|
-
id: z.ZodString;
|
|
133
|
-
title: z.ZodString;
|
|
134
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
135
|
-
pages: z.ZodArray<z.ZodString>;
|
|
136
|
-
}, z.core.$strict>;
|
|
137
|
-
export type MockupCustomModule = z.infer<typeof customModuleSchema>;
|
|
138
|
-
export type MockupSpecModule = string | MockupCustomModule;
|
|
139
239
|
export declare const CUSTOM_PAGE_FIELDS: readonly ["html", "css", "height", "states"];
|
|
140
240
|
export declare const MOCKUP_SOURCES: readonly ["chat", "claude-code", "codex"];
|
|
141
241
|
export type MockupSource = (typeof MOCKUP_SOURCES)[number];
|
|
@@ -159,47 +259,6 @@ declare const specDataSchema: z.ZodObject<{
|
|
|
159
259
|
}>>;
|
|
160
260
|
}, z.core.$strict>;
|
|
161
261
|
export type MockupData = z.infer<typeof specDataSchema>;
|
|
162
|
-
export declare const PLAIN_FIELD_TYPES: readonly ["string", "number", "price", "boolean", "date", "email", "url"];
|
|
163
|
-
export type MockupFieldType = (typeof PLAIN_FIELD_TYPES)[number] | "enum" | "ref";
|
|
164
|
-
declare const entityFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
165
|
-
type: z.ZodEnum<{
|
|
166
|
-
boolean: "boolean";
|
|
167
|
-
date: "date";
|
|
168
|
-
email: "email";
|
|
169
|
-
number: "number";
|
|
170
|
-
price: "price";
|
|
171
|
-
string: "string";
|
|
172
|
-
url: "url";
|
|
173
|
-
}>;
|
|
174
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
175
|
-
type: z.ZodLiteral<"enum">;
|
|
176
|
-
values: z.ZodArray<z.ZodString>;
|
|
177
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
178
|
-
type: z.ZodLiteral<"ref">;
|
|
179
|
-
to: z.ZodString;
|
|
180
|
-
}, z.core.$strict>], "type">;
|
|
181
|
-
export type MockupSpecEntityField = z.infer<typeof entityFieldSchema>;
|
|
182
|
-
declare const entitySchema: z.ZodObject<{
|
|
183
|
-
tenantScoped: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
-
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
185
|
-
type: z.ZodEnum<{
|
|
186
|
-
boolean: "boolean";
|
|
187
|
-
date: "date";
|
|
188
|
-
email: "email";
|
|
189
|
-
number: "number";
|
|
190
|
-
price: "price";
|
|
191
|
-
string: "string";
|
|
192
|
-
url: "url";
|
|
193
|
-
}>;
|
|
194
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
195
|
-
type: z.ZodLiteral<"enum">;
|
|
196
|
-
values: z.ZodArray<z.ZodString>;
|
|
197
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
198
|
-
type: z.ZodLiteral<"ref">;
|
|
199
|
-
to: z.ZodString;
|
|
200
|
-
}, z.core.$strict>], "type">>;
|
|
201
|
-
}, z.core.$strict>;
|
|
202
|
-
export type MockupSpecEntity = z.infer<typeof entitySchema>;
|
|
203
262
|
export declare const specSchema: z.ZodObject<{
|
|
204
263
|
$schema: z.ZodOptional<z.ZodString>;
|
|
205
264
|
version: z.ZodLiteral<1>;
|
|
@@ -223,33 +282,6 @@ export declare const specSchema: z.ZodObject<{
|
|
|
223
282
|
"read-write": "read-write";
|
|
224
283
|
}>>;
|
|
225
284
|
}, z.core.$strict>>;
|
|
226
|
-
entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
227
|
-
tenantScoped: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
-
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
229
|
-
type: z.ZodEnum<{
|
|
230
|
-
boolean: "boolean";
|
|
231
|
-
date: "date";
|
|
232
|
-
email: "email";
|
|
233
|
-
number: "number";
|
|
234
|
-
price: "price";
|
|
235
|
-
string: "string";
|
|
236
|
-
url: "url";
|
|
237
|
-
}>;
|
|
238
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
239
|
-
type: z.ZodLiteral<"enum">;
|
|
240
|
-
values: z.ZodArray<z.ZodString>;
|
|
241
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
242
|
-
type: z.ZodLiteral<"ref">;
|
|
243
|
-
to: z.ZodString;
|
|
244
|
-
}, z.core.$strict>], "type">>;
|
|
245
|
-
}, z.core.$strict>>>;
|
|
246
|
-
fixtures: z.ZodOptional<z.ZodObject<{
|
|
247
|
-
tenants: z.ZodArray<z.ZodObject<{
|
|
248
|
-
id: z.ZodString;
|
|
249
|
-
name: z.ZodString;
|
|
250
|
-
plan: z.ZodOptional<z.ZodString>;
|
|
251
|
-
}, z.core.$strict>>;
|
|
252
|
-
}, z.core.$strict>>;
|
|
253
285
|
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
254
286
|
id: z.ZodString;
|
|
255
287
|
title: z.ZodString;
|
|
@@ -264,12 +296,7 @@ export declare const specSchema: z.ZodObject<{
|
|
|
264
296
|
height: z.ZodOptional<z.ZodNumber>;
|
|
265
297
|
}, z.core.$strict>>;
|
|
266
298
|
}, z.core.$strict>>;
|
|
267
|
-
modules: z.ZodOptional<z.ZodArray<z.
|
|
268
|
-
id: z.ZodString;
|
|
269
|
-
title: z.ZodString;
|
|
270
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
271
|
-
pages: z.ZodArray<z.ZodString>;
|
|
272
|
-
}, z.core.$strict>]>>>;
|
|
299
|
+
modules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
273
300
|
pages: z.ZodArray<z.ZodObject<{
|
|
274
301
|
id: z.ZodString;
|
|
275
302
|
title: z.ZodString;
|
|
@@ -291,8 +318,85 @@ export declare const specSchema: z.ZodObject<{
|
|
|
291
318
|
success: "success";
|
|
292
319
|
warning: "warning";
|
|
293
320
|
}>>;
|
|
294
|
-
variant: z.ZodOptional<z.ZodEnum<typeof ButtonVariant>>;
|
|
321
|
+
variant: z.ZodOptional<z.ZodEnum<typeof import("@antelopejs/interface-dms/base").ButtonVariant>>;
|
|
322
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
323
|
+
type: z.ZodLiteral<"page">;
|
|
324
|
+
url: z.ZodString;
|
|
325
|
+
}, z.core.$strict>>;
|
|
326
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
327
|
+
title: z.ZodString;
|
|
328
|
+
description: z.ZodOptional<z.ZodString>;
|
|
329
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
330
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
331
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
332
|
+
error: "error";
|
|
333
|
+
info: "info";
|
|
334
|
+
neutral: "neutral";
|
|
335
|
+
primary: "primary";
|
|
336
|
+
secondary: "secondary";
|
|
337
|
+
success: "success";
|
|
338
|
+
warning: "warning";
|
|
339
|
+
}>>;
|
|
340
|
+
confirmLabel: z.ZodOptional<z.ZodString>;
|
|
341
|
+
cancelLabel: z.ZodOptional<z.ZodString>;
|
|
342
|
+
impact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
343
|
+
icon: z.ZodString;
|
|
344
|
+
label: z.ZodString;
|
|
345
|
+
count: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
346
|
+
}, z.core.$strict>>>;
|
|
347
|
+
blocked: z.ZodOptional<z.ZodBoolean>;
|
|
348
|
+
confirmText: z.ZodOptional<z.ZodString>;
|
|
349
|
+
confirmTextCaseInsensitive: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
+
}, z.core.$strict>>;
|
|
295
351
|
}, z.core.$strict>>>;
|
|
352
|
+
layout: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodEnum<{
|
|
353
|
+
default: "default";
|
|
354
|
+
empty: "empty";
|
|
355
|
+
"form-page": "form-page";
|
|
356
|
+
settings: "settings";
|
|
357
|
+
}>, z.ZodTransform<{
|
|
358
|
+
type: "default" | "empty" | "form-page" | "settings";
|
|
359
|
+
}, "default" | "empty" | "form-page" | "settings">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
360
|
+
type: z.ZodLiteral<"default">;
|
|
361
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
362
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
363
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
364
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
365
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
367
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
368
|
+
}, z.core.$strict>>;
|
|
369
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
370
|
+
type: z.ZodLiteral<"form-page">;
|
|
371
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
372
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
373
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
374
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
375
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
377
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
378
|
+
}, z.core.$strict>>;
|
|
379
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
380
|
+
type: z.ZodLiteral<"settings">;
|
|
381
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
382
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
383
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
384
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
385
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
386
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
387
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
388
|
+
}, z.core.$strict>>;
|
|
389
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
390
|
+
type: z.ZodLiteral<"empty">;
|
|
391
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
392
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
393
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
394
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
395
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
396
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
397
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
398
|
+
}, z.core.$strict>>;
|
|
399
|
+
}, z.core.$strict>], "type">]>>;
|
|
296
400
|
options: z.ZodOptional<z.ZodObject<{
|
|
297
401
|
theme: z.ZodOptional<z.ZodEnum<{
|
|
298
402
|
dark: "dark";
|
|
@@ -320,6 +424,51 @@ export interface MockupIssue {
|
|
|
320
424
|
path: string;
|
|
321
425
|
message: string;
|
|
322
426
|
}
|
|
427
|
+
export interface MockupPageState {
|
|
428
|
+
id: string;
|
|
429
|
+
title: string;
|
|
430
|
+
category?: string;
|
|
431
|
+
menu?: false;
|
|
432
|
+
custom?: true;
|
|
433
|
+
generated?: true;
|
|
434
|
+
parent?: string;
|
|
435
|
+
route?: {
|
|
436
|
+
param: string;
|
|
437
|
+
sample?: string;
|
|
438
|
+
};
|
|
439
|
+
links: string[];
|
|
440
|
+
icon?: string;
|
|
441
|
+
description?: string;
|
|
442
|
+
headerActions?: MockupHeaderAction[];
|
|
443
|
+
layout?: MockupPageLayout;
|
|
444
|
+
options: MockupPageOptions;
|
|
445
|
+
tree: MockupNode[];
|
|
446
|
+
realTree?: MockupNode[];
|
|
447
|
+
livePage?: Pick<MockupLivePage, "ref">;
|
|
448
|
+
paths: Record<string, string>;
|
|
449
|
+
}
|
|
450
|
+
export interface MockupSidebarWidgetState {
|
|
451
|
+
id: string;
|
|
452
|
+
title?: string;
|
|
453
|
+
html: string;
|
|
454
|
+
css?: string;
|
|
455
|
+
height: number;
|
|
456
|
+
}
|
|
457
|
+
export interface MockupSidebarState {
|
|
458
|
+
widgets: MockupSidebarWidgetState[];
|
|
459
|
+
}
|
|
460
|
+
export interface MockupState {
|
|
461
|
+
name: MockupName;
|
|
462
|
+
title?: string;
|
|
463
|
+
revision: number;
|
|
464
|
+
categories?: MockupCategory[];
|
|
465
|
+
sidebar?: MockupSidebarState;
|
|
466
|
+
modules?: MockupModule[];
|
|
467
|
+
pages: MockupPageState[];
|
|
468
|
+
issues: MockupIssue[];
|
|
469
|
+
warnings: MockupIssue[];
|
|
470
|
+
}
|
|
323
471
|
export declare function isJsonObject(value: Json | undefined): value is JsonObject;
|
|
324
472
|
export declare function specValueAt(value: Json, pointer: string): Json | undefined;
|
|
473
|
+
export declare function jsonPointer(path: readonly PropertyKey[]): string;
|
|
325
474
|
export declare function zodIssues(base: string, error: z.ZodError): MockupIssue[];
|
package/dist/mockup/model.js
CHANGED
|
@@ -14,28 +14,30 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.specSchema = exports.
|
|
17
|
+
exports.specSchema = exports.mockupBuiltSchema = exports.mockupSourceSchema = exports.MOCKUP_SOURCES = exports.CUSTOM_PAGE_FIELDS = exports.ROUTE_PARAM_PATTERN = exports.SIDEBAR_WIDGET_DEFAULT_HEIGHT = exports.MAX_SIDEBAR_WIDGETS = exports.MOCKUP_LAYOUTS = exports.annotationIdSchema = exports.fixtureKeySchema = exports.pageIdSchema = exports.mockupNameSchema = exports.RESERVED_MOCKUP_NAMES = exports.MAX_PAGES = exports.KEY_PATTERN = exports.SLUG_PATTERN = exports.jsonObjectSchema = exports.jsonSchema = void 0;
|
|
18
18
|
exports.parseMockupName = parseMockupName;
|
|
19
19
|
exports.isJsonObject = isJsonObject;
|
|
20
20
|
exports.specValueAt = specValueAt;
|
|
21
|
+
exports.jsonPointer = jsonPointer;
|
|
21
22
|
exports.zodIssues = zodIssues;
|
|
22
|
-
const button_1 = require("@antelopejs/interface-dms/base/types/button");
|
|
23
|
-
const tone_1 = require("@antelopejs/interface-dms/base/types/tone");
|
|
24
23
|
const zod_1 = require("zod");
|
|
25
|
-
const entities_1 = require("./entities");
|
|
26
24
|
const generate_1 = require("./generate");
|
|
27
|
-
const json_1 = require("./json");
|
|
28
25
|
const modules_1 = require("./modules");
|
|
29
|
-
const
|
|
26
|
+
const header_action_1 = require("./header-action");
|
|
30
27
|
const route_patterns_1 = require("./route-patterns");
|
|
31
|
-
__exportStar(require("./json"), exports);
|
|
32
|
-
__exportStar(require("./state"), exports);
|
|
33
28
|
__exportStar(require("./route-patterns"), exports);
|
|
34
29
|
__exportStar(require("./modules"), exports);
|
|
35
|
-
__exportStar(require("./
|
|
36
|
-
__exportStar(require("./tenancy"), exports);
|
|
37
|
-
__exportStar(require("./tenant-rows"), exports);
|
|
30
|
+
__exportStar(require("./header-action"), exports);
|
|
38
31
|
const sketch_limits_1 = require("./sketch-limits");
|
|
32
|
+
exports.jsonSchema = zod_1.z.union([
|
|
33
|
+
zod_1.z.string(),
|
|
34
|
+
zod_1.z.number(),
|
|
35
|
+
zod_1.z.boolean(),
|
|
36
|
+
zod_1.z.null(),
|
|
37
|
+
zod_1.z.array(zod_1.z.lazy(() => exports.jsonSchema)),
|
|
38
|
+
zod_1.z.record(zod_1.z.string(), zod_1.z.lazy(() => exports.jsonSchema)),
|
|
39
|
+
]);
|
|
40
|
+
exports.jsonObjectSchema = zod_1.z.record(zod_1.z.string(), exports.jsonSchema);
|
|
39
41
|
exports.SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
40
42
|
exports.KEY_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
|
|
41
43
|
exports.MAX_PAGES = 50;
|
|
@@ -58,7 +60,7 @@ const nodeSchema = zod_1.z
|
|
|
58
60
|
.object({
|
|
59
61
|
type: zod_1.z.string().optional(),
|
|
60
62
|
componentName: zod_1.z.string().optional(),
|
|
61
|
-
options:
|
|
63
|
+
options: exports.jsonObjectSchema.optional(),
|
|
62
64
|
children: zod_1.z.array(zod_1.z.lazy(() => nodeSchema)).optional(),
|
|
63
65
|
id: zod_1.z.string().optional(),
|
|
64
66
|
slot: zod_1.z.string().optional(),
|
|
@@ -72,17 +74,50 @@ const pageOptionsSchema = zod_1.z
|
|
|
72
74
|
padding: zod_1.z.boolean().optional(),
|
|
73
75
|
})
|
|
74
76
|
.strict();
|
|
77
|
+
exports.MOCKUP_LAYOUTS = [
|
|
78
|
+
"default",
|
|
79
|
+
"form-page",
|
|
80
|
+
"settings",
|
|
81
|
+
"empty",
|
|
82
|
+
];
|
|
83
|
+
const framedLayoutOptions = {
|
|
84
|
+
hideHeader: zod_1.z.boolean().optional(),
|
|
85
|
+
fillHeight: zod_1.z.boolean().optional(),
|
|
86
|
+
};
|
|
87
|
+
const layoutOptionSchemas = {
|
|
88
|
+
default: zod_1.z
|
|
89
|
+
.object({ fullWidth: zod_1.z.boolean().optional(), ...framedLayoutOptions })
|
|
90
|
+
.strict(),
|
|
91
|
+
"form-page": zod_1.z.object(framedLayoutOptions).strict(),
|
|
92
|
+
settings: zod_1.z.object(framedLayoutOptions).strict(),
|
|
93
|
+
empty: zod_1.z
|
|
94
|
+
.object({
|
|
95
|
+
hideBrand: zod_1.z.boolean().optional(),
|
|
96
|
+
hideFooter: zod_1.z.boolean().optional(),
|
|
97
|
+
fillHeight: zod_1.z.boolean().optional(),
|
|
98
|
+
})
|
|
99
|
+
.strict(),
|
|
100
|
+
};
|
|
101
|
+
function layoutSchemaOf(type) {
|
|
102
|
+
return zod_1.z
|
|
103
|
+
.object({
|
|
104
|
+
type: zod_1.z.literal(type),
|
|
105
|
+
options: layoutOptionSchemas[type].optional(),
|
|
106
|
+
})
|
|
107
|
+
.strict();
|
|
108
|
+
}
|
|
109
|
+
const layoutObjectSchema = zod_1.z.discriminatedUnion("type", [
|
|
110
|
+
layoutSchemaOf("default"),
|
|
111
|
+
layoutSchemaOf("form-page"),
|
|
112
|
+
layoutSchemaOf("settings"),
|
|
113
|
+
layoutSchemaOf("empty"),
|
|
114
|
+
]);
|
|
115
|
+
const pageLayoutSchema = zod_1.z.union([zod_1.z.enum(exports.MOCKUP_LAYOUTS).transform((type) => ({ type })), layoutObjectSchema], {
|
|
116
|
+
error: `is the name of a layout, one of ${exports.MOCKUP_LAYOUTS.join(", ")}, or { "type": <that name>, "options": {...} }`,
|
|
117
|
+
});
|
|
75
118
|
const livePageSchema = zod_1.z
|
|
76
119
|
.object({ ref: zod_1.z.string().min(1), version: zod_1.z.string() })
|
|
77
120
|
.strict();
|
|
78
|
-
const headerActionSchema = zod_1.z
|
|
79
|
-
.object({
|
|
80
|
-
label: zod_1.z.string(),
|
|
81
|
-
icon: zod_1.z.string().optional(),
|
|
82
|
-
color: zod_1.z.enum(tone_1.TONES).optional(),
|
|
83
|
-
variant: zod_1.z.nativeEnum(button_1.ButtonVariant).optional(),
|
|
84
|
-
})
|
|
85
|
-
.strict();
|
|
86
121
|
const categorySchema = zod_1.z
|
|
87
122
|
.object({
|
|
88
123
|
id: exports.pageIdSchema,
|
|
@@ -112,10 +147,6 @@ const sidebarSchema = zod_1.z
|
|
|
112
147
|
})
|
|
113
148
|
.strict();
|
|
114
149
|
exports.ROUTE_PARAM_PATTERN = /^:[A-Za-z_][A-Za-z0-9_]*$/;
|
|
115
|
-
const FIXTURE_FORMS = [
|
|
116
|
-
{ holds: generate_1.holdsGenerate, schema: generate_1.generatedFixtureSchema },
|
|
117
|
-
{ holds: entities_1.holdsEntity, schema: entities_1.entityFixtureSchema },
|
|
118
|
-
];
|
|
119
150
|
const pageSchema = zod_1.z
|
|
120
151
|
.object({
|
|
121
152
|
id: exports.pageIdSchema,
|
|
@@ -126,45 +157,36 @@ const pageSchema = zod_1.z
|
|
|
126
157
|
route: zod_1.z.string().regex(exports.ROUTE_PARAM_PATTERN).optional(),
|
|
127
158
|
icon: zod_1.z.string().optional(),
|
|
128
159
|
description: zod_1.z.string().optional(),
|
|
129
|
-
headerActions: zod_1.z.array(headerActionSchema).optional(),
|
|
160
|
+
headerActions: zod_1.z.array(header_action_1.headerActionSchema).optional(),
|
|
161
|
+
layout: pageLayoutSchema.optional(),
|
|
130
162
|
options: pageOptionsSchema.optional(),
|
|
131
163
|
livePage: livePageSchema.optional(),
|
|
132
164
|
liveRoutes: zod_1.z.record(exports.fixtureKeySchema, route_patterns_1.liveRouteSchema).optional(),
|
|
133
|
-
fixtures: zod_1.z.record(exports.fixtureKeySchema,
|
|
165
|
+
fixtures: zod_1.z.record(exports.fixtureKeySchema, exports.jsonSchema).optional(),
|
|
134
166
|
custom: zod_1.z.boolean().optional(),
|
|
135
|
-
html:
|
|
136
|
-
css:
|
|
137
|
-
height:
|
|
138
|
-
states:
|
|
167
|
+
html: exports.jsonSchema.optional(),
|
|
168
|
+
css: exports.jsonSchema.optional(),
|
|
169
|
+
height: exports.jsonSchema.optional(),
|
|
170
|
+
states: exports.jsonSchema.optional(),
|
|
139
171
|
tree: zod_1.z.array(nodeSchema).default([]),
|
|
140
172
|
})
|
|
141
173
|
.strict()
|
|
142
174
|
.superRefine((page, context) => {
|
|
143
175
|
for (const [key, value] of Object.entries(page.fixtures ?? {})) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
156
|
-
}
|
|
176
|
+
if (!(0, generate_1.holdsGenerate)(value))
|
|
177
|
+
continue;
|
|
178
|
+
const generated = generate_1.generatedFixtureSchema.safeParse(value);
|
|
179
|
+
if (generated.success)
|
|
180
|
+
continue;
|
|
181
|
+
for (const issue of generated.error.issues) {
|
|
182
|
+
context.addIssue({
|
|
183
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
184
|
+
path: ["fixtures", key, ...issue.path],
|
|
185
|
+
message: issue.message,
|
|
186
|
+
});
|
|
157
187
|
}
|
|
158
188
|
}
|
|
159
189
|
});
|
|
160
|
-
const customModuleSchema = zod_1.z
|
|
161
|
-
.object({
|
|
162
|
-
id: exports.pageIdSchema,
|
|
163
|
-
title: zod_1.z.string(),
|
|
164
|
-
icon: zod_1.z.string().optional(),
|
|
165
|
-
pages: zod_1.z.array(exports.pageIdSchema).max(exports.MAX_PAGES),
|
|
166
|
-
})
|
|
167
|
-
.strict();
|
|
168
190
|
exports.CUSTOM_PAGE_FIELDS = ["html", "css", "height", "states"];
|
|
169
191
|
function checkCustomPages(pages, issue) {
|
|
170
192
|
pages.forEach((page, index) => {
|
|
@@ -231,32 +253,6 @@ const specDataSchema = zod_1.z
|
|
|
231
253
|
access: connectionAccessSchema.default("read"),
|
|
232
254
|
})
|
|
233
255
|
.strict();
|
|
234
|
-
const entityNameSchema = zod_1.z.string().regex(exports.KEY_PATTERN);
|
|
235
|
-
exports.PLAIN_FIELD_TYPES = [
|
|
236
|
-
"string",
|
|
237
|
-
"number",
|
|
238
|
-
"price",
|
|
239
|
-
"boolean",
|
|
240
|
-
"date",
|
|
241
|
-
"email",
|
|
242
|
-
"url",
|
|
243
|
-
];
|
|
244
|
-
const entityFieldSchema = zod_1.z.discriminatedUnion("type", [
|
|
245
|
-
zod_1.z.object({ type: zod_1.z.enum(exports.PLAIN_FIELD_TYPES) }).strict(),
|
|
246
|
-
zod_1.z
|
|
247
|
-
.object({
|
|
248
|
-
type: zod_1.z.literal("enum"),
|
|
249
|
-
values: zod_1.z.array(zod_1.z.string().min(1)).nonempty(),
|
|
250
|
-
})
|
|
251
|
-
.strict(),
|
|
252
|
-
zod_1.z.object({ type: zod_1.z.literal("ref"), to: entityNameSchema }).strict(),
|
|
253
|
-
]);
|
|
254
|
-
const entitySchema = zod_1.z
|
|
255
|
-
.object({
|
|
256
|
-
tenantScoped: zod_1.z.boolean().optional(),
|
|
257
|
-
fields: zod_1.z.record(entityNameSchema, entityFieldSchema),
|
|
258
|
-
})
|
|
259
|
-
.strict();
|
|
260
256
|
exports.specSchema = zod_1.z
|
|
261
257
|
.object({
|
|
262
258
|
$schema: zod_1.z.string().optional(),
|
|
@@ -265,14 +261,9 @@ exports.specSchema = zod_1.z
|
|
|
265
261
|
source: exports.mockupSourceSchema.optional(),
|
|
266
262
|
built: exports.mockupBuiltSchema.optional(),
|
|
267
263
|
data: specDataSchema.optional(),
|
|
268
|
-
entities: zod_1.z.record(entityNameSchema, entitySchema).optional(),
|
|
269
|
-
fixtures: tenancy_1.specFixturesSchema.optional(),
|
|
270
264
|
categories: zod_1.z.array(categorySchema).max(exports.MAX_PAGES).optional(),
|
|
271
265
|
sidebar: sidebarSchema.optional(),
|
|
272
|
-
modules: zod_1.z
|
|
273
|
-
.array(zod_1.z.union([zod_1.z.string(), customModuleSchema]))
|
|
274
|
-
.max(exports.MAX_PAGES)
|
|
275
|
-
.optional(),
|
|
266
|
+
modules: zod_1.z.array(zod_1.z.string()).max(exports.MAX_PAGES).optional(),
|
|
276
267
|
pages: zod_1.z.array(pageSchema).max(exports.MAX_PAGES),
|
|
277
268
|
})
|
|
278
269
|
.strict()
|
|
@@ -294,8 +285,8 @@ exports.specSchema = zod_1.z
|
|
|
294
285
|
}
|
|
295
286
|
widgets.add(widget.id);
|
|
296
287
|
});
|
|
297
|
-
for (const {
|
|
298
|
-
issue(
|
|
288
|
+
for (const { index, message } of (0, modules_1.moduleIssues)(spec.modules ?? [])) {
|
|
289
|
+
issue(["modules", index], message);
|
|
299
290
|
}
|
|
300
291
|
const known = categories.size
|
|
301
292
|
? `the categories are ${[...categories].join(", ")}`
|
|
@@ -326,9 +317,14 @@ function specValueAt(value, pointer) {
|
|
|
326
317
|
: undefined;
|
|
327
318
|
}, value);
|
|
328
319
|
}
|
|
320
|
+
function jsonPointer(path) {
|
|
321
|
+
return path
|
|
322
|
+
.map((segment) => `/${String(segment).replaceAll("~", "~0").replaceAll("/", "~1")}`)
|
|
323
|
+
.join("");
|
|
324
|
+
}
|
|
329
325
|
function zodIssues(base, error) {
|
|
330
326
|
return error.issues.map((issue) => ({
|
|
331
|
-
path: `${base}${
|
|
327
|
+
path: `${base}${jsonPointer(issue.path)}`,
|
|
332
328
|
message: issue.message,
|
|
333
329
|
}));
|
|
334
330
|
}
|