@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
|
@@ -34,18 +34,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.BUILDER_PROJECT_TOOLS = void 0;
|
|
37
|
-
const promises_1 = require("node:timers/promises");
|
|
38
37
|
const interface_dms_builder_1 = require("@antelopejs/interface-dms-builder");
|
|
39
38
|
const zod_1 = require("zod");
|
|
40
39
|
const json_1 = require("../json");
|
|
41
40
|
const confirmation_gate_1 = require("../confirmation-gate");
|
|
42
41
|
const tool_1 = require("../tool");
|
|
43
|
-
const redact_1 = require("../redact");
|
|
44
42
|
const builder_shared_1 = require("./builder-shared");
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const UNAPPROVED_PAGES_PREFIX = "pages not approved for removal";
|
|
43
|
+
const builder_connection_access_1 = require("./builder-connection-access");
|
|
44
|
+
const builder_map_resources_1 = require("./builder-map-resources");
|
|
45
|
+
const builder_analysis_1 = require("./builder-analysis");
|
|
49
46
|
const IMPORT_OVERRIDE = zod_1.z.object({
|
|
50
47
|
interface: zod_1.z.string(),
|
|
51
48
|
source: zod_1.z.string().optional(),
|
|
@@ -83,110 +80,10 @@ const STEP = zod_1.z.discriminatedUnion("op", [
|
|
|
83
80
|
.describe("The catalog connection whose tables the module holds, e.g. `erp`: the Builder's Database panel then edits and removes the module with that connection."),
|
|
84
81
|
}),
|
|
85
82
|
]);
|
|
86
|
-
const MAPPED_FIELD = zod_1.z.object({
|
|
87
|
-
column: zod_1.z.string(),
|
|
88
|
-
declared: zod_1.z
|
|
89
|
-
.string()
|
|
90
|
-
.optional()
|
|
91
|
-
.describe("One of the column's `accepts`, from the proposal or database_describe; the first by default."),
|
|
92
|
-
label: zod_1.z.string().optional(),
|
|
93
|
-
listable: zod_1.z.boolean().optional(),
|
|
94
|
-
filterable: zod_1.z.boolean().optional(),
|
|
95
|
-
sortable: zod_1.z.boolean().optional(),
|
|
96
|
-
searchable: zod_1.z.boolean().optional(),
|
|
97
|
-
relation: zod_1.z
|
|
98
|
-
.string()
|
|
99
|
-
.nullable()
|
|
100
|
-
.optional()
|
|
101
|
-
.describe("`schema.name` of another relation in this call, or one the module mapped before: makes the column a relation column onto that relation's single-column key. Left out, a declared foreign key onto such a relation (with a TableView) becomes one anyway; null keeps the column a plain value."),
|
|
102
|
-
display: zod_1.z
|
|
103
|
-
.union([
|
|
104
|
-
zod_1.z.object({
|
|
105
|
-
kind: zod_1.z.literal("badge"),
|
|
106
|
-
values: zod_1.z
|
|
107
|
-
.number()
|
|
108
|
-
.optional()
|
|
109
|
-
.describe("How many values the badge draws, as the proposal and builder_mapping show it; read, never written."),
|
|
110
|
-
items: zod_1.z
|
|
111
|
-
.array(zod_1.z.object({
|
|
112
|
-
value: zod_1.z.string(),
|
|
113
|
-
label: zod_1.z.string(),
|
|
114
|
-
tone: zod_1.z.enum([
|
|
115
|
-
"neutral",
|
|
116
|
-
"primary",
|
|
117
|
-
"secondary",
|
|
118
|
-
"success",
|
|
119
|
-
"warning",
|
|
120
|
-
"error",
|
|
121
|
-
"info",
|
|
122
|
-
]),
|
|
123
|
-
}))
|
|
124
|
-
.optional()
|
|
125
|
-
.describe("Never written into the code: a mapped badge reads its values from the column's rows when the page is served, labelled and toned by the DMS. Left out, the column is a badge when the relation's mapping holds one, else when its analysis proposes one; with neither, the column is written plain."),
|
|
126
|
-
}),
|
|
127
|
-
zod_1.z.object({
|
|
128
|
-
kind: zod_1.z.literal("price"),
|
|
129
|
-
currency: zod_1.z
|
|
130
|
-
.string()
|
|
131
|
-
.regex(/^[A-Z]{3}$/)
|
|
132
|
-
.optional()
|
|
133
|
-
.describe("ISO 4217 code of the amount (`USD`). Left out, the field is sent as if it left `display` out: it takes the display the relation's mapping holds or its analysis proposes, a price in the currency the column comment states, else in the one its relation's currency column holds, read from the rows when the page is served, and with neither it is written plain. Send a code to write a price neither holds; a relation with a currency column reads that column instead."),
|
|
134
|
-
}),
|
|
135
|
-
])
|
|
136
|
-
.nullable()
|
|
137
|
-
.optional()
|
|
138
|
-
.describe("How the column is drawn: a `badge` on a text column of few values, a `price` on an amount. The proposal's display when left out; `null` writes the column plain. A badge's values are never shown to you: send the badge back as the proposal or builder_mapping shows it, `{ kind: \"badge\", values: 3 }`."),
|
|
139
|
-
});
|
|
140
|
-
const MAPPED_RESOURCE = zod_1.z.object({
|
|
141
|
-
relation: zod_1.z.string().describe("`schema.name`."),
|
|
142
|
-
className: zod_1.z.string().optional(),
|
|
143
|
-
label: zod_1.z
|
|
144
|
-
.string()
|
|
145
|
-
.optional()
|
|
146
|
-
.describe("The column relation columns pointing here show; also the TableView's labelKey."),
|
|
147
|
-
title: zod_1.z
|
|
148
|
-
.string()
|
|
149
|
-
.optional()
|
|
150
|
-
.describe("The page's title; the relation's name, humanized, by default."),
|
|
151
|
-
tableView: zod_1.z
|
|
152
|
-
.boolean()
|
|
153
|
-
.describe("False for a stats-only relation; forced false without a key."),
|
|
154
|
-
writable: zod_1.z
|
|
155
|
-
.boolean()
|
|
156
|
-
.describe("False serves the TableView without new, edit and delete. True is refused while the connection's access is `read`."),
|
|
157
|
-
fields: zod_1.z.array(MAPPED_FIELD),
|
|
158
|
-
tabs: zod_1.z
|
|
159
|
-
.object({ column: zod_1.z.string() })
|
|
160
|
-
.nullable()
|
|
161
|
-
.optional()
|
|
162
|
-
.describe("Tabs above the table by a filterable badge column: All, then one per value. The proposal's tabs when left out; `null` writes none."),
|
|
163
|
-
icon: zod_1.z
|
|
164
|
-
.string()
|
|
165
|
-
.optional()
|
|
166
|
-
.describe("The page's menu icon, an icon name such as `i-ph-shopping-cart`."),
|
|
167
|
-
description: zod_1.z
|
|
168
|
-
.string()
|
|
169
|
-
.optional()
|
|
170
|
-
.describe("What the page is for, in a sentence."),
|
|
171
|
-
order: zod_1.z
|
|
172
|
-
.number()
|
|
173
|
-
.optional()
|
|
174
|
-
.describe("Sorts the page among its category's pages, lowest first. 100 by default, so a dashboard created with order 0 comes before the mapped tables."),
|
|
175
|
-
tableOptions: zod_1.z
|
|
176
|
-
.object(builder_table_view_1.TABLE_VIEW_SETTINGS)
|
|
177
|
-
.optional()
|
|
178
|
-
.describe("Displays (kanban, cards, grouped), views and footer figures for the page's table, with the same checks as builder_configure_table_view; a refused choice is a warning and the page keeps what it had."),
|
|
179
|
-
});
|
|
180
|
-
const CONNECTION = zod_1.z
|
|
181
|
-
.string()
|
|
182
|
-
.describe("A connection id from database_connections.");
|
|
183
|
-
const BOUND_MODULE = zod_1.z
|
|
184
|
-
.string()
|
|
185
|
-
.describe("The project module bound to the connection's database.");
|
|
186
83
|
const configureProject = (0, tool_1.defineTool)({
|
|
187
84
|
name: "builder_configure_project",
|
|
188
85
|
title: "Configure project",
|
|
189
|
-
description: "Edits antelope.config.ts in one step: adds modules (AddModule), merges into existing ones (ConfigureModule: config, importOverrides pins and connections, exportPriority, env variable names) and scaffolds local modules (CreateLocalModule). To connect a database, plan the batch from database_project: its driver package and range, a tables module pinned to the driver, the catalog connection on `self`, and the pins it names. Every step is validated before anything is written, and a refused step writes nothing. The user always approves the change, shown as a diff. A restart is needed before new modules load. It never raises an external connection's access: a step that sets `config.externalConnections.<id>.access` to `read-write` where the module's entry in antelope.config.ts does not already hold the literal string `read-write`, to anything else but `read`, supplies it from a variable, or rebinds a variable `envOverrides` maps to it, is refused. Keeping, lowering or removing an access works, so restate the connections you do not change.
|
|
86
|
+
description: "Edits antelope.config.ts in one step: adds modules (AddModule), merges into existing ones (ConfigureModule: config, importOverrides pins and connections, exportPriority, env variable names) and scaffolds local modules (CreateLocalModule). To connect a database, plan the batch from database_project: its driver package and range, a tables module pinned to the driver, the catalog connection on `self`, the dms-database step registering the connection with `config.externalConnections.<id>.access` set to `read`, and the pins it names. Before you connect one, ask the person whether the dashboard may only read that database or also change its rows: write `read` either way, and if they chose read & write, call builder_set_connection_access once the restarted project lists the connection in database_connections. Every step is validated before anything is written, and a refused step writes nothing. The user always approves the change, shown as a diff. A restart is needed before new modules load. It never raises an external connection's access: a step that sets `config.externalConnections.<id>.access` to `read-write` where the module's entry in antelope.config.ts does not already hold the literal string `read-write`, to anything else but `read`, supplies it from a variable, or rebinds a variable `envOverrides` maps to it, is refused. Keeping, lowering or removing an access works, so restate the connections you do not change. Raise one with builder_set_connection_access, once the person agrees; a person also grants writes in the Database module's Data browser or the assistant's connect step. A database driver's connection target is never written as a value: a step that writes anything at an option of a driver's config that names a server or an account (its `url`, or a host, port, socket, user or password among the client options it passes on) is refused; map the variable instead, with `env: { url: \"<VARIABLE>\" }`.",
|
|
190
87
|
effect: "project",
|
|
191
88
|
input: zod_1.z.object({ steps: zod_1.z.array(STEP).min(1) }),
|
|
192
89
|
async run({ steps }, sessionId) {
|
|
@@ -205,133 +102,42 @@ const configureProject = (0, tool_1.defineTool)({
|
|
|
205
102
|
return confirmation_gate_1.repeatConfirmation.run(sessionId, "builder_configure_project", { steps, plannedChanges }, async () => (0, builder_shared_1.opResult)(await (0, interface_dms_builder_1.ConfigureProject)(steps)));
|
|
206
103
|
},
|
|
207
104
|
});
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
...resource,
|
|
238
|
-
fields: resource.fields.map(({ display, ...field }) => {
|
|
239
|
-
const sent = displayInput(display);
|
|
240
|
-
return sent === undefined ? field : { ...field, display: sent };
|
|
241
|
-
}),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
function withReadBadges(sent) {
|
|
245
|
-
return { ...sent, resources: sent.resources.map(resourceInput) };
|
|
246
|
-
}
|
|
247
|
-
const mapResources = (0, tool_1.defineTool)({
|
|
248
|
-
name: "builder_map_resources",
|
|
249
|
-
title: "Map resources",
|
|
250
|
-
description: "Maps relations of a connected database into a project module bound to it (created with builder_configure_project): table classes and models with the database's names verbatim, DataAPI controllers and one TableView page per relation that has a key. Only your choices are sent: the Builder reads the relations' descriptions from its own catalog connection and checks every choice against them. A relation mapped before is rewritten from the new choices, its page created, kept or removed; a mapping that would remove a page asks the person first, listing it, and a denial writes nothing, and a page that appeared after the person approved is never removed: that write is refused, so call again to ask. `excluded` records relations decided against, so the next analysis does not propose them. A connection is read-only unless the dms-database entry of antelope.config.ts sets `config.externalConnections.<id>.access` to `read-write`: on a read-only one, a `writable: true` resource with a TableView is refused, and so are a ResourceForm that creates or edits its rows and a block over a table that still serves write routes. Only a person changes the access. A relation the database account may not insert, update or delete in is mapped read-only even when asked `writable: true`, with a `relation_read_only` warning. Answers the files it wrote, without their diffs, and `leftOut`: columns a TableView cannot show, with why.",
|
|
251
|
-
effect: "builder",
|
|
252
|
-
input: MAP_RESOURCES_INPUT,
|
|
253
|
-
async run(sent, sessionId) {
|
|
254
|
-
const input = withReadBadges(sent);
|
|
255
|
-
const preview = await (0, interface_dms_builder_1.PreviewMapResources)(input);
|
|
256
|
-
if (!preview.ok)
|
|
257
|
-
return (0, builder_shared_1.opResult)(preview);
|
|
258
|
-
const { pagesToRemove } = preview.data;
|
|
259
|
-
const write = async () => {
|
|
260
|
-
const written = await (0, interface_dms_builder_1.MapResources)({
|
|
261
|
-
...input,
|
|
262
|
-
approvedPageRemovals: pagesToRemove,
|
|
263
|
-
});
|
|
264
|
-
return (unapprovedPagesRefusal(written) ??
|
|
265
|
-
(0, builder_shared_1.redactedOpResult)(written, (data) => data));
|
|
266
|
-
};
|
|
267
|
-
return pagesToRemove.length === 0
|
|
268
|
-
? write()
|
|
269
|
-
: confirmation_gate_1.repeatConfirmation.run(sessionId, "builder_map_resources", { ...sent, pagesToRemove }, write);
|
|
270
|
-
},
|
|
271
|
-
});
|
|
272
|
-
const AnalyseDatabaseInputSchema = zod_1.z.object({
|
|
273
|
-
connection: zod_1.z
|
|
274
|
-
.string()
|
|
275
|
-
.optional()
|
|
276
|
-
.describe("A connection id from database_connections, to start an analysis."),
|
|
277
|
-
module: zod_1.z
|
|
278
|
-
.string()
|
|
279
|
-
.optional()
|
|
280
|
-
.describe("The project module bound to the connection's database; relations it mapped or excluded are not proposed again."),
|
|
281
|
-
schemas: zod_1.z
|
|
282
|
-
.array(zod_1.z.string())
|
|
283
|
-
.optional()
|
|
284
|
-
.describe("Limit the analysis to these schemas, as a `schemas` open item asks."),
|
|
285
|
-
job: zod_1.z
|
|
286
|
-
.string()
|
|
287
|
-
.optional()
|
|
288
|
-
.describe("A running analysis's `id`, to read on instead of starting one."),
|
|
289
|
-
});
|
|
290
|
-
async function startOrRead(args) {
|
|
291
|
-
if (args.job !== undefined)
|
|
292
|
-
return (0, interface_dms_builder_1.GetAnalysis)(args.job);
|
|
293
|
-
if (args.connection === undefined || args.module === undefined) {
|
|
294
|
-
return undefined;
|
|
295
|
-
}
|
|
296
|
-
return (0, interface_dms_builder_1.AnalyseDatabase)({
|
|
297
|
-
connection: args.connection,
|
|
298
|
-
module: args.module,
|
|
299
|
-
schemas: args.schemas,
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
const analyseDatabase = (0, tool_1.defineTool)({
|
|
303
|
-
name: "builder_analyse_database",
|
|
304
|
-
title: "Analyse database",
|
|
305
|
-
description: "Runs the Builder's analysis of a connected database: it reads the catalog and the profiles and proposes a mapping by fixed rules, writing nothing. Answers the proposal: resources in the shape builder_map_resources takes, each choice with its rule and `kind` (`fact` from the catalog, or `default`, a judgement to check), the relations excluded and why, and `open`: what the rules could not decide, each with its options. It carries the database's shape, never a value from its rows: a field's `profile` holds traits, nulls, distinct and the rows of each category, a badge `{ kind: \"badge\", values }` says how many values it draws, and a price names no currency; builder_map_resources reads the values itself. Profiling is slow: when the analysis is still running after a minute this answers its progress and `job`; call again with that `job` to read on. A call without `job` answers the last finished proposal again, profiling nothing, while the module's mapping, the schemas and the database's catalog are unchanged.",
|
|
306
|
-
effect: "read",
|
|
307
|
-
input: AnalyseDatabaseInputSchema,
|
|
308
|
-
async run(args) {
|
|
309
|
-
let answer = await startOrRead(args);
|
|
310
|
-
if (answer === undefined) {
|
|
311
|
-
return (0, builder_shared_1.refusalResult)("invalid_input", "Pass `connection` and `module` to start an analysis, or `job` to read a running one.");
|
|
312
|
-
}
|
|
313
|
-
const deadline = Date.now() + ANALYSIS_WAIT_MS;
|
|
314
|
-
while (answer.ok &&
|
|
315
|
-
answer.data.status === "running" &&
|
|
316
|
-
Date.now() < deadline) {
|
|
317
|
-
await (0, promises_1.setTimeout)(ANALYSIS_POLL_MS);
|
|
318
|
-
answer = await (0, interface_dms_builder_1.GetAnalysis)(answer.data.id);
|
|
319
|
-
}
|
|
320
|
-
return (0, builder_shared_1.redactedOpResult)(answer, redact_1.redactAnalysis);
|
|
105
|
+
const setConnectionAccess = (0, tool_1.defineTool)({
|
|
106
|
+
name: "builder_set_connection_access",
|
|
107
|
+
title: "Set connection access",
|
|
108
|
+
description: "Changes what the dashboard may do on an external database: `read` shows its rows only, `read-write` lets the pages the builder maps add, edit and delete them. It writes `config.externalConnections.<connection>.access` on the dms-database entry of antelope.config.ts, as the Read & write switch of the Database module's Data browser does. Call it only after the person explicitly agreed in this conversation to let the dashboard change rows in their database, never on your own initiative: it changes what the dashboard can write to their database. `read-write` is refused while the database account may insert, update or delete rows in no table, or when its catalog does not answer. The first call writes nothing and answers the planned change: show it to the person, and repeat the same call to run it. Answers the files it wrote and `access`, what the project now lets the dashboard do on the connection; the running backend reads it after its restart, which `ajs project dev` starts on its own. Then map tables again with `writable: true`; a table the account may not write stays read-only.",
|
|
109
|
+
effect: "project",
|
|
110
|
+
input: zod_1.z.object({
|
|
111
|
+
connection: builder_connection_access_1.CONNECTION,
|
|
112
|
+
access: zod_1.z
|
|
113
|
+
.enum(["read", "read-write"])
|
|
114
|
+
.describe("`read`, the default of every connection, or `read-write`, which the person chose."),
|
|
115
|
+
}),
|
|
116
|
+
async run({ connection, access }, sessionId) {
|
|
117
|
+
const { connectionAccessSwitch } = await Promise.resolve().then(() => __importStar(require("../../implementations/dms-builder/engine")));
|
|
118
|
+
const planned = await connectionAccessSwitch(connection, access);
|
|
119
|
+
if (!planned.ok)
|
|
120
|
+
return (0, builder_shared_1.refusalResult)(planned.code, planned.reason);
|
|
121
|
+
const steps = [planned.step];
|
|
122
|
+
const dryRun = await (0, interface_dms_builder_1.ConfigureProject)(steps, { dryRun: true });
|
|
123
|
+
if (!dryRun.ok)
|
|
124
|
+
return (0, builder_shared_1.opResult)(dryRun);
|
|
125
|
+
const write = async () => (0, builder_connection_access_1.answerWithAccess)(await (0, interface_dms_builder_1.ConfigureProject)(steps), connection, (data) => data);
|
|
126
|
+
if (dryRun.changes.length === 0)
|
|
127
|
+
return write();
|
|
128
|
+
const plannedChanges = dryRun.changes.map(({ path, kind, diff }) => ({
|
|
129
|
+
path,
|
|
130
|
+
kind,
|
|
131
|
+
diff,
|
|
132
|
+
}));
|
|
133
|
+
return confirmation_gate_1.repeatConfirmation.run(sessionId, "builder_set_connection_access", { connection, access, plannedChanges }, write);
|
|
321
134
|
},
|
|
322
135
|
});
|
|
323
|
-
const mapping = (0, tool_1.defineTool)({
|
|
324
|
-
name: "builder_mapping",
|
|
325
|
-
title: "Builder mapping",
|
|
326
|
-
description: "The relations a module maps for a connection, read back from its code as their current choices, in the proposal's shape (every rule `mapped`), with `included`: the columns the module declares. A badge shows how many values it draws, not the values, and a price no currency. Read it before mapping a relation again with builder_map_resources, so you send its current choices with only what you change.",
|
|
327
|
-
effect: "read",
|
|
328
|
-
input: zod_1.z.object({ connection: CONNECTION, module: BOUND_MODULE }),
|
|
329
|
-
run: async ({ connection, module }) => (0, builder_shared_1.redactedOpResult)(await (0, interface_dms_builder_1.GetMapping)(connection, module), (relations) => relations.map(redact_1.redactMapping)),
|
|
330
|
-
});
|
|
331
136
|
exports.BUILDER_PROJECT_TOOLS = [
|
|
332
137
|
configureProject,
|
|
333
|
-
mapResources,
|
|
334
|
-
analyseDatabase,
|
|
335
|
-
mapping,
|
|
138
|
+
builder_map_resources_1.mapResources,
|
|
139
|
+
builder_analysis_1.analyseDatabase,
|
|
140
|
+
builder_analysis_1.mapping,
|
|
141
|
+
setConnectionAccess,
|
|
336
142
|
];
|
|
337
143
|
//# sourceMappingURL=builder-project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-project.js","sourceRoot":"","sources":["../../../src/mcp/tools/builder-project.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"builder-project.js","sourceRoot":"","sources":["../../../src/mcp/tools/builder-project.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAqE;AACrE,6BAAwB;AACxB,kCAA2C;AAC3C,4DAA0D;AAC1D,kCAAqC;AACrC,qDAA2D;AAC3D,2EAA2E;AAC3E,mEAAuD;AACvD,yDAA8D;AAE9D,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC1B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC;KACnB,MAAM,CAAC;IACN,MAAM,EAAE,uBAAgB,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,uBAAgB,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,OAAC;SACH,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC;SAC9B,QAAQ,EAAE;SACV,QAAQ,CACP,uLAAuL,CACxL;IACH,eAAe,EAAE,OAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE;IACpD,cAAc,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC;KACD,QAAQ,CAAC,8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od";
|
|
2
|
+
export declare const CELL_DISPLAY: z.ZodObject<{
|
|
3
|
+
type: z.ZodString;
|
|
4
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("@antelopejs/interface-dms/json").JsonValue, z.ZodTypeDef, import("@antelopejs/interface-dms/json").JsonValue>>>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
type: string;
|
|
7
|
+
options?: Record<string, import("@antelopejs/interface-dms/json").JsonValue> | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
type: string;
|
|
10
|
+
options?: Record<string, import("@antelopejs/interface-dms/json").JsonValue> | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const COLUMN_PRESENTATION: {
|
|
13
|
+
description: z.ZodOptional<z.ZodString>;
|
|
14
|
+
group: z.ZodOptional<z.ZodString>;
|
|
15
|
+
isVisible: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
cellWrap: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
};
|
|
1
19
|
export declare const BUILDER_RESOURCE_TOOLS: import("../tool").McpTool[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BUILDER_RESOURCE_TOOLS = void 0;
|
|
3
|
+
exports.BUILDER_RESOURCE_TOOLS = exports.COLUMN_PRESENTATION = exports.CELL_DISPLAY = void 0;
|
|
4
4
|
const interface_dms_builder_1 = require("@antelopejs/interface-dms-builder");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
+
const cell_displays_1 = require("../../implementations/dms-builder/engine/cell-displays");
|
|
6
7
|
const json_1 = require("../json");
|
|
7
8
|
const confirmation_gate_1 = require("../confirmation-gate");
|
|
8
9
|
const tool_1 = require("../tool");
|
|
@@ -16,6 +17,43 @@ const DATA_TYPE_VALUE = zod_1.z.object({
|
|
|
16
17
|
.describe("A `dataTypes` id from builder_catalog, e.g. `string`, `select`."),
|
|
17
18
|
config: json_1.JsonObjectSchema.optional().describe(`That DataType's own config, per builder_catalog. ${builder_shared_1.BUILDER_REF_NOTE}`),
|
|
18
19
|
});
|
|
20
|
+
const CELL_DISPLAY_IDS = [...cell_displays_1.CELL_DISPLAYS.keys()].join(", ");
|
|
21
|
+
exports.CELL_DISPLAY = zod_1.z
|
|
22
|
+
.object({
|
|
23
|
+
type: zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.describe(`The id of one of the DMS's cell displays: ${CELL_DISPLAY_IDS}.`),
|
|
26
|
+
options: json_1.JsonObjectSchema.optional().describe("The options of that display's DefaultDisplays class (identity: avatarField, subtitleField, badges…; two_line: primaryField, subField…; status_pill: tones, toneField…; progress: doneField and totalField). An option the class does not take is refused."),
|
|
27
|
+
})
|
|
28
|
+
.describe("How table cells draw the value, written as `@Column({ display: new DefaultDisplays.<Class>(options) })`. The column keeps its dataType for its forms, filters and exports.");
|
|
29
|
+
exports.COLUMN_PRESENTATION = {
|
|
30
|
+
description: zod_1.z.string().optional().describe("The column's help text."),
|
|
31
|
+
group: zod_1.z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe("The id of the form group the field joins (`@Column({ group })`); declare its title with builder_configure_column_groups."),
|
|
35
|
+
isVisible: zod_1.z
|
|
36
|
+
.boolean()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe("False hides the column until the person picks it. Default true."),
|
|
39
|
+
size: zod_1.z
|
|
40
|
+
.number()
|
|
41
|
+
.positive()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Default width of the grid column, in px (150 when left out)."),
|
|
44
|
+
cellWrap: zod_1.z
|
|
45
|
+
.boolean()
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("Wrap the cell's content without a line limit."),
|
|
48
|
+
};
|
|
49
|
+
const PRESENTATION_PATCH = {
|
|
50
|
+
description: exports.COLUMN_PRESENTATION.description.unwrap().nullable().optional(),
|
|
51
|
+
group: exports.COLUMN_PRESENTATION.group.unwrap().nullable().optional(),
|
|
52
|
+
isVisible: exports.COLUMN_PRESENTATION.isVisible.unwrap().nullable().optional(),
|
|
53
|
+
size: exports.COLUMN_PRESENTATION.size.unwrap().nullable().optional(),
|
|
54
|
+
cellWrap: exports.COLUMN_PRESENTATION.cellWrap.unwrap().nullable().optional(),
|
|
55
|
+
display: exports.CELL_DISPLAY.nullable().optional(),
|
|
56
|
+
};
|
|
19
57
|
const FIELD_ASPECTS = {
|
|
20
58
|
dataType: DATA_TYPE_VALUE,
|
|
21
59
|
label: zod_1.z
|
|
@@ -39,6 +77,8 @@ const FIELD_ASPECTS = {
|
|
|
39
77
|
.number()
|
|
40
78
|
.optional()
|
|
41
79
|
.describe("Position among the resource's fields."),
|
|
80
|
+
...exports.COLUMN_PRESENTATION,
|
|
81
|
+
display: exports.CELL_DISPLAY.optional(),
|
|
42
82
|
};
|
|
43
83
|
const FIELD_SPEC = zod_1.z.object({
|
|
44
84
|
name: zod_1.z
|
|
@@ -48,6 +88,7 @@ const FIELD_SPEC = zod_1.z.object({
|
|
|
48
88
|
});
|
|
49
89
|
const FIELD_ASPECTS_PATCH = zod_1.z.object({
|
|
50
90
|
...FIELD_ASPECTS,
|
|
91
|
+
...PRESENTATION_PATCH,
|
|
51
92
|
dataType: DATA_TYPE_VALUE.optional(),
|
|
52
93
|
});
|
|
53
94
|
const RESOURCE_LOCATION = zod_1.z
|
|
@@ -80,7 +121,7 @@ const listResources = (0, tool_1.defineTool)({
|
|
|
80
121
|
const resourceStructure = (0, tool_1.defineTool)({
|
|
81
122
|
name: "builder_resource_structure",
|
|
82
123
|
title: "Resource structure",
|
|
83
|
-
description: (0, builder_shared_1.withEscalationNote)("Returns a resource's fields with their semantic aspects, its `routes` (absent when it serves the full set), and a version hash for optimistic concurrency. Hand-edited or relation fields come back marked `opaque` — safe mode cannot reconfigure those. In a module mapped from a connected database, a badge's select reads its items from a column (`itemsFrom: { column }`, `items: []`) and a price may read its currency from one (`currencyFrom: { column }`): the DMS reads those values from the rows when it serves the page. A select's `items` and a price's `currency` that a mapping wrote before that read `{ $hidden: n }`, n the values it read from rows: leave `dataType` out of a patch to keep them. The ones you wrote read as written."),
|
|
124
|
+
description: (0, builder_shared_1.withEscalationNote)("Returns a resource's fields with their semantic aspects (a cell display reads `display: { type, options }`, beside `group`, `isVisible`, `size`, `cellWrap` and `description`), its `columnGroups` by id, its `routes` (absent when it serves the full set), and a version hash for optimistic concurrency. Hand-edited or relation fields come back marked `opaque` — safe mode cannot reconfigure those. In a module mapped from a connected database, a badge's select reads its items from a column (`itemsFrom: { column }`, `items: []`) and a price may read its currency from one (`currencyFrom: { column }`): the DMS reads those values from the rows when it serves the page. A select's `items` and a price's `currency` that a mapping wrote before that read `{ $hidden: n }`, n the values it read from rows: leave `dataType` out of a patch to keep them. The ones you wrote read as written."),
|
|
84
125
|
effect: "read",
|
|
85
126
|
input: zod_1.z.object({ ref: zod_1.z.string() }),
|
|
86
127
|
async run({ ref }) {
|
|
@@ -123,7 +164,7 @@ const deleteResource = (0, tool_1.defineTool)({
|
|
|
123
164
|
const addField = (0, tool_1.defineTool)({
|
|
124
165
|
name: "builder_add_field",
|
|
125
166
|
title: "Add field",
|
|
126
|
-
description: (0, builder_shared_1.withEscalationNote)("Adds a field to a resource, editing the Table and DataAPI classes together in one atomic op."),
|
|
167
|
+
description: (0, builder_shared_1.withEscalationNote)("Adds a field to a resource, editing the Table and DataAPI classes together in one atomic op. Its `@Column` takes the presentation a mockup column declares: `display` (a cell display `{ type, options }`), `group`, `isVisible`, `size`, `cellWrap` and `description`. A display whose options its class does not take is refused with invalid_config."),
|
|
127
168
|
effect: "builder",
|
|
128
169
|
input: zod_1.z.object({ ref: zod_1.z.string(), field: FIELD_SPEC }),
|
|
129
170
|
run: async ({ ref, field }) => builder_shared_1.containsExprSentinel.parse(field)
|
|
@@ -133,7 +174,7 @@ const addField = (0, tool_1.defineTool)({
|
|
|
133
174
|
const configureField = (0, tool_1.defineTool)({
|
|
134
175
|
name: "builder_configure_field",
|
|
135
176
|
title: "Configure field",
|
|
136
|
-
description: (0, builder_shared_1.withEscalationNote)("Reconfigures a field by merging the patch over its current aspects and re-deriving the whole decorator stack on both classes (no drift). Field name is immutable — rename via builder_remove_field + builder_add_field."),
|
|
177
|
+
description: (0, builder_shared_1.withEscalationNote)("Reconfigures a field by merging the patch over its current aspects and re-deriving the whole decorator stack on both classes (no drift). Field name is immutable — rename via builder_remove_field + builder_add_field. The presentation options (`display`, `group`, `isVisible`, `size`, `cellWrap`, `description`) are replaced when sent and removed when sent as null; a display whose options its class does not take is refused with invalid_config."),
|
|
137
178
|
effect: "builder",
|
|
138
179
|
input: zod_1.z.object({ path: FIELD_PATH, patch: FIELD_ASPECTS_PATCH }),
|
|
139
180
|
run: async ({ path, patch }) => builder_shared_1.containsExprSentinel.parse(patch)
|
|
@@ -148,6 +189,33 @@ const removeField = (0, tool_1.defineTool)({
|
|
|
148
189
|
input: zod_1.z.object({ path: FIELD_PATH }),
|
|
149
190
|
run: async (args, sessionId) => confirmation_gate_1.repeatConfirmation.run(sessionId, "builder_remove_field", args, async () => (0, builder_shared_1.opResult)(await (0, interface_dms_builder_1.RemoveField)(args.path))),
|
|
150
191
|
});
|
|
192
|
+
const COLUMN_GROUP = zod_1.z.object({
|
|
193
|
+
label: zod_1.z.string().min(1).describe("The group's title in the forms."),
|
|
194
|
+
description: zod_1.z.string().optional(),
|
|
195
|
+
orientation: zod_1.z
|
|
196
|
+
.enum(["horizontal", "vertical"])
|
|
197
|
+
.optional()
|
|
198
|
+
.describe("How the group lays its fields out."),
|
|
199
|
+
order: zod_1.z
|
|
200
|
+
.number()
|
|
201
|
+
.optional()
|
|
202
|
+
.describe("Where the group sorts among the others."),
|
|
203
|
+
});
|
|
204
|
+
const configureColumnGroups = (0, tool_1.defineTool)({
|
|
205
|
+
name: "builder_configure_column_groups",
|
|
206
|
+
title: "Configure column groups",
|
|
207
|
+
description: (0, builder_shared_1.withEscalationNote)("Writes or removes the `@ColumnGroup(id, { label, description?, orientation?, order? })` decorators on a resource's DataAPI controller: the titles and layouts of the form groups its fields join with `group`. A group sent replaces the one of its id, `null` removes it, and groups left out stay. builder_resource_structure reads them back as `columnGroups`."),
|
|
208
|
+
effect: "builder",
|
|
209
|
+
input: zod_1.z.object({
|
|
210
|
+
resource: zod_1.z
|
|
211
|
+
.string()
|
|
212
|
+
.describe("The resource's `ref`, from builder_list_resources."),
|
|
213
|
+
groups: zod_1.z
|
|
214
|
+
.record(COLUMN_GROUP.nullable())
|
|
215
|
+
.describe("The groups to write by id; null removes that group."),
|
|
216
|
+
}),
|
|
217
|
+
run: async ({ resource, groups }) => (0, builder_shared_1.opResult)(await (0, interface_dms_builder_1.ConfigureColumnGroups)(resource, groups)),
|
|
218
|
+
});
|
|
151
219
|
exports.BUILDER_RESOURCE_TOOLS = [
|
|
152
220
|
listResources,
|
|
153
221
|
resourceStructure,
|
|
@@ -155,6 +223,7 @@ exports.BUILDER_RESOURCE_TOOLS = [
|
|
|
155
223
|
deleteResource,
|
|
156
224
|
addField,
|
|
157
225
|
configureField,
|
|
226
|
+
configureColumnGroups,
|
|
158
227
|
removeField,
|
|
159
228
|
];
|
|
160
229
|
//# sourceMappingURL=builder-resources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-resources.js","sourceRoot":"","sources":["../../../src/mcp/tools/builder-resources.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"builder-resources.js","sourceRoot":"","sources":["../../../src/mcp/tools/builder-resources.ts"],"names":[],"mappings":";;;AAAA,6EAS2C;AAC3C,6BAAwB;AACxB,0FAAuF;AACvF,kCAA2C;AAC3C,4DAA0D;AAC1D,kCAAqC;AACrC,qDAQ0B;AAE1B,MAAM,UAAU,GAAG,OAAC;KACjB,MAAM,EAAE;KACR,QAAQ,CACP,uGAAuG,CACxG,CAAC;AAEJ,MAAM,eAAe,GAAG,OAAC,CA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AC,YAAY,CAAC,QAAQ,EAAE,CAAC;aAC/B,QAAQ,CAAC,qDAAqD,CAAC;KACnE,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAClC,IAAA,yBAAQ,EAAC,MAAM,IAAA,6CAAqB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;CAC1D,CAAC,CAAC;AAEU,QAAA,sBAAsB,GAAG;IACpC,aAAa;IACb,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,QAAQ;IACR,cAAc;IACd,qBAAqB;IACrB,WAAW;CACZ,CAAC"}
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BUILDER_THEME_TOOLS = void 0;
|
|
4
4
|
const interface_dms_builder_1 = require("@antelopejs/interface-dms-builder");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const
|
|
6
|
+
const theme_schemas_1 = require("./theme-schemas");
|
|
7
7
|
const tool_1 = require("../tool");
|
|
8
8
|
const builder_shared_1 = require("./builder-shared");
|
|
9
9
|
const getTheme = (0, tool_1.defineTool)({
|
|
10
10
|
name: "builder_get_theme",
|
|
11
11
|
title: "Get theme",
|
|
12
|
-
description: (0, builder_shared_1.withEscalationNote)("Reads the project's theme back from its frontend layer: the CSS custom properties it overrides (`variables.shared`, `.light`, `.dark`), the palette of each Nuxt UI color role (`colors`: primary, success, warning, error, info), the public path of each logo slot per mode (`logos`: default, collapsed, email, favicon), the files they live in, whether the layer's entry imports the stylesheet, and a `version` to pass back as builder_set_theme's `expectedVersion`. Only string literals are read back: a palette or logo path the app config holds as code reads as no override. A project without a layer of its own answers `not_found`, its `ref` naming where builder_create_theme_layer would create it; a stylesheet holding rules the builder does not write answers `unsupported`."),
|
|
12
|
+
description: (0, builder_shared_1.withEscalationNote)("Reads the project's theme back from its frontend layer: the CSS custom properties it overrides (`variables.shared`, `.light`, `.dark`), the palette of each Nuxt UI color role (`colors`: primary, success, warning, error, info), the public path of each logo slot per mode (`logos`: default, collapsed, email, favicon), the files they live in, whether the layer's entry imports the stylesheet, whether the frontend loader finds the layer (`declaration.declared`: when false a saved theme never reaches the dashboard, and builder_create_theme_layer repairs it), and a `version` to pass back as builder_set_theme's `expectedVersion`. Only string literals are read back: a palette or logo path the app config holds as code reads as no override. A project without a layer of its own answers `not_found`, its `ref` naming where builder_create_theme_layer would create it; a stylesheet holding rules the builder does not write answers `unsupported`."),
|
|
13
13
|
effect: "read",
|
|
14
14
|
input: zod_1.z.object({}),
|
|
15
15
|
run: async () => (0, builder_shared_1.opResult)(await (0, interface_dms_builder_1.GetTheme)()),
|
|
@@ -19,7 +19,7 @@ const setTheme = (0, tool_1.defineTool)({
|
|
|
19
19
|
title: "Set theme",
|
|
20
20
|
description: (0, builder_shared_1.withEscalationNote)('Writes the whole theme in one transaction, replacing the one on disk: what the draft leaves out goes back to the DMS default, so start from builder_get_theme and change only what you mean to. `variables` holds custom properties, `colors` a palette per role, `logos` public paths per slot and mode. An upload sets its slot and mode over `logos`; its file is named after its content, so a new logo is a new URL. SVG is written sanitized, with an `svg_sanitized` warning when anything that runs or fetches was taken out; one that is not a single well-formed `<svg>` is refused with `invalid_config`. A variable whose value starts with a hosted font (`--font-sans: "Inter", sans-serif`; Inter, IBM Plex Sans, Public Sans, DM Sans, Manrope, Plus Jakarta Sans, Figtree, Atkinson Hyperlegible Next, Nunito, Source Serif 4) gets its files downloaded once into the layer; a download that fails writes nothing. A palette or logo path the app config holds as code stays as written when the draft leaves it as read; a draft that changes one is refused with `unsupported`, naming its key path. Pass `expectedVersion` from builder_get_theme: `stale` comes back when the files changed since. The first save that writes a stylesheet adds its import to the layer\'s entry, which reloads the page in development.'),
|
|
21
21
|
effect: "builder",
|
|
22
|
-
input:
|
|
22
|
+
input: theme_schemas_1.themeDraftSchema.extend({
|
|
23
23
|
expectedVersion: zod_1.z
|
|
24
24
|
.string()
|
|
25
25
|
.optional()
|
|
@@ -30,7 +30,7 @@ const setTheme = (0, tool_1.defineTool)({
|
|
|
30
30
|
const createThemeLayer = (0, tool_1.defineTool)({
|
|
31
31
|
name: "builder_create_theme_layer",
|
|
32
32
|
title: "Create theme layer",
|
|
33
|
-
description: (0, builder_shared_1.withEscalationNote)("Creates the frontend layer a theme is written to, for a project without one (builder_get_theme answers `not_found`): `frontend-vue/` at the project root, with a `package.json` and an entry importing the stylesheet, registered from the project's `start()` above the DMS. A project that
|
|
33
|
+
description: (0, builder_shared_1.withEscalationNote)("Creates the frontend layer a theme is written to, for a project without one (builder_get_theme answers `not_found`): `frontend-vue/` at the project root, with a `package.json` and an entry importing the stylesheet, and the project's frontend module that declares it: `src/frontend-module.ts`, named as `dmsFrontend` in the project's `package.json` for the frontend loader, and registered from the project's `start()` above the DMS. A project that has a layer which is not declared (builder_get_theme answers `declaration.declared: false`) gets it declared; a declared layer is returned unchanged, and nothing is written. The backend reloads with the registration; the frontend dev server serves the layer once restarted."),
|
|
34
34
|
effect: "builder",
|
|
35
35
|
input: zod_1.z.object({}),
|
|
36
36
|
run: async () => (0, builder_shared_1.opResult)(await (0, interface_dms_builder_1.CreateThemeLayer)()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-theme.js","sourceRoot":"","sources":["../../../src/mcp/tools/builder-theme.ts"],"names":[],"mappings":";;;AAAA,6EAI2C;AAC3C,6BAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"builder-theme.js","sourceRoot":"","sources":["../../../src/mcp/tools/builder-theme.ts"],"names":[],"mappings":";;;AAAA,6EAI2C;AAC3C,6BAAwB;AACxB,mDAAmD;AACnD,kCAAqC;AACrC,qDAAgE;AAEhE,MAAM,QAAQ,GAAG,IAAA,iBAAU,EAAC;IAC1B,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,IAAA,mCAAkB,EAC7B,86BAA86B,CAC/6B;IACD,MAAM,EAAE,MAAM;IACd,KAAK,EA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Tool)({
|
|
59
59
|
name: "database_project",
|
|
60
60
|
title: "Read the project's database wiring",
|
|
61
|
-
description: "Answers what a builder_configure_project batch that connects a database needs: `modules`, the module ids antelope.config.ts holds; `self`, the DMS's module id, which declares the catalog connection; `ownDatabase`, the project's default interface-database provider; `databasePins`, the modules to pin to it; `dmsDatabase`, the dms-database module id; `interfaceDatabase`, the version core resolves; and `drivers`, each engine's driver package with the only range the project can start, to write as the AddModule source version unchanged. An engine absent from `drivers` has no release built for that version.",
|
|
61
|
+
description: "Answers what a builder_configure_project batch that connects a database needs: `modules`, the module ids antelope.config.ts holds; `self`, the DMS's module id, which declares the catalog connection; `ownDatabase`, the project's default interface-database provider; `databasePins`, the modules to pin to it; `dmsDatabase`, the dms-database module id, whose `config.externalConnections.<id>.access` the batch sets to `read` (ask the person whether the dashboard may also change the database's rows, and grant that afterwards with builder_set_connection_access); `interfaceDatabase`, the version core resolves; and `drivers`, each engine's driver package with the only range the project can start, to write as the AddModule source version unchanged. An engine absent from `drivers` has no release built for that version.",
|
|
62
62
|
effect: "read",
|
|
63
63
|
input: zod_1.z.object({}),
|
|
64
64
|
run: async () => (0, builder_shared_1.opResult)(await (0, interface_dms_builder_1.GetDatabaseProject)()),
|