@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
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SETTINGS_LAYOUT_STATE = void 0;
|
|
4
|
-
exports.compileLayouts = compileLayouts;
|
|
5
|
-
exports.layoutStateOf = layoutStateOf;
|
|
6
|
-
const layouts_1 = require("./layouts");
|
|
7
|
-
const model_1 = require("./model");
|
|
8
|
-
const sketch_1 = require("./sketch");
|
|
9
|
-
function compileRegion(source, pointer, issues) {
|
|
10
|
-
const checked = (0, sketch_1.checkSketch)(source);
|
|
11
|
-
if (checked.ok)
|
|
12
|
-
return checked.sketch;
|
|
13
|
-
for (const { field, what } of checked.refusals) {
|
|
14
|
-
issues.push({
|
|
15
|
-
path: `${pointer}/${field}`,
|
|
16
|
-
message: `a layout region is static HTML and CSS, so it may not hold ${what}`,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return { html: "" };
|
|
20
|
-
}
|
|
21
|
-
function regionState(region, at, pointer, issues) {
|
|
22
|
-
const { html, css } = region;
|
|
23
|
-
const drawn = compileRegion(css === undefined ? { html } : { html, css }, pointer, issues);
|
|
24
|
-
const state = {
|
|
25
|
-
html: drawn.html,
|
|
26
|
-
height: region.height ?? model_1.LAYOUT_REGION_DEFAULT_HEIGHTS[at],
|
|
27
|
-
};
|
|
28
|
-
if (drawn.css !== undefined)
|
|
29
|
-
state.css = drawn.css;
|
|
30
|
-
return state;
|
|
31
|
-
}
|
|
32
|
-
function compileLayout(layout, pointer, issues) {
|
|
33
|
-
const state = {
|
|
34
|
-
type: "custom",
|
|
35
|
-
id: layout.id,
|
|
36
|
-
title: layout.title,
|
|
37
|
-
dashboard: layout.dashboard ?? true,
|
|
38
|
-
};
|
|
39
|
-
if (layout.header) {
|
|
40
|
-
state.header = regionState(layout.header, "header", `${pointer}/header`, issues);
|
|
41
|
-
}
|
|
42
|
-
if (layout.aside) {
|
|
43
|
-
const aside = {
|
|
44
|
-
...regionState(layout.aside, "aside", `${pointer}/aside`, issues),
|
|
45
|
-
width: layout.aside.width ?? model_1.LAYOUT_ASIDE_DEFAULT_WIDTH,
|
|
46
|
-
side: layout.aside.side ?? model_1.LAYOUT_ASIDE_DEFAULT_SIDE,
|
|
47
|
-
};
|
|
48
|
-
state.aside = aside;
|
|
49
|
-
}
|
|
50
|
-
if (layout.footer) {
|
|
51
|
-
state.footer = regionState(layout.footer, "footer", `${pointer}/footer`, issues);
|
|
52
|
-
}
|
|
53
|
-
return state;
|
|
54
|
-
}
|
|
55
|
-
function compileLayouts(layouts, issues) {
|
|
56
|
-
const compiled = new Map();
|
|
57
|
-
layouts.forEach((layout, index) => {
|
|
58
|
-
const state = compileLayout(layout, `/layouts/${index}`, issues);
|
|
59
|
-
if (!compiled.has(layout.id))
|
|
60
|
-
compiled.set(layout.id, state);
|
|
61
|
-
});
|
|
62
|
-
return compiled;
|
|
63
|
-
}
|
|
64
|
-
exports.SETTINGS_LAYOUT_STATE = {
|
|
65
|
-
type: "settings",
|
|
66
|
-
};
|
|
67
|
-
function layoutStateOf(layout, inSettings, layouts) {
|
|
68
|
-
if (layout === undefined)
|
|
69
|
-
return inSettings ? exports.SETTINGS_LAYOUT_STATE : undefined;
|
|
70
|
-
if (!(0, layouts_1.isCustomLayoutRef)(layout))
|
|
71
|
-
return layout;
|
|
72
|
-
return layouts.get(layout.id);
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=compile-layouts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile-layouts.js","sourceRoot":"","sources":["../../src/mockup/compile-layouts.ts"],"names":[],"mappings":";;;;;AAAA,uCAA8C;AAU9C,mCAIiB;AACjB,qCAA0D;AAU1D,SAAS,aAAa,CACpB,MAAoB,EACpB,OAAe,EACf,MAAqB;IAErB,MAAM,OAAO,GAAG,IAAA,oBAAW,EAAC,MAAM,CAAC,CAAC;IACpC,IAAI,OAAO,CAAC,EAAE;QAAE,OAAO,OAAO,CAAC,MAAM,CAAC;IACtC,KAAK,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,GAAG,OAAO,IAAI,KAAK,EAAE;YAC3B,OAAO,EAAE,8DAA8D,IAAI,EAAE;SAC9E,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,WAAW,CAClB,MAAuD,EACvD,EAA8C,EAC9C,OAAe,EACf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,CAAC,KAAK,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,KAAK,CAAC,MAAM,GAAG,WAAW,CACxB,MAAM,CAAC,MAAM,EACb,QAAQ,EACR,GAAG,OAAO,SAAS,EACnB,MAAM,CACP,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAMD,wBACE,OAAsC,EACtC,MAAqB;IAErB,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmC,CAAC;IAC5D,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAChC,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,EAAE,YAAY,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAGY,QAAA,qBAAqB,GAA0B;IAC1D,IAAI,EAAE,UAAU;CACjB,CAAC;AAQF,uBACE,MAAoC,EACpC,UAAmB,EACnB,OAAsB;IAEtB,IAAI,MAAM,KAAK,SAAS;QACtB,OAAO,UAAU,CAAC,CAAC,CAAC,QAAA,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC;IACxD,IAAI,CAAC,IAAA,2BAAiB,EAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC9C,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Catalog } from "./block-catalog";
|
|
2
|
-
import type { FixtureScope } from "./fixtures";
|
|
3
|
-
import { type FixtureAnswers } from "./fixture-answers";
|
|
4
|
-
import type { MockupNode } from "./model";
|
|
5
|
-
export interface PageScope extends FixtureScope {
|
|
6
|
-
catalog: Catalog;
|
|
7
|
-
paths: Record<string, string>;
|
|
8
|
-
answers: FixtureAnswers;
|
|
9
|
-
}
|
|
10
|
-
export declare function compileNode(node: MockupNode, pointer: string, layoutPath: string, scope: PageScope): MockupNode;
|
|
11
|
-
export declare const ROOT_LAYOUT_PREFIX = "block-";
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROOT_LAYOUT_PREFIX = void 0;
|
|
4
|
-
exports.compileNode = compileNode;
|
|
5
|
-
const block_catalog_1 = require("./block-catalog");
|
|
6
|
-
const controller_blocks_1 = require("./controller-blocks");
|
|
7
|
-
const fixtures_1 = require("./fixtures");
|
|
8
|
-
const fixture_answers_1 = require("./fixture-answers");
|
|
9
|
-
const form_fields_1 = require("./form-fields");
|
|
10
|
-
const page_links_1 = require("./page-links");
|
|
11
|
-
const sample_routes_1 = require("./sample-routes");
|
|
12
|
-
const sketch_1 = require("./sketch");
|
|
13
|
-
const validate_1 = require("./validate");
|
|
14
|
-
function compileChildren(node, pointer, layoutPath, scope) {
|
|
15
|
-
if (!node.children)
|
|
16
|
-
return node;
|
|
17
|
-
const children = node.children.map((child, index) => {
|
|
18
|
-
const childPointer = `${pointer}/children/${index}`;
|
|
19
|
-
const childPath = `${layoutPath}.${child.id ?? index}`;
|
|
20
|
-
if (Object.hasOwn(scope.paths, childPath)) {
|
|
21
|
-
scope.issues.push({
|
|
22
|
-
path: child.id === undefined ? childPointer : `${childPointer}/id`,
|
|
23
|
-
message: `another child of this block already has the id "${child.id ?? index}"`,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return compileNode(child, childPointer, childPath, scope);
|
|
27
|
-
});
|
|
28
|
-
return { ...node, children };
|
|
29
|
-
}
|
|
30
|
-
function withOptions(node, pointer, scope) {
|
|
31
|
-
return {
|
|
32
|
-
...node,
|
|
33
|
-
options: (0, fixtures_1.rewriteObject)(node.options ?? {}, `${pointer}/options`, scope),
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const sketchKind = {
|
|
37
|
-
resolve: (node, scope) => node.type === sketch_1.SKETCH_TYPE
|
|
38
|
-
? (pointer) => (0, sketch_1.compileSketch)(node, pointer, scope.issues, (0, page_links_1.sketchLinks)(scope))
|
|
39
|
-
: undefined,
|
|
40
|
-
};
|
|
41
|
-
const controllerKind = {
|
|
42
|
-
resolve(node, scope) {
|
|
43
|
-
const descriptor = (0, block_catalog_1.descriptorOf)(node, scope.catalog);
|
|
44
|
-
if (!descriptor?.controllerArg)
|
|
45
|
-
return undefined;
|
|
46
|
-
const block = controller_blocks_1.CONTROLLER_BLOCKS.get(descriptor.type);
|
|
47
|
-
return (pointer, layoutPath) => {
|
|
48
|
-
if (block) {
|
|
49
|
-
const built = block.compile(node, pointer, scope);
|
|
50
|
-
return compileChildren(built, pointer, layoutPath, scope);
|
|
51
|
-
}
|
|
52
|
-
scope.issues.push({
|
|
53
|
-
path: pointer,
|
|
54
|
-
message: `${descriptor.type} needs a controller class, which a mockup cannot build: draw it with a sketch`,
|
|
55
|
-
});
|
|
56
|
-
return compileChildren(withOptions(node, pointer, scope), pointer, layoutPath, scope);
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
const blockKind = {
|
|
61
|
-
resolve(node, scope) {
|
|
62
|
-
const descriptor = (0, block_catalog_1.descriptorOf)(node, scope.catalog);
|
|
63
|
-
if (!descriptor)
|
|
64
|
-
return undefined;
|
|
65
|
-
return (pointer, layoutPath) => {
|
|
66
|
-
const compiled = withOptions(node, pointer, scope);
|
|
67
|
-
(0, validate_1.validateBlockOptions)(descriptor, node, compiled.options, `${pointer}/options`, scope);
|
|
68
|
-
(0, validate_1.validateBlockChildren)(descriptor, node, pointer, scope.issues, (child) => (0, block_catalog_1.descriptorOf)(child, scope.catalog)?.type ?? child.type);
|
|
69
|
-
const options = (0, form_fields_1.withFieldInputs)(descriptor, compiled.options, `${pointer}/options`, scope.issues);
|
|
70
|
-
return compileChildren({ ...compiled, options: (0, validate_1.componentOptionsOf)(descriptor, options) }, pointer, layoutPath, scope);
|
|
71
|
-
};
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
function unknownIssue(node, pointer) {
|
|
75
|
-
if (node.type !== undefined) {
|
|
76
|
-
return {
|
|
77
|
-
path: `${pointer}/type`,
|
|
78
|
-
message: `no block type is registered as "${node.type}"`,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
if (node.componentName !== undefined) {
|
|
82
|
-
return {
|
|
83
|
-
path: `${pointer}/componentName`,
|
|
84
|
-
message: `no registered block emits the component "${node.componentName}"`,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return { path: pointer, message: "a node needs a type or a componentName" };
|
|
88
|
-
}
|
|
89
|
-
const unknownKind = {
|
|
90
|
-
resolve: (node, scope) => (pointer, layoutPath) => {
|
|
91
|
-
scope.issues.push(unknownIssue(node, pointer));
|
|
92
|
-
return compileChildren(withOptions(node, pointer, scope), pointer, layoutPath, scope);
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
const NODE_KINDS = [
|
|
96
|
-
sketchKind,
|
|
97
|
-
controllerKind,
|
|
98
|
-
blockKind,
|
|
99
|
-
unknownKind,
|
|
100
|
-
];
|
|
101
|
-
function drawnOn(node, scope) {
|
|
102
|
-
if (scope.routes || !node.options)
|
|
103
|
-
return node;
|
|
104
|
-
return { ...node, options: (0, sample_routes_1.confineToFixtures)(node.options, scope) };
|
|
105
|
-
}
|
|
106
|
-
function compileNode(node, pointer, layoutPath, scope) {
|
|
107
|
-
scope.paths[layoutPath] = pointer;
|
|
108
|
-
const descriptor = (0, block_catalog_1.descriptorOf)(node, scope.catalog);
|
|
109
|
-
if (descriptor)
|
|
110
|
-
(0, fixture_answers_1.checkFixtureAnswer)(descriptor, node, pointer, scope);
|
|
111
|
-
for (const kind of NODE_KINDS) {
|
|
112
|
-
const compile = kind.resolve(node, scope);
|
|
113
|
-
if (compile)
|
|
114
|
-
return drawnOn(compile(pointer, layoutPath), scope);
|
|
115
|
-
}
|
|
116
|
-
return node;
|
|
117
|
-
}
|
|
118
|
-
exports.ROOT_LAYOUT_PREFIX = "block-";
|
|
119
|
-
//# sourceMappingURL=compile-nodes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile-nodes.js","sourceRoot":"","sources":["../../src/mockup/compile-nodes.ts"],"names":[],"mappings":";;;;AAAA,mDAA6D;AAC7D,2DAAwD;AAExD,yCAA2C;AAC3C,uDAA4E;AAC5E,+CAAgD;AAEhD,6CAA2C;AAC3C,mDAAoD;AACpD,qCAAsD;AACtD,yCAIoB;AAmBpB,SAAS,eAAe,CACtB,IAAgB,EAChB,OAAe,EACf,UAAkB,EAClB,KAAgB;IAEhB,IAAI,CAAC,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAClD,MAAM,YAAY,GAAG,GAAG,OAAO,aAAa,KAAK,EAAE,CAAC;QACpD,MAAM,SAAS,GAAG,GAAG,UAAU,IAAI,KAAK,CAAC,EAAE,IAAI,KAAK,EAAE,CAAC;QACvD,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;YAC1C,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;gBAChB,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,KAAK;gBAClE,OAAO,EAAE,mDAAmD,KAAK,CAAC,EAAE,IAAI,KAAK,GAAG;aACjF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,WAAW,CAAC,KAAK,EAAE,YAA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,EAClB,KAAgB;IAEhB,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC;IAClC,MAAM,UAAU,GAAG,IAAA,4BAAY,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACrD,IAAI,UAAU;QAAE,IAAA,oCAAkB,EAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACrE,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,OAAO;YAAE,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAGY,QAAA,kBAAkB,GAAG,QAAQ,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type CustomLayouts } from "./compile-layouts";
|
|
2
|
-
import { type PageScope } from "./compile-nodes";
|
|
3
|
-
import type { JsonObject, MockupName, MockupPageState, MockupSpecPage } from "./model";
|
|
4
|
-
import { type LinkedPage } from "./page-links";
|
|
5
|
-
import { type PlacedEntry } from "./places";
|
|
6
|
-
export type SpecPage = MockupSpecPage & {
|
|
7
|
-
pointer: string;
|
|
8
|
-
};
|
|
9
|
-
export type PageGraph = ReadonlyMap<string, LinkedPage>;
|
|
10
|
-
export declare function pageGraph(pages: readonly MockupSpecPage[]): PageGraph;
|
|
11
|
-
export interface SpecScope extends Pick<PageScope, "catalog" | "issues" | "warnings" | "answers"> {
|
|
12
|
-
name: MockupName;
|
|
13
|
-
layouts: CustomLayouts;
|
|
14
|
-
graph: PageGraph;
|
|
15
|
-
fixtures: ReadonlyMap<string, JsonObject>;
|
|
16
|
-
generated: MockupPageState[];
|
|
17
|
-
}
|
|
18
|
-
export declare function compileEntry(entry: PlacedEntry<SpecPage>, spec: SpecScope): MockupPageState;
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pageGraph = pageGraph;
|
|
4
|
-
exports.compileEntry = compileEntry;
|
|
5
|
-
const compile_layouts_1 = require("./compile-layouts");
|
|
6
|
-
const compile_nodes_1 = require("./compile-nodes");
|
|
7
|
-
const extensions_1 = require("./extensions");
|
|
8
|
-
const model_1 = require("./model");
|
|
9
|
-
const page_links_1 = require("./page-links");
|
|
10
|
-
const places_1 = require("./places");
|
|
11
|
-
const sketch_1 = require("./sketch");
|
|
12
|
-
function compileCustomPage(page, pointer, scope) {
|
|
13
|
-
const fields = {};
|
|
14
|
-
for (const field of model_1.CUSTOM_PAGE_FIELDS) {
|
|
15
|
-
const value = page[field];
|
|
16
|
-
if (value !== undefined)
|
|
17
|
-
fields[field] = value;
|
|
18
|
-
}
|
|
19
|
-
return [(0, sketch_1.compileSketchPage)(fields, pointer, scope.issues, (0, page_links_1.sketchLinks)(scope))];
|
|
20
|
-
}
|
|
21
|
-
function pageGraph(pages) {
|
|
22
|
-
return new Map(pages.map((page) => [
|
|
23
|
-
page.id,
|
|
24
|
-
{
|
|
25
|
-
...(page.parent !== undefined && { parent: page.parent }),
|
|
26
|
-
...(page.route !== undefined && { param: page.route.slice(1) }),
|
|
27
|
-
},
|
|
28
|
-
]));
|
|
29
|
-
}
|
|
30
|
-
function ancestorsOf(id, graph) {
|
|
31
|
-
const found = [];
|
|
32
|
-
for (let at = graph.get(id)?.parent; at !== undefined;) {
|
|
33
|
-
if (at === id || found.includes(at) || !graph.has(at))
|
|
34
|
-
break;
|
|
35
|
-
found.push(at);
|
|
36
|
-
at = graph.get(at)?.parent;
|
|
37
|
-
}
|
|
38
|
-
return found;
|
|
39
|
-
}
|
|
40
|
-
function scopeOf(page, spec, { issues, warnings }) {
|
|
41
|
-
const ancestors = ancestorsOf(page.id, spec.graph).map((id) => ({ id, fixtures: spec.fixtures.get(id) ?? {} }));
|
|
42
|
-
const param = spec.graph.get(page.id)?.param;
|
|
43
|
-
return {
|
|
44
|
-
catalog: spec.catalog,
|
|
45
|
-
issues,
|
|
46
|
-
warnings,
|
|
47
|
-
name: spec.name,
|
|
48
|
-
pageId: page.id,
|
|
49
|
-
fixtures: spec.fixtures.get(page.id) ?? {},
|
|
50
|
-
pages: spec.graph,
|
|
51
|
-
links: new Set(),
|
|
52
|
-
generatedPages: [],
|
|
53
|
-
ancestors,
|
|
54
|
-
answers: spec.answers,
|
|
55
|
-
...(param !== undefined && { route: { param } }),
|
|
56
|
-
...(page.livePage && { livePage: true }),
|
|
57
|
-
paths: {},
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function compileTree(page, pointer, scope, firstRoot) {
|
|
61
|
-
return page.tree.map((node, index) => (0, compile_nodes_1.compileNode)(node, `${pointer}/tree/${index}`, `${compile_nodes_1.ROOT_LAYOUT_PREFIX}${firstRoot + index}`, scope));
|
|
62
|
-
}
|
|
63
|
-
function compileBody(page, host, spec, firstRoot) {
|
|
64
|
-
const scope = scopeOf(page, spec, spec);
|
|
65
|
-
const isCustom = page.custom === true;
|
|
66
|
-
const tree = isCustom
|
|
67
|
-
? compileCustomPage(page, page.pointer, scope)
|
|
68
|
-
: compileTree(page, page.pointer, scope, firstRoot);
|
|
69
|
-
spec.generated.push(...scope.generatedPages.map((generated) => ({
|
|
70
|
-
id: generated.id,
|
|
71
|
-
title: generated.title,
|
|
72
|
-
description: generated.description,
|
|
73
|
-
place: host.place,
|
|
74
|
-
options: host.options,
|
|
75
|
-
links: [],
|
|
76
|
-
tree: generated.tree,
|
|
77
|
-
paths: {},
|
|
78
|
-
menu: false,
|
|
79
|
-
generated: true,
|
|
80
|
-
parent: host.id,
|
|
81
|
-
...(generated.route && { route: generated.route }),
|
|
82
|
-
...(host.place.kind === "settings" && { layout: compile_layouts_1.SETTINGS_LAYOUT_STATE }),
|
|
83
|
-
})));
|
|
84
|
-
const body = {
|
|
85
|
-
tree,
|
|
86
|
-
links: scope.links,
|
|
87
|
-
paths: scope.paths,
|
|
88
|
-
roots: tree.length,
|
|
89
|
-
...(scope.route && { route: scope.route }),
|
|
90
|
-
};
|
|
91
|
-
if (page.headerActions && page.id === host.id) {
|
|
92
|
-
body.headerActions = (0, page_links_1.headerActionLinks)(page.headerActions, `${page.pointer}/headerActions`, scope);
|
|
93
|
-
}
|
|
94
|
-
if (page.liveRoutes && !isCustom) {
|
|
95
|
-
body.realTree = compileTree(page, page.pointer, {
|
|
96
|
-
...scopeOf(page, spec, { issues: [], warnings: [] }),
|
|
97
|
-
routes: page.liveRoutes,
|
|
98
|
-
}, firstRoot);
|
|
99
|
-
}
|
|
100
|
-
return body;
|
|
101
|
-
}
|
|
102
|
-
function pageState(lead, place, body, spec) {
|
|
103
|
-
const state = {
|
|
104
|
-
id: lead.id,
|
|
105
|
-
title: lead.title,
|
|
106
|
-
place,
|
|
107
|
-
options: lead.options ?? {},
|
|
108
|
-
links: [...spec.graph.keys()].filter((id) => body.links.has(id)),
|
|
109
|
-
tree: body.tree,
|
|
110
|
-
paths: body.paths,
|
|
111
|
-
};
|
|
112
|
-
if (body.realTree)
|
|
113
|
-
state.realTree = body.realTree;
|
|
114
|
-
if (body.route)
|
|
115
|
-
state.route = body.route;
|
|
116
|
-
if (lead.menu === false)
|
|
117
|
-
state.menu = false;
|
|
118
|
-
if (lead.parent !== undefined)
|
|
119
|
-
state.parent = lead.parent;
|
|
120
|
-
if (lead.icon !== undefined)
|
|
121
|
-
state.icon = lead.icon;
|
|
122
|
-
if (lead.description !== undefined)
|
|
123
|
-
state.description = lead.description;
|
|
124
|
-
if (body.headerActions)
|
|
125
|
-
state.headerActions = body.headerActions;
|
|
126
|
-
const layout = (0, compile_layouts_1.layoutStateOf)(lead.layout, place.kind === "settings", spec.layouts);
|
|
127
|
-
if (layout)
|
|
128
|
-
state.layout = layout;
|
|
129
|
-
return state;
|
|
130
|
-
}
|
|
131
|
-
function compilePage(page, place, spec) {
|
|
132
|
-
const host = { id: page.id, options: page.options ?? {}, place };
|
|
133
|
-
const state = pageState(page, place, compileBody(page, host, spec, 0), spec);
|
|
134
|
-
if (page.custom === true)
|
|
135
|
-
state.custom = true;
|
|
136
|
-
if (place.kind === "app" && page.category !== undefined) {
|
|
137
|
-
state.category = page.category;
|
|
138
|
-
}
|
|
139
|
-
if (page.livePage)
|
|
140
|
-
state.livePage = { ref: page.livePage.ref };
|
|
141
|
-
return state;
|
|
142
|
-
}
|
|
143
|
-
function compileExtension(entry, spec) {
|
|
144
|
-
const place = {
|
|
145
|
-
kind: "extension",
|
|
146
|
-
target: entry.target,
|
|
147
|
-
menu: entry.menu,
|
|
148
|
-
};
|
|
149
|
-
const lead = (0, places_1.leadOf)(entry);
|
|
150
|
-
const host = { id: lead.id, options: lead.options ?? {}, place };
|
|
151
|
-
const { pages, own } = (0, extensions_1.extensionLayout)((0, extensions_1.extensionOrder)(entry.pages));
|
|
152
|
-
let firstRoot = 0;
|
|
153
|
-
const bodies = pages.map((page, index) => {
|
|
154
|
-
if (index === own)
|
|
155
|
-
firstRoot += 1;
|
|
156
|
-
const body = compileBody(page, host, spec, firstRoot);
|
|
157
|
-
firstRoot += body.roots;
|
|
158
|
-
return body;
|
|
159
|
-
});
|
|
160
|
-
const around = (nodes) => {
|
|
161
|
-
const drawn = bodies.flatMap(nodes);
|
|
162
|
-
const at = bodies.slice(0, own).reduce((sum, body) => sum + body.roots, 0);
|
|
163
|
-
return [
|
|
164
|
-
...drawn.slice(0, at),
|
|
165
|
-
(0, extensions_1.targetPlaceholder)(entry.target),
|
|
166
|
-
...drawn.slice(at),
|
|
167
|
-
];
|
|
168
|
-
};
|
|
169
|
-
const merged = {
|
|
170
|
-
tree: around((body) => body.tree),
|
|
171
|
-
links: new Set(bodies.flatMap((body) => [...body.links])),
|
|
172
|
-
paths: Object.fromEntries(bodies.flatMap((body) => Object.entries(body.paths))),
|
|
173
|
-
roots: bodies.reduce((sum, body) => sum + body.roots, 1),
|
|
174
|
-
};
|
|
175
|
-
if (bodies.some((body) => body.realTree)) {
|
|
176
|
-
merged.realTree = around((body) => body.realTree ?? body.tree);
|
|
177
|
-
}
|
|
178
|
-
const state = pageState(lead, place, merged, spec);
|
|
179
|
-
if (entry.menu === "app" && lead.category !== undefined) {
|
|
180
|
-
state.category = lead.category;
|
|
181
|
-
}
|
|
182
|
-
return state;
|
|
183
|
-
}
|
|
184
|
-
function compileEntry(entry, spec) {
|
|
185
|
-
return entry.kind === "page"
|
|
186
|
-
? compilePage(entry.page, entry.place, spec)
|
|
187
|
-
: compileExtension(entry, spec);
|
|
188
|
-
}
|
|
189
|
-
//# sourceMappingURL=compile-pages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile-pages.js","sourceRoot":"","sources":["../../src/mockup/compile-pages.ts"],"names":[],"mappings":";;;;AAAA,uDAI2B;AAC3B,mDAIyB;AACzB,6CAIsB;AAYtB,mCAA6C;AAC7C,6CAA+E;AAC/E,qCAA0E;AAC1E,qCAA6C;AAM7C,SAAS,iBAAiB,CACxB,IAAoB,EACpB,OAAe,EACf,KAAgB;IAEhB,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,0BAAkB,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,KAAK,KAAK,SAAS;YAAE,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACjD,CAAC;IACD,OAAO,CAAC,IAAA,0BAAiB,EAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,IAAA,wBAAW,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC;AAMD,mBAA0B,KAAgC;IACxD,OAAO,IAAI,GAAG,CACZ,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAClB,IAAI,CAAC,EAAE;Q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IAAI,KAAK,MAAM;QAC1B,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC;QAC5C,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/mockup/create.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { MockupNamed } from "./manage";
|
|
2
|
-
export declare const MOCKUP_TEMPLATES: readonly ["blank", "example"];
|
|
3
|
-
export type MockupTemplate = (typeof MOCKUP_TEMPLATES)[number];
|
|
4
|
-
export interface MockupCreation {
|
|
5
|
-
title: string;
|
|
6
|
-
template: MockupTemplate;
|
|
7
|
-
}
|
|
8
|
-
export type CreateRefusal = {
|
|
9
|
-
kind: "no_free_name";
|
|
10
|
-
} | {
|
|
11
|
-
kind: "no_template";
|
|
12
|
-
};
|
|
13
|
-
export type CreateResult = ({
|
|
14
|
-
kind: "done";
|
|
15
|
-
} & MockupNamed) | CreateRefusal;
|
|
16
|
-
export declare function createMockup(mockupsDir: string, request: MockupCreation): Promise<CreateResult>;
|
package/dist/mockup/create.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MOCKUP_TEMPLATES = void 0;
|
|
4
|
-
exports.createMockup = createMockup;
|
|
5
|
-
const node_crypto_1 = require("node:crypto");
|
|
6
|
-
const promises_1 = require("node:fs/promises");
|
|
7
|
-
const node_path_1 = require("node:path");
|
|
8
|
-
const example_1 = require("./example");
|
|
9
|
-
const files_1 = require("./files");
|
|
10
|
-
const model_1 = require("./model");
|
|
11
|
-
const JSON_INDENT = 2;
|
|
12
|
-
const MAX_CREATE_ATTEMPTS = 100;
|
|
13
|
-
const MAX_STEM_LENGTH = 48;
|
|
14
|
-
const FALLBACK_STEM = "mockup";
|
|
15
|
-
const TEMPORARY_SUFFIX = ".tmp";
|
|
16
|
-
const EXISTING_DIRECTORY = "EEXIST";
|
|
17
|
-
exports.MOCKUP_TEMPLATES = ["blank", "example"];
|
|
18
|
-
const TEMPLATES = {
|
|
19
|
-
blank: (title) => Promise.resolve({
|
|
20
|
-
version: 1,
|
|
21
|
-
title,
|
|
22
|
-
pages: [{ id: "home", title: "Home", tree: [] }],
|
|
23
|
-
}),
|
|
24
|
-
example: async (title) => {
|
|
25
|
-
const example = await (0, example_1.readExampleSpec)();
|
|
26
|
-
return example && { ...example, title };
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
function withoutAccents(text) {
|
|
30
|
-
return text.normalize("NFD").replace(/\p{Diacritic}/gu, "");
|
|
31
|
-
}
|
|
32
|
-
function* candidateNames(title) {
|
|
33
|
-
const stem = (0, model_1.slugOfText)(withoutAccents(title).toLowerCase(), MAX_STEM_LENGTH) ||
|
|
34
|
-
FALLBACK_STEM;
|
|
35
|
-
for (let attempt = 1; attempt <= MAX_CREATE_ATTEMPTS; attempt++) {
|
|
36
|
-
const name = (0, model_1.parseMockupName)(attempt === 1 ? stem : `${stem}-${attempt}`);
|
|
37
|
-
if (name)
|
|
38
|
-
yield name;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
async function createMockup(mockupsDir, request) {
|
|
42
|
-
const spec = await TEMPLATES[request.template](request.title);
|
|
43
|
-
if (!spec)
|
|
44
|
-
return { kind: "no_template" };
|
|
45
|
-
await (0, promises_1.mkdir)(mockupsDir, { recursive: true });
|
|
46
|
-
const staging = (0, node_path_1.join)(mockupsDir, `.create-${(0, node_crypto_1.randomBytes)(6).toString("hex")}${TEMPORARY_SUFFIX}`);
|
|
47
|
-
const staged = (0, node_path_1.join)(staging, files_1.SPEC_FILE);
|
|
48
|
-
try {
|
|
49
|
-
await (0, promises_1.mkdir)(staging);
|
|
50
|
-
await (0, promises_1.writeFile)(staged, `${JSON.stringify(spec, null, JSON_INDENT)}\n`, "utf8");
|
|
51
|
-
for (const name of candidateNames(request.title)) {
|
|
52
|
-
const directory = (0, files_1.mockupDirectory)(mockupsDir, name);
|
|
53
|
-
try {
|
|
54
|
-
await (0, promises_1.mkdir)(directory);
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
if ((0, files_1.parseFsError)(error).code === EXISTING_DIRECTORY)
|
|
58
|
-
continue;
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
try {
|
|
62
|
-
await (0, promises_1.link)(staged, (0, node_path_1.join)(directory, files_1.SPEC_FILE));
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
if ((0, files_1.parseFsError)(error).code === EXISTING_DIRECTORY)
|
|
66
|
-
continue;
|
|
67
|
-
await (0, promises_1.rmdir)(directory).catch(() => undefined);
|
|
68
|
-
throw error;
|
|
69
|
-
}
|
|
70
|
-
return { kind: "done", name };
|
|
71
|
-
}
|
|
72
|
-
return { kind: "no_free_name" };
|
|
73
|
-
}
|
|
74
|
-
finally {
|
|
75
|
-
await (0, promises_1.rm)(staging, { recursive: true, force: true });
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/mockup/create.ts"],"names":[],"mappings":";;;;AAAA,6CAA0C;AAC1C,+CAAqE;AACrE,yCAAiC;AACjC,uCAA4C;AAC5C,mCAAmE;AAEnE,mCAKiB;AAEjB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAGvB,QAAA,gBAAgB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAoB9D,MAAM,SAAS,GAGX;IACF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AAS,CAAC,CAAC;gBAC9C,MAAM,KAAK,CAAC;YACd,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAClC,CAAC;YAAS,CAAC;QACT,MAAM,IAAA,aAAE,EAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;AACH,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { MockupName } from "./model";
|
|
2
|
-
export interface MockupCreated {
|
|
3
|
-
name: MockupName;
|
|
4
|
-
title?: string;
|
|
5
|
-
}
|
|
6
|
-
export type MockupCreatedListener = (created: MockupCreated) => void;
|
|
7
|
-
export declare class CreatedWatcher {
|
|
8
|
-
private readonly mockupsDir;
|
|
9
|
-
private readonly readSpec;
|
|
10
|
-
private watch;
|
|
11
|
-
constructor(mockupsDir: string, readSpec: (name: MockupName) => Promise<string | undefined>);
|
|
12
|
-
subscribe(listener: MockupCreatedListener): Promise<() => void>;
|
|
13
|
-
close(): void;
|
|
14
|
-
private start;
|
|
15
|
-
private stop;
|
|
16
|
-
private specNames;
|
|
17
|
-
private scan;
|
|
18
|
-
}
|