@svgrid/enterprise 2.5.2 → 2.6.0
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/dist/SvAlertRuleEditor.svelte.d.ts +13 -0
- package/dist/SvAlertsManager.svelte.d.ts +14 -0
- package/dist/SvAlertsPanel.svelte.d.ts +9 -0
- package/dist/SvAuthGate.svelte.d.ts +22 -0
- package/dist/SvBoard.svelte.d.ts +35 -0
- package/dist/SvExportMenu.svelte.d.ts +61 -0
- package/dist/SvExpressionEditor.svelte.d.ts +12 -0
- package/dist/SvFileInput.svelte.d.ts +20 -0
- package/dist/SvGridAlerts.svelte.d.ts +77 -0
- package/dist/SvGridBoard.svelte.d.ts +30 -0
- package/dist/SvGridEditPanel.svelte.d.ts +73 -0
- package/dist/SvGridMasterDetail.svelte.d.ts +49 -0
- package/dist/SvGridScheduler.svelte.d.ts +30 -0
- package/dist/SvImportDialog.svelte.d.ts +88 -0
- package/dist/SvLookupInput.svelte.d.ts +21 -0
- package/dist/SvPivotDesigner.svelte.d.ts +176 -0
- package/dist/SvRecordDetail.svelte.d.ts +58 -0
- package/dist/SvSchedule.svelte.d.ts +29 -0
- package/dist/SvSchemaChart.svelte.d.ts +61 -0
- package/dist/SvSchemaDashboard.svelte.d.ts +46 -0
- package/dist/alerts/alert-engine-attach.d.ts +79 -0
- package/dist/alerts/alert-engine-attach.js +106 -0
- package/dist/alerts/alert-engine.d.ts +42 -0
- package/dist/alerts/alert-engine.js +196 -0
- package/dist/alerts/alert-formats.d.ts +26 -0
- package/dist/alerts/alert-formats.js +58 -0
- package/dist/alerts/alert-observer.d.ts +54 -0
- package/dist/alerts/alert-observer.js +156 -0
- package/dist/alerts/alert-scheduler.d.ts +30 -0
- package/dist/alerts/alert-scheduler.js +54 -0
- package/dist/alerts/alert-storage.d.ts +31 -0
- package/dist/alerts/alert-storage.js +92 -0
- package/dist/alerts/alert-store.svelte.d.ts +24 -0
- package/dist/alerts/alert-store.svelte.js +69 -0
- package/dist/alerts/alert-types.d.ts +86 -0
- package/dist/alerts/alert-types.js +1 -0
- package/dist/alerts.d.ts +2 -0
- package/{src/alerts.ts → dist/alerts.js} +9 -9
- package/dist/board.d.ts +7 -0
- package/{src/board.ts → dist/board.js} +13 -14
- package/dist/cdn/svgrid-enterprise.svelte-external.js +2987 -2981
- package/dist/designer/assets/{index-CM5xvaOy.js → index-BF0UH638.js} +3 -3
- package/dist/designer/assets/{src-D-ET9Mmo.js → src-BPJruwB9.js} +184 -184
- package/dist/designer/index.html +2 -2
- package/dist/edit-panel.d.ts +105 -0
- package/dist/edit-panel.js +350 -0
- package/dist/export-conditional.d.ts +31 -0
- package/dist/export-conditional.js +65 -0
- package/dist/export-ooxml.d.ts +93 -0
- package/dist/export-ooxml.js +385 -0
- package/dist/export-pdf.d.ts +107 -0
- package/dist/export-pdf.js +144 -0
- package/dist/export-print.d.ts +55 -0
- package/dist/export-print.js +91 -0
- package/{src/export-serialize.ts → dist/export-serialize.d.ts} +11 -24
- package/dist/export-serialize.js +11 -0
- package/dist/export-xls.d.ts +26 -0
- package/dist/export-xls.js +157 -0
- package/dist/export.d.ts +323 -0
- package/dist/export.js +1021 -0
- package/dist/expressions/evaluate.d.ts +17 -0
- package/dist/expressions/evaluate.js +214 -0
- package/dist/expressions/expression-columns.d.ts +61 -0
- package/dist/expressions/expression-columns.js +72 -0
- package/dist/expressions/expression-types.d.ts +125 -0
- package/dist/expressions/expression-types.js +1 -0
- package/dist/expressions/parse.d.ts +25 -0
- package/dist/expressions/parse.js +537 -0
- package/dist/import.d.ts +232 -0
- package/dist/import.js +846 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +91 -0
- package/dist/install.d.ts +70 -0
- package/dist/install.js +61 -0
- package/dist/license-core.d.ts +37 -0
- package/dist/license-core.js +81 -0
- package/dist/license.d.ts +30 -0
- package/dist/license.js +139 -0
- package/dist/master-detail.d.ts +23 -0
- package/dist/master-detail.js +35 -0
- package/dist/node/studio.js +1 -1
- package/dist/pivot-chart.d.ts +28 -0
- package/dist/pivot-chart.js +71 -0
- package/dist/pivot-designer.d.ts +69 -0
- package/dist/pivot-designer.js +38 -0
- package/dist/pivot-enable.d.ts +6 -0
- package/{src/pivot-enable.ts → dist/pivot-enable.js} +13 -18
- package/dist/pivot.d.ts +111 -0
- package/dist/pivot.js +353 -0
- package/dist/print.d.ts +33 -0
- package/dist/print.js +61 -0
- package/dist/revoked.d.ts +1 -0
- package/{src/revoked.ts → dist/revoked.js} +5 -6
- package/dist/scheduler-assignments.d.ts +64 -0
- package/dist/scheduler-assignments.js +92 -0
- package/dist/scheduler-axis.d.ts +81 -0
- package/dist/scheduler-axis.js +180 -0
- package/{src/scheduler-booking.ts → dist/scheduler-booking.d.ts} +10 -43
- package/dist/scheduler-booking.js +50 -0
- package/dist/scheduler-config.d.ts +177 -0
- package/dist/scheduler-config.js +1 -0
- package/dist/scheduler-dependencies.d.ts +89 -0
- package/dist/scheduler-dependencies.js +179 -0
- package/dist/scheduler-freebusy.d.ts +19 -0
- package/{src/scheduler-freebusy.ts → dist/scheduler-freebusy.js} +9 -19
- package/{src/scheduler-heatmap.ts → dist/scheduler-heatmap.d.ts} +12 -35
- package/dist/scheduler-heatmap.js +41 -0
- package/dist/scheduler-resource-tree.d.ts +48 -0
- package/dist/scheduler-resource-tree.js +78 -0
- package/dist/scheduler-slots.d.ts +37 -0
- package/dist/scheduler-slots.js +80 -0
- package/dist/scheduler-summary.d.ts +41 -0
- package/dist/scheduler-summary.js +54 -0
- package/dist/scheduler.d.ts +7 -0
- package/{src/scheduler.ts → dist/scheduler.js} +13 -14
- package/dist/scheduling.d.ts +132 -0
- package/dist/scheduling.js +228 -0
- package/dist/schema-designer.d.ts +42 -0
- package/dist/schema-designer.js +117 -0
- package/dist/schema.d.ts +369 -0
- package/dist/schema.js +216 -0
- package/dist/smart-shim.d.ts +62 -0
- package/dist/smart-shim.js +34 -0
- package/dist/sources/aggregate.d.ts +43 -0
- package/dist/sources/aggregate.js +60 -0
- package/dist/sources/auth-supabase.d.ts +69 -0
- package/dist/sources/auth-supabase.js +39 -0
- package/dist/sources/dashboard.d.ts +65 -0
- package/dist/sources/dashboard.js +95 -0
- package/dist/sources/field-inference.d.ts +23 -0
- package/dist/sources/field-inference.js +52 -0
- package/dist/sources/filters.d.ts +35 -0
- package/dist/sources/filters.js +52 -0
- package/dist/sources/index.d.ts +18 -0
- package/dist/sources/index.js +18 -0
- package/dist/sources/introspect-supabase.d.ts +30 -0
- package/dist/sources/introspect-supabase.js +134 -0
- package/dist/sources/realtime-supabase.d.ts +37 -0
- package/dist/sources/realtime-supabase.js +52 -0
- package/dist/sources/relation-lookup.d.ts +50 -0
- package/dist/sources/relation-lookup.js +77 -0
- package/dist/sources/rest-adapters.d.ts +48 -0
- package/dist/sources/rest-adapters.js +85 -0
- package/dist/sources/rest.d.ts +38 -0
- package/dist/sources/rest.js +86 -0
- package/dist/sources/schema-from-columns.d.ts +37 -0
- package/dist/sources/schema-from-columns.js +48 -0
- package/dist/sources/supabase.d.ts +33 -0
- package/dist/sources/supabase.js +74 -0
- package/dist/sources/with-entity-rules.d.ts +25 -0
- package/dist/sources/with-entity-rules.js +47 -0
- package/dist/sources/with-relation-labels.d.ts +26 -0
- package/dist/sources/with-relation-labels.js +38 -0
- package/dist/staged-editing.d.ts +85 -0
- package/dist/staged-editing.js +0 -0
- package/dist/studio/bug-report.d.ts +61 -0
- package/dist/studio/bug-report.js +126 -0
- package/dist/studio/cli.d.ts +56 -0
- package/dist/studio/cli.js +70 -0
- package/dist/studio/copilot-core.d.ts +22 -0
- package/{src/studio/copilot-core.ts → dist/studio/copilot-core.js} +34 -38
- package/dist/studio/csv.d.ts +36 -0
- package/dist/studio/csv.js +173 -0
- package/dist/studio/db-connect-string.d.ts +45 -0
- package/dist/studio/db-connect-string.js +113 -0
- package/dist/studio/deploy-cli.d.ts +35 -0
- package/dist/studio/deploy-cli.js +81 -0
- package/dist/studio/emit-project.d.ts +77 -0
- package/dist/studio/emit-project.js +5389 -0
- package/dist/studio/emit-schema.d.ts +110 -0
- package/dist/studio/emit-schema.js +1128 -0
- package/dist/studio/index.d.ts +35 -0
- package/dist/studio/index.js +38 -0
- package/dist/studio/init-flow.d.ts +58 -0
- package/dist/studio/init-flow.js +451 -0
- package/dist/studio/introspect-db.d.ts +47 -0
- package/dist/studio/introspect-db.js +255 -0
- package/dist/studio/introspect-openapi.d.ts +19 -0
- package/dist/studio/introspect-openapi.js +244 -0
- package/dist/studio/introspect-prisma.d.ts +25 -0
- package/dist/studio/introspect-prisma.js +164 -0
- package/dist/studio/introspect.d.ts +35 -0
- package/dist/studio/introspect.js +306 -0
- package/dist/studio/project.d.ts +1327 -0
- package/dist/studio/project.js +1798 -0
- package/dist/studio/sample-data.d.ts +19 -0
- package/dist/studio/sample-data.js +207 -0
- package/dist/studio/samples/ats.d.ts +2 -0
- package/dist/studio/samples/ats.js +194 -0
- package/dist/studio/samples/clinic.d.ts +2 -0
- package/dist/studio/samples/clinic.js +171 -0
- package/dist/studio/samples/crm.d.ts +2 -0
- package/dist/studio/samples/crm.js +280 -0
- package/dist/studio/samples/datasets.d.ts +38 -0
- package/dist/studio/samples/datasets.js +296 -0
- package/dist/studio/samples/ecommerce.d.ts +2 -0
- package/dist/studio/samples/ecommerce.js +178 -0
- package/dist/studio/samples/events.d.ts +2 -0
- package/dist/studio/samples/events.js +192 -0
- package/dist/studio/samples/fleet.d.ts +2 -0
- package/dist/studio/samples/fleet.js +203 -0
- package/dist/studio/samples/gym.d.ts +2 -0
- package/dist/studio/samples/gym.js +205 -0
- package/dist/studio/samples/hr.d.ts +2 -0
- package/dist/studio/samples/hr.js +186 -0
- package/dist/studio/samples/index.d.ts +13 -0
- package/dist/studio/samples/index.js +44 -0
- package/dist/studio/samples/insurance.d.ts +2 -0
- package/dist/studio/samples/insurance.js +220 -0
- package/dist/studio/samples/inventory.d.ts +2 -0
- package/dist/studio/samples/inventory.js +204 -0
- package/dist/studio/samples/invoicing.d.ts +2 -0
- package/dist/studio/samples/invoicing.js +154 -0
- package/dist/studio/samples/library.d.ts +2 -0
- package/dist/studio/samples/library.js +171 -0
- package/dist/studio/samples/live-data.d.ts +5 -0
- package/dist/studio/samples/live-data.js +261 -0
- package/dist/studio/samples/projects.d.ts +2 -0
- package/dist/studio/samples/projects.js +203 -0
- package/dist/studio/samples/realestate.d.ts +2 -0
- package/dist/studio/samples/realestate.js +187 -0
- package/dist/studio/samples/restaurant.d.ts +2 -0
- package/dist/studio/samples/restaurant.js +180 -0
- package/dist/studio/samples/school.d.ts +2 -0
- package/dist/studio/samples/school.js +188 -0
- package/dist/studio/samples/shared.d.ts +142 -0
- package/dist/studio/samples/shared.js +164 -0
- package/dist/studio/samples/starter.d.ts +4 -0
- package/dist/studio/samples/starter.js +237 -0
- package/dist/studio/samples/subscriptions.d.ts +2 -0
- package/dist/studio/samples/subscriptions.js +175 -0
- package/dist/studio/samples/support.d.ts +2 -0
- package/dist/studio/samples/support.js +209 -0
- package/dist/studio/scaffold-app.d.ts +22 -0
- package/{src/studio/scaffold-app.ts → dist/studio/scaffold-app.js} +45 -63
- package/dist/studio/scaffold.d.ts +63 -0
- package/dist/studio/scaffold.js +346 -0
- package/dist/studio/screen-suites.d.ts +193 -0
- package/dist/studio/screen-suites.js +297 -0
- package/dist/studio/themes.d.ts +34 -0
- package/dist/studio/themes.js +41 -0
- package/dist/studio/ui-components.d.ts +89 -0
- package/dist/studio/ui-components.generated.d.ts +29 -0
- package/dist/studio/ui-components.generated.js +7139 -0
- package/dist/studio/ui-components.js +673 -0
- package/dist/studio/user-error.d.ts +23 -0
- package/{src/studio/user-error.ts → dist/studio/user-error.js} +10 -13
- package/dist/studio/verify.d.ts +34 -0
- package/dist/studio/verify.js +47 -0
- package/dist/sveltekit/in-memory.d.ts +14 -0
- package/dist/sveltekit/in-memory.js +113 -0
- package/dist/sveltekit/index.d.ts +6 -0
- package/dist/sveltekit/index.js +5 -0
- package/dist/sveltekit/query-plan.d.ts +44 -0
- package/dist/sveltekit/query-plan.js +76 -0
- package/dist/sveltekit/sql-source.d.ts +47 -0
- package/dist/sveltekit/sql-source.js +106 -0
- package/dist/sveltekit/sql.d.ts +48 -0
- package/dist/sveltekit/sql.js +73 -0
- package/dist/sveltekit/transport.d.ts +209 -0
- package/dist/sveltekit/transport.js +219 -0
- package/{src/sveltekit/types.ts → dist/sveltekit/types.d.ts} +8 -11
- package/dist/sveltekit/types.js +1 -0
- package/dist/upgrade-prompt.d.ts +16 -0
- package/dist/upgrade-prompt.js +141 -0
- package/dist/version.d.ts +13 -0
- package/{src/version.ts → dist/version.js} +1 -1
- package/dist/watermark.d.ts +2 -0
- package/dist/watermark.js +146 -0
- package/package.json +26 -24
- package/src/SvBoard.dom.test.ts +0 -67
- package/src/SvGridAlerts.dom.test.ts +0 -113
- package/src/SvGridEditPanel.dom.test.ts +0 -320
- package/src/SvRecordDetail.dom.test.ts +0 -137
- package/src/SvSchedule.dom.test.ts +0 -57
- package/src/ai-export-pdf.dom.test.ts +0 -77
- package/src/ai-export-xlsx.dom.test.ts +0 -90
- package/src/ai-export.dom.test.ts +0 -114
- package/src/alerts/alert-engine-attach.ts +0 -165
- package/src/alerts/alert-engine.test.ts +0 -135
- package/src/alerts/alert-engine.ts +0 -260
- package/src/alerts/alert-formats.test.ts +0 -87
- package/src/alerts/alert-formats.ts +0 -77
- package/src/alerts/alert-observer.test.ts +0 -189
- package/src/alerts/alert-observer.ts +0 -208
- package/src/alerts/alert-scheduler.ts +0 -96
- package/src/alerts/alert-storage.test.ts +0 -54
- package/src/alerts/alert-storage.ts +0 -116
- package/src/alerts/alert-store.svelte.ts +0 -80
- package/src/alerts/alert-types.ts +0 -94
- package/src/board.dom.test.ts +0 -941
- package/src/edit-panel.test.ts +0 -322
- package/src/edit-panel.ts +0 -379
- package/src/export-conditional.test.ts +0 -60
- package/src/export-conditional.ts +0 -94
- package/src/export-ooxml.test.ts +0 -152
- package/src/export-ooxml.ts +0 -489
- package/src/export-pdf.test.ts +0 -138
- package/src/export-pdf.ts +0 -245
- package/src/export-print.test.ts +0 -66
- package/src/export-print.ts +0 -132
- package/src/export-serialize.test.ts +0 -56
- package/src/export-xls.ts +0 -199
- package/src/export-xlsx-roundtrip.test.ts +0 -120
- package/src/export-xlsx.test.ts +0 -150
- package/src/export.test.ts +0 -349
- package/src/export.ts +0 -1464
- package/src/expressions/evaluate.test.ts +0 -111
- package/src/expressions/evaluate.ts +0 -237
- package/src/expressions/expression-columns.ts +0 -133
- package/src/expressions/expression-types.ts +0 -84
- package/src/expressions/parse.test.ts +0 -106
- package/src/expressions/parse.ts +0 -610
- package/src/import-automap.test.ts +0 -131
- package/src/import-hardening.test.ts +0 -158
- package/src/import.test.ts +0 -415
- package/src/import.ts +0 -1044
- package/src/index.ts +0 -569
- package/src/install.ts +0 -154
- package/src/license-core.test.ts +0 -23
- package/src/license-core.ts +0 -107
- package/src/license-expiry.test.ts +0 -127
- package/src/license.ts +0 -137
- package/src/master-detail.test.ts +0 -61
- package/src/master-detail.ts +0 -42
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +0 -178
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-ZrPsKxob.js +0 -3875
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-ZrPsKxob.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-ACqvWGE2.js +0 -21
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-ACqvWGE2.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-D3w5jt92.js +0 -1938
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-D3w5jt92.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-CC2V3H0y.js +0 -205
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-CC2V3H0y.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-BXP37tAa.js +0 -18
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-BXP37tAa.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-DwubnU5b.js +0 -264
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-DwubnU5b.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-hD7f6PUz.js +0 -697
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-hD7f6PUz.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +0 -134
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +0 -55
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +0 -2
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +0 -46843
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +0 -237
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +0 -2
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +0 -4
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +0 -7
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +0 -4
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +0 -5
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +0 -5
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +0 -5
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +0 -6
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +0 -83
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +0 -559
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +0 -24
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +0 -122
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +0 -2
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +0 -89
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +0 -241
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DBx1SCN6.js +0 -4938
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DBx1SCN6.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-gjfpSTFS.js +0 -495
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-gjfpSTFS.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-DKoOKg8S.js +0 -190
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-DKoOKg8S.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-C0MiR7eR.js +0 -8
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-C0MiR7eR.js.map +0 -1
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-B6Y7P0Q-.js +0 -138
- package/src/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-B6Y7P0Q-.js.map +0 -1
- package/src/pivot-chart.test.ts +0 -86
- package/src/pivot-chart.ts +0 -112
- package/src/pivot-designer.ts +0 -101
- package/src/pivot.test.ts +0 -335
- package/src/pivot.ts +0 -578
- package/src/print.ts +0 -107
- package/src/scheduler-assignments.test.ts +0 -97
- package/src/scheduler-assignments.ts +0 -134
- package/src/scheduler-axis.test.ts +0 -108
- package/src/scheduler-axis.ts +0 -238
- package/src/scheduler-booking.test.ts +0 -57
- package/src/scheduler-config.ts +0 -179
- package/src/scheduler-dependencies.test.ts +0 -155
- package/src/scheduler-dependencies.ts +0 -223
- package/src/scheduler-freebusy.test.ts +0 -41
- package/src/scheduler-heatmap.test.ts +0 -39
- package/src/scheduler-resource-tree.test.ts +0 -84
- package/src/scheduler-resource-tree.ts +0 -107
- package/src/scheduler-slots.test.ts +0 -53
- package/src/scheduler-slots.ts +0 -94
- package/src/scheduler-summary.test.ts +0 -47
- package/src/scheduler-summary.ts +0 -81
- package/src/scheduling.test.ts +0 -194
- package/src/scheduling.ts +0 -293
- package/src/schema-designer.test.ts +0 -121
- package/src/schema-designer.ts +0 -142
- package/src/schema.test.ts +0 -268
- package/src/schema.ts +0 -562
- package/src/smart-shim.ts +0 -107
- package/src/sources/aggregate.test.ts +0 -79
- package/src/sources/aggregate.ts +0 -102
- package/src/sources/auth-supabase.test.ts +0 -80
- package/src/sources/auth-supabase.ts +0 -87
- package/src/sources/dashboard.kpi.test.ts +0 -50
- package/src/sources/dashboard.test.ts +0 -61
- package/src/sources/dashboard.ts +0 -136
- package/src/sources/field-inference.test.ts +0 -60
- package/src/sources/field-inference.ts +0 -63
- package/src/sources/filters.test.ts +0 -58
- package/src/sources/filters.ts +0 -70
- package/src/sources/index.ts +0 -67
- package/src/sources/introspect-supabase.test.ts +0 -112
- package/src/sources/introspect-supabase.ts +0 -139
- package/src/sources/realtime-supabase.test.ts +0 -93
- package/src/sources/realtime-supabase.ts +0 -99
- package/src/sources/relation-lookup.test.ts +0 -99
- package/src/sources/relation-lookup.ts +0 -128
- package/src/sources/rest-adapters.test.ts +0 -95
- package/src/sources/rest-adapters.ts +0 -120
- package/src/sources/rest.test.ts +0 -104
- package/src/sources/rest.ts +0 -129
- package/src/sources/schema-from-columns.test.ts +0 -106
- package/src/sources/schema-from-columns.ts +0 -88
- package/src/sources/supabase.test.ts +0 -110
- package/src/sources/supabase.ts +0 -99
- package/src/sources/with-entity-rules.test.ts +0 -104
- package/src/sources/with-entity-rules.ts +0 -78
- package/src/sources/with-relation-labels.test.ts +0 -75
- package/src/sources/with-relation-labels.ts +0 -73
- package/src/staged-editing.ts +0 -0
- package/src/studio/bug-report.test.ts +0 -101
- package/src/studio/bug-report.ts +0 -165
- package/src/studio/cli.test.ts +0 -187
- package/src/studio/cli.ts +0 -117
- package/src/studio/copilot-core.test.ts +0 -45
- package/src/studio/csv.test.ts +0 -90
- package/src/studio/csv.ts +0 -165
- package/src/studio/db-connect-string.test.ts +0 -94
- package/src/studio/db-connect-string.ts +0 -128
- package/src/studio/deploy-cli.test.ts +0 -56
- package/src/studio/deploy-cli.ts +0 -100
- package/src/studio/emit-project.test.ts +0 -3324
- package/src/studio/emit-project.ts +0 -5377
- package/src/studio/emit-schema.test.ts +0 -111
- package/src/studio/emit-schema.ts +0 -1181
- package/src/studio/index.ts +0 -380
- package/src/studio/init-flow.test.ts +0 -514
- package/src/studio/init-flow.ts +0 -556
- package/src/studio/introspect-db.test.ts +0 -186
- package/src/studio/introspect-db.ts +0 -312
- package/src/studio/introspect-openapi.test.ts +0 -84
- package/src/studio/introspect-openapi.ts +0 -252
- package/src/studio/introspect-prisma.test.ts +0 -99
- package/src/studio/introspect-prisma.ts +0 -175
- package/src/studio/introspect.test.ts +0 -172
- package/src/studio/introspect.ts +0 -310
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +0 -1
- package/src/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +0 -3
- package/src/studio/pipeline.test.ts +0 -42
- package/src/studio/project-robust.test.ts +0 -157
- package/src/studio/project.test.ts +0 -929
- package/src/studio/project.ts +0 -2394
- package/src/studio/sample-data.test.ts +0 -58
- package/src/studio/sample-data.ts +0 -203
- package/src/studio/samples/ats.ts +0 -202
- package/src/studio/samples/clinic.ts +0 -179
- package/src/studio/samples/crm.ts +0 -291
- package/src/studio/samples/datasets.test.ts +0 -84
- package/src/studio/samples/datasets.ts +0 -340
- package/src/studio/samples/ecommerce.ts +0 -187
- package/src/studio/samples/events.ts +0 -201
- package/src/studio/samples/fleet.ts +0 -213
- package/src/studio/samples/gym.ts +0 -215
- package/src/studio/samples/hr.ts +0 -195
- package/src/studio/samples/index.ts +0 -55
- package/src/studio/samples/insurance.ts +0 -229
- package/src/studio/samples/inventory.ts +0 -213
- package/src/studio/samples/invoicing.ts +0 -162
- package/src/studio/samples/library.ts +0 -180
- package/src/studio/samples/live-data.test.ts +0 -99
- package/src/studio/samples/live-data.ts +0 -306
- package/src/studio/samples/projects.ts +0 -212
- package/src/studio/samples/realestate.ts +0 -196
- package/src/studio/samples/restaurant.ts +0 -189
- package/src/studio/samples/samples.test.ts +0 -304
- package/src/studio/samples/school.ts +0 -197
- package/src/studio/samples/seed-floor.test.ts +0 -25
- package/src/studio/samples/shared.ts +0 -237
- package/src/studio/samples/starter.ts +0 -251
- package/src/studio/samples/subscriptions.ts +0 -183
- package/src/studio/samples/support.ts +0 -216
- package/src/studio/scaffold-app.test.ts +0 -91
- package/src/studio/scaffold.test.ts +0 -192
- package/src/studio/scaffold.ts +0 -390
- package/src/studio/screen-suites.test.ts +0 -269
- package/src/studio/screen-suites.ts +0 -448
- package/src/studio/themes.ts +0 -62
- package/src/studio/ui-components-surface.test.ts +0 -185
- package/src/studio/ui-components.generated.ts +0 -7154
- package/src/studio/ui-components.ts +0 -742
- package/src/studio/verify.test.ts +0 -47
- package/src/studio/verify.ts +0 -79
- package/src/sveltekit/in-memory.test.ts +0 -104
- package/src/sveltekit/in-memory.ts +0 -129
- package/src/sveltekit/index.ts +0 -24
- package/src/sveltekit/query-plan.test.ts +0 -109
- package/src/sveltekit/query-plan.ts +0 -125
- package/src/sveltekit/sql-source.test.ts +0 -198
- package/src/sveltekit/sql-source.ts +0 -171
- package/src/sveltekit/sql.test.ts +0 -80
- package/src/sveltekit/sql.ts +0 -131
- package/src/sveltekit/transport-scope.test.ts +0 -125
- package/src/sveltekit/transport.test.ts +0 -201
- package/src/sveltekit/transport.ts +0 -373
- package/src/upgrade-prompt.test.ts +0 -71
- package/src/upgrade-prompt.ts +0 -162
- package/src/version.test.ts +0 -17
- package/src/watermark.test.ts +0 -97
- package/src/watermark.ts +0 -156
- /package/{src → dist}/SvAlertRuleEditor.svelte +0 -0
- /package/{src → dist}/SvAlertsManager.svelte +0 -0
- /package/{src → dist}/SvAlertsPanel.svelte +0 -0
- /package/{src → dist}/SvAuthGate.svelte +0 -0
- /package/{src → dist}/SvBoard.svelte +0 -0
- /package/{src → dist}/SvExportMenu.svelte +0 -0
- /package/{src → dist}/SvExpressionEditor.svelte +0 -0
- /package/{src → dist}/SvFileInput.svelte +0 -0
- /package/{src → dist}/SvGridAlerts.svelte +0 -0
- /package/{src → dist}/SvGridBoard.svelte +0 -0
- /package/{src → dist}/SvGridEditPanel.svelte +0 -0
- /package/{src → dist}/SvGridMasterDetail.svelte +0 -0
- /package/{src → dist}/SvGridScheduler.svelte +0 -0
- /package/{src → dist}/SvImportDialog.svelte +0 -0
- /package/{src → dist}/SvLookupInput.svelte +0 -0
- /package/{src → dist}/SvPivotDesigner.svelte +0 -0
- /package/{src → dist}/SvRecordDetail.svelte +0 -0
- /package/{src → dist}/SvSchedule.svelte +0 -0
- /package/{src → dist}/SvSchemaChart.svelte +0 -0
- /package/{src → dist}/SvSchemaDashboard.svelte +0 -0
- /package/{src → dist}/pdfmake-shims.d.ts +0 -0
- /package/{src → dist}/smart.export.d.ts +0 -0
- /package/{src → dist}/smart.export.js +0 -0
- /package/{src → dist}/studio/HANDLERS-DESIGN.md +0 -0
- /package/{src → dist/studio}/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js.map +0 -0
- /package/{src → dist/studio}/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js.map +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js +0 -0
- /package/{src → dist}/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js.map +0 -0
|
@@ -0,0 +1,1327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Studio project model - the declarative spine the visual designer edits and the
|
|
3
|
+
* codegen emits. A project is a multi-entity app: `entities` (the data model) +
|
|
4
|
+
* `screens` (one per entity by default), where a screen is an ordered list of
|
|
5
|
+
* data-bound `blocks` (grid, form, chart, dashboard, KPI, master-detail, lookup).
|
|
6
|
+
*
|
|
7
|
+
* Pure + node-safe (lives in the `./studio` subtree - `.js` imports, no Svelte,
|
|
8
|
+
* no `sources/`), mirroring the immutable-ops style of `schema-designer.ts`:
|
|
9
|
+
* every mutation returns a NEW project so Svelte reactivity + undo stay simple.
|
|
10
|
+
* Block-config unions are defined here (not imported from `sources/`) to keep the
|
|
11
|
+
* module resolvable under node16.
|
|
12
|
+
*/
|
|
13
|
+
import type { EntitySchema, FormSection } from '../schema.js';
|
|
14
|
+
import type { ChartType, DockManagerState } from '@svgrid/grid';
|
|
15
|
+
export type Reduce = 'sum' | 'avg' | 'count' | 'min' | 'max';
|
|
16
|
+
export type DataSourceKind = 'memory' | 'sql' | 'supabase' | 'rest' | 'pglite';
|
|
17
|
+
export type Presentation = 'modal' | 'drawer' | 'inline';
|
|
18
|
+
export type RestMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
19
|
+
export type ParamLocation = 'path' | 'query' | 'header';
|
|
20
|
+
export type ParamType = 'string' | 'number' | 'boolean';
|
|
21
|
+
/** One request parameter in the REST builder (path `{id}`, query, or header). */
|
|
22
|
+
export type RequestParam = {
|
|
23
|
+
name: string;
|
|
24
|
+
location: ParamLocation;
|
|
25
|
+
type: ParamType;
|
|
26
|
+
value?: string;
|
|
27
|
+
};
|
|
28
|
+
export type SqlDialectKind = 'postgres' | 'mysql' | 'sqlite' | 'mssql' | 'supabase' | 'turso';
|
|
29
|
+
/** In-memory (seeded) source. `seed` carries curated rows (e.g. a sample app);
|
|
30
|
+
* when absent the codegen + preview synthesize realistic rows. */
|
|
31
|
+
export type MemorySource = {
|
|
32
|
+
kind: 'memory';
|
|
33
|
+
seed?: Record<string, unknown>[];
|
|
34
|
+
};
|
|
35
|
+
/** Wire-format preset that teaches the REST source how a backend pages / sorts /
|
|
36
|
+
* wraps its rows, so the generated grid does REAL server-side paging + sort (not a
|
|
37
|
+
* single fetched page). Maps to the `offsetLimit` / `dummyjson` / `jsonServer`
|
|
38
|
+
* adapters in `@svgrid/enterprise`. Absent = the legacy manual `rowsPath`/`totalPath`
|
|
39
|
+
* (parse only; no server paging). */
|
|
40
|
+
export type RestAdapterConfig = {
|
|
41
|
+
kind: 'dummyjson';
|
|
42
|
+
rowsKey?: string;
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'jsonServer';
|
|
45
|
+
} | {
|
|
46
|
+
kind: 'offsetLimit';
|
|
47
|
+
offsetParam?: string;
|
|
48
|
+
limitParam?: string;
|
|
49
|
+
sortByParam?: string;
|
|
50
|
+
orderParam?: string;
|
|
51
|
+
searchParam?: string;
|
|
52
|
+
rowsKey?: string;
|
|
53
|
+
totalKey?: string;
|
|
54
|
+
};
|
|
55
|
+
export type RestSource = {
|
|
56
|
+
kind: 'rest';
|
|
57
|
+
/** Origin + version prefix, e.g. `https://api.example.com/v1`. */
|
|
58
|
+
baseUrl: string;
|
|
59
|
+
/** Collection path, e.g. `customers` or `albums/{id}/tracks`. */
|
|
60
|
+
path: string;
|
|
61
|
+
method: RestMethod;
|
|
62
|
+
params: RequestParam[];
|
|
63
|
+
idField?: string;
|
|
64
|
+
/** Wire-format preset for real server paging/sort (offsetLimit / dummyjson /
|
|
65
|
+
* jsonServer). When set, it supersedes `rowsPath`/`totalPath`. */
|
|
66
|
+
adapter?: RestAdapterConfig;
|
|
67
|
+
/** Dotted path in the response body holding the rows, e.g. `data.items`. */
|
|
68
|
+
rowsPath?: string;
|
|
69
|
+
/** Dotted path holding the total row count, e.g. `data.total`. */
|
|
70
|
+
totalPath?: string;
|
|
71
|
+
};
|
|
72
|
+
export type SqlSource = {
|
|
73
|
+
kind: 'sql';
|
|
74
|
+
table: string;
|
|
75
|
+
dialect?: SqlDialectKind; /** DB schema / search path (Postgres/MSSQL); default `public`. Qualifies the table. */
|
|
76
|
+
schema?: string;
|
|
77
|
+
};
|
|
78
|
+
export type SupabaseSource = {
|
|
79
|
+
kind: 'supabase';
|
|
80
|
+
table: string;
|
|
81
|
+
url?: string;
|
|
82
|
+
key?: string;
|
|
83
|
+
realtime?: boolean;
|
|
84
|
+
};
|
|
85
|
+
/** Embedded Postgres (PGlite) - a real, persistent database with ZERO backend
|
|
86
|
+
* setup. Runs in the browser, persisting to IndexedDB. Swap for a `sql` source
|
|
87
|
+
* pointed at hosted Postgres to go to production (same schema + SQL). */
|
|
88
|
+
export type PgliteSource = {
|
|
89
|
+
kind: 'pglite';
|
|
90
|
+
table: string;
|
|
91
|
+
seed?: Record<string, unknown>[];
|
|
92
|
+
};
|
|
93
|
+
/** Where one entity's rows come from. */
|
|
94
|
+
export type EntityDataSource = MemorySource | RestSource | SqlSource | SupabaseSource | PgliteSource;
|
|
95
|
+
/** The kinds of block a screen can hold: data-bound (entity-derived) or the
|
|
96
|
+
* entity-agnostic `'component'` (a UI-kit component from `UI_COMPONENT_REGISTRY`,
|
|
97
|
+
* usable on any screen, including a freestanding one with no entity). */
|
|
98
|
+
export type BlockKind = 'grid' | 'form' | 'chart' | 'dashboard' | 'kpi' | 'gauge' | 'tree' | 'tabs' | 'accordion' | 'master-detail' | 'lookup' | 'pivot' | 'filter' | 'record' | 'board' | 'calendar' | 'detail' | 'component';
|
|
99
|
+
export type GridAlign = 'left' | 'center' | 'right';
|
|
100
|
+
/** No-code per-column value formatting. Compiles to the grid's `format` (CellFormatConfig):
|
|
101
|
+
* a raw `1234.5` becomes `$1,234.50` / `42%` / `Jun 27, 2026` without a code renderer. */
|
|
102
|
+
export type ColumnFormat = {
|
|
103
|
+
type: 'number';
|
|
104
|
+
decimals?: number;
|
|
105
|
+
} | {
|
|
106
|
+
type: 'currency';
|
|
107
|
+
currency?: string;
|
|
108
|
+
} | {
|
|
109
|
+
type: 'percent';
|
|
110
|
+
decimals?: number; /** cell values are 0-100 (42 -> 42%) not 0-1. */
|
|
111
|
+
valueIsPercentPoints?: boolean;
|
|
112
|
+
} | {
|
|
113
|
+
type: 'date';
|
|
114
|
+
pattern?: string;
|
|
115
|
+
} | {
|
|
116
|
+
type: 'datetime';
|
|
117
|
+
pattern?: string;
|
|
118
|
+
};
|
|
119
|
+
/** No-code rich cell renderer for a column. Unlike `ColumnFormat` (value formatting),
|
|
120
|
+
* these render a component/link: an auto-colored status pill, a progress bar, or a
|
|
121
|
+
* clickable link. Compiles to a `cell` snippet on the column. Mutually exclusive with
|
|
122
|
+
* `format` (a cell is either formatted text or a rich renderer). */
|
|
123
|
+
export type ColumnCellType = {
|
|
124
|
+
kind: 'badge';
|
|
125
|
+
} | {
|
|
126
|
+
kind: 'progress';
|
|
127
|
+
max?: number;
|
|
128
|
+
} | {
|
|
129
|
+
kind: 'link';
|
|
130
|
+
as?: 'url' | 'email' | 'tel';
|
|
131
|
+
};
|
|
132
|
+
export type GridColumnConfig = {
|
|
133
|
+
field: string;
|
|
134
|
+
show: boolean;
|
|
135
|
+
header?: string;
|
|
136
|
+
width?: number;
|
|
137
|
+
align?: GridAlign;
|
|
138
|
+
pin?: 'left' | 'right'; /** Aggregate this column into the group summary row when the grid is grouped. */
|
|
139
|
+
aggregate?: Reduce; /** No-code display formatting (currency / percent / date / ...). */
|
|
140
|
+
format?: ColumnFormat; /** No-code rich cell renderer (badge / progress / link). */
|
|
141
|
+
cellType?: ColumnCellType;
|
|
142
|
+
};
|
|
143
|
+
/** How a grid edits its rows: read-only, inline (Excel-style cells), or a popup form. */
|
|
144
|
+
export type GridEditing = 'none' | 'inline' | 'form';
|
|
145
|
+
/** Row height preset. */
|
|
146
|
+
export type GridDensity = 'compact' | 'normal' | 'comfortable';
|
|
147
|
+
/** Where the pagination footer sits. */
|
|
148
|
+
export type PagerPosition = 'top' | 'bottom' | 'both';
|
|
149
|
+
export type GridConfig = {
|
|
150
|
+
kind: 'grid';
|
|
151
|
+
columns: GridColumnConfig[];
|
|
152
|
+
pageSize: number;
|
|
153
|
+
selectable: boolean;
|
|
154
|
+
sortable: boolean;
|
|
155
|
+
filterable: boolean;
|
|
156
|
+
/** Which filtering surfaces show when `filterable` is on. Undefined = the global search
|
|
157
|
+
* box only (back-compat). Combine a global search, a per-column filter row, and/or the
|
|
158
|
+
* column header filter menu. */
|
|
159
|
+
filterUi?: GridFilterUi;
|
|
160
|
+
editing: GridEditing;
|
|
161
|
+
/** Presentation of the edit form when `editing === 'form'`. */
|
|
162
|
+
formPresentation: Presentation;
|
|
163
|
+
/** Form layout depth (all optional; default = the auto 2-column form of all fields). */
|
|
164
|
+
formColumns?: 1 | 2 | 3;
|
|
165
|
+
/** Restrict + order the form's fields (field names). */
|
|
166
|
+
formFields?: string[];
|
|
167
|
+
/** Group fields into titled fieldsets. Overrides the entity's own
|
|
168
|
+
* `EntitySchema.form.sections` for this grid's form. */
|
|
169
|
+
formSections?: FormSection[];
|
|
170
|
+
/** Dialog title override + width for the modal/drawer form. */
|
|
171
|
+
formTitle?: string;
|
|
172
|
+
formSize?: 'sm' | 'md' | 'lg';
|
|
173
|
+
density: GridDensity;
|
|
174
|
+
striped: boolean;
|
|
175
|
+
/** Excel-style cell/range selection. */
|
|
176
|
+
cellSelection: boolean;
|
|
177
|
+
/** Show a totals/summary footer row. */
|
|
178
|
+
rowSummaries: boolean;
|
|
179
|
+
/** Paginate (false shows all rows, no pager). */
|
|
180
|
+
paginated: boolean;
|
|
181
|
+
/** Where the pager sits when paginated. */
|
|
182
|
+
paginationPosition: PagerPosition;
|
|
183
|
+
/** Page-size choices in the pager's selector. */
|
|
184
|
+
pageSizeOptions: number[];
|
|
185
|
+
/** Drill-through: clicking a row navigates to `screen`, filtered by the clicked
|
|
186
|
+
* row's `sourceField` value on the target's `targetField`. */
|
|
187
|
+
rowLink?: RowLink;
|
|
188
|
+
/** Per-row action buttons (edit / delete / navigate) shown in an actions column. */
|
|
189
|
+
rowActions?: RowAction[];
|
|
190
|
+
/** No-code conditional formatting: color / bold a cell by its value. Compiled to
|
|
191
|
+
* the grid's `conditionalFormats` rule engine. */
|
|
192
|
+
formatRules?: FormatRule[];
|
|
193
|
+
/** No-code row grouping: fields to group rows by (outermost first). When set, the
|
|
194
|
+
* grid loads the full dataset and groups/sorts/paginates client-side (so groups
|
|
195
|
+
* span every row, not just a server page) and shows the grouping controls. Per-column
|
|
196
|
+
* `aggregate` values roll up into each group's summary row. */
|
|
197
|
+
grouping?: string[];
|
|
198
|
+
/** No-code export toolbar: a button bar above the grid wired to the grid's own
|
|
199
|
+
* export API (CSV / JSON / copy-to-clipboard - no extra dependencies). */
|
|
200
|
+
export?: GridExportConfig;
|
|
201
|
+
/** No-code tree data: render the grid's own rows as an expand/collapse hierarchy
|
|
202
|
+
* built from a self-referential parent field. Mutually exclusive with `grouping`. */
|
|
203
|
+
treeData?: TreeDataConfig;
|
|
204
|
+
/** Render the grid's rows as a calendar / scheduler (a view of the grid, like the
|
|
205
|
+
* Kanban board). Mutually exclusive with grouping / tree. Uses the enterprise
|
|
206
|
+
* scheduler renderer (`enableSchedulerView`). */
|
|
207
|
+
scheduler?: SchedulerViewConfig;
|
|
208
|
+
/** Raw SvGrid prop overrides from the block's "All properties" panel - every grid
|
|
209
|
+
* prop the curated controls don't manage. Passed straight through to `<SvGrid>`
|
|
210
|
+
* (deduped against the curated props at codegen time). */
|
|
211
|
+
props?: Record<string, unknown>;
|
|
212
|
+
};
|
|
213
|
+
/** Which calendar view the scheduler opens on / offers. */
|
|
214
|
+
export type SchedulerViewMode = 'month' | 'week' | 'day' | 'agenda' | 'timelineDay' | 'timelineWeek' | 'timelineMonth' | 'timelineYear';
|
|
215
|
+
/** No-code scheduler-view config: map the entity's fields onto calendar events. Only
|
|
216
|
+
* `startField` is required; the rest are optional refinements. Compiles to SvGrid's
|
|
217
|
+
* `scheduler` prop + write-back handlers. */
|
|
218
|
+
export type SchedulerViewConfig = {
|
|
219
|
+
/** Field holding the event start (Date / epoch / ISO string). Required. */
|
|
220
|
+
startField: string;
|
|
221
|
+
/** Field holding the event end. Omit to use a default duration from the start. */
|
|
222
|
+
endField?: string;
|
|
223
|
+
/** Field for the event title. Defaults to the first column. */
|
|
224
|
+
titleField?: string;
|
|
225
|
+
/** Field holding a per-event accent color. */
|
|
226
|
+
colorField?: string;
|
|
227
|
+
/** Field that groups events into per-resource columns (people / rooms / machines). */
|
|
228
|
+
resourceField?: string;
|
|
229
|
+
/** Field holding a recurrence rule (one event per matching day). */
|
|
230
|
+
recurrenceField?: string;
|
|
231
|
+
/** Boolean field marking an all-day event. */
|
|
232
|
+
allDayField?: string;
|
|
233
|
+
/** The view shown first. Default 'month'. */
|
|
234
|
+
initialView?: SchedulerViewMode;
|
|
235
|
+
/** Enable drag-to-move + edge-resize (writes back through the data source). */
|
|
236
|
+
editable?: boolean;
|
|
237
|
+
/** Show the built-in event detail drawer. */
|
|
238
|
+
drawer?: boolean;
|
|
239
|
+
};
|
|
240
|
+
/** Tree-data grid config: `parentField` is a self-referential FK (a row whose parent is
|
|
241
|
+
* empty / not in the set is a root); `labelField` is the column that shows the indented,
|
|
242
|
+
* expandable tree cell. */
|
|
243
|
+
export type TreeDataConfig = {
|
|
244
|
+
parentField: string;
|
|
245
|
+
labelField: string;
|
|
246
|
+
};
|
|
247
|
+
/** Which export affordances the grid toolbar shows. All go through the grid's built-in
|
|
248
|
+
* export API (dependency-free). Empty / all-false = no toolbar. */
|
|
249
|
+
/** Export buttons on a grid's toolbar.
|
|
250
|
+
*
|
|
251
|
+
* `csv` / `json` / `copy` use the free grid API. `xlsx` / `pdf` / `print` go
|
|
252
|
+
* through `@svgrid/enterprise` (real OOXML, pdfmake, paginated print) and pull
|
|
253
|
+
* in their optional peer deps - jszip for xlsx, pdfmake for pdf - which the
|
|
254
|
+
* generated package.json declares only when the button is switched on. */
|
|
255
|
+
export type GridExportConfig = {
|
|
256
|
+
csv?: boolean;
|
|
257
|
+
json?: boolean;
|
|
258
|
+
copy?: boolean;
|
|
259
|
+
xlsx?: boolean;
|
|
260
|
+
pdf?: boolean;
|
|
261
|
+
print?: boolean;
|
|
262
|
+
};
|
|
263
|
+
/** Which filtering surfaces the grid shows (when `filterable`). `global` = the search-all
|
|
264
|
+
* box, `row` = a filter input under each header, `menu` = the column header filter menu. */
|
|
265
|
+
export type GridFilterUi = {
|
|
266
|
+
global?: boolean;
|
|
267
|
+
row?: boolean;
|
|
268
|
+
menu?: boolean;
|
|
269
|
+
};
|
|
270
|
+
/** A conditional-formatting comparison. */
|
|
271
|
+
export type FormatOp = 'eq' | 'ne' | 'lt' | 'lte' | 'gt' | 'gte' | 'contains' | 'empty' | 'notEmpty';
|
|
272
|
+
/** One no-code format rule: style a `field`'s cell when the comparison holds. */
|
|
273
|
+
export type FormatRule = {
|
|
274
|
+
field: string;
|
|
275
|
+
op: FormatOp;
|
|
276
|
+
value?: string | number;
|
|
277
|
+
color?: string;
|
|
278
|
+
background?: string;
|
|
279
|
+
bold?: boolean;
|
|
280
|
+
};
|
|
281
|
+
/** A row-click drill-through to another screen. */
|
|
282
|
+
export type RowLink = {
|
|
283
|
+
screen: string;
|
|
284
|
+
sourceField?: string;
|
|
285
|
+
targetField: string;
|
|
286
|
+
};
|
|
287
|
+
/** One per-row action button. */
|
|
288
|
+
export type RowActionKind = 'edit' | 'delete' | 'navigate' | 'custom';
|
|
289
|
+
export type RowAction = {
|
|
290
|
+
kind: RowActionKind;
|
|
291
|
+
label?: string;
|
|
292
|
+
/** navigate: target screen id. */
|
|
293
|
+
screen?: string;
|
|
294
|
+
/** navigate: field on this row whose value is passed (defaults to the id). */
|
|
295
|
+
sourceField?: string;
|
|
296
|
+
/** navigate: field on the target entity to filter by. */
|
|
297
|
+
targetField?: string;
|
|
298
|
+
/** custom: stable id - becomes the generated `/api/actions/<id>` route + handler
|
|
299
|
+
* name. Required when `kind` is `'custom'`. */
|
|
300
|
+
id?: string;
|
|
301
|
+
/** custom: icon glyph (rendered next to the label). */
|
|
302
|
+
icon?: string;
|
|
303
|
+
/** custom: confirm before running, e.g. "Approve this order?". */
|
|
304
|
+
confirm?: string;
|
|
305
|
+
};
|
|
306
|
+
/** A custom action: a button wired to a generated stub API route + client
|
|
307
|
+
* handler - the plumbing (fetch, loading state, error handling, RBAC gate) is
|
|
308
|
+
* generated; the developer fills in the actual logic in the stub route.
|
|
309
|
+
* Screen-level actions render in the screen's toolbar and work on ANY screen,
|
|
310
|
+
* including one with no bound entity. Row-level actions (via `RowAction`'s
|
|
311
|
+
* `'custom'` kind) render per-row in a grid, alongside edit/delete/navigate. */
|
|
312
|
+
export type ActionConfig = {
|
|
313
|
+
id: string;
|
|
314
|
+
label: string;
|
|
315
|
+
icon?: string;
|
|
316
|
+
confirm?: string;
|
|
317
|
+
};
|
|
318
|
+
/** Legacy standalone edit-form block. Editing is now a Grid property; kept so old
|
|
319
|
+
* `studio.config.json` files still parse. Not offered in the palette. */
|
|
320
|
+
export type FormConfig = {
|
|
321
|
+
kind: 'form';
|
|
322
|
+
presentation: Presentation;
|
|
323
|
+
};
|
|
324
|
+
/** A chart, optionally drilling into `drillScreen` (filtered by the clicked category). */
|
|
325
|
+
export type ChartConfig = {
|
|
326
|
+
kind: 'chart';
|
|
327
|
+
dimension: string;
|
|
328
|
+
measure?: string;
|
|
329
|
+
reduce: Reduce;
|
|
330
|
+
type: ChartType;
|
|
331
|
+
drillScreen?: string;
|
|
332
|
+
dataLabels?: boolean;
|
|
333
|
+
color?: string;
|
|
334
|
+
};
|
|
335
|
+
/** Number format for a KPI value. `auto` keeps the legacy behavior ($ when the
|
|
336
|
+
* measure's label carries `$`, else grouped number). */
|
|
337
|
+
export type KpiFormat = 'auto' | 'number' | 'currency' | 'percent' | 'compact';
|
|
338
|
+
export type KpiConfig = {
|
|
339
|
+
kind: 'kpi';
|
|
340
|
+
label: string;
|
|
341
|
+
measure?: string;
|
|
342
|
+
reduce: Reduce;
|
|
343
|
+
/** Value formatting. Defaults to `auto`. */
|
|
344
|
+
format?: KpiFormat;
|
|
345
|
+
/** Field to bucket the measure by for an inline sparkline (e.g. a date or stage). */
|
|
346
|
+
trendField?: string;
|
|
347
|
+
/** Aggregate per sparkline bucket. Defaults to `reduce`. */
|
|
348
|
+
trendReduce?: Reduce;
|
|
349
|
+
/** Target value: shows a "% of target" delta chip. */
|
|
350
|
+
target?: number;
|
|
351
|
+
};
|
|
352
|
+
/** A radial gauge (SvGauge) of one aggregated measure within [min, max]. Like a
|
|
353
|
+
* KPI but rendered as an arc - good for utilization, progress, scores. */
|
|
354
|
+
export type GaugeConfig = {
|
|
355
|
+
kind: 'gauge';
|
|
356
|
+
label: string;
|
|
357
|
+
measure?: string;
|
|
358
|
+
reduce: Reduce;
|
|
359
|
+
min: number;
|
|
360
|
+
max: number;
|
|
361
|
+
unit?: string;
|
|
362
|
+
};
|
|
363
|
+
/** A hierarchical tree (SvTree) built from the entity's own rows: `labelField` is
|
|
364
|
+
* the node text, `parentField` is a self-referential FK (a row whose parent is
|
|
365
|
+
* empty / unknown is a root). Good for categories, folders, org charts. */
|
|
366
|
+
export type TreeConfig = {
|
|
367
|
+
kind: 'tree';
|
|
368
|
+
labelField: string;
|
|
369
|
+
parentField: string;
|
|
370
|
+
};
|
|
371
|
+
/** One tab of a Tabs container: a label + its own ordered child blocks. */
|
|
372
|
+
export type StudioTab = {
|
|
373
|
+
label: string;
|
|
374
|
+
blocks: Block[];
|
|
375
|
+
};
|
|
376
|
+
/** A tabbed container (SvTabs) grouping display blocks into tabs. Children are the
|
|
377
|
+
* controller-free, `allRows`-driven blocks (see `TAB_CHILD_KINDS`). */
|
|
378
|
+
export type TabsConfig = {
|
|
379
|
+
kind: 'tabs';
|
|
380
|
+
tabs: StudioTab[];
|
|
381
|
+
};
|
|
382
|
+
/** One section of an Accordion container: a label + its own ordered child blocks. */
|
|
383
|
+
export type AccordionSection = {
|
|
384
|
+
label: string;
|
|
385
|
+
blocks: Block[];
|
|
386
|
+
};
|
|
387
|
+
/** An accordion container (SvAccordion): collapsible sections, each hosting its own
|
|
388
|
+
* child blocks (same container-child set as Tabs). `multiple` lets several sections
|
|
389
|
+
* stay open at once (default: single-open). */
|
|
390
|
+
export type AccordionConfig = {
|
|
391
|
+
kind: 'accordion';
|
|
392
|
+
sections: AccordionSection[];
|
|
393
|
+
multiple?: boolean;
|
|
394
|
+
};
|
|
395
|
+
export type DashboardConfig = {
|
|
396
|
+
kind: 'dashboard';
|
|
397
|
+
};
|
|
398
|
+
export type MasterDetailConfig = {
|
|
399
|
+
kind: 'master-detail';
|
|
400
|
+
childEntity: string;
|
|
401
|
+
foreignKey: string;
|
|
402
|
+
linkScreen?: string;
|
|
403
|
+
};
|
|
404
|
+
export type LookupConfig = {
|
|
405
|
+
kind: 'lookup';
|
|
406
|
+
field: string;
|
|
407
|
+
};
|
|
408
|
+
/** A pivot table (SvPivotDesigner): row/column dimensions + one aggregated measure.
|
|
409
|
+
* `aggregate` reuses the Reduce set (all valid pivot aggregators). */
|
|
410
|
+
export type PivotConfig = {
|
|
411
|
+
kind: 'pivot';
|
|
412
|
+
rows: string[];
|
|
413
|
+
cols: string[];
|
|
414
|
+
measure?: string;
|
|
415
|
+
aggregate: Reduce;
|
|
416
|
+
};
|
|
417
|
+
/** A faceted filter panel that drives the screen's grid. `fields` are the columns
|
|
418
|
+
* exposed as facets (enum/boolean -> select, text -> contains search). */
|
|
419
|
+
export type FilterPanelConfig = {
|
|
420
|
+
kind: 'filter';
|
|
421
|
+
fields: string[];
|
|
422
|
+
title?: string;
|
|
423
|
+
};
|
|
424
|
+
/** A record detail panel: shows the row selected in the screen's grid via
|
|
425
|
+
* SvGridEditPanel. `fields` optionally narrows which fields show (empty = all). */
|
|
426
|
+
export type RecordConfig = {
|
|
427
|
+
kind: 'record';
|
|
428
|
+
fields?: string[];
|
|
429
|
+
editable: boolean;
|
|
430
|
+
presentation?: Presentation;
|
|
431
|
+
};
|
|
432
|
+
/** A Kanban board (SvBoard): columns are an `enum` field's options (`groupBy`),
|
|
433
|
+
* rows become draggable cards titled by `titleField`. Dragging a card changes its
|
|
434
|
+
* `groupBy` value. Optional `badgeField` (a chip) + `subtitleField` (secondary line). */
|
|
435
|
+
export type BoardConfig = {
|
|
436
|
+
kind: 'board';
|
|
437
|
+
groupBy: string;
|
|
438
|
+
titleField: string;
|
|
439
|
+
badgeField?: string;
|
|
440
|
+
subtitleField?: string;
|
|
441
|
+
openScreen?: string;
|
|
442
|
+
};
|
|
443
|
+
/** A month event-calendar (SvSchedule): each row with a `dateField` value is an
|
|
444
|
+
* event on that day, labelled by `titleField` and (optionally) tinted by an enum
|
|
445
|
+
* `colorField`. Good for appointments / events / bookings / shifts. */
|
|
446
|
+
export type CalendarConfig = {
|
|
447
|
+
kind: 'calendar';
|
|
448
|
+
dateField: string;
|
|
449
|
+
titleField: string;
|
|
450
|
+
colorField?: string;
|
|
451
|
+
openScreen?: string;
|
|
452
|
+
};
|
|
453
|
+
/** A related child collection shown as a tab on a record detail page. */
|
|
454
|
+
export type DetailRelated = {
|
|
455
|
+
entity: string;
|
|
456
|
+
foreignKey: string;
|
|
457
|
+
label?: string;
|
|
458
|
+
titleField?: string;
|
|
459
|
+
subtitleField?: string;
|
|
460
|
+
dateField?: string;
|
|
461
|
+
statusField?: string;
|
|
462
|
+
parentField?: string;
|
|
463
|
+
};
|
|
464
|
+
/** A full record "detail page" (SvRecordDetail): a header (title + subtitle +
|
|
465
|
+
* colored `statusField` pill + `metricFields` tiles), a tabbed Overview of
|
|
466
|
+
* `sections` (field groups), and one tab per `related` child collection (a
|
|
467
|
+
* timeline of the children pointing back at the record). The universal signature
|
|
468
|
+
* view for relation-heavy entities where a board / calendar does not fit. */
|
|
469
|
+
export type DetailConfig = {
|
|
470
|
+
kind: 'detail';
|
|
471
|
+
titleField: string;
|
|
472
|
+
subtitleField?: string;
|
|
473
|
+
statusField?: string;
|
|
474
|
+
metricFields?: string[];
|
|
475
|
+
sections?: {
|
|
476
|
+
label: string;
|
|
477
|
+
fields: string[];
|
|
478
|
+
}[];
|
|
479
|
+
related?: DetailRelated[];
|
|
480
|
+
};
|
|
481
|
+
/** A UI-kit component (from `UI_COMPONENT_REGISTRY`, keyed by `component`) dropped
|
|
482
|
+
* onto a screen. Entity-agnostic - works on a freestanding page or mixed onto an
|
|
483
|
+
* entity-bound screen alike. `props` holds its configured "chrome" values, keyed
|
|
484
|
+
* by the registry entry's prop `key`; a component with `hasContent` also stores
|
|
485
|
+
* its literal text content under the reserved `_content` key. */
|
|
486
|
+
/** A data binding for one component prop (or `_content`): its value is computed
|
|
487
|
+
* from the screen's rows instead of a static literal. `aggregate` reduces a field
|
|
488
|
+
* over all rows (a KPI-style number), `field` reads the first row's field, `expr`
|
|
489
|
+
* is a raw JS expression over `rows`. Needs an entity screen (rows to bind to). */
|
|
490
|
+
export type ComponentBinding = {
|
|
491
|
+
kind: 'aggregate';
|
|
492
|
+
field?: string;
|
|
493
|
+
reduce: Reduce;
|
|
494
|
+
} | {
|
|
495
|
+
kind: 'field';
|
|
496
|
+
field: string;
|
|
497
|
+
} | {
|
|
498
|
+
kind: 'expr';
|
|
499
|
+
code: string;
|
|
500
|
+
};
|
|
501
|
+
export type ComponentConfig = {
|
|
502
|
+
kind: 'component';
|
|
503
|
+
component: string;
|
|
504
|
+
props: Record<string, unknown>;
|
|
505
|
+
name?: string;
|
|
506
|
+
bindings?: Record<string, ComponentBinding>;
|
|
507
|
+
};
|
|
508
|
+
export type BlockConfig = GridConfig | FormConfig | ChartConfig | KpiConfig | GaugeConfig | TreeConfig | TabsConfig | AccordionConfig | DashboardConfig | MasterDetailConfig | LookupConfig | PivotConfig | FilterPanelConfig | RecordConfig | BoardConfig | CalendarConfig | DetailConfig | ComponentConfig;
|
|
509
|
+
/** Block kinds allowed inside a Tabs / Accordion container: the controller-free,
|
|
510
|
+
* `allRows`-driven display blocks (no grid / form / master-detail, which need the
|
|
511
|
+
* screen controller). `component` covers any UI-kit component added by key. */
|
|
512
|
+
export declare const TAB_CHILD_KINDS: ReadonlyArray<BlockKind>;
|
|
513
|
+
/** Alias: the same set applies to Accordion sections. */
|
|
514
|
+
export declare const CONTAINER_CHILD_KINDS: readonly BlockKind[];
|
|
515
|
+
/** Display-block child kinds (no `component`) - what the container "add block" menu offers;
|
|
516
|
+
* components are added separately, by registry key, via `addContainerComponent`. */
|
|
517
|
+
export declare const CONTAINER_DISPLAY_KINDS: ReadonlyArray<BlockKind>;
|
|
518
|
+
/** All blocks on a screen, flattened to include the children nested in Tabs
|
|
519
|
+
* containers - used to detect kinds for imports / data loading. */
|
|
520
|
+
export declare function flattenBlocks(blocks: ReadonlyArray<Block>): Block[];
|
|
521
|
+
/** User style overrides for a block's wrapper element (the card around the block).
|
|
522
|
+
* Each field is an OVERRIDE - `undefined` keeps the block kind's default look. Applied
|
|
523
|
+
* identically in the designer preview and the generated app (see `blockStyleCss`). */
|
|
524
|
+
export type BlockStyle = {
|
|
525
|
+
/** Force a border on (true) or off (false); undefined = the kind's default. */
|
|
526
|
+
border?: boolean;
|
|
527
|
+
/** Force a drop shadow on (true) or off (false); undefined = default. */
|
|
528
|
+
shadow?: boolean;
|
|
529
|
+
/** Inner padding, px. */
|
|
530
|
+
padding?: number;
|
|
531
|
+
/** Outer margin, px. */
|
|
532
|
+
margin?: number;
|
|
533
|
+
/** Background color (any CSS color). */
|
|
534
|
+
background?: string;
|
|
535
|
+
/** Corner radius, px. */
|
|
536
|
+
radius?: number;
|
|
537
|
+
};
|
|
538
|
+
export type Block = {
|
|
539
|
+
id: string;
|
|
540
|
+
/** Coarse width in a 3-col grid (legacy + quick buttons). `colSpan` overrides it. */
|
|
541
|
+
span: 1 | 2 | 3;
|
|
542
|
+
/** Fine width in a 12-col grid (1-12), set by the horizontal drag / slider.
|
|
543
|
+
* Falls back to `span * 4` (so 1/2/3 -> 4/8/12) when unset. */
|
|
544
|
+
colSpan?: number;
|
|
545
|
+
/** Canvas/preview region height in px. Undefined = the kind's natural default.
|
|
546
|
+
* Applies to height-driven blocks (grid, chart, master-detail). */
|
|
547
|
+
height?: number;
|
|
548
|
+
/** Per-block appearance overrides (border / shadow / padding / margin / bg / radius). */
|
|
549
|
+
style?: BlockStyle;
|
|
550
|
+
/** Extra CSS class(es) put on the block's wrapper, so custom.css can target it. */
|
|
551
|
+
className?: string;
|
|
552
|
+
config: BlockConfig;
|
|
553
|
+
};
|
|
554
|
+
/** Sanitize a user-typed class list to a safe value (letters/digits/_/- and spaces) so
|
|
555
|
+
* it can never break out of a `class="..."` attribute. Shared by block/screen/app. */
|
|
556
|
+
export declare function sanitizeClassName(raw: string | undefined): string;
|
|
557
|
+
/** The sanitized extra class(es) for a block's wrapper. */
|
|
558
|
+
export declare function blockClassName(block: Pick<Block, 'className'>): string;
|
|
559
|
+
/** The number of columns (1-12) a block occupies in the 12-col layout. */
|
|
560
|
+
export declare const blockColumns: (b: Pick<Block, "span" | "colSpan">) => number;
|
|
561
|
+
/** The CSS declarations for a block's style overrides, for its wrapper element - shared
|
|
562
|
+
* by codegen and the designer so the preview matches the generated app. Empty when no
|
|
563
|
+
* overrides. Numeric fields are safe; the background color is sanitized. */
|
|
564
|
+
export declare function blockStyleCss(style: BlockStyle | undefined): string;
|
|
565
|
+
/** Merge a partial style patch over a block's style, dropping keys set to undefined;
|
|
566
|
+
* returns undefined when nothing is left (keeps the model + serialized config clean). */
|
|
567
|
+
export declare function mergeBlockStyle(base: BlockStyle | undefined, patch: Partial<BlockStyle>): BlockStyle | undefined;
|
|
568
|
+
/** Navigation placement for a screen (Manage Pages: show/hide + label + order). */
|
|
569
|
+
export type ScreenNav = {
|
|
570
|
+
show?: boolean;
|
|
571
|
+
label?: string;
|
|
572
|
+
order?: number;
|
|
573
|
+
};
|
|
574
|
+
/** The always-present page lifecycle handlers the Code view edits. Kept as named
|
|
575
|
+
* constants so codegen, the designer, and the manifest agree on the slot names.
|
|
576
|
+
* `onLoad` runs on mount (with the page context); `onDestroy` runs on unmount
|
|
577
|
+
* (cleanup: timers, subscriptions, aborts). */
|
|
578
|
+
export declare const ON_LOAD = "onLoad";
|
|
579
|
+
export declare const ON_DESTROY = "onDestroy";
|
|
580
|
+
/** Every lifecycle slot the Code view can edit, in display order. */
|
|
581
|
+
export declare const HANDLER_SLOTS: ReadonlyArray<string>;
|
|
582
|
+
/** The handler-steps key for a component block's click event. */
|
|
583
|
+
export declare const clickSlot: (blockId: string) => string;
|
|
584
|
+
/** The handler-steps key for a grid block's row-select (row click) event. The
|
|
585
|
+
* compiled steps get the clicked `row` in scope (use row-field values). */
|
|
586
|
+
export declare const rowSelectSlot: (blockId: string) => string;
|
|
587
|
+
/** The handler-steps key for a component block's change (value change) event. */
|
|
588
|
+
export declare const changeSlot: (blockId: string) => string;
|
|
589
|
+
/** Generic event slot - `click`/`change` produce the same keys as clickSlot/changeSlot,
|
|
590
|
+
* so existing projects keep their wiring; any other declared component event
|
|
591
|
+
* (focus, select, toggle, ...) gets its own `<event>:<blockId>` slot. */
|
|
592
|
+
export declare const eventSlot: (event: string, blockId: string) => string;
|
|
593
|
+
/** The handler-steps key for the screen's form-submit (record saved) event. The
|
|
594
|
+
* compiled steps get the submitted `row` (values) in scope. */
|
|
595
|
+
export declare const FORM_SUBMIT = "formSubmit";
|
|
596
|
+
/** One event on the Grid, exposed to code-behind as `ctx.grid.<method> = (e) => {}`.
|
|
597
|
+
* `prop` is the SvGrid callback it wires to (empty for `dataEvent`s, which fire from
|
|
598
|
+
* Studio's data controller on create/update/delete rather than from the grid markup). */
|
|
599
|
+
export type GridEventDef = {
|
|
600
|
+
key: string;
|
|
601
|
+
method: string;
|
|
602
|
+
prop: string;
|
|
603
|
+
params: string;
|
|
604
|
+
builtin: boolean;
|
|
605
|
+
desc: string;
|
|
606
|
+
dataEvent?: boolean;
|
|
607
|
+
};
|
|
608
|
+
/** The Grid's real event surface (mirrors SvGrid's `on*` callbacks). Studio wires
|
|
609
|
+
* every one into `ctx.grid` so page code can subscribe with `ctx.grid.onCellClick =
|
|
610
|
+
* (e) => {}`. `params` is the handler's parameter list, with `Row` as the row-type
|
|
611
|
+
* placeholder (substituted per screen). `builtin` marks events a Studio feature may
|
|
612
|
+
* already use (sort/filter/paginate/edit/row-click) - codegen COMPOSES the user's
|
|
613
|
+
* handler onto the built-in rather than emitting a duplicate prop. Signatures are
|
|
614
|
+
* transcribed from packages/grid/src/SvGrid.types.ts. */
|
|
615
|
+
export declare const GRID_EVENTS: readonly GridEventDef[];
|
|
616
|
+
/** A screen-scoped reactive variable (`ctx.state.<name>`). Emitted as `$state`. */
|
|
617
|
+
export type StateVarType = 'string' | 'number' | 'boolean' | 'json';
|
|
618
|
+
export type StateVar = {
|
|
619
|
+
name: string;
|
|
620
|
+
type: StateVarType;
|
|
621
|
+
initial?: string;
|
|
622
|
+
};
|
|
623
|
+
/** The `$state(...)` initializer for a variable's declared type. */
|
|
624
|
+
export declare function stateInitExpr(v: StateVar): string;
|
|
625
|
+
/** The TS type annotation for a variable. */
|
|
626
|
+
export declare function stateTsType(v: StateVar): string;
|
|
627
|
+
/** A value expression usable in steps / conditions: a literal, a state var, a URL
|
|
628
|
+
* param, or the current row (for row-scoped handlers). Compiles to a `ctx` expr. */
|
|
629
|
+
export type LogicValue = {
|
|
630
|
+
kind: 'literal';
|
|
631
|
+
value: string;
|
|
632
|
+
} | {
|
|
633
|
+
kind: 'state';
|
|
634
|
+
name: string;
|
|
635
|
+
} | {
|
|
636
|
+
kind: 'param';
|
|
637
|
+
name: string;
|
|
638
|
+
} | {
|
|
639
|
+
kind: 'field';
|
|
640
|
+
name: string;
|
|
641
|
+
};
|
|
642
|
+
export declare function compileValue(v: LogicValue, rowExpr?: string): string;
|
|
643
|
+
export type LogicOp = 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'truthy' | 'falsy';
|
|
644
|
+
export type Condition = {
|
|
645
|
+
left: LogicValue;
|
|
646
|
+
op: LogicOp;
|
|
647
|
+
right?: LogicValue;
|
|
648
|
+
};
|
|
649
|
+
export declare function compileCondition(c: Condition, rowExpr?: string): string;
|
|
650
|
+
/** A field assignment used by create / update record steps. */
|
|
651
|
+
export type FieldValue = {
|
|
652
|
+
field: string;
|
|
653
|
+
value: LogicValue;
|
|
654
|
+
};
|
|
655
|
+
/** One step in a visual "method" (the Methods panel, Radzen-style). Each compiles
|
|
656
|
+
* to a line of typed `ctx` code-behind - so the visual builder and the code editor
|
|
657
|
+
* produce identical output. `code` is the raw-TS escape hatch. */
|
|
658
|
+
export type ActionStep = {
|
|
659
|
+
type: 'navigate';
|
|
660
|
+
to: string;
|
|
661
|
+
} | {
|
|
662
|
+
type: 'gridExport';
|
|
663
|
+
format?: 'csv' | 'tsv' | 'json';
|
|
664
|
+
} | {
|
|
665
|
+
type: 'gridCopy';
|
|
666
|
+
} | {
|
|
667
|
+
type: 'gridClear';
|
|
668
|
+
what: 'filters' | 'sort' | 'selection';
|
|
669
|
+
} | {
|
|
670
|
+
type: 'gridSort';
|
|
671
|
+
field: string;
|
|
672
|
+
dir?: 'asc' | 'desc';
|
|
673
|
+
} | {
|
|
674
|
+
type: 'gridFilter';
|
|
675
|
+
field: string;
|
|
676
|
+
value: string;
|
|
677
|
+
} | {
|
|
678
|
+
type: 'reloadData';
|
|
679
|
+
} | {
|
|
680
|
+
type: 'setProp';
|
|
681
|
+
target: string;
|
|
682
|
+
prop: string;
|
|
683
|
+
value: string;
|
|
684
|
+
} | {
|
|
685
|
+
type: 'setText';
|
|
686
|
+
target: string;
|
|
687
|
+
value: string;
|
|
688
|
+
} | {
|
|
689
|
+
type: 'alert';
|
|
690
|
+
message: string;
|
|
691
|
+
} | {
|
|
692
|
+
type: 'apiAction';
|
|
693
|
+
actionId: string;
|
|
694
|
+
} | {
|
|
695
|
+
type: 'setVar';
|
|
696
|
+
name: string;
|
|
697
|
+
value: LogicValue;
|
|
698
|
+
} | {
|
|
699
|
+
type: 'createRecord';
|
|
700
|
+
values: FieldValue[];
|
|
701
|
+
} | {
|
|
702
|
+
type: 'updateRecord';
|
|
703
|
+
id: LogicValue;
|
|
704
|
+
values: FieldValue[];
|
|
705
|
+
} | {
|
|
706
|
+
type: 'deleteRecord';
|
|
707
|
+
id: LogicValue;
|
|
708
|
+
} | {
|
|
709
|
+
type: 'branch';
|
|
710
|
+
condition: Condition;
|
|
711
|
+
then: ActionStep[];
|
|
712
|
+
else?: ActionStep[];
|
|
713
|
+
} | {
|
|
714
|
+
type: 'code';
|
|
715
|
+
code: string;
|
|
716
|
+
};
|
|
717
|
+
export type ActionStepType = ActionStep['type'];
|
|
718
|
+
/** Compile one step to a `ctx` statement (a single line, no trailing newline). */
|
|
719
|
+
export declare function compileStep(step: ActionStep): string;
|
|
720
|
+
/** Compile a list of steps to a handler body (indented lines). */
|
|
721
|
+
export declare function compileHandlerSteps(steps: ReadonlyArray<ActionStep>): string;
|
|
722
|
+
/** One step in an entity trigger (a server-side rule). */
|
|
723
|
+
export type TriggerStep = {
|
|
724
|
+
type: 'setField';
|
|
725
|
+
field: string;
|
|
726
|
+
value: LogicValue;
|
|
727
|
+
} | {
|
|
728
|
+
type: 'requireField';
|
|
729
|
+
field: string;
|
|
730
|
+
message?: string;
|
|
731
|
+
} | {
|
|
732
|
+
type: 'reject';
|
|
733
|
+
condition: Condition;
|
|
734
|
+
message: string;
|
|
735
|
+
} | {
|
|
736
|
+
type: 'branch';
|
|
737
|
+
condition: Condition;
|
|
738
|
+
then: TriggerStep[];
|
|
739
|
+
else?: TriggerStep[];
|
|
740
|
+
} | {
|
|
741
|
+
type: 'code';
|
|
742
|
+
code: string;
|
|
743
|
+
};
|
|
744
|
+
export type TriggerEvent = 'beforeCreate' | 'afterCreate' | 'beforeUpdate' | 'afterUpdate' | 'beforeDelete' | 'afterDelete';
|
|
745
|
+
/** All trigger events, in display order; before-hooks transform/validate, after-hooks are side effects. */
|
|
746
|
+
export declare const TRIGGER_EVENTS: ReadonlyArray<TriggerEvent>;
|
|
747
|
+
export type EntityTriggers = Partial<Record<TriggerEvent, TriggerStep[]>>;
|
|
748
|
+
/** Compile one trigger step against the payload variable `rowExpr` (default `v`). */
|
|
749
|
+
export declare function compileTriggerStep(step: TriggerStep, rowExpr?: string): string;
|
|
750
|
+
export declare function compileTriggerSteps(steps: ReadonlyArray<TriggerStep>, rowExpr?: string): string;
|
|
751
|
+
/** `entity` is optional: a screen with none is a freestanding page (no data
|
|
752
|
+
* binding, no blocks - every `BlockKind` is entity-bound) - just a title, an
|
|
753
|
+
* empty content area, and optionally a toolbar of custom `actions`. Wire up a
|
|
754
|
+
* "Run report" / "Sync now" button on a blank page without a table behind it.
|
|
755
|
+
*
|
|
756
|
+
* `code` opts the screen into a create-once `handlers.ts` companion (user-owned,
|
|
757
|
+
* never regenerated) whose `onLoad(ctx)` runs on mount; `renderGrid` adds a Grid
|
|
758
|
+
* fed via `ctx.setRows`. `handlerBodies` holds each handler's body (keyed by name). */
|
|
759
|
+
/** How a screen arranges its blocks: the default 12-column responsive grid, or a
|
|
760
|
+
* docking workspace (SvDockManager - drag-to-dock splits/tabs + floating / pinned panes,
|
|
761
|
+
* serialized as `dock`). */
|
|
762
|
+
export type ScreenLayout = 'grid' | 'stack' | 'split' | 'dock' | 'canvas';
|
|
763
|
+
/** Layouts that arrange blocks as dockable / split panes (both back onto a
|
|
764
|
+
* serialized `DockManagerState`; `split` renders it locked = resize-only). */
|
|
765
|
+
export declare const PANE_LAYOUTS: ReadonlyArray<ScreenLayout>;
|
|
766
|
+
export declare function isPaneLayout(layout: ScreenLayout): boolean;
|
|
767
|
+
/** Free-form canvas: a block is placed on a 12-column grid by explicit cell
|
|
768
|
+
* coordinates (col/row) + spans, instead of flowing. `row`/`rowSpan` count
|
|
769
|
+
* fixed-height rows (see CANVAS_ROW_PX). All values are grid cells, 0-indexed. */
|
|
770
|
+
export type CanvasRect = {
|
|
771
|
+
col: number;
|
|
772
|
+
row: number;
|
|
773
|
+
colSpan: number;
|
|
774
|
+
rowSpan: number;
|
|
775
|
+
};
|
|
776
|
+
export declare const CANVAS_COLS = 12;
|
|
777
|
+
/** Height of one canvas row in px (grid-auto-rows), shared by designer + codegen. */
|
|
778
|
+
export declare const CANVAS_ROW_PX = 40;
|
|
779
|
+
/** Gap between canvas cells in px. */
|
|
780
|
+
export declare const CANVAS_GAP_PX = 8;
|
|
781
|
+
export type GridLayoutOpts = {
|
|
782
|
+
colGap?: number;
|
|
783
|
+
rowGap?: number;
|
|
784
|
+
maxWidth?: number;
|
|
785
|
+
align?: 'start' | 'stretch';
|
|
786
|
+
mobileBreakpoint?: number;
|
|
787
|
+
};
|
|
788
|
+
export type StackLayoutOpts = {
|
|
789
|
+
gap?: number;
|
|
790
|
+
maxWidth?: number;
|
|
791
|
+
align?: 'left' | 'center';
|
|
792
|
+
dividers?: boolean;
|
|
793
|
+
minHeight?: number;
|
|
794
|
+
};
|
|
795
|
+
export type SplitLayoutOpts = {
|
|
796
|
+
orientation?: 'auto' | 'row' | 'column';
|
|
797
|
+
minPaneSize?: number;
|
|
798
|
+
persist?: boolean;
|
|
799
|
+
};
|
|
800
|
+
export type DockLayoutOpts = {
|
|
801
|
+
allowPopout?: boolean;
|
|
802
|
+
hideSingleTab?: boolean;
|
|
803
|
+
headerPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
804
|
+
persist?: boolean;
|
|
805
|
+
};
|
|
806
|
+
export type CanvasLayoutOpts = {
|
|
807
|
+
cols?: number;
|
|
808
|
+
rowHeight?: number;
|
|
809
|
+
gap?: number;
|
|
810
|
+
showGrid?: boolean;
|
|
811
|
+
};
|
|
812
|
+
export type LayoutOpts = {
|
|
813
|
+
grid?: GridLayoutOpts;
|
|
814
|
+
stack?: StackLayoutOpts;
|
|
815
|
+
split?: SplitLayoutOpts;
|
|
816
|
+
dock?: DockLayoutOpts;
|
|
817
|
+
canvas?: CanvasLayoutOpts;
|
|
818
|
+
};
|
|
819
|
+
/** `maxWidth: 0` (or absent) means full-bleed. */
|
|
820
|
+
export declare const GRID_OPT_DEFAULTS: Required<GridLayoutOpts>;
|
|
821
|
+
export declare const STACK_OPT_DEFAULTS: Required<StackLayoutOpts>;
|
|
822
|
+
export declare const SPLIT_OPT_DEFAULTS: Required<SplitLayoutOpts>;
|
|
823
|
+
export declare const DOCK_OPT_DEFAULTS: Required<DockLayoutOpts>;
|
|
824
|
+
export declare const CANVAS_OPT_DEFAULTS: Required<CanvasLayoutOpts>;
|
|
825
|
+
export declare const gridOpts: (s: Screen) => Required<GridLayoutOpts>;
|
|
826
|
+
export declare const stackOpts: (s: Screen) => Required<StackLayoutOpts>;
|
|
827
|
+
export declare const splitOpts: (s: Screen) => Required<SplitLayoutOpts>;
|
|
828
|
+
export declare const dockOpts: (s: Screen) => Required<DockLayoutOpts>;
|
|
829
|
+
export declare const canvasOpts: (s: Screen) => Required<CanvasLayoutOpts>;
|
|
830
|
+
/** Patch one mode's settings (merged over any existing values). */
|
|
831
|
+
export declare function setLayoutOpts<K extends keyof LayoutOpts>(project: StudioProject, screenId: string, mode: K, patch: Partial<NonNullable<LayoutOpts[K]>>): StudioProject;
|
|
832
|
+
export type Screen = {
|
|
833
|
+
id: string;
|
|
834
|
+
entity?: string;
|
|
835
|
+
title: string;
|
|
836
|
+
route: string;
|
|
837
|
+
blocks: Block[];
|
|
838
|
+
nav?: ScreenNav;
|
|
839
|
+
actions?: ActionConfig[];
|
|
840
|
+
code?: boolean;
|
|
841
|
+
renderGrid?: boolean;
|
|
842
|
+
handlerBodies?: Record<string, string>;
|
|
843
|
+
handlerSteps?: Record<string, ActionStep[]>;
|
|
844
|
+
handlersSource?: string;
|
|
845
|
+
className?: string;
|
|
846
|
+
layout?: ScreenLayout;
|
|
847
|
+
dock?: DockManagerState;
|
|
848
|
+
canvas?: Record<string, CanvasRect>;
|
|
849
|
+
layoutOpts?: LayoutOpts;
|
|
850
|
+
state?: StateVar[];
|
|
851
|
+
renderMode?: 'ssr' | 'spa';
|
|
852
|
+
};
|
|
853
|
+
/** The generated app's shell (master layout): sidebar, top-nav, or bottom-nav; brand, footer. */
|
|
854
|
+
export type ShellStyle = 'sidebar' | 'top-nav' | 'bottom-nav';
|
|
855
|
+
export type ShellConfig = {
|
|
856
|
+
style?: ShellStyle;
|
|
857
|
+
brand?: string;
|
|
858
|
+
footer?: string;
|
|
859
|
+
navPosition?: 'left' | 'right';
|
|
860
|
+
logo?: string;
|
|
861
|
+
toolbar?: boolean;
|
|
862
|
+
};
|
|
863
|
+
export type ProjectTheme = {
|
|
864
|
+
accent?: string;
|
|
865
|
+
preset?: string;
|
|
866
|
+
mode?: 'light' | 'dark';
|
|
867
|
+
shell?: ShellConfig;
|
|
868
|
+
customCss?: string;
|
|
869
|
+
appClass?: string;
|
|
870
|
+
};
|
|
871
|
+
/** A mutating CRUD action, gated by RBAC (reads are implied by screen access). */
|
|
872
|
+
export type CrudAction = 'create' | 'update' | 'delete';
|
|
873
|
+
export declare const CRUD_ACTIONS: readonly CrudAction[];
|
|
874
|
+
/** Access rules for one role. */
|
|
875
|
+
export type RoleAccess = {
|
|
876
|
+
role: string;
|
|
877
|
+
/** Screen ids the role can open. `'*'` = every screen. */
|
|
878
|
+
screens: '*' | string[];
|
|
879
|
+
/** Write actions the role may perform. `'*'` = all; read is implied by screen access. */
|
|
880
|
+
actions: '*' | CrudAction[];
|
|
881
|
+
};
|
|
882
|
+
/** Role-based access control for the app. When `enabled`, the generator emits a
|
|
883
|
+
* `src/lib/access.ts` and gates nav / actions in the UI AND the server route. */
|
|
884
|
+
export type AccessControl = {
|
|
885
|
+
enabled: boolean;
|
|
886
|
+
roles: RoleAccess[];
|
|
887
|
+
/** Fallback role when the app can't resolve one from the session. Default-denies. */
|
|
888
|
+
defaultRole?: string;
|
|
889
|
+
};
|
|
890
|
+
/** Authentication starter. When `enabled`, the generator scaffolds a real sign-in:
|
|
891
|
+
* a session cookie + `hooks.server.ts` that populates `event.locals.role`/`user`
|
|
892
|
+
* (closing the loop the RBAC layer expects), a `/login` page, sign-out, and demo
|
|
893
|
+
* seed users (one per RBAC role, or a single admin). Dependency-free: Web Crypto +
|
|
894
|
+
* stateless signed cookies. `protect` gates the whole app behind login (default). */
|
|
895
|
+
/** Social / enterprise sign-in providers. `oidc` is a generic OpenID Connect issuer
|
|
896
|
+
* (covers Azure AD / Entra ID, Okta, Auth0, Keycloak, ... via discovery). */
|
|
897
|
+
export type OAuthProvider = 'github' | 'google' | 'oidc';
|
|
898
|
+
export type AuthConfig = {
|
|
899
|
+
enabled: boolean;
|
|
900
|
+
/** Which sign-in system to scaffold. `'builtin'` (default) is the dependency-free
|
|
901
|
+
* cookie-session starter below (own user store, server route guards, RBAC).
|
|
902
|
+
* `'supabase'` delegates to Supabase Auth: a client-side `SvAuthGate` over the
|
|
903
|
+
* shared Supabase client, pairing with the database's Row Level Security. The
|
|
904
|
+
* builtin-only sub-options (register / userAdmin / oauth / twoFactor / email) do
|
|
905
|
+
* not apply to the Supabase provider. */
|
|
906
|
+
provider?: 'builtin' | 'supabase';
|
|
907
|
+
/** Redirect unauthenticated visitors to /login for every route. Default true. */
|
|
908
|
+
protect?: boolean;
|
|
909
|
+
/** Self-service sign-up + password recovery (/register, /forgot-password,
|
|
910
|
+
* /reset-password). Needs the DB-backed user store (turn on the data layer). */
|
|
911
|
+
register?: boolean;
|
|
912
|
+
/** An admin user-management screen (/users: list, invite, change role, remove).
|
|
913
|
+
* Needs the DB-backed store + RBAC (only a full-access role can open it). */
|
|
914
|
+
userAdmin?: boolean;
|
|
915
|
+
/** OAuth / OpenID Connect sign-in buttons. Needs the DB-backed store. */
|
|
916
|
+
oauth?: OAuthProvider[];
|
|
917
|
+
/** Email one-time-code two-factor auth. Needs the DB-backed store + real email. */
|
|
918
|
+
twoFactor?: boolean;
|
|
919
|
+
/** Real email delivery (Resend HTTP API or SMTP via nodemailer); dev console otherwise.
|
|
920
|
+
* Implied when `twoFactor` is on. */
|
|
921
|
+
email?: boolean;
|
|
922
|
+
};
|
|
923
|
+
/** Does a role's rules permit opening a screen? */
|
|
924
|
+
export declare const roleCanScreen: (r: RoleAccess, screenId: string) => boolean;
|
|
925
|
+
/** Does a role's rules permit a write action? */
|
|
926
|
+
export declare const roleCanAction: (r: RoleAccess, action: CrudAction) => boolean;
|
|
927
|
+
export type StudioProject = {
|
|
928
|
+
title: string;
|
|
929
|
+
entities: EntitySchema[];
|
|
930
|
+
screens: Screen[];
|
|
931
|
+
/** Default source kind for new entities; per-entity overrides live in `dataSources`. */
|
|
932
|
+
dataSource: DataSourceKind;
|
|
933
|
+
/** Per-entity data-source binding, keyed by entity name. */
|
|
934
|
+
dataSources?: Record<string, EntityDataSource>;
|
|
935
|
+
/** Project-level Supabase connection (URL + anon key), shared by every
|
|
936
|
+
* Supabase-bound entity so it's set once. A per-entity `SupabaseSource.url`/`key`
|
|
937
|
+
* still overrides for that entity. Read by the wizard + the `.env` paste hint. */
|
|
938
|
+
supabase?: {
|
|
939
|
+
url?: string;
|
|
940
|
+
key?: string;
|
|
941
|
+
};
|
|
942
|
+
theme?: ProjectTheme;
|
|
943
|
+
/** Role-based access control (optional; off unless `access.enabled`). */
|
|
944
|
+
access?: AccessControl;
|
|
945
|
+
/** Authentication starter (optional; off unless `auth.enabled`). Provides the
|
|
946
|
+
* session/login that populates the role RBAC consumes. */
|
|
947
|
+
auth?: AuthConfig;
|
|
948
|
+
/** Typed data layer: when `'drizzle'` and there's a SQL-bound entity, emit a
|
|
949
|
+
* Drizzle schema + typed repositories + drizzle-kit migrations. */
|
|
950
|
+
dataLayer?: 'drizzle';
|
|
951
|
+
/** Emit an audit trail: connected routes log create/update/delete + an /audit viewer. */
|
|
952
|
+
audit?: boolean;
|
|
953
|
+
/** Localization: when enabled, emit a message catalog + locale switcher and route
|
|
954
|
+
* nav / titles / column headers through `t()`. */
|
|
955
|
+
i18n?: I18nConfig;
|
|
956
|
+
/** Deploy target: picks the SvelteKit adapter + provider config the bundle emits.
|
|
957
|
+
* Defaults to `auto` (@sveltejs/adapter-auto, which detects Vercel/Netlify/Cloudflare). */
|
|
958
|
+
deploy?: DeployTarget;
|
|
959
|
+
/** Server-side business-rule triggers, keyed by entity name. Enforced on the
|
|
960
|
+
* SQL route (compiled into createKitHandlers `hooks`). */
|
|
961
|
+
triggers?: Record<string, EntityTriggers>;
|
|
962
|
+
/** Scheduled background jobs: a guarded `/api/cron` endpoint plus the schedule
|
|
963
|
+
* config for the deploy target. Empty / omitted emits nothing. */
|
|
964
|
+
jobs?: ScheduledJob[];
|
|
965
|
+
/** Multi-tenancy: scope every row to the signed-in user's tenant. */
|
|
966
|
+
tenancy?: TenancyConfig;
|
|
967
|
+
};
|
|
968
|
+
/**
|
|
969
|
+
* Multi-tenancy for the generated app: one database, one deployment, rows
|
|
970
|
+
* partitioned by a tenant column.
|
|
971
|
+
*
|
|
972
|
+
* Enforced on the SERVER, in the API route's `scope` option - reads are
|
|
973
|
+
* filtered, creates are stamped, and updates/deletes re-read the target under
|
|
974
|
+
* the scope first. A client that skips the UI still cannot reach another
|
|
975
|
+
* tenant's rows.
|
|
976
|
+
*
|
|
977
|
+
* Requires the [auth starter](./auth.md) (the tenant comes from the session)
|
|
978
|
+
* and the typed data layer (the column has to exist in the schema). Without
|
|
979
|
+
* both it degrades to off rather than emitting a half-enforced scope.
|
|
980
|
+
*/
|
|
981
|
+
export type TenancyConfig = {
|
|
982
|
+
enabled: boolean;
|
|
983
|
+
/** Column holding the tenant key on every scoped entity. Default `tenantId`. */
|
|
984
|
+
field?: string;
|
|
985
|
+
/** Entities to leave GLOBAL (shared across tenants) - reference/lookup tables
|
|
986
|
+
* like currencies or countries that every tenant reads. */
|
|
987
|
+
sharedEntities?: string[];
|
|
988
|
+
};
|
|
989
|
+
/** What a scheduled job does when it fires.
|
|
990
|
+
* - `email`: send a summary of an entity (row count + the newest rows).
|
|
991
|
+
* - `code`: run a body you write, with `db` / `sendEmail` in scope. */
|
|
992
|
+
export type ScheduledJobKind = 'email' | 'code';
|
|
993
|
+
/**
|
|
994
|
+
* One scheduled background job.
|
|
995
|
+
*
|
|
996
|
+
* Jobs run on the SERVER via a generated `/api/cron` route, not in a browser
|
|
997
|
+
* tab - unlike the client-side `createScheduler` in `@svgrid/enterprise`, which
|
|
998
|
+
* only fires while the app is open. The route is secret-guarded and invoked by
|
|
999
|
+
* the platform's scheduler (Vercel Cron, a GitHub Actions schedule, or your own
|
|
1000
|
+
* crontab hitting the URL).
|
|
1001
|
+
*/
|
|
1002
|
+
export type ScheduledJob = {
|
|
1003
|
+
/** Stable id - the `?job=` selector and the handler name. */
|
|
1004
|
+
id: string;
|
|
1005
|
+
/** Human label used in comments + the DEPLOY.md table. */
|
|
1006
|
+
name: string;
|
|
1007
|
+
/** Standard 5-field cron expression, interpreted in UTC. */
|
|
1008
|
+
cron: string;
|
|
1009
|
+
/** Off by default is surprising for something you explicitly added, so a job
|
|
1010
|
+
* runs unless `enabled` is explicitly false. */
|
|
1011
|
+
enabled?: boolean;
|
|
1012
|
+
kind: ScheduledJobKind;
|
|
1013
|
+
/** `email`: the entity to summarize. */
|
|
1014
|
+
entity?: string;
|
|
1015
|
+
/** `email`: recipient address. */
|
|
1016
|
+
to?: string;
|
|
1017
|
+
/** `email`: subject line. Defaults to the job name. */
|
|
1018
|
+
subject?: string;
|
|
1019
|
+
/** `code`: the handler body (TypeScript). */
|
|
1020
|
+
code?: string;
|
|
1021
|
+
};
|
|
1022
|
+
/** The render mode for a screen. `'ssr'` emits idiomatic SvelteKit (`+page.server.ts`
|
|
1023
|
+
* with a `load` + form `actions`, SSR + progressive enhancement); `'spa'` (the
|
|
1024
|
+
* default) emits the client data-source-controller page. Opt-in for now. */
|
|
1025
|
+
export declare function screenRenderMode(_project: StudioProject, screen: Screen): 'ssr' | 'spa';
|
|
1026
|
+
/** How a screen would emit under SSR: 'grid' (single grid -> load + form actions,
|
|
1027
|
+
* URL-driven sort/filter/page), 'read' (data-viz/detail blocks -> load only), or
|
|
1028
|
+
* null when it must stay SPA. */
|
|
1029
|
+
export declare function ssrScreenShape(project: StudioProject, screen: Screen): 'grid' | 'read' | null;
|
|
1030
|
+
/** Whether a screen can be emitted as SSR-native (any supported shape). */
|
|
1031
|
+
export declare function ssrEligible(project: StudioProject, screen: Screen): boolean;
|
|
1032
|
+
/** Set a screen's render mode ('spa' clears back to the default). */
|
|
1033
|
+
export declare function setScreenRenderMode(project: StudioProject, screenId: string, mode: 'ssr' | 'spa'): StudioProject;
|
|
1034
|
+
/** True when the screen should actually emit as SSR (mode is 'ssr' AND eligible). */
|
|
1035
|
+
export declare function isSsrScreen(project: StudioProject, screen: Screen): boolean;
|
|
1036
|
+
export declare function withSsrDefaults(project: StudioProject): StudioProject;
|
|
1037
|
+
/** The triggers configured for an entity (or an empty object). */
|
|
1038
|
+
export declare function triggersOf(project: StudioProject, entity: string): EntityTriggers;
|
|
1039
|
+
/** Set (or clear, with `null`) an entity's steps for one trigger event. */
|
|
1040
|
+
export declare function setTrigger(project: StudioProject, entity: string, event: TriggerEvent, steps: TriggerStep[] | null): StudioProject;
|
|
1041
|
+
/** Turn multi-tenancy on/off and configure the scoping column. */
|
|
1042
|
+
export declare function setTenancy(project: StudioProject, tenancy: TenancyConfig | null): StudioProject;
|
|
1043
|
+
/** The tenant column name, defaulted. */
|
|
1044
|
+
export declare const tenantField: (project: StudioProject) => string;
|
|
1045
|
+
/** True when `entity` is scoped to a tenant (i.e. tenancy is on and it is not
|
|
1046
|
+
* listed as shared). Shared entities stay global reference data. */
|
|
1047
|
+
export declare function isTenantScoped(project: StudioProject, entity: string): boolean;
|
|
1048
|
+
/** Add or replace a scheduled job (matched by `id`). Pass `null` to remove one. */
|
|
1049
|
+
export declare function setJob(project: StudioProject, id: string, job: Omit<ScheduledJob, 'id'> | null): StudioProject;
|
|
1050
|
+
/** Where the generated app deploys. Drives the emitted SvelteKit adapter + config. */
|
|
1051
|
+
export type DeployTarget = 'auto' | 'vercel' | 'netlify' | 'cloudflare' | 'node';
|
|
1052
|
+
/** Localization config: the locales the app ships and which is the default. */
|
|
1053
|
+
export type I18nConfig = {
|
|
1054
|
+
enabled: boolean;
|
|
1055
|
+
locales: string[];
|
|
1056
|
+
defaultLocale?: string;
|
|
1057
|
+
};
|
|
1058
|
+
export type ProjectIssueLevel = 'error' | 'warning';
|
|
1059
|
+
export type ProjectIssue = {
|
|
1060
|
+
level: ProjectIssueLevel;
|
|
1061
|
+
message: string;
|
|
1062
|
+
screen?: string;
|
|
1063
|
+
block?: string;
|
|
1064
|
+
};
|
|
1065
|
+
/** One palette entry: a draggable block kind + what it needs to be useful. */
|
|
1066
|
+
export type PaletteItem = {
|
|
1067
|
+
kind: BlockKind;
|
|
1068
|
+
label: string;
|
|
1069
|
+
needs?: 'measure' | 'child';
|
|
1070
|
+
};
|
|
1071
|
+
/** The designer's block palette, in menu order. (Editing is a Grid property, so
|
|
1072
|
+
* there's no standalone form block.) */
|
|
1073
|
+
export declare const blockPalette: ReadonlyArray<PaletteItem>;
|
|
1074
|
+
export declare function entityOf(project: StudioProject, name: string | undefined): EntitySchema | undefined;
|
|
1075
|
+
/** Sensible grid columns for an entity: every non-grid-hidden field, shown. */
|
|
1076
|
+
export declare function gridColumns(entity: EntitySchema): GridColumnConfig[];
|
|
1077
|
+
/** A default config for a freshly-added block of `kind`, sized for the entity. */
|
|
1078
|
+
export declare function defaultBlockConfig(kind: BlockKind, entity: EntitySchema): BlockConfig;
|
|
1079
|
+
/** Low-cardinality, filter-friendly fields (enum, boolean, then text), non-key.
|
|
1080
|
+
* Used to seed the faceted Filter panel. Caps at 4 so the panel stays compact. */
|
|
1081
|
+
export declare function pickFacetFields(entity: EntitySchema): string[];
|
|
1082
|
+
/** Append a tab to a Tabs container. */
|
|
1083
|
+
export declare function addTab(cfg: TabsConfig, label?: string): TabsConfig;
|
|
1084
|
+
/** Remove a tab by index (keeps at least one). */
|
|
1085
|
+
export declare function removeTab(cfg: TabsConfig, index: number): TabsConfig;
|
|
1086
|
+
/** Rename a tab by index. */
|
|
1087
|
+
export declare function renameTab(cfg: TabsConfig, index: number, label: string): TabsConfig;
|
|
1088
|
+
/** Add a child block (default config for `kind`) to a tab. Only `TAB_CHILD_KINDS` are allowed. */
|
|
1089
|
+
export declare function addTabBlock(cfg: TabsConfig, index: number, kind: BlockKind, entity: EntitySchema): TabsConfig;
|
|
1090
|
+
/** Remove a child block from a tab by id. */
|
|
1091
|
+
export declare function removeTabBlock(cfg: TabsConfig, index: number, blockId: string): TabsConfig;
|
|
1092
|
+
/** Add a specific UI-kit component (by registry key) to a tab. */
|
|
1093
|
+
export declare function addTabComponent(cfg: TabsConfig, index: number, componentKey: string): TabsConfig;
|
|
1094
|
+
/** Append a section (collapsible panel) to an accordion. */
|
|
1095
|
+
export declare function addAccordionSection(cfg: AccordionConfig, label?: string): AccordionConfig;
|
|
1096
|
+
/** Remove a section by index (keeps at least one). */
|
|
1097
|
+
export declare function removeAccordionSection(cfg: AccordionConfig, index: number): AccordionConfig;
|
|
1098
|
+
/** Rename a section by index. */
|
|
1099
|
+
export declare function renameAccordionSection(cfg: AccordionConfig, index: number, label: string): AccordionConfig;
|
|
1100
|
+
/** Toggle single- vs multiple-open behaviour. */
|
|
1101
|
+
export declare function setAccordionMultiple(cfg: AccordionConfig, multiple: boolean): AccordionConfig;
|
|
1102
|
+
/** Add a display-block child (default config for `kind`) to a section. Only CONTAINER_CHILD_KINDS. */
|
|
1103
|
+
export declare function addAccordionBlock(cfg: AccordionConfig, index: number, kind: BlockKind, entity: EntitySchema): AccordionConfig;
|
|
1104
|
+
/** Add a specific UI-kit component (by registry key) to a section. */
|
|
1105
|
+
export declare function addAccordionComponent(cfg: AccordionConfig, index: number, componentKey: string): AccordionConfig;
|
|
1106
|
+
/** Remove a child block from a section by id. */
|
|
1107
|
+
export declare function removeAccordionBlock(cfg: AccordionConfig, index: number, blockId: string): AccordionConfig;
|
|
1108
|
+
/** A default screen for an entity: a grid (editing via a popup form by default). */
|
|
1109
|
+
export declare function defaultScreenFor(entity: EntitySchema): Screen;
|
|
1110
|
+
/** A new project from a set of entities: one default screen each, in-memory. */
|
|
1111
|
+
export declare function createProject(entities: EntitySchema[], opts?: {
|
|
1112
|
+
title?: string;
|
|
1113
|
+
dataSource?: DataSourceKind;
|
|
1114
|
+
}): StudioProject;
|
|
1115
|
+
export declare function addBlock(project: StudioProject, screenId: string, kind: BlockKind): StudioProject;
|
|
1116
|
+
/** Insert a new block at `index` (drag-drop from the palette). Clamps to range. */
|
|
1117
|
+
export declare function addBlockAt(project: StudioProject, screenId: string, kind: BlockKind, index: number): StudioProject;
|
|
1118
|
+
/** Add a UI-kit component block (see `ui-components.ts`'s `UI_COMPONENT_REGISTRY`)
|
|
1119
|
+
* to a screen. Unlike `addBlock`/`addBlockAt`, this needs no entity - it works on
|
|
1120
|
+
* any screen, including a freestanding one, or mixed onto an entity-bound one. */
|
|
1121
|
+
export declare function addComponentBlock(project: StudioProject, screenId: string, componentKey: string, defaultProps?: Record<string, unknown>, index?: number): StudioProject;
|
|
1122
|
+
/** A valid, unique JS identifier for a component handle on a screen, e.g. `button1`.
|
|
1123
|
+
* Handles are the named objects code reaches (btn.setLabel(...), btn.onclick = ...). */
|
|
1124
|
+
export declare function componentHandleName(cfg: ComponentConfig): string;
|
|
1125
|
+
/** Rename a component's handle (the variable code uses to reach it). */
|
|
1126
|
+
export declare function setComponentName(project: StudioProject, screenId: string, blockId: string, name: string): StudioProject;
|
|
1127
|
+
/** True when a component has at least one data-bound prop. */
|
|
1128
|
+
export declare function componentHasBindings(cfg: ComponentConfig): boolean;
|
|
1129
|
+
/** Bind (or, with `binding: null`, unbind) one component prop to the screen's data. */
|
|
1130
|
+
export declare function setComponentBinding(project: StudioProject, screenId: string, blockId: string, propKey: string, binding: ComponentBinding | null): StudioProject;
|
|
1131
|
+
export declare function removeBlock(project: StudioProject, screenId: string, blockId: string): StudioProject;
|
|
1132
|
+
/** Clone a block (config + width/height) with a fresh id, inserted right after it. */
|
|
1133
|
+
export declare function duplicateBlock(project: StudioProject, screenId: string, blockId: string): StudioProject;
|
|
1134
|
+
/** Move a block one slot up (`-1`) or down (`+1`). No-op at the ends. */
|
|
1135
|
+
export declare function moveBlock(project: StudioProject, screenId: string, blockId: string, dir: -1 | 1): StudioProject;
|
|
1136
|
+
/** Reorder a block to an explicit index (drag-drop). Clamps to range. */
|
|
1137
|
+
export declare function reorderBlock(project: StudioProject, screenId: string, blockId: string, toIndex: number): StudioProject;
|
|
1138
|
+
/** Patch a block's config (merged), span/height, and/or appearance `style` (merged;
|
|
1139
|
+
* keys set to undefined are cleared). */
|
|
1140
|
+
export declare function updateBlock(project: StudioProject, screenId: string, blockId: string, patch: {
|
|
1141
|
+
span?: 1 | 2 | 3;
|
|
1142
|
+
colSpan?: number;
|
|
1143
|
+
height?: number;
|
|
1144
|
+
config?: Partial<BlockConfig>;
|
|
1145
|
+
style?: Partial<BlockStyle>;
|
|
1146
|
+
className?: string;
|
|
1147
|
+
}): StudioProject;
|
|
1148
|
+
/** Replace an entity's schema (e.g. after field edits), keeping its screens. */
|
|
1149
|
+
export declare function updateEntity(project: StudioProject, name: string, schema: EntitySchema): StudioProject;
|
|
1150
|
+
/** Add an entity + its default screen. */
|
|
1151
|
+
export declare function addEntity(project: StudioProject, schema: EntitySchema): StudioProject;
|
|
1152
|
+
/** Remove an entity and every screen bound to it. */
|
|
1153
|
+
export declare function removeEntity(project: StudioProject, name: string): StudioProject;
|
|
1154
|
+
export declare function addScreen(project: StudioProject, entity: string): StudioProject;
|
|
1155
|
+
export declare function removeScreen(project: StudioProject, screenId: string): StudioProject;
|
|
1156
|
+
export declare function updateScreen(project: StudioProject, screenId: string, patch: Partial<Pick<Screen, 'title' | 'route' | 'entity' | 'nav' | 'actions' | 'className' | 'renderMode'>>): StudioProject;
|
|
1157
|
+
/** The screen's layout engine. Defaults to `'grid'` (the 12-column responsive grid). */
|
|
1158
|
+
export declare function screenLayoutOf(screen: Screen): ScreenLayout;
|
|
1159
|
+
/** Every pane id present anywhere in a dock workspace (main tree + floating + auto-hidden). */
|
|
1160
|
+
export declare function dockPaneIds(state: DockManagerState): Set<string>;
|
|
1161
|
+
/**
|
|
1162
|
+
* Smart auto-layout: seed a docking workspace from a screen's blocks by role -
|
|
1163
|
+
* filters dock left, record / detail panels dock right, KPIs / gauges strip across
|
|
1164
|
+
* the top, and the main content (grid / board / calendar / chart / ...) fills the
|
|
1165
|
+
* centre. Pane ids equal block ids. Runtime float / pin / pop-out is layered on later.
|
|
1166
|
+
*/
|
|
1167
|
+
export declare function buildDockLayout(screen: Screen): DockManagerState;
|
|
1168
|
+
/** Incrementally reconcile a dock workspace to the screen's blocks - add a pane for each new
|
|
1169
|
+
* block, strip panes for removed blocks - WITHOUT rebuilding, so the user's arrangement
|
|
1170
|
+
* (splits / floats / pins) is preserved. Seeds a fresh workspace if none exists. */
|
|
1171
|
+
export declare function syncDockPanes(screen: Screen): Screen;
|
|
1172
|
+
/** Rebuild the dock workspace if its panes no longer match the screen's blocks (a safety
|
|
1173
|
+
* net after block add / delete while the visual editor hasn't reconciled incrementally). */
|
|
1174
|
+
export declare function reconcileDock(screen: Screen): Screen;
|
|
1175
|
+
/** Switch a screen between the 12-column grid and a docking workspace. Switching to
|
|
1176
|
+
* `'dock'` seeds a workspace (smart auto-layout) if none exists yet. */
|
|
1177
|
+
export declare function setScreenLayout(project: StudioProject, screenId: string, layout: ScreenLayout): StudioProject;
|
|
1178
|
+
/** Seed canvas rects for every block: flow them two-up (half-width each) down the
|
|
1179
|
+
* page, so switching to canvas gives a reasonable starting arrangement. */
|
|
1180
|
+
export declare function buildCanvasLayout(screen: Screen): Record<string, CanvasRect>;
|
|
1181
|
+
/** The stored rect for a block, or a computed default (so a block added after the
|
|
1182
|
+
* layout was seeded still lands somewhere sane). */
|
|
1183
|
+
export declare function canvasRectOf(screen: Screen, blockId: string): CanvasRect;
|
|
1184
|
+
/** Move / resize a block on the canvas. Values are clamped to the screen's column
|
|
1185
|
+
* count (col in-grid, colSpan 1..cols; row >= 0, rowSpan >= 1). */
|
|
1186
|
+
export declare function setCanvasRect(project: StudioProject, screenId: string, blockId: string, rect: Partial<CanvasRect>): StudioProject;
|
|
1187
|
+
/** Named starting arrangements for the 12-column grid - a one-click way to set
|
|
1188
|
+
* every block's column span to a common pattern instead of picking each by hand. */
|
|
1189
|
+
export type GridPreset = 'full' | 'two-col' | 'three-col' | 'sidebar' | 'kpi-row';
|
|
1190
|
+
export declare function gridPresetLabel(preset: GridPreset): string;
|
|
1191
|
+
export declare const GRID_PRESETS: ReadonlyArray<GridPreset>;
|
|
1192
|
+
/** Apply a grid preset: rewrite the top-level blocks' `colSpan` to the pattern.
|
|
1193
|
+
* Only touches the current screen's own blocks (nested container children keep
|
|
1194
|
+
* their spans). A no-op for a screen with no blocks. */
|
|
1195
|
+
export declare function applyGridPreset(project: StudioProject, screenId: string, preset: GridPreset): StudioProject;
|
|
1196
|
+
/** Persist a new dock workspace (user rearranged panes in the designer). */
|
|
1197
|
+
export declare function setScreenDock(project: StudioProject, screenId: string, dock: DockManagerState): StudioProject;
|
|
1198
|
+
/** Add a state variable (unique name; `state_N` if the name is taken / empty). */
|
|
1199
|
+
export declare function addStateVar(project: StudioProject, screenId: string, v?: Partial<StateVar>): StudioProject;
|
|
1200
|
+
/** Patch a state variable by (old) name. Renames keep the identifier valid + unique. */
|
|
1201
|
+
export declare function updateStateVar(project: StudioProject, screenId: string, name: string, patch: Partial<StateVar>): StudioProject;
|
|
1202
|
+
/** Remove a state variable by name. */
|
|
1203
|
+
export declare function removeStateVar(project: StudioProject, screenId: string, name: string): StudioProject;
|
|
1204
|
+
/** Rebuild the pane arrangement from scratch (smart auto-layout, honoring the
|
|
1205
|
+
* current split orientation). Used when a setting invalidates the layout - e.g.
|
|
1206
|
+
* the user flips split orientation - or as a "reset arrangement" action. */
|
|
1207
|
+
export declare function reseedScreenDock(project: StudioProject, screenId: string): StudioProject;
|
|
1208
|
+
/** The current title (tab text) of a block's dock pane, if the screen is docked. */
|
|
1209
|
+
export declare function dockPaneTitleOf(screen: Screen, paneId: string): string | undefined;
|
|
1210
|
+
/** Rename a block's dock pane (the tab text) anywhere in the workspace. */
|
|
1211
|
+
export declare function setDockPaneTitle(project: StudioProject, screenId: string, paneId: string, title: string): StudioProject;
|
|
1212
|
+
/** A freestanding screen: no bound entity, so no blocks/data binding - just a
|
|
1213
|
+
* title and (once actions are added) a toolbar. For a blank page the developer
|
|
1214
|
+
* builds on, or one that's purely a home for custom actions ("Run report"). */
|
|
1215
|
+
export declare function addFreestandingScreen(project: StudioProject, opts: {
|
|
1216
|
+
title: string;
|
|
1217
|
+
route?: string;
|
|
1218
|
+
}): StudioProject;
|
|
1219
|
+
/** Add a toolbar-level custom action to a screen (works on a freestanding screen
|
|
1220
|
+
* too). Generates a stable id from `taken` project-wide ids; the generated app
|
|
1221
|
+
* gets a wired-up button + a stub `/api/actions/<id>` route to fill in. */
|
|
1222
|
+
export declare function addScreenAction(project: StudioProject, screenId: string, action: {
|
|
1223
|
+
label: string;
|
|
1224
|
+
icon?: string;
|
|
1225
|
+
confirm?: string;
|
|
1226
|
+
}): StudioProject;
|
|
1227
|
+
export declare function removeScreenAction(project: StudioProject, screenId: string, actionId: string): StudioProject;
|
|
1228
|
+
/** Opt a screen into a user-owned `handlers.ts` companion (design + your own code).
|
|
1229
|
+
* The generator scaffolds the stub once and never rewrites it. */
|
|
1230
|
+
export declare function enableScreenCode(project: StudioProject, screenId: string): StudioProject;
|
|
1231
|
+
/** Drop the code companion binding (leaves any file the user already wrote on disk;
|
|
1232
|
+
* the generator simply stops emitting/importing it). */
|
|
1233
|
+
export declare function disableScreenCode(project: StudioProject, screenId: string): StudioProject;
|
|
1234
|
+
/** Toggle whether the page renders a Grid fed by `ctx.setRows` from `onLoad`.
|
|
1235
|
+
* Implies `code: true` (a Grid needs the handler to fill it). */
|
|
1236
|
+
export declare function setScreenRenderGrid(project: StudioProject, screenId: string, on: boolean): StudioProject;
|
|
1237
|
+
/** Set the body of one event handler (e.g. `load`) - the code inside the generated
|
|
1238
|
+
* function. This is what the designer's Code view edits per slot (the "single
|
|
1239
|
+
* onLoad block"). Empty clears it back to the stub default. Implies `code: true`. */
|
|
1240
|
+
export declare function setHandlerBody(project: StudioProject, screenId: string, handler: string, body: string): StudioProject;
|
|
1241
|
+
/** Set the full source the designer writes into the screen's `handlers.ts` companion.
|
|
1242
|
+
* An advanced escape hatch that overrides the structured per-event bodies: when
|
|
1243
|
+
* present it is emitted verbatim. Empty string clears it. Implies `code: true`. */
|
|
1244
|
+
export declare function setScreenHandlersSource(project: StudioProject, screenId: string, source: string): StudioProject;
|
|
1245
|
+
/** Replace the steps of one method slot (`onLoad`, `onDestroy`, or `click:<blockId>`).
|
|
1246
|
+
* An empty list clears the slot. Implies `code: true`. */
|
|
1247
|
+
export declare function setHandlerSteps(project: StudioProject, screenId: string, slot: string, steps: ActionStep[]): StudioProject;
|
|
1248
|
+
/** Append a step to a method slot. */
|
|
1249
|
+
export declare function addHandlerStep(project: StudioProject, screenId: string, slot: string, step: ActionStep): StudioProject;
|
|
1250
|
+
/** Replace / remove a step at `index` (null removes it). */
|
|
1251
|
+
export declare function updateHandlerStep(project: StudioProject, screenId: string, slot: string, index: number, step: ActionStep | null): StudioProject;
|
|
1252
|
+
/** Move a step within its slot (dir -1 up, +1 down). */
|
|
1253
|
+
export declare function moveHandlerStep(project: StudioProject, screenId: string, slot: string, index: number, dir: -1 | 1): StudioProject;
|
|
1254
|
+
/** Drop the visual steps for a slot into the raw code editor (compile once), so a
|
|
1255
|
+
* user can hand-edit from there. Moves `handlerSteps[slot]` -> `handlerBodies[slot]`. */
|
|
1256
|
+
export declare function stepsToCode(project: StudioProject, screenId: string, slot: string): StudioProject;
|
|
1257
|
+
/** Insert a block (deep-cloned, fresh id) into a screen - the paste target. Appends by default. */
|
|
1258
|
+
export declare function insertBlock(project: StudioProject, screenId: string, block: Block, index?: number): StudioProject;
|
|
1259
|
+
/** Duplicate a whole screen (fresh id / route / title + fresh block ids), inserted after it. */
|
|
1260
|
+
export declare function duplicateScreen(project: StudioProject, screenId: string): StudioProject;
|
|
1261
|
+
/** Move a screen to an explicit index (drag-reorder the tab strip). Clamps to range. */
|
|
1262
|
+
export declare function reorderScreen(project: StudioProject, screenId: string, toIndex: number): StudioProject;
|
|
1263
|
+
export declare function setDataSource(project: StudioProject, dataSource: DataSourceKind): StudioProject;
|
|
1264
|
+
/** Set the deploy target (SvelteKit adapter + provider config the bundle emits). */
|
|
1265
|
+
export declare function setDeployTarget(project: StudioProject, deploy: DeployTarget): StudioProject;
|
|
1266
|
+
/** Enable / disable the authentication starter (login + session + hooks). */
|
|
1267
|
+
export declare function setAuth(project: StudioProject, patch: Partial<AuthConfig> & {
|
|
1268
|
+
enabled: boolean;
|
|
1269
|
+
}): StudioProject;
|
|
1270
|
+
/** Enable / disable the typed Drizzle data layer (schema + repos + migrations). */
|
|
1271
|
+
export declare function setDataLayer(project: StudioProject, enabled: boolean): StudioProject;
|
|
1272
|
+
/** A demo user seed for the auth starter: one user per RBAC role (so you can sign in
|
|
1273
|
+
* and see each role's access), or a single admin when RBAC is off. Passwords are
|
|
1274
|
+
* demo seeds (like sample rows) - the generated code flags them for replacement. */
|
|
1275
|
+
export type SeedUser = {
|
|
1276
|
+
email: string;
|
|
1277
|
+
name: string;
|
|
1278
|
+
role: string;
|
|
1279
|
+
password: string;
|
|
1280
|
+
};
|
|
1281
|
+
export declare function seedUsers(project: StudioProject): SeedUser[];
|
|
1282
|
+
/** A skeleton binding for a kind, seeded with the entity's name as its table/path. */
|
|
1283
|
+
export declare function defaultEntitySource(kind: DataSourceKind, entityName: string): EntityDataSource;
|
|
1284
|
+
/** Bind one entity to a data source (REST / SQL / Supabase / in-memory). */
|
|
1285
|
+
export declare function setEntityDataSource(project: StudioProject, entityName: string, source: EntityDataSource): StudioProject;
|
|
1286
|
+
/** The resolved source for an entity: its explicit per-entity binding, else a skeleton
|
|
1287
|
+
* for the project's default source kind (so the rail "Default source" actually applies
|
|
1288
|
+
* to unbound entities, and this agrees with `ssrScreenShape`'s fallback). */
|
|
1289
|
+
export declare function entityDataSource(project: StudioProject, entityName: string): EntityDataSource;
|
|
1290
|
+
export declare function setTheme(project: StudioProject, theme: ProjectTheme): StudioProject;
|
|
1291
|
+
/** Apply a Studio theme preset: sets the preset id and clears any manual accent
|
|
1292
|
+
* override so the preset's own accent takes effect (the user can re-tune it
|
|
1293
|
+
* afterwards with the color picker). Pass `accent` to pin one explicitly. */
|
|
1294
|
+
export declare function setThemePreset(project: StudioProject, preset: string, accent?: string): StudioProject;
|
|
1295
|
+
/** Configure the generated app shell (layout style, brand, footer, nav position). */
|
|
1296
|
+
export declare function setShell(project: StudioProject, shell: ShellConfig): StudioProject;
|
|
1297
|
+
export type ScreenTemplate = 'crud' | 'dashboard' | 'master-detail' | 'empty';
|
|
1298
|
+
/** Build a screen for an entity from a template (a preset arrangement of blocks). */
|
|
1299
|
+
export declare function screenFromTemplate(entity: EntitySchema, template: ScreenTemplate, opts?: {
|
|
1300
|
+
child?: EntitySchema;
|
|
1301
|
+
foreignKey?: string;
|
|
1302
|
+
}): Screen;
|
|
1303
|
+
/** Add a screen built from a template. `child` (for master-detail) is an entity name. */
|
|
1304
|
+
export declare function addScreenFromTemplate(project: StudioProject, entityName: string, template: ScreenTemplate, opts?: {
|
|
1305
|
+
child?: string;
|
|
1306
|
+
foreignKey?: string;
|
|
1307
|
+
}): StudioProject;
|
|
1308
|
+
/**
|
|
1309
|
+
* Enforce the structural invariants the designer + codegen rely on: unique
|
|
1310
|
+
* entity names, unique field names within an entity, unique screen ids + routes,
|
|
1311
|
+
* and unique block ids within a screen. In-app ops already keep these, but a
|
|
1312
|
+
* hand-edited / externally-produced `studio.config.json` may not - and a
|
|
1313
|
+
* duplicate key would crash a keyed `{#each}` list at render time. Idempotent:
|
|
1314
|
+
* a project that already satisfies the invariants is returned value-equal.
|
|
1315
|
+
*/
|
|
1316
|
+
export declare function sanitizeProject(project: StudioProject): StudioProject;
|
|
1317
|
+
/** Serialize a project to a `studio.config.json` string (the persisted design). */
|
|
1318
|
+
export declare function serializeProject(project: StudioProject): string;
|
|
1319
|
+
/**
|
|
1320
|
+
* Parse a `studio.config.json` string back into a `StudioProject`, validating
|
|
1321
|
+
* the shape. Note: only the data model round-trips - any runtime functions on an
|
|
1322
|
+
* entity (`computed` / `validate` / `hooks`) are not part of the config.
|
|
1323
|
+
*/
|
|
1324
|
+
export declare function parseProject(json: string): StudioProject;
|
|
1325
|
+
/** Validate a project. Errors block codegen; warnings are advisory. */
|
|
1326
|
+
export declare function validateProject(project: StudioProject): ProjectIssue[];
|
|
1327
|
+
export declare function isProjectValid(project: StudioProject): boolean;
|