@antelopejs/dms 0.21.3-next.1001.ge3bf721 → 0.21.3-next.1003.g014f36d
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/data/mockup-example/spec.json +11 -36
- package/data/mockup-spec.schema.json +917 -23
- package/dist/builder.js +0 -2
- package/dist/builder.js.map +1 -1
- package/dist/implementations/dms-builder/engine/access-grant.js +6 -6
- package/dist/implementations/dms-builder/engine/access-grant.js.map +1 -1
- package/dist/implementations/dms-builder/engine/analysis-job.js +2 -1
- package/dist/implementations/dms-builder/engine/analysis-job.js.map +1 -1
- package/dist/implementations/dms-builder/engine/category-section.d.ts +23 -0
- package/dist/implementations/dms-builder/engine/category-section.js +84 -0
- package/dist/implementations/dms-builder/engine/category-section.js.map +1 -0
- package/dist/implementations/dms-builder/engine/cell-displays.d.ts +17 -0
- package/dist/implementations/dms-builder/engine/cell-displays.js +194 -0
- package/dist/implementations/dms-builder/engine/cell-displays.js.map +1 -0
- package/dist/implementations/dms-builder/engine/column-display.js +2 -2
- package/dist/implementations/dms-builder/engine/column-display.js.map +1 -1
- package/dist/implementations/dms-builder/engine/column-groups-write.d.ts +2 -0
- package/dist/implementations/dms-builder/engine/column-groups-write.js +79 -0
- package/dist/implementations/dms-builder/engine/column-groups-write.js.map +1 -0
- package/dist/implementations/dms-builder/engine/column-groups.d.ts +27 -0
- package/dist/implementations/dms-builder/engine/column-groups.js +36 -0
- package/dist/implementations/dms-builder/engine/column-groups.js.map +1 -0
- package/dist/implementations/dms-builder/engine/column-presentation.d.ts +13 -0
- package/dist/implementations/dms-builder/engine/column-presentation.js +121 -0
- package/dist/implementations/dms-builder/engine/column-presentation.js.map +1 -0
- package/dist/implementations/dms-builder/engine/compose-page.js +4 -4
- package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -1
- package/dist/implementations/dms-builder/engine/connection-access-switch.d.ts +11 -0
- package/dist/implementations/dms-builder/engine/connection-access-switch.js +61 -0
- package/dist/implementations/dms-builder/engine/connection-access-switch.js.map +1 -0
- package/dist/implementations/dms-builder/engine/connection-access.js +1 -1
- package/dist/implementations/dms-builder/engine/connection-access.js.map +1 -1
- package/dist/implementations/dms-builder/engine/connection-targets.js +3 -3
- package/dist/implementations/dms-builder/engine/connection-targets.js.map +1 -1
- package/dist/implementations/dms-builder/engine/database-connection.d.ts +2 -0
- package/dist/implementations/dms-builder/engine/database-connection.js +24 -0
- package/dist/implementations/dms-builder/engine/database-connection.js.map +1 -1
- package/dist/implementations/dms-builder/engine/display-defaults.d.ts +2 -1
- package/dist/implementations/dms-builder/engine/display-defaults.js +2 -1
- package/dist/implementations/dms-builder/engine/display-defaults.js.map +1 -1
- package/dist/implementations/dms-builder/engine/dms-database.js +2 -2
- package/dist/implementations/dms-builder/engine/dms-database.js.map +1 -1
- package/dist/implementations/dms-builder/engine/emit.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/emit.js +9 -0
- package/dist/implementations/dms-builder/engine/emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/index.d.ts +2 -0
- package/dist/implementations/dms-builder/engine/index.js +2 -0
- package/dist/implementations/dms-builder/engine/index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-batch.js +22 -1
- package/dist/implementations/dms-builder/engine/map-resources-batch.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-pages.js +91 -41
- package/dist/implementations/dms-builder/engine/map-resources-pages.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-plan.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/map-resources-plan.js +7 -2
- package/dist/implementations/dms-builder/engine/map-resources-plan.js.map +1 -1
- package/dist/implementations/dms-builder/engine/map-resources-presentation.d.ts +10 -0
- package/dist/implementations/dms-builder/engine/map-resources-presentation.js +33 -0
- package/dist/implementations/dms-builder/engine/map-resources-presentation.js.map +1 -0
- package/dist/implementations/dms-builder/engine/map-resources.js +2 -1
- package/dist/implementations/dms-builder/engine/map-resources.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-choices.js +3 -3
- package/dist/implementations/dms-builder/engine/mapped-choices.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.d.ts +2 -1
- package/dist/implementations/dms-builder/engine/mapped-displays.js +6 -3
- package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -1
- package/dist/implementations/dms-builder/engine/mapped-modules.js +5 -5
- package/dist/implementations/dms-builder/engine/mapped-modules.js.map +1 -1
- package/dist/implementations/dms-builder/engine/ops-categories.d.ts +3 -1
- package/dist/implementations/dms-builder/engine/ops-categories.js +45 -40
- package/dist/implementations/dms-builder/engine/ops-categories.js.map +1 -1
- package/dist/implementations/dms-builder/engine/page-draft-validation.js +3 -3
- package/dist/implementations/dms-builder/engine/page-draft-validation.js.map +1 -1
- package/dist/implementations/dms-builder/engine/page-draft.js +2 -1
- package/dist/implementations/dms-builder/engine/page-draft.js.map +1 -1
- package/dist/implementations/dms-builder/engine/page-structure.js +1 -0
- package/dist/implementations/dms-builder/engine/page-structure.js.map +1 -1
- package/dist/implementations/dms-builder/engine/plain-object.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/plain-object.js +7 -0
- package/dist/implementations/dms-builder/engine/plain-object.js.map +1 -0
- package/dist/implementations/dms-builder/engine/planned-page.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/planned-page.js +1 -0
- package/dist/implementations/dms-builder/engine/planned-page.js.map +1 -1
- package/dist/implementations/dms-builder/engine/preview.js +3 -3
- package/dist/implementations/dms-builder/engine/preview.js.map +1 -1
- package/dist/implementations/dms-builder/engine/project-config-entry.js +2 -2
- package/dist/implementations/dms-builder/engine/project-config-entry.js.map +1 -1
- package/dist/implementations/dms-builder/engine/project-config-text.js +2 -2
- package/dist/implementations/dms-builder/engine/project-config-text.js.map +1 -1
- package/dist/implementations/dms-builder/engine/project-config.js +2 -2
- package/dist/implementations/dms-builder/engine/project-config.js.map +1 -1
- package/dist/implementations/dms-builder/engine/project-scaffold.js +3 -3
- package/dist/implementations/dms-builder/engine/project-scaffold.js.map +1 -1
- package/dist/implementations/dms-builder/engine/project.js +3 -3
- package/dist/implementations/dms-builder/engine/project.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-plan.js +2 -2
- package/dist/implementations/dms-builder/engine/query-plan.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-preview.js +2 -2
- package/dist/implementations/dms-builder/engine/query-preview.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-structure.js +2 -2
- package/dist/implementations/dms-builder/engine/query-structure.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-sync.js +2 -2
- package/dist/implementations/dms-builder/engine/query-sync.js.map +1 -1
- package/dist/implementations/dms-builder/engine/query-template.js +6 -6
- package/dist/implementations/dms-builder/engine/query-template.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-emit-types.js +5 -0
- package/dist/implementations/dms-builder/engine/resource-emit-types.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-emit.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/resource-emit.js +1 -0
- package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-guards.d.ts +4 -0
- package/dist/implementations/dms-builder/engine/resource-guards.js +38 -0
- package/dist/implementations/dms-builder/engine/resource-guards.js.map +1 -0
- package/dist/implementations/dms-builder/engine/resource-ops-delete.d.ts +2 -2
- package/dist/implementations/dms-builder/engine/resource-ops-delete.js +18 -38
- package/dist/implementations/dms-builder/engine/resource-ops-delete.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-ops.js +5 -0
- package/dist/implementations/dms-builder/engine/resource-ops.js.map +1 -1
- package/dist/implementations/dms-builder/engine/resource-structure.js +22 -3
- package/dist/implementations/dms-builder/engine/resource-structure.js.map +1 -1
- package/dist/implementations/dms-builder/engine/row-writes.d.ts +2 -1
- package/dist/implementations/dms-builder/engine/row-writes.js +2 -1
- package/dist/implementations/dms-builder/engine/row-writes.js.map +1 -1
- package/dist/implementations/dms-builder/engine/scan.d.ts +2 -0
- package/dist/implementations/dms-builder/engine/scan.js +17 -3
- package/dist/implementations/dms-builder/engine/scan.js.map +1 -1
- package/dist/implementations/dms-builder/engine/source-index.d.ts +1 -0
- package/dist/implementations/dms-builder/engine/source-index.js +16 -0
- package/dist/implementations/dms-builder/engine/source-index.js.map +1 -1
- package/dist/implementations/dms-builder/engine/table-readers.js +2 -2
- package/dist/implementations/dms-builder/engine/table-readers.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme-declaration.d.ts +13 -0
- package/dist/implementations/dms-builder/engine/theme-declaration.js +72 -0
- package/dist/implementations/dms-builder/engine/theme-declaration.js.map +1 -0
- package/dist/implementations/dms-builder/engine/theme-registration.d.ts +18 -0
- package/dist/implementations/dms-builder/engine/theme-registration.js +210 -0
- package/dist/implementations/dms-builder/engine/theme-registration.js.map +1 -0
- package/dist/implementations/dms-builder/engine/theme-scaffold.js +41 -147
- package/dist/implementations/dms-builder/engine/theme-scaffold.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme-stylesheet.js +18 -1
- package/dist/implementations/dms-builder/engine/theme-stylesheet.js.map +1 -1
- package/dist/implementations/dms-builder/engine/theme.js +2 -0
- package/dist/implementations/dms-builder/engine/theme.js.map +1 -1
- package/dist/implementations/dms-builder/engine/value.d.ts +0 -1
- package/dist/implementations/dms-builder/engine/value.js +0 -4
- package/dist/implementations/dms-builder/engine/value.js.map +1 -1
- package/dist/implementations/dms-builder/index.d.ts +7 -3
- package/dist/implementations/dms-builder/index.js +6 -0
- package/dist/implementations/dms-builder/index.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/access.d.ts +3 -0
- package/dist/mcp/access.js +16 -0
- package/dist/mcp/access.js.map +1 -1
- package/dist/mcp/analysis-summary.d.ts +51 -0
- package/dist/mcp/analysis-summary.js +99 -0
- package/dist/mcp/analysis-summary.js.map +1 -0
- package/dist/mcp/bridge.d.ts +1 -0
- package/dist/mcp/bridge.js +15 -3
- package/dist/mcp/bridge.js.map +1 -1
- package/dist/mcp/index.js +2 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/protocol.js +15 -9
- package/dist/mcp/protocol.js.map +1 -1
- package/dist/mcp/redact.d.ts +2 -1
- package/dist/mcp/redact.js.map +1 -1
- package/dist/mcp/route.d.ts +1 -1
- package/dist/mcp/route.js +8 -3
- package/dist/mcp/route.js.map +1 -1
- package/dist/mcp/tool.d.ts +2 -0
- package/dist/mcp/tool.js +1 -0
- package/dist/mcp/tool.js.map +1 -1
- package/dist/mcp/tools/builder-analysis.d.ts +2 -0
- package/dist/mcp/tools/builder-analysis.js +124 -0
- package/dist/mcp/tools/builder-analysis.js.map +1 -0
- package/dist/mcp/tools/builder-connection-access.d.ts +7 -0
- package/dist/mcp/tools/builder-connection-access.js +58 -0
- package/dist/mcp/tools/builder-connection-access.js.map +1 -0
- package/dist/mcp/tools/builder-map-resources.d.ts +1 -0
- package/dist/mcp/tools/builder-map-resources.js +179 -0
- package/dist/mcp/tools/builder-map-resources.js.map +1 -0
- package/dist/mcp/tools/builder-pages.js +28 -7
- package/dist/mcp/tools/builder-pages.js.map +1 -1
- package/dist/mcp/tools/builder-project.js +37 -231
- package/dist/mcp/tools/builder-project.js.map +1 -1
- package/dist/mcp/tools/builder-resources.d.ts +18 -0
- package/dist/mcp/tools/builder-resources.js +73 -4
- package/dist/mcp/tools/builder-resources.js.map +1 -1
- package/dist/mcp/tools/builder-theme.js +4 -4
- package/dist/mcp/tools/builder-theme.js.map +1 -1
- package/dist/mcp/tools/database.js +1 -1
- package/dist/mcp/tools/database.js.map +1 -1
- package/dist/mcp/tools/json-patch.d.ts +10 -0
- package/dist/mcp/tools/json-patch.js +35 -0
- package/dist/mcp/tools/json-patch.js.map +1 -1
- package/dist/mcp/tools/mockup-annotations.js +3 -2
- package/dist/mcp/tools/mockup-annotations.js.map +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js +1 -1
- package/dist/mcp/tools/mockup-apply-to-page.js.map +1 -1
- package/dist/mcp/tools/mockup-from-page.js +7 -4
- package/dist/mcp/tools/mockup-from-page.js.map +1 -1
- package/dist/mcp/tools/mockup-patch-spec.js +10 -3
- package/dist/mcp/tools/mockup-patch-spec.js.map +1 -1
- package/dist/mcp/tools/mockup-read-spec.d.ts +1 -0
- package/dist/mcp/tools/mockup-read-spec.js +45 -0
- package/dist/mcp/tools/mockup-read-spec.js.map +1 -0
- package/dist/mcp/tools/mockup-resolve-annotation.js +8 -9
- package/dist/mcp/tools/mockup-resolve-annotation.js.map +1 -1
- package/dist/mcp/tools/mockup-support.d.ts +4 -2
- package/dist/mcp/tools/mockup-support.js +18 -11
- package/dist/mcp/tools/mockup-support.js.map +1 -1
- package/dist/mcp/tools/mockup-write-spec.js +8 -3
- package/dist/mcp/tools/mockup-write-spec.js.map +1 -1
- package/dist/mcp/tools/mockup.js +2 -0
- package/dist/mcp/tools/mockup.js.map +1 -1
- package/dist/mcp/tools/preview-blocks.js +3 -6
- package/dist/mcp/tools/preview-blocks.js.map +1 -1
- package/dist/mcp/tools/theme-schemas.d.ts +201 -0
- package/dist/{branding → mcp/tools}/theme-schemas.js +1 -5
- package/dist/mcp/tools/theme-schemas.js.map +1 -0
- package/dist/mockup/anchor.d.ts +33 -0
- package/dist/mockup/anchor.js +19 -4
- package/dist/mockup/anchor.js.map +1 -1
- package/dist/mockup/annotations-file.d.ts +105 -0
- package/dist/mockup/annotations-file.js +96 -0
- package/dist/mockup/annotations-file.js.map +1 -0
- package/dist/mockup/annotations.d.ts +133 -55
- package/dist/mockup/annotations.js +169 -97
- package/dist/mockup/annotations.js.map +1 -1
- package/dist/mockup/apply-notes.d.ts +1 -1
- package/dist/mockup/apply-notes.js +1 -0
- package/dist/mockup/apply-notes.js.map +1 -1
- package/dist/mockup/apply-plan.d.ts +2 -0
- package/dist/mockup/apply-plan.js +25 -3
- package/dist/mockup/apply-plan.js.map +1 -1
- package/dist/mockup/apply-to-page.js +3 -3
- package/dist/mockup/apply-to-page.js.map +1 -1
- package/dist/mockup/block-catalog.d.ts +8 -0
- package/dist/mockup/block-catalog.js +32 -0
- package/dist/mockup/block-catalog.js.map +1 -0
- package/dist/mockup/compile.d.ts +6 -2
- package/dist/mockup/compile.js +138 -46
- package/dist/mockup/compile.js.map +1 -1
- package/dist/mockup/controller-blocks.d.ts +2 -0
- package/dist/mockup/controller-blocks.js +162 -41
- package/dist/mockup/controller-blocks.js.map +1 -1
- package/dist/mockup/data-access.d.ts +3 -0
- package/dist/mockup/data-access.js +110 -0
- package/dist/mockup/data-access.js.map +1 -0
- package/dist/mockup/display-values.d.ts +13 -0
- package/dist/mockup/display-values.js +46 -0
- package/dist/mockup/display-values.js.map +1 -0
- package/dist/mockup/example.d.ts +2 -0
- package/dist/mockup/example.js +19 -0
- package/dist/mockup/example.js.map +1 -0
- package/dist/mockup/fixture-answers.d.ts +16 -0
- package/dist/mockup/fixture-answers.js +295 -0
- package/dist/mockup/fixture-answers.js.map +1 -0
- package/dist/mockup/fixtures.d.ts +40 -7
- package/dist/mockup/fixtures.js +85 -19
- package/dist/mockup/fixtures.js.map +1 -1
- package/dist/mockup/form-fields.d.ts +1 -0
- package/dist/mockup/form-fields.js +28 -0
- package/dist/mockup/form-fields.js.map +1 -1
- package/dist/mockup/form-page-modes.d.ts +8 -0
- package/dist/mockup/form-page-modes.js +67 -0
- package/dist/mockup/form-page-modes.js.map +1 -0
- package/dist/mockup/from-page.d.ts +1 -0
- package/dist/mockup/from-page.js +10 -4
- package/dist/mockup/from-page.js.map +1 -1
- package/dist/mockup/generate.d.ts +86 -0
- package/dist/mockup/generate.js +281 -0
- package/dist/mockup/generate.js.map +1 -0
- package/dist/mockup/history-routes.d.ts +34 -0
- package/dist/mockup/history-routes.js +265 -0
- package/dist/mockup/history-routes.js.map +1 -0
- package/dist/mockup/history.d.ts +62 -0
- package/dist/mockup/history.js +248 -0
- package/dist/mockup/history.js.map +1 -0
- package/dist/mockup/index.d.ts +6 -0
- package/dist/mockup/index.js +17 -0
- package/dist/mockup/index.js.map +1 -1
- package/dist/mockup/json-schema-sketch.d.ts +5 -0
- package/dist/mockup/json-schema-sketch.js +93 -0
- package/dist/mockup/json-schema-sketch.js.map +1 -0
- package/dist/mockup/json-schema.js +158 -7
- package/dist/mockup/json-schema.js.map +1 -1
- package/dist/mockup/live-page.d.ts +4 -2
- package/dist/mockup/live-page.js +105 -3
- package/dist/mockup/live-page.js.map +1 -1
- package/dist/mockup/manage-routes.d.ts +17 -0
- package/dist/mockup/manage-routes.js +120 -0
- package/dist/mockup/manage-routes.js.map +1 -0
- package/dist/mockup/manage.d.ts +20 -0
- package/dist/mockup/manage.js +108 -0
- package/dist/mockup/manage.js.map +1 -0
- package/dist/mockup/model.d.ts +589 -12
- package/dist/mockup/model.js +196 -30
- package/dist/mockup/model.js.map +1 -1
- package/dist/mockup/page-links.d.ts +20 -0
- package/dist/mockup/page-links.js +68 -0
- package/dist/mockup/page-links.js.map +1 -0
- package/dist/mockup/page-placement.d.ts +8 -0
- package/dist/mockup/page-placement.js +68 -0
- package/dist/mockup/page-placement.js.map +1 -0
- package/dist/mockup/page.js +5 -3
- package/dist/mockup/page.js.map +1 -1
- package/dist/mockup/route-patterns.d.ts +6 -0
- package/dist/mockup/route-patterns.js +16 -0
- package/dist/mockup/route-patterns.js.map +1 -0
- package/dist/mockup/routes.d.ts +2 -0
- package/dist/mockup/routes.js +200 -14
- 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/sample-routes.js +8 -2
- package/dist/mockup/sample-routes.js.map +1 -1
- package/dist/mockup/sample-rows.d.ts +1 -1
- package/dist/mockup/sample-rows.js +5 -4
- package/dist/mockup/sample-rows.js.map +1 -1
- package/dist/mockup/sidebar.d.ts +2 -0
- package/dist/mockup/sidebar.js +34 -0
- package/dist/mockup/sidebar.js.map +1 -0
- package/dist/mockup/sketch-allowlist.d.ts +2 -1
- package/dist/mockup/sketch-allowlist.js +1 -1
- package/dist/mockup/sketch-allowlist.js.map +1 -1
- package/dist/mockup/sketch-html.d.ts +2 -1
- package/dist/mockup/sketch-html.js +74 -24
- package/dist/mockup/sketch-html.js.map +1 -1
- package/dist/mockup/sketch-limits.d.ts +4 -0
- package/dist/mockup/sketch-limits.js +5 -1
- package/dist/mockup/sketch-limits.js.map +1 -1
- package/dist/mockup/sketch.d.ts +15 -8
- package/dist/mockup/sketch.js +78 -33
- package/dist/mockup/sketch.js.map +1 -1
- package/dist/mockup/source-routes.js +1 -1
- package/dist/mockup/source-routes.js.map +1 -1
- package/dist/mockup/source.d.ts +6 -3
- package/dist/mockup/source.js +19 -23
- package/dist/mockup/source.js.map +1 -1
- package/dist/mockup/store.d.ts +15 -1
- package/dist/mockup/store.js +110 -2
- package/dist/mockup/store.js.map +1 -1
- package/dist/mockup/table-archive.d.ts +7 -0
- package/dist/mockup/table-archive.js +58 -0
- package/dist/mockup/table-archive.js.map +1 -0
- package/dist/mockup/table-columns.d.ts +57 -0
- package/dist/mockup/table-columns.js +136 -0
- package/dist/mockup/table-columns.js.map +1 -0
- package/dist/mockup/table-forms.d.ts +22 -0
- package/dist/mockup/table-forms.js +192 -0
- package/dist/mockup/table-forms.js.map +1 -0
- package/dist/mockup/table-options.d.ts +461 -0
- package/dist/mockup/table-options.js +231 -0
- package/dist/mockup/table-options.js.map +1 -0
- package/dist/mockup/table-title.d.ts +3 -0
- package/dist/mockup/table-title.js +28 -0
- package/dist/mockup/table-title.js.map +1 -0
- package/dist/mockup/validate.js +11 -0
- package/dist/mockup/validate.js.map +1 -1
- package/dist/pages/public/preview/index.d.ts +4 -0
- package/dist/pages/public/preview/index.js +5 -1
- package/dist/pages/public/preview/index.js.map +1 -1
- package/dist/pages/settings/users/appearance.d.ts +0 -1
- package/dist/pages/settings/users/appearance.js +0 -6
- package/dist/pages/settings/users/appearance.js.map +1 -1
- package/frontend-vue/dms.frontend.ts +3 -17
- package/frontend-vue/eslint-globals.generated.mjs +8 -7
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +0 -12
- package/frontend-vue/layers/dms-layout/app/app.config.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardFrame.vue +5 -16
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +1 -4
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidePanel.vue +8 -6
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +91 -12
- package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +242 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +2 -9
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewPageHeader.vue +45 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewTopBar.vue +135 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/dashboardNavbar.ts +6 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/headerButton.ts +26 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +138 -0
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-mockups.ts +112 -0
- package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +69 -0
- package/frontend-vue/layers/dms-layout/app/build/mockups/header-action.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/components/navigation/NavigationMenu.vue +16 -0
- package/frontend-vue/layers/dms-layout/app/custom-layouts/MockupLayout.vue +35 -0
- package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +26 -28
- package/frontend-vue/layers/dms-layout/app/entries/components/layout/MockupSidebarMenu.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/entries/components/layout/PreviewPageHeader.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/entries/components/layout/PreviewTopBar.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/entries/components/layout/mockupMenu.ts +1 -0
- package/frontend-vue/layers/dms-layout/app/entries/mockups/created-toast.ts +2 -0
- package/frontend-vue/layers/dms-layout/app/error.vue +8 -4
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +4 -192
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +4 -192
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +13 -3
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupBlockCatalog.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCanvasChrome.vue +66 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEditOverlay.vue +91 -53
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEditPanel.vue +12 -3
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHeaderActions.vue +143 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupHistoryPanel.vue +124 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIconInput.vue +18 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +43 -22
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModeBanner.vue +33 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +564 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +110 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPageInspector.vue +77 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPagesList.vue +349 -76
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinCard.vue +251 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +188 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinTray.vue +61 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPlacementChip.vue +36 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupReplaceModal.vue +33 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupResolveBar.vue +49 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupSectionDeleteModal.vue +48 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupShortcutTip.vue +23 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupShortcutsModal.vue +69 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupSketchStatePicker.vue +51 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupStatusBanners.vue +39 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTitle.vue +90 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +198 -70
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupVersionBanner.vue +87 -0
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +326 -406
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +18 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +41 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +84 -13
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupAssistantRuns.ts +71 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDocument.ts +75 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +153 -38
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameSize.ts +65 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupGridLayout.ts +43 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupHandoff.ts +67 -28
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +431 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +142 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPanels.ts +59 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPins.ts +468 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +44 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +52 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSectionEditing.ts +284 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSectionWrites.ts +80 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +21 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupShortcutKeys.ts +27 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSketchStates.ts +48 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupToolModes.ts +67 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupVersions.ts +168 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerHandoff.ts +114 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +70 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +131 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +27 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewLinks.ts +114 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/layout/sidePanelState.ts +25 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/layout/useSideRailWidth.ts +53 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionContainers.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewBindings.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewNavigation.ts +11 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/types.ts +8 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +14 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewConfig.ts +3 -1
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCard.vue +189 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +129 -113
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupRenameModal.vue +116 -0
- package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +32 -30
- package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +56 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreview.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +250 -11
- package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +191 -71
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCard.ts +60 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupCatalog.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupEdit.ts +55 -44
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +180 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +66 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +378 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverviewArrows.ts +160 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPageTree.ts +89 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupPins.ts +152 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupRealData.ts +36 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSectionEdits.ts +57 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSections.ts +264 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +226 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSketchStates.ts +91 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +89 -6
- package/frontend-vue/layers/dms-ui/app/build/utils/mockupVersions.ts +117 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +56 -5
- package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +17 -0
- package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +16 -16
- package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +7 -2
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +7 -1
- package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +3 -2
- package/frontend-vue/layers/dms-ui/app/composables/chart/types.ts +2 -1
- package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupIconInput.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupSectionEditing.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupVersions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCard.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupFrame.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupLinks.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOverview.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOverviewArrows.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupPageTree.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupRealData.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSections.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupShortcuts.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/entries/utils/mockupVersions.ts +1 -0
- package/frontend-vue/layers/dms-ui/app/utils/mockupAssistant.ts +62 -8
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +131 -18
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +131 -18
- package/package.json +5 -5
- package/dist/branding/index.d.ts +0 -2
- package/dist/branding/index.js +0 -19
- package/dist/branding/index.js.map +0 -1
- package/dist/branding/page.d.ts +0 -10
- package/dist/branding/page.js +0 -22
- package/dist/branding/page.js.map +0 -1
- package/dist/branding/register.d.ts +0 -1
- package/dist/branding/register.js +0 -10
- package/dist/branding/register.js.map +0 -1
- package/dist/branding/routes.d.ts +0 -18
- package/dist/branding/routes.js +0 -78
- package/dist/branding/routes.js.map +0 -1
- package/dist/branding/theme-schemas.d.ts +0 -484
- package/dist/branding/theme-schemas.js.map +0 -1
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingColorPair.vue +0 -80
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingDeveloperPanel.vue +0 -266
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingEditor.vue +0 -316
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingLogoTile.vue +0 -67
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingPaletteSwatches.vue +0 -63
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingPreview.vue +0 -138
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingSimplePanel.vue +0 -171
- package/frontend-vue/layers/dms-layout/app/build/branding/BrandingValueInput.vue +0 -36
- package/frontend-vue/layers/dms-layout/app/build/branding/api.ts +0 -55
- package/frontend-vue/layers/dms-layout/app/build/branding/catalog.ts +0 -209
- package/frontend-vue/layers/dms-layout/app/build/branding/color-input.ts +0 -35
- package/frontend-vue/layers/dms-layout/app/build/branding/device-draft.ts +0 -291
- package/frontend-vue/layers/dms-layout/app/build/branding/errors.ts +0 -23
- package/frontend-vue/layers/dms-layout/app/build/branding/fonts.ts +0 -106
- package/frontend-vue/layers/dms-layout/app/build/branding/header-action.ts +0 -19
- package/frontend-vue/layers/dms-layout/app/build/branding/logo-tiles.ts +0 -73
- package/frontend-vue/layers/dms-layout/app/build/branding/logos.ts +0 -178
- package/frontend-vue/layers/dms-layout/app/build/branding/model.ts +0 -395
- package/frontend-vue/layers/dms-layout/app/build/branding/preview-style.ts +0 -184
- package/frontend-vue/layers/dms-layout/app/build/branding/raster.ts +0 -100
- package/frontend-vue/layers/dms-layout/app/build/branding/theme-types.ts +0 -105
- package/frontend-vue/layers/dms-layout/app/build/branding/useBrandingEditor.ts +0 -284
- package/frontend-vue/layers/dms-layout/app/build/branding/values.ts +0 -104
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewSidebar.vue +0 -62
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/AppearanceDeveloper.vue +0 -50
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/CssVariablesList.vue +0 -322
- package/frontend-vue/layers/dms-layout/app/build/mockup/header-action.ts +0 -125
- package/frontend-vue/layers/dms-layout/app/entries/branding/BrandingEditor.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/entries/branding/header-action.ts +0 -2
- package/frontend-vue/layers/dms-layout/app/entries/branding/model.ts +0 -5
- package/frontend-vue/layers/dms-layout/app/entries/mockup/header-action.ts +0 -2
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupAnnotations.vue +0 -93
- package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCommentPanel.vue +0 -85
- package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupComments.ts +0 -95
|
@@ -1,88 +1,166 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type
|
|
3
|
-
import
|
|
2
|
+
import { type NoteSite } from "./anchor";
|
|
3
|
+
import { type StoredAnnotation } from "./annotations-file";
|
|
4
|
+
import type { Json, JsonObject, MockupIssue, MockupName } from "./model";
|
|
5
|
+
export declare const annotationPlaceSchema: z.ZodObject<{
|
|
6
|
+
page: z.ZodString;
|
|
7
|
+
path: z.ZodOptional<z.ZodString>;
|
|
8
|
+
offset: z.ZodObject<{
|
|
9
|
+
x: z.ZodNumber;
|
|
10
|
+
y: z.ZodNumber;
|
|
11
|
+
}, "strict", z.ZodTypeAny, {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}, {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}>;
|
|
18
|
+
state: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, "strict", z.ZodTypeAny, {
|
|
20
|
+
page: string;
|
|
21
|
+
path?: string | undefined;
|
|
22
|
+
offset: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
state?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
page: string;
|
|
29
|
+
path?: string | undefined;
|
|
30
|
+
offset: {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
};
|
|
34
|
+
state?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export type AnnotationPlace = z.infer<typeof annotationPlaceSchema>;
|
|
4
37
|
export declare const annotationDraftSchema: z.ZodObject<{
|
|
5
38
|
page: z.ZodString;
|
|
6
|
-
path: z.ZodString
|
|
39
|
+
path: z.ZodOptional<z.ZodString>;
|
|
40
|
+
offset: z.ZodObject<{
|
|
41
|
+
x: z.ZodNumber;
|
|
42
|
+
y: z.ZodNumber;
|
|
43
|
+
}, "strict", z.ZodTypeAny, {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
}, {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
}>;
|
|
50
|
+
state: z.ZodOptional<z.ZodString>;
|
|
51
|
+
} & {
|
|
7
52
|
text: z.ZodString;
|
|
8
53
|
}, "strict", z.ZodTypeAny, {
|
|
9
54
|
page: string;
|
|
10
|
-
path
|
|
55
|
+
path?: string | undefined;
|
|
56
|
+
offset: {
|
|
57
|
+
x: number;
|
|
58
|
+
y: number;
|
|
59
|
+
};
|
|
60
|
+
state?: string | undefined;
|
|
11
61
|
text: string;
|
|
12
62
|
}, {
|
|
13
63
|
page: string;
|
|
14
|
-
path
|
|
64
|
+
path?: string | undefined;
|
|
65
|
+
offset: {
|
|
66
|
+
x: number;
|
|
67
|
+
y: number;
|
|
68
|
+
};
|
|
69
|
+
state?: string | undefined;
|
|
15
70
|
text: string;
|
|
16
71
|
}>;
|
|
17
72
|
export type AnnotationDraft = z.infer<typeof annotationDraftSchema>;
|
|
18
73
|
export declare const annotationPatchSchema: z.ZodObject<{
|
|
19
74
|
status: z.ZodOptional<z.ZodEnum<["open", "resolved"]>>;
|
|
20
75
|
text: z.ZodOptional<z.ZodString>;
|
|
76
|
+
place: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
page: z.ZodString;
|
|
78
|
+
path: z.ZodOptional<z.ZodString>;
|
|
79
|
+
offset: z.ZodObject<{
|
|
80
|
+
x: z.ZodNumber;
|
|
81
|
+
y: z.ZodNumber;
|
|
82
|
+
}, "strict", z.ZodTypeAny, {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
}, {
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
}>;
|
|
89
|
+
state: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, "strict", z.ZodTypeAny, {
|
|
91
|
+
page: string;
|
|
92
|
+
path?: string | undefined;
|
|
93
|
+
offset: {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
};
|
|
97
|
+
state?: string | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
page: string;
|
|
100
|
+
path?: string | undefined;
|
|
101
|
+
offset: {
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
};
|
|
105
|
+
state?: string | undefined;
|
|
106
|
+
}>>;
|
|
21
107
|
}, "strict", z.ZodTypeAny, {
|
|
22
108
|
status?: "open" | "resolved" | undefined;
|
|
23
109
|
text?: string | undefined;
|
|
110
|
+
place?: {
|
|
111
|
+
page: string;
|
|
112
|
+
path?: string | undefined;
|
|
113
|
+
offset: {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
};
|
|
117
|
+
state?: string | undefined;
|
|
118
|
+
} | undefined;
|
|
24
119
|
}, {
|
|
25
120
|
status?: "open" | "resolved" | undefined;
|
|
26
121
|
text?: string | undefined;
|
|
122
|
+
place?: {
|
|
123
|
+
page: string;
|
|
124
|
+
path?: string | undefined;
|
|
125
|
+
offset: {
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
};
|
|
129
|
+
state?: string | undefined;
|
|
130
|
+
} | undefined;
|
|
27
131
|
}>;
|
|
28
132
|
export type AnnotationPatch = z.infer<typeof annotationPatchSchema>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
page?: string | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
block: string;
|
|
41
|
-
steps: string[];
|
|
42
|
-
page?: string | undefined;
|
|
43
|
-
}>;
|
|
44
|
-
text: z.ZodString;
|
|
45
|
-
status: z.ZodEnum<["open", "resolved"]>;
|
|
46
|
-
createdAt: z.ZodString;
|
|
47
|
-
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
id: string;
|
|
50
|
-
anchor: {
|
|
51
|
-
block: string;
|
|
52
|
-
steps: string[];
|
|
53
|
-
page?: string | undefined;
|
|
54
|
-
};
|
|
55
|
-
text: string;
|
|
56
|
-
status: "open" | "resolved";
|
|
57
|
-
createdAt: string;
|
|
58
|
-
resolvedAt?: string | undefined;
|
|
59
|
-
}, {
|
|
60
|
-
id: string;
|
|
61
|
-
anchor: {
|
|
62
|
-
block: string;
|
|
63
|
-
steps: string[];
|
|
64
|
-
page?: string | undefined;
|
|
65
|
-
};
|
|
66
|
-
text: string;
|
|
67
|
-
status: "open" | "resolved";
|
|
68
|
-
createdAt: string;
|
|
69
|
-
resolvedAt?: string | undefined;
|
|
70
|
-
}>;
|
|
71
|
-
export type MockupAnnotation = z.infer<typeof storedSchema> & Partial<NodeSite>;
|
|
133
|
+
export type MockupAnnotation = StoredAnnotation & Partial<NoteSite>;
|
|
134
|
+
export type PlacementRefusal = {
|
|
135
|
+
kind: "no_node";
|
|
136
|
+
} | {
|
|
137
|
+
kind: "ambiguous";
|
|
138
|
+
} | {
|
|
139
|
+
kind: "spec_invalid";
|
|
140
|
+
errors: MockupIssue[];
|
|
141
|
+
};
|
|
72
142
|
export type AnnotationCreation = {
|
|
73
143
|
kind: "created";
|
|
74
144
|
annotation: MockupAnnotation;
|
|
75
145
|
} | {
|
|
76
146
|
kind: "no_mockup";
|
|
147
|
+
} | PlacementRefusal;
|
|
148
|
+
export type AnnotationUpdate = {
|
|
149
|
+
kind: "updated";
|
|
150
|
+
annotation: MockupAnnotation;
|
|
77
151
|
} | {
|
|
78
|
-
kind: "
|
|
79
|
-
} | {
|
|
80
|
-
kind: "ambiguous";
|
|
152
|
+
kind: "no_mockup";
|
|
81
153
|
} | {
|
|
82
|
-
kind: "
|
|
83
|
-
|
|
154
|
+
kind: "no_annotation";
|
|
155
|
+
} | PlacementRefusal;
|
|
156
|
+
export type AnnotationInSpec = MockupAnnotation & {
|
|
157
|
+
pointer?: string;
|
|
158
|
+
node?: Json;
|
|
84
159
|
};
|
|
85
160
|
export declare function listAnnotations(name: MockupName, mockupsDir?: string): Promise<MockupAnnotation[] | undefined>;
|
|
161
|
+
export declare function listAnnotationsInSpec(name: MockupName, mockupsDir?: string): Promise<AnnotationInSpec[] | undefined>;
|
|
162
|
+
export declare function listVersionAnnotations(name: MockupName, seq: number, spec: JsonObject, mockupsDir?: string): Promise<MockupAnnotation[] | undefined>;
|
|
163
|
+
export declare function countAnnotationsByVersion(name: MockupName, mockupsDir?: string): Promise<ReadonlyMap<number, number>>;
|
|
86
164
|
export declare function createAnnotation(name: MockupName, draft: AnnotationDraft, mockupsDir?: string): Promise<AnnotationCreation>;
|
|
87
|
-
export declare function updateAnnotation(name: MockupName, id: string, patch: AnnotationPatch, mockupsDir?: string): Promise<
|
|
88
|
-
export
|
|
165
|
+
export declare function updateAnnotation(name: MockupName, id: string, patch: AnnotationPatch, mockupsDir?: string): Promise<AnnotationUpdate>;
|
|
166
|
+
export declare function deleteAnnotation(name: MockupName, id: string, mockupsDir?: string): Promise<boolean>;
|
|
@@ -1,89 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.annotationPatchSchema = exports.annotationDraftSchema = void 0;
|
|
3
|
+
exports.annotationPatchSchema = exports.annotationDraftSchema = exports.annotationPlaceSchema = void 0;
|
|
4
4
|
exports.listAnnotations = listAnnotations;
|
|
5
|
+
exports.listAnnotationsInSpec = listAnnotationsInSpec;
|
|
6
|
+
exports.listVersionAnnotations = listVersionAnnotations;
|
|
7
|
+
exports.countAnnotationsByVersion = countAnnotationsByVersion;
|
|
5
8
|
exports.createAnnotation = createAnnotation;
|
|
6
9
|
exports.updateAnnotation = updateAnnotation;
|
|
10
|
+
exports.deleteAnnotation = deleteAnnotation;
|
|
7
11
|
const node_crypto_1 = require("node:crypto");
|
|
8
|
-
const promises_1 = require("node:fs/promises");
|
|
9
|
-
const node_path_1 = require("node:path");
|
|
10
12
|
const zod_1 = require("zod");
|
|
11
13
|
const anchor_1 = require("./anchor");
|
|
12
14
|
const compile_1 = require("./compile");
|
|
15
|
+
const annotations_file_1 = require("./annotations-file");
|
|
13
16
|
const files_1 = require("./files");
|
|
17
|
+
const history_1 = require("./history");
|
|
14
18
|
const model_1 = require("./model");
|
|
19
|
+
const sketch_1 = require("./sketch");
|
|
15
20
|
const source_1 = require("./source");
|
|
16
21
|
const MAX_TEXT = 2000;
|
|
17
22
|
const MAX_POINTER = 2048;
|
|
18
23
|
const ID_BYTES = 12;
|
|
19
|
-
const JSON_INDENT = 2;
|
|
20
24
|
const textSchema = zod_1.z.string().trim().min(1).max(MAX_TEXT);
|
|
21
|
-
const statusSchema = zod_1.z.enum(["open", "resolved"]);
|
|
22
25
|
const pointerSchema = zod_1.z
|
|
23
26
|
.string()
|
|
24
27
|
.max(MAX_POINTER)
|
|
25
28
|
.regex(/^(?:\/[^/]*)*$/);
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
const sketchStateSchema = zod_1.z.string().regex(sketch_1.SKETCH_STATE_PATTERN);
|
|
30
|
+
exports.annotationPlaceSchema = zod_1.z
|
|
31
|
+
.object({
|
|
32
|
+
page: model_1.pageIdSchema,
|
|
33
|
+
path: pointerSchema.optional(),
|
|
34
|
+
offset: annotations_file_1.pinOffsetSchema,
|
|
35
|
+
state: sketchStateSchema.optional(),
|
|
36
|
+
})
|
|
37
|
+
.strict();
|
|
38
|
+
exports.annotationDraftSchema = exports.annotationPlaceSchema
|
|
39
|
+
.extend({ text: textSchema })
|
|
28
40
|
.strict();
|
|
29
41
|
exports.annotationPatchSchema = zod_1.z
|
|
30
|
-
.object({
|
|
42
|
+
.object({
|
|
43
|
+
status: annotations_file_1.statusSchema.optional(),
|
|
44
|
+
text: textSchema.optional(),
|
|
45
|
+
place: exports.annotationPlaceSchema.optional(),
|
|
46
|
+
})
|
|
31
47
|
.strict();
|
|
32
|
-
const storedSchema = zod_1.z.object({
|
|
33
|
-
id: model_1.annotationIdSchema,
|
|
34
|
-
anchor: anchor_1.blockAnchorSchema,
|
|
35
|
-
text: zod_1.z.string(),
|
|
36
|
-
status: statusSchema,
|
|
37
|
-
createdAt: zod_1.z.string(),
|
|
38
|
-
resolvedAt: zod_1.z.string().optional(),
|
|
39
|
-
});
|
|
40
|
-
const annotationsFileSchema = zod_1.z.object({
|
|
41
|
-
version: zod_1.z.literal(2),
|
|
42
|
-
annotations: zod_1.z.array(storedSchema),
|
|
43
|
-
});
|
|
44
|
-
const queues = new Map();
|
|
45
|
-
function serialized(path, task) {
|
|
46
|
-
const previous = queues.get(path) ?? Promise.resolve();
|
|
47
|
-
const run = previous.then(task);
|
|
48
|
-
queues.set(path, run.then(() => undefined, () => undefined));
|
|
49
|
-
return run;
|
|
50
|
-
}
|
|
51
|
-
async function exists(directory) {
|
|
52
|
-
try {
|
|
53
|
-
return (await (0, promises_1.stat)(directory)).isDirectory();
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
if ((0, files_1.parseFsError)(error).code === files_1.MISSING_FILE)
|
|
57
|
-
return false;
|
|
58
|
-
throw error;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
async function readAnnotationsFile(path) {
|
|
62
|
-
let text;
|
|
63
|
-
try {
|
|
64
|
-
text = await (0, promises_1.readFile)(path, "utf8");
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
if ((0, files_1.parseFsError)(error).code === files_1.MISSING_FILE) {
|
|
68
|
-
return { version: 2, annotations: [] };
|
|
69
|
-
}
|
|
70
|
-
throw error;
|
|
71
|
-
}
|
|
72
|
-
const parsed = annotationsFileSchema.safeParse(JSON.parse(text));
|
|
73
|
-
if (!parsed.success) {
|
|
74
|
-
throw new Error(`${path} is not an annotations file: ${parsed.error.message}`);
|
|
75
|
-
}
|
|
76
|
-
return parsed.data;
|
|
77
|
-
}
|
|
78
|
-
function writeAnnotationsFile(path, file) {
|
|
79
|
-
return (0, files_1.writeAtomically)(path, `${JSON.stringify(file, null, JSON_INDENT)}\n`);
|
|
80
|
-
}
|
|
81
|
-
function annotationsPath(mockupsDir, name) {
|
|
82
|
-
return (0, node_path_1.join)((0, files_1.mockupDirectory)(mockupsDir, name), files_1.ANNOTATIONS_FILE);
|
|
83
|
-
}
|
|
84
48
|
function locked(mockupsDir, name, run) {
|
|
85
|
-
const path = annotationsPath(mockupsDir, name);
|
|
86
|
-
return (0, source_1.withSpecLock)(mockupsDir, name, (_write, stamp) => serialized(path, () => run({ mockupsDir, name, stamp, path })));
|
|
49
|
+
const path = (0, annotations_file_1.annotationsPath)(mockupsDir, name);
|
|
50
|
+
return (0, source_1.withSpecLock)(mockupsDir, name, (_write, stamp) => (0, annotations_file_1.serialized)(path, () => run({ mockupsDir, name, stamp, path })));
|
|
87
51
|
}
|
|
88
52
|
async function readStrictSpec(held) {
|
|
89
53
|
const text = await (0, source_1.readSpecText)(held.mockupsDir, held.name);
|
|
@@ -94,76 +58,184 @@ async function readStrictSpec(held) {
|
|
|
94
58
|
? { kind: "read", spec: read.spec, text }
|
|
95
59
|
: { kind: "invalid", errors: read.issues };
|
|
96
60
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
61
|
+
function pinnedOn(note, newest) {
|
|
62
|
+
return note.version ?? newest;
|
|
63
|
+
}
|
|
64
|
+
function located(note, tree, newest) {
|
|
65
|
+
const version = pinnedOn(note, newest);
|
|
66
|
+
const pinned = version === undefined ? note : { ...note, version };
|
|
67
|
+
const site = tree ? (0, anchor_1.locateAnchor)(tree, note.anchor) : undefined;
|
|
68
|
+
return site ? { ...pinned, ...site } : pinned;
|
|
100
69
|
}
|
|
101
70
|
async function currentTree(mockupsDir, name) {
|
|
102
71
|
return (0, anchor_1.viewOf)((await (0, source_1.readSpecSource)(mockupsDir, name))?.spec);
|
|
103
72
|
}
|
|
73
|
+
function inSpec(note, spec, tree) {
|
|
74
|
+
if (note.path !== undefined && spec) {
|
|
75
|
+
const node = (0, model_1.specValueAt)(spec, note.path);
|
|
76
|
+
return node === undefined ? note : { ...note, pointer: note.path, node };
|
|
77
|
+
}
|
|
78
|
+
const page = tree?.pages.findIndex((entry) => entry?.id === note.page);
|
|
79
|
+
return note.page !== undefined && page !== undefined && page >= 0
|
|
80
|
+
? { ...note, pointer: (0, model_1.jsonPointer)(["pages", page]) }
|
|
81
|
+
: note;
|
|
82
|
+
}
|
|
83
|
+
async function readPlaced(name, mockupsDir) {
|
|
84
|
+
if (!(await (0, annotations_file_1.exists)((0, files_1.mockupDirectory)(mockupsDir, name))))
|
|
85
|
+
return undefined;
|
|
86
|
+
const file = await (0, annotations_file_1.readAnnotationsFile)((0, annotations_file_1.annotationsPath)(mockupsDir, name));
|
|
87
|
+
const spec = (await (0, source_1.readSpecSource)(mockupsDir, name))?.spec;
|
|
88
|
+
const tree = (0, anchor_1.viewOf)(spec);
|
|
89
|
+
const newest = await (0, history_1.newestVersion)(mockupsDir, name);
|
|
90
|
+
return {
|
|
91
|
+
notes: file.annotations.map((note) => located(note, tree, newest)),
|
|
92
|
+
spec,
|
|
93
|
+
tree,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
104
96
|
async function listAnnotations(name, mockupsDir = (0, files_1.defaultMockupsDir)()) {
|
|
105
|
-
|
|
97
|
+
return (await readPlaced(name, mockupsDir))?.notes;
|
|
98
|
+
}
|
|
99
|
+
async function listAnnotationsInSpec(name, mockupsDir = (0, files_1.defaultMockupsDir)()) {
|
|
100
|
+
const placed = await readPlaced(name, mockupsDir);
|
|
101
|
+
return placed?.notes.map((note) => inSpec(note, placed.spec, placed.tree));
|
|
102
|
+
}
|
|
103
|
+
async function listVersionAnnotations(name, seq, spec, mockupsDir = (0, files_1.defaultMockupsDir)()) {
|
|
104
|
+
if (!(await (0, annotations_file_1.exists)((0, files_1.mockupDirectory)(mockupsDir, name))))
|
|
106
105
|
return undefined;
|
|
107
|
-
const file = await readAnnotationsFile(annotationsPath(mockupsDir, name));
|
|
108
|
-
const
|
|
109
|
-
|
|
106
|
+
const file = await (0, annotations_file_1.readAnnotationsFile)((0, annotations_file_1.annotationsPath)(mockupsDir, name));
|
|
107
|
+
const newest = await (0, history_1.newestVersion)(mockupsDir, name);
|
|
108
|
+
const tree = (0, anchor_1.viewOf)(spec);
|
|
109
|
+
return file.annotations
|
|
110
|
+
.filter((note) => pinnedOn(note, newest) === seq)
|
|
111
|
+
.map((note) => located(note, tree, newest));
|
|
110
112
|
}
|
|
111
|
-
async function
|
|
112
|
-
const file = await readAnnotationsFile(
|
|
113
|
+
async function countAnnotationsByVersion(name, mockupsDir = (0, files_1.defaultMockupsDir)()) {
|
|
114
|
+
const file = await (0, annotations_file_1.readAnnotationsFile)((0, annotations_file_1.annotationsPath)(mockupsDir, name));
|
|
115
|
+
const newest = await (0, history_1.newestVersion)(mockupsDir, name);
|
|
116
|
+
const counts = new Map();
|
|
117
|
+
for (const note of file.annotations) {
|
|
118
|
+
const version = pinnedOn(note, newest);
|
|
119
|
+
if (version !== undefined) {
|
|
120
|
+
counts.set(version, (counts.get(version) ?? 0) + 1);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return counts;
|
|
124
|
+
}
|
|
125
|
+
async function anchorPlace(held, place) {
|
|
126
|
+
const { page, path } = place;
|
|
127
|
+
if (path === undefined) {
|
|
128
|
+
const tree = await currentTree(held.mockupsDir, held.name);
|
|
129
|
+
const anchor = { page };
|
|
130
|
+
return tree && (0, anchor_1.locateAnchor)(tree, anchor)
|
|
131
|
+
? { kind: "anchored", anchor }
|
|
132
|
+
: { kind: "no_node" };
|
|
133
|
+
}
|
|
113
134
|
const read = await readStrictSpec(held);
|
|
114
135
|
if (read.kind === "missing")
|
|
115
136
|
return { kind: "no_node" };
|
|
116
137
|
if (read.kind === "invalid") {
|
|
117
138
|
return { kind: "spec_invalid", errors: read.errors };
|
|
118
139
|
}
|
|
119
|
-
const
|
|
120
|
-
const anchored = (0, anchor_1.anchorSite)(spec, draft);
|
|
140
|
+
const anchored = (0, anchor_1.anchorSite)(read.spec, { page, path });
|
|
121
141
|
if (!anchored)
|
|
122
142
|
return { kind: "no_node" };
|
|
143
|
+
if ((0, anchor_1.locateBlock)(read.spec, anchored.anchor)?.path !== path) {
|
|
144
|
+
return { kind: "ambiguous" };
|
|
145
|
+
}
|
|
146
|
+
if (anchored.stamp)
|
|
147
|
+
await held.stamp(read.text, [anchored.stamp]);
|
|
148
|
+
return { kind: "anchored", anchor: anchored.anchor };
|
|
149
|
+
}
|
|
150
|
+
async function servedNow(held, note) {
|
|
151
|
+
return located(note, await currentTree(held.mockupsDir, held.name), await (0, history_1.newestVersion)(held.mockupsDir, held.name));
|
|
152
|
+
}
|
|
153
|
+
async function create(held, draft) {
|
|
154
|
+
const file = await (0, annotations_file_1.readAnnotationsFile)(held.path);
|
|
155
|
+
const anchored = await anchorPlace(held, draft);
|
|
156
|
+
if (anchored.kind !== "anchored")
|
|
157
|
+
return anchored;
|
|
158
|
+
const version = await (0, history_1.newestVersion)(held.mockupsDir, held.name);
|
|
123
159
|
const note = {
|
|
124
160
|
id: (0, node_crypto_1.randomBytes)(ID_BYTES).toString("base64url"),
|
|
125
161
|
anchor: anchored.anchor,
|
|
162
|
+
offset: draft.offset,
|
|
126
163
|
text: draft.text,
|
|
127
164
|
status: "open",
|
|
128
165
|
createdAt: new Date().toISOString(),
|
|
166
|
+
...(version !== undefined && { version }),
|
|
167
|
+
...(draft.state !== undefined && { state: draft.state }),
|
|
129
168
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (anchored.stamp)
|
|
133
|
-
await held.stamp(read.text, [anchored.stamp]);
|
|
134
|
-
await writeAnnotationsFile(held.path, {
|
|
135
|
-
version: 2,
|
|
169
|
+
await (0, annotations_file_1.writeAnnotationsFile)(held.path, {
|
|
170
|
+
version: annotations_file_1.FILE_VERSION,
|
|
136
171
|
annotations: [...file.annotations, note],
|
|
137
172
|
});
|
|
138
|
-
return { kind: "created", annotation:
|
|
173
|
+
return { kind: "created", annotation: await servedNow(held, note) };
|
|
139
174
|
}
|
|
140
175
|
async function createAnnotation(name, draft, mockupsDir = (0, files_1.defaultMockupsDir)()) {
|
|
141
|
-
if (!(await exists((0, files_1.mockupDirectory)(mockupsDir, name)))) {
|
|
176
|
+
if (!(await (0, annotations_file_1.exists)((0, files_1.mockupDirectory)(mockupsDir, name)))) {
|
|
142
177
|
return { kind: "no_mockup" };
|
|
143
178
|
}
|
|
144
179
|
return locked(mockupsDir, name, (held) => create(held, draft));
|
|
145
180
|
}
|
|
146
|
-
function
|
|
147
|
-
const { resolvedAt, ...rest } = annotation;
|
|
148
|
-
const next = {
|
|
181
|
+
function withStatusAndText(annotation, change, newest) {
|
|
182
|
+
const { resolvedAt, resolvedVersion, ...rest } = annotation;
|
|
183
|
+
const next = {
|
|
184
|
+
...rest,
|
|
185
|
+
...change,
|
|
186
|
+
...(rest.version === undefined &&
|
|
187
|
+
newest !== undefined && { version: newest }),
|
|
188
|
+
};
|
|
149
189
|
if (next.status === "open")
|
|
150
190
|
return next;
|
|
151
|
-
|
|
191
|
+
const version = resolvedVersion ?? newest;
|
|
192
|
+
return {
|
|
193
|
+
...next,
|
|
194
|
+
resolvedAt: resolvedAt ?? new Date().toISOString(),
|
|
195
|
+
...(version !== undefined && { resolvedVersion: version }),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
async function update(held, id, patch) {
|
|
199
|
+
const file = await (0, annotations_file_1.readAnnotationsFile)(held.path);
|
|
200
|
+
const index = file.annotations.findIndex((note) => note.id === id);
|
|
201
|
+
if (index < 0)
|
|
202
|
+
return { kind: "no_annotation" };
|
|
203
|
+
const { place, ...change } = patch;
|
|
204
|
+
let updated = withStatusAndText(file.annotations[index], change, await (0, history_1.newestVersion)(held.mockupsDir, held.name));
|
|
205
|
+
if (place) {
|
|
206
|
+
const anchored = await anchorPlace(held, place);
|
|
207
|
+
if (anchored.kind !== "anchored")
|
|
208
|
+
return anchored;
|
|
209
|
+
const { state: _drawn, ...pinned } = updated;
|
|
210
|
+
updated = {
|
|
211
|
+
...pinned,
|
|
212
|
+
anchor: anchored.anchor,
|
|
213
|
+
offset: place.offset,
|
|
214
|
+
...(place.state !== undefined && { state: place.state }),
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
await (0, annotations_file_1.writeAnnotationsFile)(held.path, {
|
|
218
|
+
...file,
|
|
219
|
+
annotations: file.annotations.map((note, position) => position === index ? updated : note),
|
|
220
|
+
});
|
|
221
|
+
return { kind: "updated", annotation: await servedNow(held, updated) };
|
|
152
222
|
}
|
|
153
223
|
async function updateAnnotation(name, id, patch, mockupsDir = (0, files_1.defaultMockupsDir)()) {
|
|
154
|
-
if (!(await exists((0, files_1.mockupDirectory)(mockupsDir, name))))
|
|
155
|
-
return
|
|
224
|
+
if (!(await (0, annotations_file_1.exists)((0, files_1.mockupDirectory)(mockupsDir, name)))) {
|
|
225
|
+
return { kind: "no_mockup" };
|
|
226
|
+
}
|
|
227
|
+
return locked(mockupsDir, name, (held) => update(held, id, patch));
|
|
228
|
+
}
|
|
229
|
+
async function deleteAnnotation(name, id, mockupsDir = (0, files_1.defaultMockupsDir)()) {
|
|
230
|
+
if (!(await (0, annotations_file_1.exists)((0, files_1.mockupDirectory)(mockupsDir, name))))
|
|
231
|
+
return false;
|
|
156
232
|
return locked(mockupsDir, name, async (held) => {
|
|
157
|
-
const file = await readAnnotationsFile(held.path);
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
...file,
|
|
164
|
-
annotations: file.annotations.map((annotation, position) => position === index ? updated : annotation),
|
|
165
|
-
});
|
|
166
|
-
return resolved(updated, await currentTree(held.mockupsDir, held.name));
|
|
233
|
+
const file = await (0, annotations_file_1.readAnnotationsFile)(held.path);
|
|
234
|
+
const kept = file.annotations.filter((note) => note.id !== id);
|
|
235
|
+
if (kept.length === file.annotations.length)
|
|
236
|
+
return false;
|
|
237
|
+
await (0, annotations_file_1.writeAnnotationsFile)(held.path, { ...file, annotations: kept });
|
|
238
|
+
return true;
|
|
167
239
|
});
|
|
168
240
|
}
|
|
169
241
|
//# sourceMappingURL=annotations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../src/mockup/annotations.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA0C;AAC1C,+CAAkD;AAClD,yCAAiC;AACjC,6BAAwB;AACxB,qCAOkB;AAClB,uCAAsC;AACtC,mCAOiB;AAEjB,mCAA2D;AAC3D,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4 +1,4 @@
|
|
|
1
|
-
export type WiringReason = "data" | "custom-component" | "table" | "held-block" | "move" | "parent" | "locked" | "type" | "name" | "placement";
|
|
1
|
+
export type WiringReason = "data" | "custom-component" | "table" | "held-block" | "move" | "parent" | "locked" | "type" | "name" | "placement" | "header-actions";
|
|
2
2
|
export declare const WIRING_REASONS: Readonly<Record<WiringReason, string>>;
|
|
3
3
|
export type WiringNote = {
|
|
4
4
|
pointer: string;
|
|
@@ -12,5 +12,6 @@ exports.WIRING_REASONS = {
|
|
|
12
12
|
type: "a type the builder cannot write here: one no block registers, or a real block put in place of a live sketch.",
|
|
13
13
|
name: "a new block whose id gives it the block name of another block at its place. Give the node an id of its own.",
|
|
14
14
|
placement: "a slot or colSpan on a block at the page's top level, which the builder lays out in order only: the block was written without it.",
|
|
15
|
+
"header-actions": "the page's headerActions, the buttons right of its title: the builder cannot write a page's layout. Declare them in the page's DefaultLayout({ headerActions }), each with the target its button needs.",
|
|
15
16
|
};
|
|
16
17
|
//# sourceMappingURL=apply-notes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-notes.js","sourceRoot":"","sources":["../../src/mockup/apply-notes.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"apply-notes.js","sourceRoot":"","sources":["../../src/mockup/apply-notes.ts"],"names":[],"mappings":";;;AAca,QAAA,cAAc,GAA2C;IACpE,IAAI,EAAE,uLAAuL;IAC7L,kBAAkB,EAChB,kHAAkH;IACpH,KAAK,EACH,yIAAyI;IAC3I,YAAY,EACV,gIAAgI;IAClI,IAAI,EAAE,0IAA0I;IAChJ,MAAM,EACJ,gOAAgO;IAClO,MAAM,EACJ,gIAAgI;IAClI,IAAI,EAAE,8GAA8G;IACpH,IAAI,EAAE,6GAA6G;IACnH,SAAS,EACP,mIAAmI;IACrI,gBAAgB,EACd,yMAAyM;CAC5M,CAAC"}
|