@antelopejs/dms 0.25.8-next.1175.g5f8cc4d → 0.25.8
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 +48 -0
- package/README.md +2 -2
- package/data/mockup-example/spec.json +0 -11
- package/data/mockup-spec.schema.json +16 -399
- package/dist/e2e/index.d.mts +1 -2
- package/dist/implementations/dms-builder/engine/table-view-settings.js +33 -9
- package/dist/implementations/dms-builder/engine/table-view-settings.js.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +0 -2
- package/dist/mcp/index.js +0 -9
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/page-verify/index.d.ts +0 -15
- package/dist/mcp/page-verify/index.js +6 -16
- package/dist/mcp/page-verify/index.js.map +1 -1
- package/dist/mcp/page-verify/mockup.d.ts +1 -3
- package/dist/mcp/page-verify/mockup.js +1 -5
- package/dist/mcp/page-verify/mockup.js.map +1 -1
- package/dist/mcp/page-verify/page-probe.d.ts +0 -5
- package/dist/mcp/page-verify/page-probe.js +0 -2
- package/dist/mcp/page-verify/page-probe.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/page-verify/report.d.ts +0 -1
- package/dist/mcp/tools/mockup-read-spec.js +3 -2
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
- package/dist/mcp/tools/mockup.js +0 -4
- 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 +2 -6
- package/dist/mcp/tools/page-verify.js.map +1 -1
- package/dist/mockup/annotations.js +2 -2
- package/dist/mockup/annotations.js.map +1 -1
- package/dist/mockup/apply-notes.js +1 -1
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/compile.d.ts +10 -6
- package/dist/mockup/compile.js +290 -31
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/files.d.ts +1 -2
- package/dist/mockup/files.js +1 -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 +27 -0
- package/dist/mockup/fixtures.js +111 -0
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/from-page.js +9 -2
- package/dist/mockup/from-page.js.map +1 -1
- package/dist/mockup/generate.js +1 -4
- package/dist/mockup/generate.js.map +1 -1
- package/dist/mockup/history-routes.d.ts +4 -2
- package/dist/mockup/history-routes.js +36 -27
- package/dist/mockup/history-routes.js.map +1 -1
- package/dist/mockup/history.js +1 -2
- package/dist/mockup/history.js.map +1 -1
- package/dist/mockup/index.d.ts +0 -10
- package/dist/mockup/index.js +0 -10
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema-layout.d.ts +0 -1
- package/dist/mockup/json-schema-layout.js +2 -95
- package/dist/mockup/json-schema-layout.js.map +1 -1
- package/dist/mockup/json-schema.js +19 -40
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/manage-routes.d.ts +1 -3
- package/dist/mockup/manage-routes.js +1 -38
- package/dist/mockup/manage-routes.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 +100 -137
- package/dist/mockup/model.js +86 -102
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/modules.d.ts +9 -6
- package/dist/mockup/modules.js +24 -105
- package/dist/mockup/modules.js.map +1 -1
- package/dist/mockup/presence-board.js +1 -1
- package/dist/mockup/presence-board.js.map +1 -1
- package/dist/mockup/presence-routes.js +2 -2
- package/dist/mockup/presence-routes.js.map +1 -1
- package/dist/mockup/refusals.d.ts +0 -5
- package/dist/mockup/refusals.js +0 -16
- package/dist/mockup/refusals.js.map +1 -1
- package/dist/mockup/routes.d.ts +5 -3
- package/dist/mockup/routes.js +162 -19
- package/dist/mockup/routes.js.map +1 -1
- package/dist/mockup/row-filters.d.ts +8 -0
- package/dist/mockup/row-filters.js +107 -0
- package/dist/mockup/row-filters.js.map +1 -0
- package/dist/mockup/sketch-limits.d.ts +0 -1
- package/dist/mockup/sketch-limits.js +1 -2
- package/dist/mockup/sketch-limits.js.map +1 -1
- package/dist/mockup/sketch.d.ts +2 -2
- package/dist/mockup/sketch.js +1 -2
- package/dist/mockup/sketch.js.map +1 -1
- package/dist/mockup/source-routes.d.ts +4 -5
- package/dist/mockup/source-routes.js +17 -26
- package/dist/mockup/source-routes.js.map +1 -1
- package/dist/mockup/source.js +1 -2
- package/dist/mockup/source.js.map +1 -1
- package/dist/mockup/store.d.ts +37 -16
- package/dist/mockup/store.js +200 -85
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/table-archive.d.ts +1 -0
- package/dist/mockup/table-archive.js +16 -0
- package/dist/mockup/table-archive.js.map +1 -1
- package/e2e/index.mjs +2 -3
- package/frontend-vue/eslint-globals.generated.mjs +38 -40
- package/frontend-vue/layers/dms-core/app/build/utils/asyncDataScope.ts +31 -3
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +2 -8
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +0 -3
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +0 -3
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +30 -110
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +6 -21
- package/frontend-vue/layers/dms-layout/app/build/components/layout/SidebarUserMenu.vue +7 -19
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +9 -79
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsNav.vue +4 -17
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +0 -12
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/useSettingsNavigation.ts +0 -39
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-mockups.ts +2 -12
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +1 -9
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +6 -53
- package/frontend-vue/layers/dms-layout/app/theme/actions.ts +7 -11
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +5 -31
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCanvasChrome.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +47 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +33 -59
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +12 -58
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/{MockupZoomControls.vue → MockupOverviewZoom.vue} +15 -23
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPagesList.vue +0 -21
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinCard.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +1 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +9 -77
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +45 -130
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +3 -70
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +4 -44
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +2 -14
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +36 -256
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +1 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameSize.ts +5 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +23 -50
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +29 -82
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPins.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +3 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +14 -60
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +3 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +2 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupToolModes.ts +7 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +8 -29
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +2 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +10 -39
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +0 -41
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +3 -37
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +1 -20
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +8 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +103 -167
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +0 -22
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +173 -75
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +9 -118
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +8 -123
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +2 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +3 -21
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPageTree.ts +0 -15
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPins.ts +8 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRealData.ts +5 -18
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +6 -17
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +2 -17
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupVersions.ts +7 -2
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixturesOnly.ts +0 -8
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +6 -108
- package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +1 -5
- package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +10 -40
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +6 -23
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +0 -2
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +4 -53
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +4 -53
- package/frontend-vue/package.json +2 -2
- package/package.json +5 -6
- package/E2E.md +0 -138
- package/dist/mcp/mockup-export/capture.d.ts +0 -19
- package/dist/mcp/mockup-export/capture.js +0 -99
- 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 -20
- package/dist/mcp/mockup-export/index.js +0 -110
- package/dist/mcp/mockup-export/index.js.map +0 -1
- package/dist/mcp/mockup-export/jobs.d.ts +0 -32
- package/dist/mcp/mockup-export/jobs.js +0 -49
- package/dist/mcp/mockup-export/jobs.js.map +0 -1
- package/dist/mcp/mockup-export/plan.d.ts +0 -78
- package/dist/mcp/mockup-export/plan.js +0 -292
- package/dist/mcp/mockup-export/plan.js.map +0 -1
- package/dist/mcp/mockup-export/route.d.ts +0 -23
- package/dist/mcp/mockup-export/route.js +0 -91
- package/dist/mcp/mockup-export/route.js.map +0 -1
- package/dist/mcp/page-verify/modules.d.ts +0 -8
- package/dist/mcp/page-verify/modules.js +0 -49
- package/dist/mcp/page-verify/modules.js.map +0 -1
- package/dist/mcp/tools/mockup-export-pdf.d.ts +0 -1
- package/dist/mcp/tools/mockup-export-pdf.js +0 -69
- package/dist/mcp/tools/mockup-export-pdf.js.map +0 -1
- package/dist/mcp/tools/mockup-module-catalog.d.ts +0 -1
- package/dist/mcp/tools/mockup-module-catalog.js +0 -36
- package/dist/mcp/tools/mockup-module-catalog.js.map +0 -1
- package/dist/mockup/compile-layouts.d.ts +0 -5
- package/dist/mockup/compile-layouts.js +0 -74
- package/dist/mockup/compile-layouts.js.map +0 -1
- package/dist/mockup/compile-nodes.d.ts +0 -11
- package/dist/mockup/compile-nodes.js +0 -119
- package/dist/mockup/compile-nodes.js.map +0 -1
- package/dist/mockup/compile-pages.d.ts +0 -18
- package/dist/mockup/compile-pages.js +0 -189
- package/dist/mockup/compile-pages.js.map +0 -1
- package/dist/mockup/create.d.ts +0 -16
- package/dist/mockup/create.js +0 -78
- package/dist/mockup/create.js.map +0 -1
- package/dist/mockup/created-watch.d.ts +0 -18
- package/dist/mockup/created-watch.js +0 -110
- package/dist/mockup/created-watch.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/etag.d.ts +0 -1
- package/dist/mockup/etag.js +0 -10
- package/dist/mockup/etag.js.map +0 -1
- package/dist/mockup/extensions.d.ts +0 -18
- package/dist/mockup/extensions.js +0 -61
- package/dist/mockup/extensions.js.map +0 -1
- package/dist/mockup/fixture-batch.d.ts +0 -21
- package/dist/mockup/fixture-batch.js +0 -111
- package/dist/mockup/fixture-batch.js.map +0 -1
- package/dist/mockup/fixture-routes.d.ts +0 -21
- package/dist/mockup/fixture-routes.js +0 -136
- 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/layout-model.d.ts +0 -156
- package/dist/mockup/layout-model.js +0 -96
- package/dist/mockup/layout-model.js.map +0 -1
- package/dist/mockup/layouts.d.ts +0 -9
- package/dist/mockup/layouts.js +0 -40
- package/dist/mockup/layouts.js.map +0 -1
- package/dist/mockup/module-manifests.d.ts +0 -99
- package/dist/mockup/module-manifests.js +0 -95
- package/dist/mockup/module-manifests.js.map +0 -1
- package/dist/mockup/module-states.d.ts +0 -10
- package/dist/mockup/module-states.js +0 -85
- package/dist/mockup/module-states.js.map +0 -1
- package/dist/mockup/modules-schema.d.ts +0 -2
- package/dist/mockup/modules-schema.js +0 -39
- package/dist/mockup/modules-schema.js.map +0 -1
- package/dist/mockup/page-capture-routes.d.ts +0 -19
- package/dist/mockup/page-capture-routes.js +0 -92
- package/dist/mockup/page-capture-routes.js.map +0 -1
- package/dist/mockup/page-captures.d.ts +0 -61
- package/dist/mockup/page-captures.js +0 -252
- package/dist/mockup/page-captures.js.map +0 -1
- package/dist/mockup/parse-spec.d.ts +0 -10
- package/dist/mockup/parse-spec.js +0 -62
- package/dist/mockup/parse-spec.js.map +0 -1
- package/dist/mockup/places.d.ts +0 -17
- package/dist/mockup/places.js +0 -75
- package/dist/mockup/places.js.map +0 -1
- package/dist/mockup/slug.d.ts +0 -3
- package/dist/mockup/slug.js +0 -7
- package/dist/mockup/slug.js.map +0 -1
- package/dist/mockup/state-patch.d.ts +0 -22
- package/dist/mockup/state-patch.js +0 -75
- package/dist/mockup/state-patch.js.map +0 -1
- package/dist/mockup/state.d.ts +0 -112
- package/dist/mockup/state.js +0 -22
- package/dist/mockup/state.js.map +0 -1
- package/dist/mockup/store-list.d.ts +0 -28
- package/dist/mockup/store-list.js +0 -89
- package/dist/mockup/store-list.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-core/app/utils/localFetchAnswers.ts +0 -124
- package/frontend-vue/layers/dms-core/app/utils/textDigest.ts +0 -29
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupWidgets.ts +0 -65
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +0 -153
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEmptyState.vue +0 -23
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModuleStore.vue +0 -164
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSectionLabel.vue +0 -51
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupReconnecting.vue +0 -17
- 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/useFixtureBatches.ts +0 -154
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupActivation.ts +0 -157
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +0 -165
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameRender.ts +0 -126
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageZoom.ts +0 -138
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +0 -124
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +0 -37
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerActivation.ts +0 -56
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerExport.ts +0 -46
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePersistedCaptures.ts +0 -151
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCreateModal.vue +0 -130
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +0 -332
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupActivation.ts +0 -100
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupAnnotations.ts +0 -146
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +0 -80
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModuleNavigation.ts +0 -171
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupModules.ts +0 -138
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverviewSections.ts +0 -66
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +0 -177
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupStatePatch.ts +0 -179
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +0 -143
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +0 -23
- package/frontend-vue/layers/dms-ui/app/build/utils/previewFixtureAnswers.ts +0 -156
- package/frontend-vue/layers/dms-ui/app/build/utils/previewRows.ts +0 -400
- package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +0 -15
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupModuleStore.ts +0 -2
- 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/useFixtureBatches.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupActivation.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupOverview.ts +0 -1
- 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/useMockupRoutePage.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupSession.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/composables/block-preview/usePersistedCaptures.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/json.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupActivation.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupAnnotations.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupModuleNavigation.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOverviewSections.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/mockupStatePatch.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/frontend-vue/layers/dms-ui/app/entries/utils/previewFixtureAnswers.ts +0 -1
- package/frontend-vue/layers/dms-ui/app/entries/utils/previewRows.ts +0 -1
package/dist/mockup/model.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
export * from "./layout-model";
|
|
5
|
-
export * from "./slug";
|
|
6
|
-
export * from "./state";
|
|
2
|
+
import { type MockupModule } from "./modules";
|
|
3
|
+
import { type MockupHeaderAction } from "./header-action";
|
|
7
4
|
export * from "./route-patterns";
|
|
8
5
|
export * from "./modules";
|
|
9
|
-
export * from "./module-manifests";
|
|
10
|
-
export * from "./tenancy";
|
|
11
|
-
export * from "./tenant-rows";
|
|
12
6
|
export * from "./header-action";
|
|
13
|
-
export
|
|
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>;
|
|
13
|
+
export declare const SLUG_PATTERN: RegExp;
|
|
14
14
|
export declare const KEY_PATTERN: RegExp;
|
|
15
15
|
export declare const RESERVED_MOCKUP_NAMES: readonly string[];
|
|
16
16
|
export declare const mockupNameSchema: z.core.$ZodBranded<z.ZodString, "Mockup", "out">;
|
|
17
17
|
export type MockupName = z.infer<typeof mockupNameSchema>;
|
|
18
|
+
export declare const pageIdSchema: z.ZodString;
|
|
18
19
|
export declare const fixtureKeySchema: z.ZodString;
|
|
19
20
|
export declare const annotationIdSchema: z.ZodString;
|
|
20
21
|
export declare function parseMockupName(raw: string): MockupName | undefined;
|
|
@@ -36,6 +37,50 @@ declare const pageOptionsSchema: z.ZodObject<{
|
|
|
36
37
|
padding: z.ZodOptional<z.ZodBoolean>;
|
|
37
38
|
}, z.core.$strict>;
|
|
38
39
|
export type MockupPageOptions = z.infer<typeof pageOptionsSchema>;
|
|
40
|
+
export declare const MOCKUP_LAYOUTS: readonly ["default", "form-page", "settings", "empty"];
|
|
41
|
+
export type MockupLayoutType = (typeof MOCKUP_LAYOUTS)[number];
|
|
42
|
+
declare const layoutObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<"default">;
|
|
44
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
48
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"form-page">;
|
|
54
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
58
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
}, z.core.$strict>>;
|
|
62
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
63
|
+
type: z.ZodLiteral<"settings">;
|
|
64
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
68
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
}, z.core.$strict>>;
|
|
72
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
73
|
+
type: z.ZodLiteral<"empty">;
|
|
74
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
}, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
|
|
78
|
+
hideBrand: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
}, z.core.$strict>>;
|
|
82
|
+
}, z.core.$strict>], "type">;
|
|
83
|
+
export type MockupPageLayout = z.infer<typeof layoutObjectSchema>;
|
|
39
84
|
declare const livePageSchema: z.ZodObject<{
|
|
40
85
|
ref: z.ZodString;
|
|
41
86
|
version: z.ZodString;
|
|
@@ -68,16 +113,10 @@ declare const sidebarSchema: z.ZodObject<{
|
|
|
68
113
|
}, z.core.$strict>;
|
|
69
114
|
export type MockupSidebar = z.infer<typeof sidebarSchema>;
|
|
70
115
|
export declare const ROUTE_PARAM_PATTERN: RegExp;
|
|
71
|
-
export declare const DOTTED_ID_PATTERN: RegExp;
|
|
72
116
|
declare const pageSchema: z.ZodObject<{
|
|
73
117
|
id: z.ZodString;
|
|
74
118
|
title: z.ZodString;
|
|
75
119
|
category: z.ZodOptional<z.ZodString>;
|
|
76
|
-
module: z.ZodOptional<z.ZodString>;
|
|
77
|
-
extends: z.ZodOptional<z.ZodString>;
|
|
78
|
-
before: z.ZodOptional<z.ZodString>;
|
|
79
|
-
after: z.ZodOptional<z.ZodString>;
|
|
80
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
81
120
|
menu: z.ZodOptional<z.ZodBoolean>;
|
|
82
121
|
parent: z.ZodOptional<z.ZodString>;
|
|
83
122
|
route: z.ZodOptional<z.ZodString>;
|
|
@@ -126,7 +165,6 @@ declare const pageSchema: z.ZodObject<{
|
|
|
126
165
|
confirmTextCaseInsensitive: z.ZodOptional<z.ZodBoolean>;
|
|
127
166
|
}, z.core.$strict>>;
|
|
128
167
|
}, z.core.$strict>>>;
|
|
129
|
-
settings: z.ZodOptional<z.ZodLiteral<true>>;
|
|
130
168
|
layout: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodEnum<{
|
|
131
169
|
default: "default";
|
|
132
170
|
empty: "empty";
|
|
@@ -174,9 +212,6 @@ declare const pageSchema: z.ZodObject<{
|
|
|
174
212
|
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
175
213
|
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
176
214
|
}, z.core.$strict>>;
|
|
177
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
178
|
-
type: z.ZodLiteral<"custom">;
|
|
179
|
-
id: z.ZodString;
|
|
180
215
|
}, z.core.$strict>], "type">]>>;
|
|
181
216
|
options: z.ZodOptional<z.ZodObject<{
|
|
182
217
|
theme: z.ZodOptional<z.ZodEnum<{
|
|
@@ -200,15 +235,6 @@ declare const pageSchema: z.ZodObject<{
|
|
|
200
235
|
tree: z.ZodDefault<z.ZodArray<z.ZodType<MockupNode, unknown, z.core.$ZodTypeInternals<MockupNode, unknown>>>>;
|
|
201
236
|
}, z.core.$strict>;
|
|
202
237
|
export type MockupSpecPage = z.infer<typeof pageSchema>;
|
|
203
|
-
export type MockupSpecPagePlacement = Pick<MockupSpecPage, "id" | "category" | "module" | "extends" | "settings" | "before" | "after" | "order">;
|
|
204
|
-
declare const customModuleSchema: z.ZodObject<{
|
|
205
|
-
id: z.ZodString;
|
|
206
|
-
title: z.ZodString;
|
|
207
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
208
|
-
description: z.ZodOptional<z.ZodString>;
|
|
209
|
-
}, z.core.$strict>;
|
|
210
|
-
export type MockupCustomModule = z.infer<typeof customModuleSchema>;
|
|
211
|
-
export type MockupSpecModule = string | MockupCustomModule;
|
|
212
238
|
export declare const CUSTOM_PAGE_FIELDS: readonly ["html", "css", "height", "states"];
|
|
213
239
|
export declare const MOCKUP_SOURCES: readonly ["chat", "claude-code", "codex"];
|
|
214
240
|
export type MockupSource = (typeof MOCKUP_SOURCES)[number];
|
|
@@ -232,47 +258,6 @@ declare const specDataSchema: z.ZodObject<{
|
|
|
232
258
|
}>>;
|
|
233
259
|
}, z.core.$strict>;
|
|
234
260
|
export type MockupData = z.infer<typeof specDataSchema>;
|
|
235
|
-
export declare const PLAIN_FIELD_TYPES: readonly ["string", "number", "price", "boolean", "date", "email", "url"];
|
|
236
|
-
export type MockupFieldType = (typeof PLAIN_FIELD_TYPES)[number] | "enum" | "ref";
|
|
237
|
-
declare const entityFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
238
|
-
type: z.ZodEnum<{
|
|
239
|
-
boolean: "boolean";
|
|
240
|
-
date: "date";
|
|
241
|
-
email: "email";
|
|
242
|
-
number: "number";
|
|
243
|
-
price: "price";
|
|
244
|
-
string: "string";
|
|
245
|
-
url: "url";
|
|
246
|
-
}>;
|
|
247
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
248
|
-
type: z.ZodLiteral<"enum">;
|
|
249
|
-
values: z.ZodArray<z.ZodString>;
|
|
250
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
251
|
-
type: z.ZodLiteral<"ref">;
|
|
252
|
-
to: z.ZodString;
|
|
253
|
-
}, z.core.$strict>], "type">;
|
|
254
|
-
export type MockupSpecEntityField = z.infer<typeof entityFieldSchema>;
|
|
255
|
-
declare const entitySchema: z.ZodObject<{
|
|
256
|
-
tenantScoped: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
-
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
258
|
-
type: z.ZodEnum<{
|
|
259
|
-
boolean: "boolean";
|
|
260
|
-
date: "date";
|
|
261
|
-
email: "email";
|
|
262
|
-
number: "number";
|
|
263
|
-
price: "price";
|
|
264
|
-
string: "string";
|
|
265
|
-
url: "url";
|
|
266
|
-
}>;
|
|
267
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
-
type: z.ZodLiteral<"enum">;
|
|
269
|
-
values: z.ZodArray<z.ZodString>;
|
|
270
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
271
|
-
type: z.ZodLiteral<"ref">;
|
|
272
|
-
to: z.ZodString;
|
|
273
|
-
}, z.core.$strict>], "type">>;
|
|
274
|
-
}, z.core.$strict>;
|
|
275
|
-
export type MockupSpecEntity = z.infer<typeof entitySchema>;
|
|
276
261
|
export declare const specSchema: z.ZodObject<{
|
|
277
262
|
$schema: z.ZodOptional<z.ZodString>;
|
|
278
263
|
version: z.ZodLiteral<1>;
|
|
@@ -296,33 +281,6 @@ export declare const specSchema: z.ZodObject<{
|
|
|
296
281
|
"read-write": "read-write";
|
|
297
282
|
}>>;
|
|
298
283
|
}, z.core.$strict>>;
|
|
299
|
-
entities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
300
|
-
tenantScoped: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
-
fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
302
|
-
type: z.ZodEnum<{
|
|
303
|
-
boolean: "boolean";
|
|
304
|
-
date: "date";
|
|
305
|
-
email: "email";
|
|
306
|
-
number: "number";
|
|
307
|
-
price: "price";
|
|
308
|
-
string: "string";
|
|
309
|
-
url: "url";
|
|
310
|
-
}>;
|
|
311
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
312
|
-
type: z.ZodLiteral<"enum">;
|
|
313
|
-
values: z.ZodArray<z.ZodString>;
|
|
314
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
315
|
-
type: z.ZodLiteral<"ref">;
|
|
316
|
-
to: z.ZodString;
|
|
317
|
-
}, z.core.$strict>], "type">>;
|
|
318
|
-
}, z.core.$strict>>>;
|
|
319
|
-
fixtures: z.ZodOptional<z.ZodObject<{
|
|
320
|
-
tenants: z.ZodArray<z.ZodObject<{
|
|
321
|
-
id: z.ZodString;
|
|
322
|
-
name: z.ZodString;
|
|
323
|
-
plan: z.ZodOptional<z.ZodString>;
|
|
324
|
-
}, z.core.$strict>>;
|
|
325
|
-
}, z.core.$strict>>;
|
|
326
284
|
categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
327
285
|
id: z.ZodString;
|
|
328
286
|
title: z.ZodString;
|
|
@@ -337,47 +295,11 @@ export declare const specSchema: z.ZodObject<{
|
|
|
337
295
|
height: z.ZodOptional<z.ZodNumber>;
|
|
338
296
|
}, z.core.$strict>>;
|
|
339
297
|
}, z.core.$strict>>;
|
|
340
|
-
|
|
341
|
-
id: z.ZodString;
|
|
342
|
-
title: z.ZodString;
|
|
343
|
-
description: z.ZodOptional<z.ZodString>;
|
|
344
|
-
dashboard: z.ZodOptional<z.ZodBoolean>;
|
|
345
|
-
header: z.ZodOptional<z.ZodObject<{
|
|
346
|
-
html: z.ZodString;
|
|
347
|
-
css: z.ZodOptional<z.ZodString>;
|
|
348
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
349
|
-
}, z.core.$strict>>;
|
|
350
|
-
aside: z.ZodOptional<z.ZodObject<{
|
|
351
|
-
html: z.ZodString;
|
|
352
|
-
css: z.ZodOptional<z.ZodString>;
|
|
353
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
354
|
-
width: z.ZodOptional<z.ZodNumber>;
|
|
355
|
-
side: z.ZodOptional<z.ZodEnum<{
|
|
356
|
-
end: "end";
|
|
357
|
-
start: "start";
|
|
358
|
-
}>>;
|
|
359
|
-
}, z.core.$strict>>;
|
|
360
|
-
footer: z.ZodOptional<z.ZodObject<{
|
|
361
|
-
html: z.ZodString;
|
|
362
|
-
css: z.ZodOptional<z.ZodString>;
|
|
363
|
-
height: z.ZodOptional<z.ZodNumber>;
|
|
364
|
-
}, z.core.$strict>>;
|
|
365
|
-
}, z.core.$strict>>>;
|
|
366
|
-
modules: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
367
|
-
id: z.ZodString;
|
|
368
|
-
title: z.ZodString;
|
|
369
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
370
|
-
description: z.ZodOptional<z.ZodString>;
|
|
371
|
-
}, z.core.$strict>]>>>;
|
|
298
|
+
modules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
372
299
|
pages: z.ZodArray<z.ZodObject<{
|
|
373
300
|
id: z.ZodString;
|
|
374
301
|
title: z.ZodString;
|
|
375
302
|
category: z.ZodOptional<z.ZodString>;
|
|
376
|
-
module: z.ZodOptional<z.ZodString>;
|
|
377
|
-
extends: z.ZodOptional<z.ZodString>;
|
|
378
|
-
before: z.ZodOptional<z.ZodString>;
|
|
379
|
-
after: z.ZodOptional<z.ZodString>;
|
|
380
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
381
303
|
menu: z.ZodOptional<z.ZodBoolean>;
|
|
382
304
|
parent: z.ZodOptional<z.ZodString>;
|
|
383
305
|
route: z.ZodOptional<z.ZodString>;
|
|
@@ -426,7 +348,6 @@ export declare const specSchema: z.ZodObject<{
|
|
|
426
348
|
confirmTextCaseInsensitive: z.ZodOptional<z.ZodBoolean>;
|
|
427
349
|
}, z.core.$strict>>;
|
|
428
350
|
}, z.core.$strict>>>;
|
|
429
|
-
settings: z.ZodOptional<z.ZodLiteral<true>>;
|
|
430
351
|
layout: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodEnum<{
|
|
431
352
|
default: "default";
|
|
432
353
|
empty: "empty";
|
|
@@ -474,9 +395,6 @@ export declare const specSchema: z.ZodObject<{
|
|
|
474
395
|
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
475
396
|
fillHeight: z.ZodOptional<z.ZodBoolean>;
|
|
476
397
|
}, z.core.$strict>>;
|
|
477
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
478
|
-
type: z.ZodLiteral<"custom">;
|
|
479
|
-
id: z.ZodString;
|
|
480
398
|
}, z.core.$strict>], "type">]>>;
|
|
481
399
|
options: z.ZodOptional<z.ZodObject<{
|
|
482
400
|
theme: z.ZodOptional<z.ZodEnum<{
|
|
@@ -505,6 +423,51 @@ export interface MockupIssue {
|
|
|
505
423
|
path: string;
|
|
506
424
|
message: string;
|
|
507
425
|
}
|
|
426
|
+
export interface MockupPageState {
|
|
427
|
+
id: string;
|
|
428
|
+
title: string;
|
|
429
|
+
category?: string;
|
|
430
|
+
menu?: false;
|
|
431
|
+
custom?: true;
|
|
432
|
+
generated?: true;
|
|
433
|
+
parent?: string;
|
|
434
|
+
route?: {
|
|
435
|
+
param: string;
|
|
436
|
+
sample?: string;
|
|
437
|
+
};
|
|
438
|
+
links: string[];
|
|
439
|
+
icon?: string;
|
|
440
|
+
description?: string;
|
|
441
|
+
headerActions?: MockupHeaderAction[];
|
|
442
|
+
layout?: MockupPageLayout;
|
|
443
|
+
options: MockupPageOptions;
|
|
444
|
+
tree: MockupNode[];
|
|
445
|
+
realTree?: MockupNode[];
|
|
446
|
+
livePage?: Pick<MockupLivePage, "ref">;
|
|
447
|
+
paths: Record<string, string>;
|
|
448
|
+
}
|
|
449
|
+
export interface MockupSidebarWidgetState {
|
|
450
|
+
id: string;
|
|
451
|
+
title?: string;
|
|
452
|
+
html: string;
|
|
453
|
+
css?: string;
|
|
454
|
+
height: number;
|
|
455
|
+
}
|
|
456
|
+
export interface MockupSidebarState {
|
|
457
|
+
widgets: MockupSidebarWidgetState[];
|
|
458
|
+
}
|
|
459
|
+
export interface MockupState {
|
|
460
|
+
name: MockupName;
|
|
461
|
+
title?: string;
|
|
462
|
+
revision: number;
|
|
463
|
+
categories?: MockupCategory[];
|
|
464
|
+
sidebar?: MockupSidebarState;
|
|
465
|
+
modules?: MockupModule[];
|
|
466
|
+
pages: MockupPageState[];
|
|
467
|
+
issues: MockupIssue[];
|
|
468
|
+
warnings: MockupIssue[];
|
|
469
|
+
}
|
|
508
470
|
export declare function isJsonObject(value: Json | undefined): value is JsonObject;
|
|
509
471
|
export declare function specValueAt(value: Json, pointer: string): Json | undefined;
|
|
472
|
+
export declare function jsonPointer(path: readonly PropertyKey[]): string;
|
|
510
473
|
export declare function zodIssues(base: string, error: z.ZodError): MockupIssue[];
|
package/dist/mockup/model.js
CHANGED
|
@@ -14,50 +14,41 @@ 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.
|
|
18
|
-
exports.slugOfText = slugOfText;
|
|
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.KEY_PATTERN = exports.SLUG_PATTERN = exports.jsonObjectSchema = exports.jsonSchema = void 0;
|
|
19
18
|
exports.parseMockupName = parseMockupName;
|
|
20
19
|
exports.isJsonObject = isJsonObject;
|
|
21
20
|
exports.specValueAt = specValueAt;
|
|
21
|
+
exports.jsonPointer = jsonPointer;
|
|
22
22
|
exports.zodIssues = zodIssues;
|
|
23
23
|
const zod_1 = require("zod");
|
|
24
|
-
const entities_1 = require("./entities");
|
|
25
24
|
const generate_1 = require("./generate");
|
|
26
|
-
const json_1 = require("./json");
|
|
27
25
|
const modules_1 = require("./modules");
|
|
28
|
-
const tenancy_1 = require("./tenancy");
|
|
29
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("./layout-model"), exports);
|
|
33
|
-
__exportStar(require("./slug"), exports);
|
|
34
|
-
__exportStar(require("./state"), exports);
|
|
35
28
|
__exportStar(require("./route-patterns"), exports);
|
|
36
29
|
__exportStar(require("./modules"), exports);
|
|
37
|
-
__exportStar(require("./module-manifests"), exports);
|
|
38
|
-
__exportStar(require("./tenancy"), exports);
|
|
39
|
-
__exportStar(require("./tenant-rows"), exports);
|
|
40
30
|
__exportStar(require("./header-action"), exports);
|
|
41
|
-
const layout_model_1 = require("./layout-model");
|
|
42
|
-
const layouts_1 = require("./layouts");
|
|
43
|
-
const slug_1 = require("./slug");
|
|
44
31
|
const sketch_limits_1 = require("./sketch-limits");
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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);
|
|
41
|
+
exports.SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
52
42
|
exports.KEY_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
|
|
53
43
|
exports.RESERVED_MOCKUP_NAMES = ["schema", "example"];
|
|
54
44
|
exports.mockupNameSchema = zod_1.z
|
|
55
45
|
.string()
|
|
56
|
-
.regex(
|
|
46
|
+
.regex(exports.SLUG_PATTERN)
|
|
57
47
|
.refine((name) => !exports.RESERVED_MOCKUP_NAMES.includes(name), {
|
|
58
48
|
message: "is reserved by the mockup API",
|
|
59
49
|
})
|
|
60
50
|
.brand("Mockup");
|
|
51
|
+
exports.pageIdSchema = zod_1.z.string().regex(exports.SLUG_PATTERN);
|
|
61
52
|
exports.fixtureKeySchema = zod_1.z.string().regex(exports.KEY_PATTERN);
|
|
62
53
|
exports.annotationIdSchema = zod_1.z.string().regex(exports.KEY_PATTERN);
|
|
63
54
|
function parseMockupName(raw) {
|
|
@@ -68,7 +59,7 @@ const nodeSchema = zod_1.z
|
|
|
68
59
|
.object({
|
|
69
60
|
type: zod_1.z.string().optional(),
|
|
70
61
|
componentName: zod_1.z.string().optional(),
|
|
71
|
-
options:
|
|
62
|
+
options: exports.jsonObjectSchema.optional(),
|
|
72
63
|
children: zod_1.z.array(zod_1.z.lazy(() => nodeSchema)).optional(),
|
|
73
64
|
id: zod_1.z.string().optional(),
|
|
74
65
|
slot: zod_1.z.string().optional(),
|
|
@@ -82,12 +73,53 @@ const pageOptionsSchema = zod_1.z
|
|
|
82
73
|
padding: zod_1.z.boolean().optional(),
|
|
83
74
|
})
|
|
84
75
|
.strict();
|
|
76
|
+
exports.MOCKUP_LAYOUTS = [
|
|
77
|
+
"default",
|
|
78
|
+
"form-page",
|
|
79
|
+
"settings",
|
|
80
|
+
"empty",
|
|
81
|
+
];
|
|
82
|
+
const framedLayoutOptions = {
|
|
83
|
+
hideHeader: zod_1.z.boolean().optional(),
|
|
84
|
+
fillHeight: zod_1.z.boolean().optional(),
|
|
85
|
+
};
|
|
86
|
+
const layoutOptionSchemas = {
|
|
87
|
+
default: zod_1.z
|
|
88
|
+
.object({ fullWidth: zod_1.z.boolean().optional(), ...framedLayoutOptions })
|
|
89
|
+
.strict(),
|
|
90
|
+
"form-page": zod_1.z.object(framedLayoutOptions).strict(),
|
|
91
|
+
settings: zod_1.z.object(framedLayoutOptions).strict(),
|
|
92
|
+
empty: zod_1.z
|
|
93
|
+
.object({
|
|
94
|
+
hideBrand: zod_1.z.boolean().optional(),
|
|
95
|
+
hideFooter: zod_1.z.boolean().optional(),
|
|
96
|
+
fillHeight: zod_1.z.boolean().optional(),
|
|
97
|
+
})
|
|
98
|
+
.strict(),
|
|
99
|
+
};
|
|
100
|
+
function layoutSchemaOf(type) {
|
|
101
|
+
return zod_1.z
|
|
102
|
+
.object({
|
|
103
|
+
type: zod_1.z.literal(type),
|
|
104
|
+
options: layoutOptionSchemas[type].optional(),
|
|
105
|
+
})
|
|
106
|
+
.strict();
|
|
107
|
+
}
|
|
108
|
+
const layoutObjectSchema = zod_1.z.discriminatedUnion("type", [
|
|
109
|
+
layoutSchemaOf("default"),
|
|
110
|
+
layoutSchemaOf("form-page"),
|
|
111
|
+
layoutSchemaOf("settings"),
|
|
112
|
+
layoutSchemaOf("empty"),
|
|
113
|
+
]);
|
|
114
|
+
const pageLayoutSchema = zod_1.z.union([zod_1.z.enum(exports.MOCKUP_LAYOUTS).transform((type) => ({ type })), layoutObjectSchema], {
|
|
115
|
+
error: `is the name of a layout, one of ${exports.MOCKUP_LAYOUTS.join(", ")}, or { "type": <that name>, "options": {...} }`,
|
|
116
|
+
});
|
|
85
117
|
const livePageSchema = zod_1.z
|
|
86
118
|
.object({ ref: zod_1.z.string().min(1), version: zod_1.z.string() })
|
|
87
119
|
.strict();
|
|
88
120
|
const categorySchema = zod_1.z
|
|
89
121
|
.object({
|
|
90
|
-
id:
|
|
122
|
+
id: exports.pageIdSchema,
|
|
91
123
|
title: zod_1.z.string(),
|
|
92
124
|
icon: zod_1.z.string().optional(),
|
|
93
125
|
})
|
|
@@ -96,7 +128,7 @@ exports.MAX_SIDEBAR_WIDGETS = 10;
|
|
|
96
128
|
exports.SIDEBAR_WIDGET_DEFAULT_HEIGHT = 120;
|
|
97
129
|
const sidebarWidgetSchema = zod_1.z
|
|
98
130
|
.object({
|
|
99
|
-
id:
|
|
131
|
+
id: exports.pageIdSchema,
|
|
100
132
|
title: zod_1.z.string().max(sketch_limits_1.SKETCH_MAX_CAPTION).optional(),
|
|
101
133
|
html: zod_1.z.string().max(sketch_limits_1.SKETCH_MAX_SOURCE),
|
|
102
134
|
css: zod_1.z.string().max(sketch_limits_1.SKETCH_MAX_SOURCE).optional(),
|
|
@@ -114,67 +146,46 @@ const sidebarSchema = zod_1.z
|
|
|
114
146
|
})
|
|
115
147
|
.strict();
|
|
116
148
|
exports.ROUTE_PARAM_PATTERN = /^:[A-Za-z_][A-Za-z0-9_]*$/;
|
|
117
|
-
const FIXTURE_FORMS = [
|
|
118
|
-
{ holds: generate_1.holdsGenerate, schema: generate_1.generatedFixtureSchema },
|
|
119
|
-
{ holds: entities_1.holdsEntity, schema: entities_1.entityFixtureSchema },
|
|
120
|
-
];
|
|
121
|
-
exports.DOTTED_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}(\.[A-Za-z0-9][A-Za-z0-9_-]{0,63}){0,7}$/;
|
|
122
149
|
const pageSchema = zod_1.z
|
|
123
150
|
.object({
|
|
124
|
-
id:
|
|
151
|
+
id: exports.pageIdSchema,
|
|
125
152
|
title: zod_1.z.string(),
|
|
126
153
|
category: zod_1.z.string().optional(),
|
|
127
|
-
module: slug_1.pageIdSchema.optional(),
|
|
128
|
-
extends: zod_1.z.string().regex(exports.DOTTED_ID_PATTERN).optional(),
|
|
129
|
-
before: zod_1.z.string().regex(exports.DOTTED_ID_PATTERN).optional(),
|
|
130
|
-
after: zod_1.z.string().regex(exports.DOTTED_ID_PATTERN).optional(),
|
|
131
|
-
order: zod_1.z.number().finite().optional(),
|
|
132
154
|
menu: zod_1.z.boolean().optional(),
|
|
133
|
-
parent:
|
|
155
|
+
parent: exports.pageIdSchema.optional(),
|
|
134
156
|
route: zod_1.z.string().regex(exports.ROUTE_PARAM_PATTERN).optional(),
|
|
135
157
|
icon: zod_1.z.string().optional(),
|
|
136
158
|
description: zod_1.z.string().optional(),
|
|
137
159
|
headerActions: zod_1.z.array(header_action_1.headerActionSchema).optional(),
|
|
138
|
-
|
|
139
|
-
layout: layout_model_1.pageLayoutSchema.optional(),
|
|
160
|
+
layout: pageLayoutSchema.optional(),
|
|
140
161
|
options: pageOptionsSchema.optional(),
|
|
141
162
|
livePage: livePageSchema.optional(),
|
|
142
163
|
liveRoutes: zod_1.z.record(exports.fixtureKeySchema, route_patterns_1.liveRouteSchema).optional(),
|
|
143
|
-
fixtures: zod_1.z.record(exports.fixtureKeySchema,
|
|
164
|
+
fixtures: zod_1.z.record(exports.fixtureKeySchema, exports.jsonSchema).optional(),
|
|
144
165
|
custom: zod_1.z.boolean().optional(),
|
|
145
|
-
html:
|
|
146
|
-
css:
|
|
147
|
-
height:
|
|
148
|
-
states:
|
|
166
|
+
html: exports.jsonSchema.optional(),
|
|
167
|
+
css: exports.jsonSchema.optional(),
|
|
168
|
+
height: exports.jsonSchema.optional(),
|
|
169
|
+
states: exports.jsonSchema.optional(),
|
|
149
170
|
tree: zod_1.z.array(nodeSchema).default([]),
|
|
150
171
|
})
|
|
151
172
|
.strict()
|
|
152
173
|
.superRefine((page, context) => {
|
|
153
174
|
for (const [key, value] of Object.entries(page.fixtures ?? {})) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
});
|
|
166
|
-
}
|
|
175
|
+
if (!(0, generate_1.holdsGenerate)(value))
|
|
176
|
+
continue;
|
|
177
|
+
const generated = generate_1.generatedFixtureSchema.safeParse(value);
|
|
178
|
+
if (generated.success)
|
|
179
|
+
continue;
|
|
180
|
+
for (const issue of generated.error.issues) {
|
|
181
|
+
context.addIssue({
|
|
182
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
183
|
+
path: ["fixtures", key, ...issue.path],
|
|
184
|
+
message: issue.message,
|
|
185
|
+
});
|
|
167
186
|
}
|
|
168
187
|
}
|
|
169
188
|
});
|
|
170
|
-
const customModuleSchema = zod_1.z
|
|
171
|
-
.object({
|
|
172
|
-
id: slug_1.pageIdSchema,
|
|
173
|
-
title: zod_1.z.string(),
|
|
174
|
-
icon: zod_1.z.string().optional(),
|
|
175
|
-
description: zod_1.z.string().optional(),
|
|
176
|
-
})
|
|
177
|
-
.strict();
|
|
178
189
|
exports.CUSTOM_PAGE_FIELDS = ["html", "css", "height", "states"];
|
|
179
190
|
function checkCustomPages(pages, issue) {
|
|
180
191
|
pages.forEach((page, index) => {
|
|
@@ -240,32 +251,6 @@ const specDataSchema = zod_1.z
|
|
|
240
251
|
access: connectionAccessSchema.default("read"),
|
|
241
252
|
})
|
|
242
253
|
.strict();
|
|
243
|
-
const entityNameSchema = zod_1.z.string().regex(exports.KEY_PATTERN);
|
|
244
|
-
exports.PLAIN_FIELD_TYPES = [
|
|
245
|
-
"string",
|
|
246
|
-
"number",
|
|
247
|
-
"price",
|
|
248
|
-
"boolean",
|
|
249
|
-
"date",
|
|
250
|
-
"email",
|
|
251
|
-
"url",
|
|
252
|
-
];
|
|
253
|
-
const entityFieldSchema = zod_1.z.discriminatedUnion("type", [
|
|
254
|
-
zod_1.z.object({ type: zod_1.z.enum(exports.PLAIN_FIELD_TYPES) }).strict(),
|
|
255
|
-
zod_1.z
|
|
256
|
-
.object({
|
|
257
|
-
type: zod_1.z.literal("enum"),
|
|
258
|
-
values: zod_1.z.array(zod_1.z.string().min(1)).nonempty(),
|
|
259
|
-
})
|
|
260
|
-
.strict(),
|
|
261
|
-
zod_1.z.object({ type: zod_1.z.literal("ref"), to: entityNameSchema }).strict(),
|
|
262
|
-
]);
|
|
263
|
-
const entitySchema = zod_1.z
|
|
264
|
-
.object({
|
|
265
|
-
tenantScoped: zod_1.z.boolean().optional(),
|
|
266
|
-
fields: zod_1.z.record(entityNameSchema, entityFieldSchema),
|
|
267
|
-
})
|
|
268
|
-
.strict();
|
|
269
254
|
exports.specSchema = zod_1.z
|
|
270
255
|
.object({
|
|
271
256
|
$schema: zod_1.z.string().optional(),
|
|
@@ -274,12 +259,9 @@ exports.specSchema = zod_1.z
|
|
|
274
259
|
source: exports.mockupSourceSchema.optional(),
|
|
275
260
|
built: exports.mockupBuiltSchema.optional(),
|
|
276
261
|
data: specDataSchema.optional(),
|
|
277
|
-
entities: zod_1.z.record(entityNameSchema, entitySchema).optional(),
|
|
278
|
-
fixtures: tenancy_1.specFixturesSchema.optional(),
|
|
279
262
|
categories: zod_1.z.array(categorySchema).optional(),
|
|
280
263
|
sidebar: sidebarSchema.optional(),
|
|
281
|
-
|
|
282
|
-
modules: zod_1.z.array(zod_1.z.union([zod_1.z.string(), customModuleSchema])).optional(),
|
|
264
|
+
modules: zod_1.z.array(zod_1.z.string()).optional(),
|
|
283
265
|
pages: zod_1.z.array(pageSchema),
|
|
284
266
|
})
|
|
285
267
|
.strict()
|
|
@@ -301,11 +283,8 @@ exports.specSchema = zod_1.z
|
|
|
301
283
|
}
|
|
302
284
|
widgets.add(widget.id);
|
|
303
285
|
});
|
|
304
|
-
for (const {
|
|
305
|
-
issue(
|
|
306
|
-
}
|
|
307
|
-
for (const { path, message } of (0, layouts_1.layoutIssues)(spec.layouts ?? [], spec.pages)) {
|
|
308
|
-
issue(path, message);
|
|
286
|
+
for (const { index, message } of (0, modules_1.moduleIssues)(spec.modules ?? [])) {
|
|
287
|
+
issue(["modules", index], message);
|
|
309
288
|
}
|
|
310
289
|
const known = categories.size
|
|
311
290
|
? `the categories are ${[...categories].join(", ")}`
|
|
@@ -336,9 +315,14 @@ function specValueAt(value, pointer) {
|
|
|
336
315
|
: undefined;
|
|
337
316
|
}, value);
|
|
338
317
|
}
|
|
318
|
+
function jsonPointer(path) {
|
|
319
|
+
return path
|
|
320
|
+
.map((segment) => `/${String(segment).replaceAll("~", "~0").replaceAll("/", "~1")}`)
|
|
321
|
+
.join("");
|
|
322
|
+
}
|
|
339
323
|
function zodIssues(base, error) {
|
|
340
324
|
return error.issues.map((issue) => ({
|
|
341
|
-
path: `${base}${
|
|
325
|
+
path: `${base}${jsonPointer(issue.path)}`,
|
|
342
326
|
message: issue.message,
|
|
343
327
|
}));
|
|
344
328
|
}
|