@12ui/design 0.2.72 → 0.2.74
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/README.md +242 -54
- package/SKILL.md +28 -33
- package/dist/cli-arguments.d.ts.map +1 -1
- package/dist/cli-arguments.js +3 -0
- package/dist/cli-arguments.js.map +1 -1
- package/dist/cli-branch-command.d.ts.map +1 -1
- package/dist/cli-branch-command.js +4 -0
- package/dist/cli-branch-command.js.map +1 -1
- package/dist/cli-capabilities.d.ts +26 -1
- package/dist/cli-capabilities.d.ts.map +1 -1
- package/dist/cli-capabilities.js +26 -1
- package/dist/cli-capabilities.js.map +1 -1
- package/dist/cli-corpus-command.d.ts +5 -4
- package/dist/cli-corpus-command.d.ts.map +1 -1
- package/dist/cli-corpus-command.js +17 -26
- package/dist/cli-corpus-command.js.map +1 -1
- package/dist/cli-corpus-run.js +1 -1
- package/dist/cli-corpus-run.js.map +1 -1
- package/dist/cli-draft-command.js +1 -1
- package/dist/cli-draft-command.js.map +1 -1
- package/dist/cli-help/design.d.ts +26 -6
- package/dist/cli-help/design.d.ts.map +1 -1
- package/dist/cli-help/design.js +39 -7
- package/dist/cli-help/design.js.map +1 -1
- package/dist/cli-help/index.d.ts +113 -7
- package/dist/cli-help/index.d.ts.map +1 -1
- package/dist/cli-help/index.js +2 -0
- package/dist/cli-help/index.js.map +1 -1
- package/dist/cli-help/meta.d.ts +1 -1
- package/dist/cli-help/meta.d.ts.map +1 -1
- package/dist/cli-help/meta.js +2 -1
- package/dist/cli-help/meta.js.map +1 -1
- package/dist/cli-help/workflow.d.ts +90 -0
- package/dist/cli-help/workflow.d.ts.map +1 -0
- package/dist/cli-help/workflow.js +89 -0
- package/dist/cli-help/workflow.js.map +1 -0
- package/dist/cli-open-browser.d.ts +7 -0
- package/dist/cli-open-browser.d.ts.map +1 -0
- package/dist/cli-open-browser.js +25 -0
- package/dist/cli-open-browser.js.map +1 -0
- package/dist/cli-prototype-command.d.ts +3 -1
- package/dist/cli-prototype-command.d.ts.map +1 -1
- package/dist/cli-prototype-command.js +33 -7
- package/dist/cli-prototype-command.js.map +1 -1
- package/dist/cli-review-command.d.ts.map +1 -1
- package/dist/cli-review-command.js +1 -16
- package/dist/cli-review-command.js.map +1 -1
- package/dist/cli-run.d.ts.map +1 -1
- package/dist/cli-run.js +35 -3
- package/dist/cli-run.js.map +1 -1
- package/dist/cli-usage.d.ts.map +1 -1
- package/dist/cli-usage.js +39 -5
- package/dist/cli-usage.js.map +1 -1
- package/dist/cli-workflow-command.d.ts +8 -0
- package/dist/cli-workflow-command.d.ts.map +1 -0
- package/dist/cli-workflow-command.js +97 -0
- package/dist/cli-workflow-command.js.map +1 -0
- package/dist/cli-workspace-command.d.ts +25 -0
- package/dist/cli-workspace-command.d.ts.map +1 -0
- package/dist/cli-workspace-command.js +95 -0
- package/dist/cli-workspace-command.js.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -4
- package/dist/config.js.map +1 -1
- package/dist/corpus-access.d.ts +11 -0
- package/dist/corpus-access.d.ts.map +1 -0
- package/dist/corpus-access.js +18 -0
- package/dist/corpus-access.js.map +1 -0
- package/dist/corpus-client.d.ts +11 -11
- package/dist/corpus-client.d.ts.map +1 -1
- package/dist/corpus-client.js +17 -6
- package/dist/corpus-client.js.map +1 -1
- package/dist/corpus-inspiration-failure.d.ts +1 -1
- package/dist/corpus-inspiration-failure.js +2 -2
- package/dist/corpus-inspiration-failure.js.map +1 -1
- package/dist/corpus-reference-download-retry.d.ts.map +1 -1
- package/dist/corpus-reference-download-retry.js +11 -1
- package/dist/corpus-reference-download-retry.js.map +1 -1
- package/dist/corpus-request-error.d.ts +2 -0
- package/dist/corpus-request-error.d.ts.map +1 -1
- package/dist/corpus-request-error.js +2 -0
- package/dist/corpus-request-error.js.map +1 -1
- package/dist/corpus-retry-guidance.d.ts +5 -0
- package/dist/corpus-retry-guidance.d.ts.map +1 -0
- package/dist/corpus-retry-guidance.js +18 -0
- package/dist/corpus-retry-guidance.js.map +1 -0
- package/dist/improve-pricing-plan.d.ts.map +1 -1
- package/dist/improve-pricing-plan.js +2 -4
- package/dist/improve-pricing-plan.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy-skill-catalog.d.ts.map +1 -1
- package/dist/legacy-skill-catalog.js +41 -0
- package/dist/legacy-skill-catalog.js.map +1 -1
- package/dist/mcp-slate-command.d.ts +31 -0
- package/dist/mcp-slate-command.d.ts.map +1 -0
- package/dist/mcp-slate-command.js +123 -0
- package/dist/mcp-slate-command.js.map +1 -0
- package/dist/mcp-slate-image.d.ts +22 -0
- package/dist/mcp-slate-image.d.ts.map +1 -0
- package/dist/mcp-slate-image.js +28 -0
- package/dist/mcp-slate-image.js.map +1 -0
- package/dist/mcp-slate-latest.d.ts +13 -0
- package/dist/mcp-slate-latest.d.ts.map +1 -0
- package/dist/mcp-slate-latest.js +34 -0
- package/dist/mcp-slate-latest.js.map +1 -0
- package/dist/mcp-slate-names.d.ts +25 -0
- package/dist/mcp-slate-names.d.ts.map +1 -0
- package/dist/mcp-slate-names.js +49 -0
- package/dist/mcp-slate-names.js.map +1 -0
- package/dist/mcp-slate-resource.d.ts +5 -0
- package/dist/mcp-slate-resource.d.ts.map +1 -0
- package/dist/mcp-slate-resource.js +37 -0
- package/dist/mcp-slate-resource.js.map +1 -0
- package/dist/mcp-slate-run.d.ts +41 -0
- package/dist/mcp-slate-run.d.ts.map +1 -0
- package/dist/mcp-slate-run.js +88 -0
- package/dist/mcp-slate-run.js.map +1 -0
- package/dist/mcp-slate-tool-defs.d.ts +61 -0
- package/dist/mcp-slate-tool-defs.d.ts.map +1 -0
- package/dist/mcp-slate-tool-defs.js +247 -0
- package/dist/mcp-slate-tool-defs.js.map +1 -0
- package/dist/mcp-slate-tools.d.ts +8 -0
- package/dist/mcp-slate-tools.d.ts.map +1 -0
- package/dist/mcp-slate-tools.js +45 -0
- package/dist/mcp-slate-tools.js.map +1 -0
- package/dist/mcp-slate-ui-copy.d.ts +145 -0
- package/dist/mcp-slate-ui-copy.d.ts.map +1 -0
- package/dist/mcp-slate-ui-copy.js +164 -0
- package/dist/mcp-slate-ui-copy.js.map +1 -0
- package/dist/mcp-slate-ui-script-bridge.d.ts +18 -0
- package/dist/mcp-slate-ui-script-bridge.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-bridge.js +137 -0
- package/dist/mcp-slate-ui-script-bridge.js.map +1 -0
- package/dist/mcp-slate-ui-script-browser.d.ts +12 -0
- package/dist/mcp-slate-ui-script-browser.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-browser.js +19 -0
- package/dist/mcp-slate-ui-script-browser.js.map +1 -0
- package/dist/mcp-slate-ui-script-dialog.d.ts +21 -0
- package/dist/mcp-slate-ui-script-dialog.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-dialog.js +321 -0
- package/dist/mcp-slate-ui-script-dialog.js.map +1 -0
- package/dist/mcp-slate-ui-script-inline.d.ts +10 -0
- package/dist/mcp-slate-ui-script-inline.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-inline.js +224 -0
- package/dist/mcp-slate-ui-script-inline.js.map +1 -0
- package/dist/mcp-slate-ui-script-inspiration.d.ts +13 -0
- package/dist/mcp-slate-ui-script-inspiration.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-inspiration.js +236 -0
- package/dist/mcp-slate-ui-script-inspiration.js.map +1 -0
- package/dist/mcp-slate-ui-script-more.d.ts +32 -0
- package/dist/mcp-slate-ui-script-more.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-more.js +289 -0
- package/dist/mcp-slate-ui-script-more.js.map +1 -0
- package/dist/mcp-slate-ui-script-progress.d.ts +7 -0
- package/dist/mcp-slate-ui-script-progress.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-progress.js +9 -0
- package/dist/mcp-slate-ui-script-progress.js.map +1 -0
- package/dist/mcp-slate-ui-script-remote.d.ts +28 -0
- package/dist/mcp-slate-ui-script-remote.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-remote.js +147 -0
- package/dist/mcp-slate-ui-script-remote.js.map +1 -0
- package/dist/mcp-slate-ui-script-scribble.d.ts +19 -0
- package/dist/mcp-slate-ui-script-scribble.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-scribble.js +114 -0
- package/dist/mcp-slate-ui-script-scribble.js.map +1 -0
- package/dist/mcp-slate-ui-script-select.d.ts +16 -0
- package/dist/mcp-slate-ui-script-select.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-select.js +73 -0
- package/dist/mcp-slate-ui-script-select.js.map +1 -0
- package/dist/mcp-slate-ui-script-stage.d.ts +12 -0
- package/dist/mcp-slate-ui-script-stage.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-stage.js +180 -0
- package/dist/mcp-slate-ui-script-stage.js.map +1 -0
- package/dist/mcp-slate-ui-script-state.d.ts +13 -0
- package/dist/mcp-slate-ui-script-state.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script-state.js +306 -0
- package/dist/mcp-slate-ui-script-state.js.map +1 -0
- package/dist/mcp-slate-ui-script.d.ts +27 -0
- package/dist/mcp-slate-ui-script.d.ts.map +1 -0
- package/dist/mcp-slate-ui-script.js +60 -0
- package/dist/mcp-slate-ui-script.js.map +1 -0
- package/dist/mcp-slate-ui-styles-dialog.d.ts +20 -0
- package/dist/mcp-slate-ui-styles-dialog.d.ts.map +1 -0
- package/dist/mcp-slate-ui-styles-dialog.js +95 -0
- package/dist/mcp-slate-ui-styles-dialog.js.map +1 -0
- package/dist/mcp-slate-ui-styles-stage.d.ts +19 -0
- package/dist/mcp-slate-ui-styles-stage.d.ts.map +1 -0
- package/dist/mcp-slate-ui-styles-stage.js +67 -0
- package/dist/mcp-slate-ui-styles-stage.js.map +1 -0
- package/dist/mcp-slate-ui-styles.d.ts +18 -0
- package/dist/mcp-slate-ui-styles.d.ts.map +1 -0
- package/dist/mcp-slate-ui-styles.js +132 -0
- package/dist/mcp-slate-ui-styles.js.map +1 -0
- package/dist/mcp-slate-ui.d.ts +16 -0
- package/dist/mcp-slate-ui.d.ts.map +1 -0
- package/dist/mcp-slate-ui.js +59 -0
- package/dist/mcp-slate-ui.js.map +1 -0
- package/dist/mcp-slate-workspace-tools.d.ts +15 -0
- package/dist/mcp-slate-workspace-tools.d.ts.map +1 -0
- package/dist/mcp-slate-workspace-tools.js +155 -0
- package/dist/mcp-slate-workspace-tools.js.map +1 -0
- package/dist/mcp-tool-definitions.d.ts.map +1 -1
- package/dist/mcp-tool-definitions.js +9 -7
- package/dist/mcp-tool-definitions.js.map +1 -1
- package/dist/mcp-tool-handler.d.ts +8 -2
- package/dist/mcp-tool-handler.d.ts.map +1 -1
- package/dist/mcp-tool-handler.js +34 -13
- package/dist/mcp-tool-handler.js.map +1 -1
- package/dist/mcp-workflow-tools.d.ts +6 -0
- package/dist/mcp-workflow-tools.d.ts.map +1 -0
- package/dist/mcp-workflow-tools.js +108 -0
- package/dist/mcp-workflow-tools.js.map +1 -0
- package/dist/prototype-label-client.d.ts +5 -0
- package/dist/prototype-label-client.d.ts.map +1 -1
- package/dist/prototype-label-client.js.map +1 -1
- package/dist/prototype-poststep.d.ts +2 -2
- package/dist/prototype-poststep.d.ts.map +1 -1
- package/dist/prototype-poststep.js +3 -0
- package/dist/prototype-poststep.js.map +1 -1
- package/dist/prototype-run-record.d.ts +6 -2
- package/dist/prototype-run-record.d.ts.map +1 -1
- package/dist/prototype-run-record.js +6 -0
- package/dist/prototype-run-record.js.map +1 -1
- package/dist/prototype-runner.d.ts +2 -2
- package/dist/prototype-runner.d.ts.map +1 -1
- package/dist/prototype-runner.js +5 -2
- package/dist/prototype-runner.js.map +1 -1
- package/dist/prototype-workflow-contract.d.ts +13 -0
- package/dist/prototype-workflow-contract.d.ts.map +1 -0
- package/dist/prototype-workflow-contract.js +82 -0
- package/dist/prototype-workflow-contract.js.map +1 -0
- package/dist/prototype-workflow-labels.d.ts +29 -0
- package/dist/prototype-workflow-labels.d.ts.map +1 -0
- package/dist/prototype-workflow-labels.js +93 -0
- package/dist/prototype-workflow-labels.js.map +1 -0
- package/dist/run-journal-commands.d.ts.map +1 -1
- package/dist/run-journal-commands.js +18 -5
- package/dist/run-journal-commands.js.map +1 -1
- package/dist/server.d.ts +22 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +44 -8
- package/dist/server.js.map +1 -1
- package/dist/slate-actions.d.ts +43 -0
- package/dist/slate-actions.d.ts.map +1 -0
- package/dist/slate-actions.js +108 -0
- package/dist/slate-actions.js.map +1 -0
- package/dist/slate-annotate.d.ts +36 -0
- package/dist/slate-annotate.d.ts.map +1 -0
- package/dist/slate-annotate.js +71 -0
- package/dist/slate-annotate.js.map +1 -0
- package/dist/slate-approvals.d.ts +61 -0
- package/dist/slate-approvals.d.ts.map +1 -0
- package/dist/slate-approvals.js +153 -0
- package/dist/slate-approvals.js.map +1 -0
- package/dist/slate-browser-decision.d.ts +30 -0
- package/dist/slate-browser-decision.d.ts.map +1 -0
- package/dist/slate-browser-decision.js +24 -0
- package/dist/slate-browser-decision.js.map +1 -0
- package/dist/slate-browser-host-script.d.ts +14 -0
- package/dist/slate-browser-host-script.d.ts.map +1 -0
- package/dist/slate-browser-host-script.js +125 -0
- package/dist/slate-browser-host-script.js.map +1 -0
- package/dist/slate-browser-host.d.ts +9 -0
- package/dist/slate-browser-host.d.ts.map +1 -0
- package/dist/slate-browser-host.js +37 -0
- package/dist/slate-browser-host.js.map +1 -0
- package/dist/slate-browser-server.d.ts +37 -0
- package/dist/slate-browser-server.d.ts.map +1 -0
- package/dist/slate-browser-server.js +186 -0
- package/dist/slate-browser-server.js.map +1 -0
- package/dist/slate-commit.d.ts +28 -0
- package/dist/slate-commit.d.ts.map +1 -0
- package/dist/slate-commit.js +218 -0
- package/dist/slate-commit.js.map +1 -0
- package/dist/slate-corpus.d.ts +14 -0
- package/dist/slate-corpus.d.ts.map +1 -0
- package/dist/slate-corpus.js +32 -0
- package/dist/slate-corpus.js.map +1 -0
- package/dist/slate-edit-prompt.d.ts +18 -0
- package/dist/slate-edit-prompt.d.ts.map +1 -0
- package/dist/slate-edit-prompt.js +41 -0
- package/dist/slate-edit-prompt.js.map +1 -0
- package/dist/slate-edit-runner.d.ts +4 -0
- package/dist/slate-edit-runner.d.ts.map +1 -0
- package/dist/slate-edit-runner.js +90 -0
- package/dist/slate-edit-runner.js.map +1 -0
- package/dist/slate-editability.d.ts +20 -0
- package/dist/slate-editability.d.ts.map +1 -0
- package/dist/slate-editability.js +19 -0
- package/dist/slate-editability.js.map +1 -0
- package/dist/slate-errors.d.ts +15 -0
- package/dist/slate-errors.d.ts.map +1 -0
- package/dist/slate-errors.js +21 -0
- package/dist/slate-errors.js.map +1 -0
- package/dist/slate-handoff-options.d.ts +40 -0
- package/dist/slate-handoff-options.d.ts.map +1 -0
- package/dist/slate-handoff-options.js +117 -0
- package/dist/slate-handoff-options.js.map +1 -0
- package/dist/slate-handoff.d.ts +11 -0
- package/dist/slate-handoff.d.ts.map +1 -0
- package/dist/slate-handoff.js +56 -0
- package/dist/slate-handoff.js.map +1 -0
- package/dist/slate-ids.d.ts +33 -0
- package/dist/slate-ids.d.ts.map +1 -0
- package/dist/slate-ids.js +47 -0
- package/dist/slate-ids.js.map +1 -0
- package/dist/slate-image-executor.d.ts +39 -0
- package/dist/slate-image-executor.d.ts.map +1 -0
- package/dist/slate-image-executor.js +52 -0
- package/dist/slate-image-executor.js.map +1 -0
- package/dist/slate-inspiration.d.ts +22 -0
- package/dist/slate-inspiration.d.ts.map +1 -0
- package/dist/slate-inspiration.js +112 -0
- package/dist/slate-inspiration.js.map +1 -0
- package/dist/slate-labels.d.ts +11 -0
- package/dist/slate-labels.d.ts.map +1 -0
- package/dist/slate-labels.js +32 -0
- package/dist/slate-labels.js.map +1 -0
- package/dist/slate-ledger.d.ts +29 -0
- package/dist/slate-ledger.d.ts.map +1 -0
- package/dist/slate-ledger.js +65 -0
- package/dist/slate-ledger.js.map +1 -0
- package/dist/slate-liveness.d.ts +26 -0
- package/dist/slate-liveness.d.ts.map +1 -0
- package/dist/slate-liveness.js +49 -0
- package/dist/slate-liveness.js.map +1 -0
- package/dist/slate-local-image.d.ts +19 -0
- package/dist/slate-local-image.d.ts.map +1 -0
- package/dist/slate-local-image.js +36 -0
- package/dist/slate-local-image.js.map +1 -0
- package/dist/slate-lock.d.ts +64 -0
- package/dist/slate-lock.d.ts.map +1 -0
- package/dist/slate-lock.js +178 -0
- package/dist/slate-lock.js.map +1 -0
- package/dist/slate-paths.d.ts +45 -0
- package/dist/slate-paths.d.ts.map +1 -0
- package/dist/slate-paths.js +132 -0
- package/dist/slate-paths.js.map +1 -0
- package/dist/slate-pick.d.ts +29 -0
- package/dist/slate-pick.d.ts.map +1 -0
- package/dist/slate-pick.js +55 -0
- package/dist/slate-pick.js.map +1 -0
- package/dist/slate-reference-ids.d.ts +6 -0
- package/dist/slate-reference-ids.d.ts.map +1 -0
- package/dist/slate-reference-ids.js +17 -0
- package/dist/slate-reference-ids.js.map +1 -0
- package/dist/slate-reference-store.d.ts +23 -0
- package/dist/slate-reference-store.d.ts.map +1 -0
- package/dist/slate-reference-store.js +46 -0
- package/dist/slate-reference-store.js.map +1 -0
- package/dist/slate-resume.d.ts +19 -0
- package/dist/slate-resume.d.ts.map +1 -0
- package/dist/slate-resume.js +94 -0
- package/dist/slate-resume.js.map +1 -0
- package/dist/slate-round-params.d.ts +20 -0
- package/dist/slate-round-params.d.ts.map +1 -0
- package/dist/slate-round-params.js +32 -0
- package/dist/slate-round-params.js.map +1 -0
- package/dist/slate-round-prompt.d.ts +18 -0
- package/dist/slate-round-prompt.d.ts.map +1 -0
- package/dist/slate-round-prompt.js +20 -0
- package/dist/slate-round-prompt.js.map +1 -0
- package/dist/slate-round-runner.d.ts +4 -0
- package/dist/slate-round-runner.d.ts.map +1 -0
- package/dist/slate-round-runner.js +125 -0
- package/dist/slate-round-runner.js.map +1 -0
- package/dist/slate-round-search.d.ts +7 -0
- package/dist/slate-round-search.d.ts.map +1 -0
- package/dist/slate-round-search.js +77 -0
- package/dist/slate-round-search.js.map +1 -0
- package/dist/slate-run-action.d.ts +14 -0
- package/dist/slate-run-action.d.ts.map +1 -0
- package/dist/slate-run-action.js +81 -0
- package/dist/slate-run-action.js.map +1 -0
- package/dist/slate-runner-context.d.ts +57 -0
- package/dist/slate-runner-context.d.ts.map +1 -0
- package/dist/slate-runner-context.js +79 -0
- package/dist/slate-runner-context.js.map +1 -0
- package/dist/slate-runner-failure.d.ts +8 -0
- package/dist/slate-runner-failure.d.ts.map +1 -0
- package/dist/slate-runner-failure.js +17 -0
- package/dist/slate-runner-failure.js.map +1 -0
- package/dist/slate-runner-flag.d.ts +3 -0
- package/dist/slate-runner-flag.d.ts.map +1 -0
- package/dist/slate-runner-flag.js +3 -0
- package/dist/slate-runner-flag.js.map +1 -0
- package/dist/slate-runner-main.d.ts +31 -0
- package/dist/slate-runner-main.d.ts.map +1 -0
- package/dist/slate-runner-main.js +132 -0
- package/dist/slate-runner-main.js.map +1 -0
- package/dist/slate-runner-spawn.d.ts +23 -0
- package/dist/slate-runner-spawn.d.ts.map +1 -0
- package/dist/slate-runner-spawn.js +27 -0
- package/dist/slate-runner-spawn.js.map +1 -0
- package/dist/slate-runtime.d.ts +38 -0
- package/dist/slate-runtime.d.ts.map +1 -0
- package/dist/slate-runtime.js +48 -0
- package/dist/slate-runtime.js.map +1 -0
- package/dist/slate-versions.d.ts +26 -0
- package/dist/slate-versions.d.ts.map +1 -0
- package/dist/slate-versions.js +110 -0
- package/dist/slate-versions.js.map +1 -0
- package/dist/slate-view-contract.d.ts +232 -0
- package/dist/slate-view-contract.d.ts.map +1 -0
- package/dist/slate-view-contract.js +17 -0
- package/dist/slate-view-contract.js.map +1 -0
- package/dist/slate-view-types.d.ts +2 -0
- package/dist/slate-view-types.d.ts.map +1 -0
- package/dist/slate-view-types.js +2 -0
- package/dist/slate-view-types.js.map +1 -0
- package/dist/slate-view.d.ts +19 -0
- package/dist/slate-view.d.ts.map +1 -0
- package/dist/slate-view.js +184 -0
- package/dist/slate-view.js.map +1 -0
- package/dist/slate-workspace-parse.d.ts +20 -0
- package/dist/slate-workspace-parse.d.ts.map +1 -0
- package/dist/slate-workspace-parse.js +442 -0
- package/dist/slate-workspace-parse.js.map +1 -0
- package/dist/slate-workspace-store.d.ts +44 -0
- package/dist/slate-workspace-store.d.ts.map +1 -0
- package/dist/slate-workspace-store.js +270 -0
- package/dist/slate-workspace-store.js.map +1 -0
- package/dist/slate-workspace-types.d.ts +176 -0
- package/dist/slate-workspace-types.d.ts.map +1 -0
- package/dist/slate-workspace-types.js +13 -0
- package/dist/slate-workspace-types.js.map +1 -0
- package/dist/workflow/adapter-12ui.d.ts +4 -0
- package/dist/workflow/adapter-12ui.d.ts.map +1 -0
- package/dist/workflow/adapter-12ui.js +147 -0
- package/dist/workflow/adapter-12ui.js.map +1 -0
- package/dist/workflow/adapter-layerdoc.d.ts +16 -0
- package/dist/workflow/adapter-layerdoc.d.ts.map +1 -0
- package/dist/workflow/adapter-layerdoc.js +116 -0
- package/dist/workflow/adapter-layerdoc.js.map +1 -0
- package/dist/workflow/adapter-openai.d.ts +4 -0
- package/dist/workflow/adapter-openai.d.ts.map +1 -0
- package/dist/workflow/adapter-openai.js +166 -0
- package/dist/workflow/adapter-openai.js.map +1 -0
- package/dist/workflow/adapter-process.d.ts +7 -0
- package/dist/workflow/adapter-process.d.ts.map +1 -0
- package/dist/workflow/adapter-process.js +174 -0
- package/dist/workflow/adapter-process.js.map +1 -0
- package/dist/workflow/adapter-prototype-labels.d.ts +15 -0
- package/dist/workflow/adapter-prototype-labels.d.ts.map +1 -0
- package/dist/workflow/adapter-prototype-labels.js +71 -0
- package/dist/workflow/adapter-prototype-labels.js.map +1 -0
- package/dist/workflow/adapter-types.d.ts +40 -0
- package/dist/workflow/adapter-types.d.ts.map +1 -0
- package/dist/workflow/adapter-types.js +2 -0
- package/dist/workflow/adapter-types.js.map +1 -0
- package/dist/workflow/adapter-utils.d.ts +11 -0
- package/dist/workflow/adapter-utils.d.ts.map +1 -0
- package/dist/workflow/adapter-utils.js +72 -0
- package/dist/workflow/adapter-utils.js.map +1 -0
- package/dist/workflow/adapters.d.ts +6 -0
- package/dist/workflow/adapters.d.ts.map +1 -0
- package/dist/workflow/adapters.js +25 -0
- package/dist/workflow/adapters.js.map +1 -0
- package/dist/workflow/artifact.d.ts +11 -0
- package/dist/workflow/artifact.d.ts.map +1 -0
- package/dist/workflow/artifact.js +94 -0
- package/dist/workflow/artifact.js.map +1 -0
- package/dist/workflow/bundle-collect.d.ts +8 -0
- package/dist/workflow/bundle-collect.d.ts.map +1 -0
- package/dist/workflow/bundle-collect.js +56 -0
- package/dist/workflow/bundle-collect.js.map +1 -0
- package/dist/workflow/bundle-export.d.ts +16 -0
- package/dist/workflow/bundle-export.d.ts.map +1 -0
- package/dist/workflow/bundle-export.js +174 -0
- package/dist/workflow/bundle-export.js.map +1 -0
- package/dist/workflow/bundle-paths.d.ts +7 -0
- package/dist/workflow/bundle-paths.d.ts.map +1 -0
- package/dist/workflow/bundle-paths.js +35 -0
- package/dist/workflow/bundle-paths.js.map +1 -0
- package/dist/workflow/bundle.d.ts +4 -0
- package/dist/workflow/bundle.d.ts.map +1 -0
- package/dist/workflow/bundle.js +4 -0
- package/dist/workflow/bundle.js.map +1 -0
- package/dist/workflow/capture.d.ts +36 -0
- package/dist/workflow/capture.d.ts.map +1 -0
- package/dist/workflow/capture.js +81 -0
- package/dist/workflow/capture.js.map +1 -0
- package/dist/workflow/continuation-branch.d.ts +15 -0
- package/dist/workflow/continuation-branch.d.ts.map +1 -0
- package/dist/workflow/continuation-branch.js +103 -0
- package/dist/workflow/continuation-branch.js.map +1 -0
- package/dist/workflow/continuation-plans.d.ts +38 -0
- package/dist/workflow/continuation-plans.d.ts.map +1 -0
- package/dist/workflow/continuation-plans.js +78 -0
- package/dist/workflow/continuation-plans.js.map +1 -0
- package/dist/workflow/continuation.d.ts +25 -0
- package/dist/workflow/continuation.d.ts.map +1 -0
- package/dist/workflow/continuation.js +89 -0
- package/dist/workflow/continuation.js.map +1 -0
- package/dist/workflow/layerdoc-reader.d.ts +27 -0
- package/dist/workflow/layerdoc-reader.d.ts.map +1 -0
- package/dist/workflow/layerdoc-reader.js +81 -0
- package/dist/workflow/layerdoc-reader.js.map +1 -0
- package/dist/workflow/project-evidence.d.ts +48 -0
- package/dist/workflow/project-evidence.d.ts.map +1 -0
- package/dist/workflow/project-evidence.js +200 -0
- package/dist/workflow/project-evidence.js.map +1 -0
- package/dist/workflow/providers.d.ts +35 -0
- package/dist/workflow/providers.d.ts.map +1 -0
- package/dist/workflow/providers.js +110 -0
- package/dist/workflow/providers.js.map +1 -0
- package/dist/workflow/recipes-layerdoc-validation.d.ts +4 -0
- package/dist/workflow/recipes-layerdoc-validation.d.ts.map +1 -0
- package/dist/workflow/recipes-layerdoc-validation.js +98 -0
- package/dist/workflow/recipes-layerdoc-validation.js.map +1 -0
- package/dist/workflow/recipes-result-validation.d.ts +6 -0
- package/dist/workflow/recipes-result-validation.d.ts.map +1 -0
- package/dist/workflow/recipes-result-validation.js +38 -0
- package/dist/workflow/recipes-result-validation.js.map +1 -0
- package/dist/workflow/recipes-schemas.d.ts +7 -0
- package/dist/workflow/recipes-schemas.d.ts.map +1 -0
- package/dist/workflow/recipes-schemas.js +67 -0
- package/dist/workflow/recipes-schemas.js.map +1 -0
- package/dist/workflow/recipes-validation.d.ts +14 -0
- package/dist/workflow/recipes-validation.d.ts.map +1 -0
- package/dist/workflow/recipes-validation.js +68 -0
- package/dist/workflow/recipes-validation.js.map +1 -0
- package/dist/workflow/recipes.d.ts +20 -0
- package/dist/workflow/recipes.d.ts.map +1 -0
- package/dist/workflow/recipes.js +167 -0
- package/dist/workflow/recipes.js.map +1 -0
- package/dist/workflow/routing.d.ts +4 -0
- package/dist/workflow/routing.d.ts.map +1 -0
- package/dist/workflow/routing.js +28 -0
- package/dist/workflow/routing.js.map +1 -0
- package/dist/workflow/schema.d.ts +5 -0
- package/dist/workflow/schema.d.ts.map +1 -0
- package/dist/workflow/schema.js +29 -0
- package/dist/workflow/schema.js.map +1 -0
- package/dist/workflow/service.d.ts +59 -0
- package/dist/workflow/service.d.ts.map +1 -0
- package/dist/workflow/service.js +170 -0
- package/dist/workflow/service.js.map +1 -0
- package/dist/workflow/store-json.d.ts +5 -0
- package/dist/workflow/store-json.d.ts.map +1 -0
- package/dist/workflow/store-json.js +35 -0
- package/dist/workflow/store-json.js.map +1 -0
- package/dist/workflow/store-lock.d.ts +3 -0
- package/dist/workflow/store-lock.d.ts.map +1 -0
- package/dist/workflow/store-lock.js +85 -0
- package/dist/workflow/store-lock.js.map +1 -0
- package/dist/workflow/store-paths.d.ts +17 -0
- package/dist/workflow/store-paths.d.ts.map +1 -0
- package/dist/workflow/store-paths.js +67 -0
- package/dist/workflow/store-paths.js.map +1 -0
- package/dist/workflow/store-validation.d.ts +7 -0
- package/dist/workflow/store-validation.d.ts.map +1 -0
- package/dist/workflow/store-validation.js +119 -0
- package/dist/workflow/store-validation.js.map +1 -0
- package/dist/workflow/store.d.ts +10 -0
- package/dist/workflow/store.d.ts.map +1 -0
- package/dist/workflow/store.js +193 -0
- package/dist/workflow/store.js.map +1 -0
- package/dist/workflow/types.d.ts +120 -0
- package/dist/workflow/types.d.ts.map +1 -0
- package/dist/workflow/types.js +15 -0
- package/dist/workflow/types.js.map +1 -0
- package/dist/workflow-transport.d.ts +28 -0
- package/dist/workflow-transport.d.ts.map +1 -0
- package/dist/workflow-transport.js +184 -0
- package/dist/workflow-transport.js.map +1 -0
- package/open-design.json +2 -2
- package/package.json +2 -1
- package/prototype-kit/tests/rules-check.mjs +9 -0
- package/runtime/codex-conversion/src/images/native-invoke.mjs +1 -1
- package/runtime/codex-conversion/src/images/native.mjs +8 -4
- package/runtime/layerdoc-validator.mjs +1860 -0
- package/skills/12ui-design/SKILL.md +17 -63
- package/skills/12ui-design/improve.md +5 -1
- package/skills/12ui-design/inspire.md +8 -5
- package/skills/12ui-design/outputs.md +23 -2
- package/skills/12ui-design/session.md +161 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View state, the image loader queue and the status polling controller.
|
|
3
|
+
*
|
|
4
|
+
* Host limits, measured or derived (see the step-0 probe): about five
|
|
5
|
+
* concurrent app requests app-wide, so a view keeps at most three image loads
|
|
6
|
+
* in flight, version pictures and reference pictures together (leaving room
|
|
7
|
+
* for status and an action); it polls only while something is running and the
|
|
8
|
+
* document is visible, with backoff from two to ten seconds and a `since`
|
|
9
|
+
* stamp so an unchanged answer costs no re-render. A hidden view issues no
|
|
10
|
+
* calls at all.
|
|
11
|
+
*/
|
|
12
|
+
export const SLATE_UI_STATE = String.raw `
|
|
13
|
+
var state = {
|
|
14
|
+
host: {}, view: null,
|
|
15
|
+
sel: { candidateId: null, versionId: null, followLatest: true },
|
|
16
|
+
tab: "designs", query: "", dialog: null, more: null,
|
|
17
|
+
busy: false, status: { text: "", kind: "", source: "", phase: "" }, lastOpText: "", lastBandOp: "",
|
|
18
|
+
thumbs: {}, fulls: {}, refs: {}, lastOpStates: {}, opBusy: {}, awaitEdit: null,
|
|
19
|
+
insp: { local: null, writing: false, dirty: false, searching: false, noMatch: "", waiters: [] }
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// ---- small helpers ----
|
|
23
|
+
function el(tag, cls, text) {
|
|
24
|
+
var e = document.createElement(tag);
|
|
25
|
+
if (cls) e.className = cls;
|
|
26
|
+
if (text !== undefined) e.textContent = text;
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
29
|
+
function button(label, cls, onclick) {
|
|
30
|
+
var b = el("button", cls || "", label);
|
|
31
|
+
b.type = "button";
|
|
32
|
+
if (onclick) b.addEventListener("click", onclick);
|
|
33
|
+
return b;
|
|
34
|
+
}
|
|
35
|
+
function uuid4() {
|
|
36
|
+
var b = new Uint8Array(16);
|
|
37
|
+
if (typeof crypto !== "undefined" && crypto.getRandomValues) crypto.getRandomValues(b);
|
|
38
|
+
else for (var i = 0; i < 16; i++) b[i] = Math.floor(Math.random() * 256);
|
|
39
|
+
b[6] = (b[6] & 15) | 64;
|
|
40
|
+
b[8] = (b[8] & 63) | 128;
|
|
41
|
+
var h = Array.prototype.map.call(b, function (x) { return (x + 256).toString(16).slice(1); }).join("");
|
|
42
|
+
return h.slice(0, 8) + "-" + h.slice(8, 12) + "-" + h.slice(12, 16) + "-" + h.slice(16, 20) + "-" + h.slice(20);
|
|
43
|
+
}
|
|
44
|
+
function visible() { return document.visibilityState !== "hidden"; }
|
|
45
|
+
function errText(err) { return err && err.message ? err.message : String(err); }
|
|
46
|
+
// "source" is "op" for a line the screen derives from the ops' own state, "" for a message about a click.
|
|
47
|
+
function setStatus(text, kind, source, phase) {
|
|
48
|
+
state.status = { text: text || "", kind: kind || "", source: source || "", phase: phase || "" };
|
|
49
|
+
var nodes = document.querySelectorAll("[data-status]");
|
|
50
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
51
|
+
nodes[i].textContent = state.status.text;
|
|
52
|
+
nodes[i].className = "status" + (kind ? " " + kind : "");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ---- lookups over the current view ----
|
|
57
|
+
function cand(id) { return state.view && state.view.candidates.find(function (c) { return c.candidateId === id; }); }
|
|
58
|
+
function ver(id) { return state.view && state.view.versions.find(function (v) { return v.versionId === id; }); }
|
|
59
|
+
function latestVersion(c) { return c && c.latestVersionId ? ver(c.latestVersionId) : undefined; }
|
|
60
|
+
function roundById(id) { return state.view && state.view.rounds.find(function (r) { return r.roundId === id; }); }
|
|
61
|
+
function byLabel(a, b) { return a.label.length - b.label.length || (a.label < b.label ? -1 : a.label > b.label ? 1 : 0); }
|
|
62
|
+
// Newest round first, then by letter: the order of the strip and of the selection.
|
|
63
|
+
function optionOrder(a, b) {
|
|
64
|
+
var ra = roundById(a.roundId);
|
|
65
|
+
var rb = roundById(b.roundId);
|
|
66
|
+
return ((rb ? rb.index : 0) - (ra ? ra.index : 0)) || byLabel(a, b);
|
|
67
|
+
}
|
|
68
|
+
function orderedCandidates() { return state.view.candidates.slice().sort(optionOrder); }
|
|
69
|
+
// The card's strip: the newest round only, plus the option the pick belongs to and the one being viewed when they are
|
|
70
|
+
// older, so the large image always has its thumbnail. The workspace still lists every round.
|
|
71
|
+
function inlineCandidates() {
|
|
72
|
+
var all = orderedCandidates();
|
|
73
|
+
if (all.length === 0) return all;
|
|
74
|
+
var newest = all[0].roundId;
|
|
75
|
+
var picked = state.view.pick && ver(state.view.pick.versionId);
|
|
76
|
+
var keep = {};
|
|
77
|
+
keep[newest] = true;
|
|
78
|
+
if (picked) keep[picked.candidateId] = true;
|
|
79
|
+
if (state.sel.candidateId) keep[state.sel.candidateId] = true;
|
|
80
|
+
return all.filter(function (c) { return c.roundId === newest || keep[c.candidateId]; });
|
|
81
|
+
}
|
|
82
|
+
function versionsOf(c) { return c.versionIds.map(ver).filter(Boolean); }
|
|
83
|
+
function runningOps() { return state.view.ops.filter(function (o) { return o.state === "starting" || o.state === "running"; }); }
|
|
84
|
+
function selectedCandidate() { return cand(state.sel.candidateId); }
|
|
85
|
+
function selectedVersion() { return ver(state.sel.versionId); }
|
|
86
|
+
function optionName(c) { return COPY.optionPrefix + c.label + (c.state === "failed" ? COPY.failedSuffix : ""); }
|
|
87
|
+
|
|
88
|
+
function ensureSelection() {
|
|
89
|
+
var v = state.view;
|
|
90
|
+
if (!v || v.candidates.length === 0) { state.sel = { candidateId: null, versionId: null, followLatest: true }; return; }
|
|
91
|
+
var c = cand(state.sel.candidateId);
|
|
92
|
+
if (!c) {
|
|
93
|
+
var picked = v.pick && ver(v.pick.versionId);
|
|
94
|
+
var ordered = orderedCandidates();
|
|
95
|
+
c = (picked && cand(picked.candidateId)) || ordered.find(function (x) { return x.state === "ready"; }) || ordered[0];
|
|
96
|
+
state.sel = { candidateId: c.candidateId, versionId: null, followLatest: true };
|
|
97
|
+
}
|
|
98
|
+
var current = state.sel.versionId && c.versionIds.indexOf(state.sel.versionId) >= 0 ? state.sel.versionId : null;
|
|
99
|
+
if (state.sel.followLatest || !current) { state.sel.versionId = c.latestVersionId; state.sel.followLatest = true; }
|
|
100
|
+
}
|
|
101
|
+
// Choosing the option that is already shown, at the version already shown, changes nothing.
|
|
102
|
+
function selectCandidate(id, versionId) {
|
|
103
|
+
var c = cand(id);
|
|
104
|
+
if (!c) return;
|
|
105
|
+
var target = versionId || c.latestVersionId;
|
|
106
|
+
if (state.sel.candidateId === id && state.sel.versionId === target) return;
|
|
107
|
+
state.awaitEdit = null;
|
|
108
|
+
state.sel.candidateId = id;
|
|
109
|
+
state.sel.versionId = target;
|
|
110
|
+
state.sel.followLatest = !versionId || versionId === c.latestVersionId;
|
|
111
|
+
renderAll();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ---- pictures through the app-only tools, at most three at a time; the workspace jumps the queue ----
|
|
115
|
+
var loader = { queue: [], active: 0, max: 3, inflight: {} };
|
|
116
|
+
function imageKey(version, size) { return size + ":" + version.versionId + ":" + version.sha256; }
|
|
117
|
+
function enqueue(key, cache, tool, args, urgent) {
|
|
118
|
+
if (cache[key]) return Promise.resolve(cache[key]);
|
|
119
|
+
if (loader.inflight[key]) {
|
|
120
|
+
if (urgent) {
|
|
121
|
+
var at = loader.queue.findIndex(function (j) { return j.key === key; });
|
|
122
|
+
if (at > 0) loader.queue.unshift(loader.queue.splice(at, 1)[0]);
|
|
123
|
+
}
|
|
124
|
+
return loader.inflight[key].promise;
|
|
125
|
+
}
|
|
126
|
+
var job = { key: key, cache: cache, tool: tool, args: args };
|
|
127
|
+
job.promise = new Promise(function (resolve, reject) { job.resolve = resolve; job.reject = reject; });
|
|
128
|
+
loader.inflight[key] = job;
|
|
129
|
+
if (urgent) loader.queue.unshift(job); else loader.queue.push(job);
|
|
130
|
+
pump();
|
|
131
|
+
return job.promise;
|
|
132
|
+
}
|
|
133
|
+
function wantImage(version, size, urgent) {
|
|
134
|
+
var cache = size === "full" ? state.fulls : state.thumbs;
|
|
135
|
+
return enqueue(imageKey(version, size), cache, TOOLS.image, { runDir: state.view.runDir, versionId: version.versionId, size: size }, urgent);
|
|
136
|
+
}
|
|
137
|
+
function wantReference(id, size, urgent) {
|
|
138
|
+
return enqueue("ref:" + size + ":" + id, state.refs, TOOLS.reference, { runDir: state.view.runDir, referenceId: id, size: size }, urgent);
|
|
139
|
+
}
|
|
140
|
+
function pump() {
|
|
141
|
+
while (visible() && loader.active < loader.max && loader.queue.length > 0) {
|
|
142
|
+
var job = loader.queue.shift();
|
|
143
|
+
loader.active++;
|
|
144
|
+
run(job);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function run(job) {
|
|
148
|
+
callTool(job.tool, job.args).then(function (result) {
|
|
149
|
+
var block = (result.content || []).find(function (b) { return b.type === "image"; });
|
|
150
|
+
if (!block) throw new Error("no image block returned");
|
|
151
|
+
var src = "data:" + block.mimeType + ";base64," + block.data;
|
|
152
|
+
job.cache[job.key] = src;
|
|
153
|
+
job.resolve(src);
|
|
154
|
+
}).catch(function (err) { job.reject(err); }).then(function () {
|
|
155
|
+
delete loader.inflight[job.key];
|
|
156
|
+
loader.active--;
|
|
157
|
+
pump();
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function fillImage(img, promise) {
|
|
161
|
+
promise.then(function (src) {
|
|
162
|
+
if (img.isConnected === false) return;
|
|
163
|
+
img.src = src;
|
|
164
|
+
img.classList.remove("empty", "shimmer");
|
|
165
|
+
}, function (err) {
|
|
166
|
+
// An error is shown in place of the picture, never thrown.
|
|
167
|
+
img.alt = errText(err);
|
|
168
|
+
img.setAttribute("data-error", errText(err));
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function bindImage(img, version, size, urgent) { if (version) fillImage(img, wantImage(version, size, urgent)); }
|
|
172
|
+
function bindReference(img, id, size) { fillImage(img, wantReference(id, size, false)); }
|
|
173
|
+
|
|
174
|
+
// ---- status polling ----
|
|
175
|
+
var DELAYS = [2000, 3000, 5000, 8000, 10000];
|
|
176
|
+
var poll = { timer: null, step: 0, inFlight: false };
|
|
177
|
+
function wantsPolling() { return !!state.view && !!state.view.runDir && visible() && runningOps().length > 0; }
|
|
178
|
+
function clearPoll() { if (poll.timer !== null) { clearTimeout(poll.timer); poll.timer = null; } }
|
|
179
|
+
function schedulePoll() {
|
|
180
|
+
clearPoll();
|
|
181
|
+
if (!wantsPolling() || poll.inFlight) return;
|
|
182
|
+
poll.timer = setTimeout(runPoll, DELAYS[Math.min(poll.step, DELAYS.length - 1)]);
|
|
183
|
+
}
|
|
184
|
+
function runPoll() {
|
|
185
|
+
poll.timer = null;
|
|
186
|
+
if (!wantsPolling()) return;
|
|
187
|
+
poll.inFlight = true;
|
|
188
|
+
callTool(TOOLS.status, { runDir: state.view.runDir, since: state.view.stamp }).then(function (result) {
|
|
189
|
+
var sc = result.structuredContent || {};
|
|
190
|
+
if (sc.unchanged) poll.step++;
|
|
191
|
+
else if (sc.schema) { poll.step = 0; applyView(sc, true); }
|
|
192
|
+
}).catch(function () { poll.step++; }).then(function () { poll.inFlight = false; schedulePoll(); });
|
|
193
|
+
}
|
|
194
|
+
// One refresh when the view becomes visible again.
|
|
195
|
+
function refreshOnce() {
|
|
196
|
+
if (!state.view || !state.view.runDir || poll.inFlight) return;
|
|
197
|
+
poll.inFlight = true;
|
|
198
|
+
callTool(TOOLS.status, { runDir: state.view.runDir, since: state.view.stamp }).then(function (result) {
|
|
199
|
+
var sc = result.structuredContent || {};
|
|
200
|
+
if (sc.schema) applyView(sc, true);
|
|
201
|
+
}).catch(function () {}).then(function () { poll.inFlight = false; schedulePoll(); });
|
|
202
|
+
}
|
|
203
|
+
document.addEventListener("visibilitychange", function () {
|
|
204
|
+
if (visible()) { pump(); refreshOnce(); schedulePoll(); }
|
|
205
|
+
else clearPoll();
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
// ---- what the ops say: the band of the workspace, the status line of the card ----
|
|
209
|
+
function opLabel(op) {
|
|
210
|
+
var parent = op.edit && ver(op.edit.parentVersionId);
|
|
211
|
+
var c = parent && cand(parent.candidateId);
|
|
212
|
+
return c ? c.label : (op.target || "");
|
|
213
|
+
}
|
|
214
|
+
function roundOfOp(op) {
|
|
215
|
+
var rounds = state.view.rounds;
|
|
216
|
+
var named = rounds.filter(function (r) { return COPY.roundPrefix + r.index === op.target; })[0];
|
|
217
|
+
if (named) return named;
|
|
218
|
+
var running = rounds.filter(function (r) { return r.state === "running"; });
|
|
219
|
+
return running.length ? running[running.length - 1] : null;
|
|
220
|
+
}
|
|
221
|
+
function progressText(op) {
|
|
222
|
+
// The hosted server has no runner of its own: a running op is waiting for the person's agent to draw and upload.
|
|
223
|
+
if (TARGET === "remote" && op.phase === "agent") return COPY.waitingForAgent;
|
|
224
|
+
if (op.kind === "round") {
|
|
225
|
+
var r = roundOfOp(op);
|
|
226
|
+
return r ? tpl(COPY.designingProgress, { n: r.readyCount, m: r.count }) : COPY.designing;
|
|
227
|
+
}
|
|
228
|
+
return tpl(COPY.editing, { label: opLabel(op) });
|
|
229
|
+
}
|
|
230
|
+
// The newest op. The local plugin stamps every op with a time; the hosted server sends none (data minimization), so
|
|
231
|
+
// its ops are already oldest first and the last one is the newest.
|
|
232
|
+
function latestOp(view) {
|
|
233
|
+
if (TARGET === "remote") return view.ops[view.ops.length - 1];
|
|
234
|
+
return view.ops.slice().sort(function (a, b) { return Date.parse(a.startedAt) - Date.parse(b.startedAt); }).pop();
|
|
235
|
+
}
|
|
236
|
+
// The one thing worth a band: work that is running, else work that stopped or failed as the newest word.
|
|
237
|
+
function activeBand(view) {
|
|
238
|
+
var running = view.ops.filter(function (o) { return o.state === "starting" || o.state === "running"; });
|
|
239
|
+
if (running.length) { var op = running[running.length - 1]; return { kind: "run", op: op, text: progressText(op) }; }
|
|
240
|
+
var last = latestOp(view);
|
|
241
|
+
if (last && last.state === "interrupted") return { kind: "stopped", op: last, text: TARGET === "remote" && last.error && last.error.message ? last.error.message : COPY.interrupted };
|
|
242
|
+
if (last && last.state === "failed" && last.error) return { kind: "failed", op: last, text: last.error.message };
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// The card has one status line, so it also carries the running, stopped and failed words; the workspace has a band.
|
|
247
|
+
function syncProgressLine(view) {
|
|
248
|
+
var band = activeBand(view);
|
|
249
|
+
// The workspace's band speaks for running work, so a line about an earlier click ("Selected E.") is stale the
|
|
250
|
+
// moment a new op starts; a refusal stays, because the person has not read it away.
|
|
251
|
+
var bandOp = band && band.kind === "run" ? band.op.opId : "";
|
|
252
|
+
if (bandOp && bandOp !== state.lastBandOp && isFullscreen() && state.status.kind !== "err") setStatus("", "");
|
|
253
|
+
state.lastBandOp = bandOp;
|
|
254
|
+
if (isFullscreen() || !band) {
|
|
255
|
+
state.lastOpText = "";
|
|
256
|
+
if (state.status.source === "op" && state.status.phase === "progress") setStatus("", "");
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
// A message about a click stays until these words themselves change.
|
|
260
|
+
if (band.text !== state.lastOpText) { state.lastOpText = band.text; setStatus(band.text, band.kind === "failed" ? "err" : "", "op", "progress"); }
|
|
261
|
+
}
|
|
262
|
+
// What a finished op produced. A failure is the band's to say in the workspace.
|
|
263
|
+
function syncDoneLine(prev, view) {
|
|
264
|
+
var was = {};
|
|
265
|
+
if (prev) prev.ops.forEach(function (o) { was[o.opId] = o.state; });
|
|
266
|
+
var finished = view.ops.filter(function (o) {
|
|
267
|
+
return (was[o.opId] === "starting" || was[o.opId] === "running") && (o.state === "succeeded" || o.state === "failed");
|
|
268
|
+
}).pop();
|
|
269
|
+
if (!finished) return;
|
|
270
|
+
if (finished.state === "failed") return;
|
|
271
|
+
var made = view.versions.filter(function (v) { return finished.resultVersionIds.indexOf(v.versionId) >= 0; });
|
|
272
|
+
if (finished.kind === "round") {
|
|
273
|
+
var n = made.length;
|
|
274
|
+
if (n === 0) return;
|
|
275
|
+
var round = roundOfOp(finished);
|
|
276
|
+
var failedCount = round ? view.candidates.filter(function (c) { return c.roundId === round.roundId && c.state === "failed"; }).length : 0;
|
|
277
|
+
var text = (n === 1 ? COPY.roundReadyOne : tpl(COPY.roundReadyMany, { n: n })) + (failedCount ? " " + tpl(COPY.roundFailed, { n: failedCount }) : "");
|
|
278
|
+
setStatus(text, failedCount ? "" : "ok", "op", "done");
|
|
279
|
+
} else {
|
|
280
|
+
setStatus(tpl(COPY.editReady, { label: made.length ? made[made.length - 1].label : opLabel(finished) }), "ok", "op", "done");
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function syncOpStatus(prev, view) { syncProgressLine(view); syncDoneLine(prev, view); }
|
|
284
|
+
|
|
285
|
+
// ---- tell the agent, best effort, when work that was running has finished ----
|
|
286
|
+
function announceSettled(prev, next) {
|
|
287
|
+
next.ops.forEach(function (op) {
|
|
288
|
+
var was = state.lastOpStates[op.opId];
|
|
289
|
+
state.lastOpStates[op.opId] = op.state;
|
|
290
|
+
if (was !== "starting" && was !== "running") return;
|
|
291
|
+
if (op.state !== "succeeded" && op.state !== "failed") return;
|
|
292
|
+
var head = TARGET === "remote" ? "Design workspace: " : "Design workspace rev " + next.rev + ": ";
|
|
293
|
+
var text;
|
|
294
|
+
if (op.state === "failed") text = head + "the " + op.kind + " " + (op.target ? "for " + op.target + " " : "") + "failed" + (op.error ? " (" + op.error.code + ")" : "") + ".";
|
|
295
|
+
else if (op.kind === "round") {
|
|
296
|
+
var labels = next.candidates.filter(function (c) { return c.versionIds.some(function (id) { return op.resultVersionIds.indexOf(id) >= 0; }); }).map(function (c) { return c.label; });
|
|
297
|
+
text = head + (op.target || "the round") + " is ready" + (labels.length ? " (" + labels[0] + " to " + labels[labels.length - 1] + ")" : "") + ".";
|
|
298
|
+
} else {
|
|
299
|
+
var made = next.versions.find(function (v) { return op.resultVersionIds.indexOf(v.versionId) >= 0; });
|
|
300
|
+
text = head + (made ? made.label : opLabel(op)) + " was created.";
|
|
301
|
+
}
|
|
302
|
+
updateModelContext(text + " Confirm with " + TOOLS.data + ".");
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
`;
|
|
306
|
+
//# sourceMappingURL=mcp-slate-ui-script-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script-state.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqSvC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The workspace view's script, assembled from single-purpose fragments that
|
|
3
|
+
* share one scope: bridge (host protocol), state (view state, picture queue,
|
|
4
|
+
* polling, what the ops say), progress, inline (the card), select (Select and
|
|
5
|
+
* the hand-offs), inspiration (the tabs and the Inspiration tab), stage
|
|
6
|
+
* (fullscreen), dialog (Edit, Branch and Convert), more (the Generate more tile and its panel), scribble (the drawing layer of Edit), the hosted and browser targets' words, then the handshake, last, so every function and
|
|
7
|
+
* variable exists before the first message can arrive. The tool names come
|
|
8
|
+
* from the view contract (SLATE_UI_TOOLS), not from the server's own module.
|
|
9
|
+
*
|
|
10
|
+
* The fragments are String.raw, so escape sequences reach the browser
|
|
11
|
+
* unchanged; the assembled script must therefore contain no backtick and no
|
|
12
|
+
* dollar-brace (a test asserts it).
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Which host the screen is for: the local plugin's own tools, the hosted server (design.12ui.com), or a browser page
|
|
16
|
+
* opened by `12ui workspace open` when the plugin's tools are not available (the local plugin's tools, reached
|
|
17
|
+
* through a host shim in the page in place of an MCP Apps host).
|
|
18
|
+
*/
|
|
19
|
+
export type SlateUiTarget = 'local' | 'remote' | 'browser';
|
|
20
|
+
/**
|
|
21
|
+
* The script for one target. The fragments are the same for both; the target is a constant they read (`TARGET`), and
|
|
22
|
+
* only the places the two servers differ branch on it: what the agent is told, how a running op reads, which Convert
|
|
23
|
+
* outputs exist and what the edit carries.
|
|
24
|
+
*/
|
|
25
|
+
export declare const buildSlateUiScript: (target: SlateUiTarget) => string;
|
|
26
|
+
export declare const SLATE_UI_SCRIPT: string;
|
|
27
|
+
//# sourceMappingURL=mcp-slate-ui-script.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-script.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAgB3D;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,aAAa,KAAG,MAyB/C,CAAC;AAEb,eAAO,MAAM,eAAe,QAA8B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { SLATE_CONVERT_CHOICES, SLATE_CONVERT_DESCRIPTIONS, SLATE_CONVERT_MAX_WIDTH, SLATE_MORE_COUNTS, SLATE_REMOTE_CONVERT_CHOICES, SLATE_REMOTE_CONVERT_DESCRIPTIONS, SLATE_UI_COPY } from './mcp-slate-ui-copy.js';
|
|
2
|
+
import { SLATE_UI_TOOLS } from './slate-view-contract.js';
|
|
3
|
+
import { SLATE_UI_BRIDGE } from './mcp-slate-ui-script-bridge.js';
|
|
4
|
+
import { SLATE_UI_BROWSER } from './mcp-slate-ui-script-browser.js';
|
|
5
|
+
import { SLATE_UI_DIALOG } from './mcp-slate-ui-script-dialog.js';
|
|
6
|
+
import { SLATE_UI_INLINE } from './mcp-slate-ui-script-inline.js';
|
|
7
|
+
import { SLATE_UI_INSPIRATION } from './mcp-slate-ui-script-inspiration.js';
|
|
8
|
+
import { SLATE_UI_MORE } from './mcp-slate-ui-script-more.js';
|
|
9
|
+
import { SLATE_UI_PROGRESS } from './mcp-slate-ui-script-progress.js';
|
|
10
|
+
import { SLATE_UI_REMOTE } from './mcp-slate-ui-script-remote.js';
|
|
11
|
+
import { SLATE_UI_SCRIBBLE } from './mcp-slate-ui-script-scribble.js';
|
|
12
|
+
import { SLATE_UI_SELECT } from './mcp-slate-ui-script-select.js';
|
|
13
|
+
import { SLATE_UI_STAGE } from './mcp-slate-ui-script-stage.js';
|
|
14
|
+
import { SLATE_UI_STATE } from './mcp-slate-ui-script-state.js';
|
|
15
|
+
const HANDSHAKE = String.raw `
|
|
16
|
+
// ---- connect: handlers are registered above, before the handshake ----
|
|
17
|
+
if (window.parent === window) {
|
|
18
|
+
fatal(COPY.needsHost);
|
|
19
|
+
} else {
|
|
20
|
+
request("ui/initialize", { appCapabilities: {}, appInfo: { name: "12ui-slate", version: "3.0.0" }, protocolVersion: PROTOCOL })
|
|
21
|
+
.then(function (init) {
|
|
22
|
+
applyHost((init && init.hostContext) || {});
|
|
23
|
+
notify("ui/notifications/initialized", {});
|
|
24
|
+
})
|
|
25
|
+
.catch(function (err) { fatal(COPY.noConnection + errText(err)); });
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
/**
|
|
29
|
+
* The script for one target. The fragments are the same for both; the target is a constant they read (`TARGET`), and
|
|
30
|
+
* only the places the two servers differ branch on it: what the agent is told, how a running op reads, which Convert
|
|
31
|
+
* outputs exist and what the edit carries.
|
|
32
|
+
*/
|
|
33
|
+
export const buildSlateUiScript = (target) => [
|
|
34
|
+
'"use strict";',
|
|
35
|
+
'(function () {',
|
|
36
|
+
SLATE_UI_BRIDGE
|
|
37
|
+
.replace('__TOOLS__', () => JSON.stringify(SLATE_UI_TOOLS))
|
|
38
|
+
.replace('__COPY__', () => JSON.stringify(SLATE_UI_COPY))
|
|
39
|
+
.replace('__TARGET__', () => JSON.stringify(target))
|
|
40
|
+
.replace('__CONVERT__', () => JSON.stringify({
|
|
41
|
+
choices: target === 'remote' ? SLATE_REMOTE_CONVERT_CHOICES : SLATE_CONVERT_CHOICES,
|
|
42
|
+
descriptions: target === 'remote' ? SLATE_REMOTE_CONVERT_DESCRIPTIONS : SLATE_CONVERT_DESCRIPTIONS,
|
|
43
|
+
maxWidth: SLATE_CONVERT_MAX_WIDTH,
|
|
44
|
+
})),
|
|
45
|
+
SLATE_UI_STATE,
|
|
46
|
+
SLATE_UI_PROGRESS,
|
|
47
|
+
SLATE_UI_INLINE,
|
|
48
|
+
SLATE_UI_SELECT,
|
|
49
|
+
SLATE_UI_INSPIRATION,
|
|
50
|
+
SLATE_UI_STAGE,
|
|
51
|
+
SLATE_UI_DIALOG,
|
|
52
|
+
SLATE_UI_MORE.replace('__MORE__', () => JSON.stringify(SLATE_MORE_COUNTS)),
|
|
53
|
+
SLATE_UI_SCRIBBLE,
|
|
54
|
+
SLATE_UI_REMOTE,
|
|
55
|
+
SLATE_UI_BROWSER,
|
|
56
|
+
HANDSHAKE,
|
|
57
|
+
'})();',
|
|
58
|
+
].join('\n');
|
|
59
|
+
export const SLATE_UI_SCRIPT = buildSlateUiScript('local');
|
|
60
|
+
//# sourceMappingURL=mcp-slate-ui-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-script.js","sourceRoot":"","sources":["../src/mcp-slate-ui-script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvN,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAuBhE,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAY3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAqB,EAAU,EAAE,CAAC;IACnE,eAAe;IACf,gBAAgB;IAChB,eAAe;SACZ,OAAO,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;SAC1D,OAAO,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;SACxD,OAAO,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SACnD,OAAO,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;QAC3C,OAAO,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,qBAAqB;QACnF,YAAY,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,0BAA0B;QAClG,QAAQ,EAAE,uBAAuB;KAClC,CAAC,CAAC;IACL,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,oBAAoB;IACpB,cAAc;IACd,eAAe;IACf,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC1E,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,SAAS;IACT,OAAO;CACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dialogs (Edit, Branch, Convert), the scribble layer of Edit and the
|
|
3
|
+
* Inspiration tab. A dialog is a centred box over a dimmed workspace; it
|
|
4
|
+
* scrolls inside itself when the window is short, and fills the width on a
|
|
5
|
+
* phone. The reference tiles are square and fluid: at least 192 px across in
|
|
6
|
+
* the card and 256 px in the workspace (--ref-min), two across under 420 px.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SLATE_UI_DIALOG_STYLES: string;
|
|
9
|
+
/**
|
|
10
|
+
* The Generate more tile and its panel. The tile is quiet but findable: a
|
|
11
|
+
* dashed border in the secondary text colour, a plus and the words "Generate
|
|
12
|
+
* more", no fill; it takes the size of the thumbnails around it (--thumb-card
|
|
13
|
+
* beside the card's strip, --thumb-rail in the selection). The panel is one bordered block under the thumbnails:
|
|
14
|
+
* heading, one helper line, the "Based on" switch, the selected inspiration as
|
|
15
|
+
* small chips, a note, the count and the two buttons. In the card, the script
|
|
16
|
+
* shortens the large image by the panel's height while it is open (an inline
|
|
17
|
+
* --cap), or folds it when too little would be left.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SLATE_UI_MORE_STYLES: string;
|
|
20
|
+
//# sourceMappingURL=mcp-slate-ui-styles-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-styles-dialog.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-dialog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,QAoClC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,QAuChC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dialogs (Edit, Branch, Convert), the scribble layer of Edit and the
|
|
3
|
+
* Inspiration tab. A dialog is a centred box over a dimmed workspace; it
|
|
4
|
+
* scrolls inside itself when the window is short, and fills the width on a
|
|
5
|
+
* phone. The reference tiles are square and fluid: at least 192 px across in
|
|
6
|
+
* the card and 256 px in the workspace (--ref-min), two across under 420 px.
|
|
7
|
+
*/
|
|
8
|
+
export const SLATE_UI_DIALOG_STYLES = String.raw `
|
|
9
|
+
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); overflow: auto; }
|
|
10
|
+
.modalbox { display: flex; flex-direction: column; gap: 12px; width: min(520px, 100%); max-height: calc(100vh - 32px); min-width: 0; padding: 16px; overflow: auto; border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--bg); color: var(--text); }
|
|
11
|
+
.modalbox.wide { width: min(880px, 100%); }
|
|
12
|
+
.modalbox h2 { margin: 0; font-size: 15px; }
|
|
13
|
+
.modalbox textarea { width: 100%; min-width: 0; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); resize: vertical; }
|
|
14
|
+
.modalbox textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
|
|
15
|
+
.radios { display: flex; flex-wrap: wrap; gap: 6px 14px; }
|
|
16
|
+
.radio { display: inline-flex; align-items: center; gap: 6px; }
|
|
17
|
+
/* One muted line: what a control does, or what will happen. */
|
|
18
|
+
.help { margin: 0; font-size: 12px; color: var(--text2); overflow-wrap: anywhere; }
|
|
19
|
+
.field > .help { margin-top: 4px; }
|
|
20
|
+
.hint { flex: 1 1 200px; min-width: 0; margin: 0; font-size: 12px; color: var(--text2); }
|
|
21
|
+
.alert { margin: 0; color: var(--danger); font-size: 12px; overflow-wrap: anywhere; }
|
|
22
|
+
.dialogbtns, .dialogtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
23
|
+
.dialogbtns button, .dialogtools button { padding: 8px 12px; }
|
|
24
|
+
.dialogtools .hint { margin-right: auto; }
|
|
25
|
+
/* The image of Edit, sized to the picture itself (a height cap of 60 percent of the window), so the scribble layer over it is exactly over the picture. */
|
|
26
|
+
.imgwrap { position: relative; width: min(100%, calc(60vh * var(--ar, 1.5))); aspect-ratio: var(--ar, 1.5); margin: 0 auto; min-width: 0; border-radius: var(--radius); background: var(--bg3); overflow: hidden; touch-action: none; }
|
|
27
|
+
.stageimg { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }
|
|
28
|
+
.scribble { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
|
|
29
|
+
.searchrow { display: flex; gap: 8px; min-width: 0; }
|
|
30
|
+
.searchrow .query { flex: 1 1 0; min-width: 0; }
|
|
31
|
+
.insp { container-type: inline-size; }
|
|
32
|
+
.insp.card { --ref-min: 192px; }
|
|
33
|
+
.insp.stage { --ref-min: 256px; }
|
|
34
|
+
.results { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
|
|
35
|
+
.refhead { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
|
|
36
|
+
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ref-min), 1fr)); gap: 8px; }
|
|
37
|
+
@container (max-width: 419px) { .refgrid { grid-template-columns: repeat(2, 1fr); } }
|
|
38
|
+
.refbtn, .skeleton { width: 100%; aspect-ratio: 1; }
|
|
39
|
+
.skeleton { border-radius: 6px; background: var(--bg2); }
|
|
40
|
+
.refbtn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
|
|
41
|
+
.check { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--inverse); color: var(--inverse-text); }
|
|
42
|
+
.refbtn[aria-pressed="true"] .check { display: grid; }
|
|
43
|
+
.placeholder { display: grid; place-items: center; min-height: 160px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text2); padding: 16px; text-align: center; }
|
|
44
|
+
`;
|
|
45
|
+
/**
|
|
46
|
+
* The Generate more tile and its panel. The tile is quiet but findable: a
|
|
47
|
+
* dashed border in the secondary text colour, a plus and the words "Generate
|
|
48
|
+
* more", no fill; it takes the size of the thumbnails around it (--thumb-card
|
|
49
|
+
* beside the card's strip, --thumb-rail in the selection). The panel is one bordered block under the thumbnails:
|
|
50
|
+
* heading, one helper line, the "Based on" switch, the selected inspiration as
|
|
51
|
+
* small chips, a note, the count and the two buttons. In the card, the script
|
|
52
|
+
* shortens the large image by the panel's height while it is open (an inline
|
|
53
|
+
* --cap), or folds it when too little would be left.
|
|
54
|
+
*/
|
|
55
|
+
export const SLATE_UI_MORE_STYLES = String.raw `
|
|
56
|
+
button.moretile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: none; padding: 0; border: 1px dashed var(--text2); border-radius: 6px; background: none; color: var(--text2); font-size: 12px; font-weight: 500; line-height: 1.2; }
|
|
57
|
+
button.moretile:hover:not(:disabled), button.moretile[aria-expanded="true"] { color: var(--text); border-color: var(--text); }
|
|
58
|
+
button.moretile:disabled { opacity: .35; }
|
|
59
|
+
.stripwrap .moretile { width: var(--thumb-card); height: var(--thumb-card); }
|
|
60
|
+
.rail .moretile { width: var(--thumb-rail); height: var(--thumb-rail); }
|
|
61
|
+
.morepanel { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
|
|
62
|
+
#more:not(:empty) { padding-top: 10px; }
|
|
63
|
+
#card .hero.folded { display: none; }
|
|
64
|
+
.morehead { margin: 0; font-size: 13px; font-weight: 600; }
|
|
65
|
+
.moreswitch { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
|
|
66
|
+
.morethumb { display: block; flex: none; width: 40px; height: 40px; border-radius: 4px; background: var(--bg3); object-fit: contain; object-position: center; }
|
|
67
|
+
.moreswitchtext { flex: 1 1 0; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
|
|
68
|
+
.moreswitch input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 36px; height: 20px; margin: 0; border: 1px solid var(--border); border-radius: 999px; background: var(--bg3); cursor: pointer; }
|
|
69
|
+
.moreswitch input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text2); transition: transform .12s; }
|
|
70
|
+
.moreswitch input[type="checkbox"]:checked { background: var(--inverse); border-color: var(--inverse); }
|
|
71
|
+
.moreswitch input[type="checkbox"]:checked::after { transform: translateX(16px); background: var(--inverse-text); }
|
|
72
|
+
.moreswitch input[type="checkbox"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
|
|
73
|
+
.moreswitch input[type="checkbox"]:disabled { opacity: .45; cursor: default; }
|
|
74
|
+
.morechips { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
75
|
+
.morechips .lbl { margin: 0; }
|
|
76
|
+
.refchips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
|
|
77
|
+
.refchip { position: relative; flex: none; width: 48px; height: 48px; }
|
|
78
|
+
.refchipimg { display: block; width: 100%; height: 100%; border-radius: 4px; background: var(--bg3); object-fit: contain; object-position: center; }
|
|
79
|
+
button.refchipx { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: var(--inverse); color: var(--inverse-text); border-color: var(--bg); }
|
|
80
|
+
.morepanel textarea { width: 100%; min-width: 0; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); resize: vertical; }
|
|
81
|
+
.morepanel textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
|
|
82
|
+
.morerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
|
|
83
|
+
.morebtns { display: flex; gap: 8px; margin-left: auto; }
|
|
84
|
+
.morerow button { padding: 8px 10px; }
|
|
85
|
+
.seg { display: flex; flex: 1 1 auto; min-width: 0; max-width: 260px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
|
|
86
|
+
.morehost .seg { max-width: none; flex-basis: 100%; }
|
|
87
|
+
.segopt { position: relative; display: block; flex: 1 1 0; min-width: 28px; }
|
|
88
|
+
.segopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
|
|
89
|
+
.segopt span { display: block; padding: 7px 4px; text-align: center; font-weight: 600; }
|
|
90
|
+
.segopt input:checked + span { background: var(--inverse); color: var(--inverse-text); }
|
|
91
|
+
.segopt input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: -2px; }
|
|
92
|
+
.morepanel .alert { margin: 0; }
|
|
93
|
+
@media (prefers-reduced-motion: reduce) { .moreswitch input[type="checkbox"]::after { transition: none; } }
|
|
94
|
+
`;
|
|
95
|
+
//# sourceMappingURL=mcp-slate-ui-styles-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-styles-dialog.js","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-dialog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoC/C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC7C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fullscreen workspace: the selection on the left, one large image with
|
|
3
|
+
* its band and action row in the middle. The Generate more tile ends the
|
|
4
|
+
* selection and its panel opens under it. Fluid at any width (`min-width: 0`
|
|
5
|
+
* on every grid and flex parent).
|
|
6
|
+
*
|
|
7
|
+
* The selection's thumbnails are --thumb-rail (144 px), so its column is sized
|
|
8
|
+
* to hold whole ones: 168 px (one per row) from 640px to 899px, where the image
|
|
9
|
+
* keeps its room in the desktop app's default 708 px tab; 320 px (two per row)
|
|
10
|
+
* from 900px; 472 px (three per row) from 1400px. Below 640px the selection
|
|
11
|
+
* becomes one horizontal row above the image, scrolling inside itself, with each
|
|
12
|
+
* option's version chips under its thumbnail.
|
|
13
|
+
*
|
|
14
|
+
* The action row is right-aligned and as wide as the picture (--ar is set by
|
|
15
|
+
* the script on the shared parent), so Select, last, ends at the picture's
|
|
16
|
+
* right edge.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SLATE_UI_STAGE_STYLES: string;
|
|
19
|
+
//# sourceMappingURL=mcp-slate-ui-styles-stage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-styles-stage.d.ts","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-stage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB,QAgDjC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fullscreen workspace: the selection on the left, one large image with
|
|
3
|
+
* its band and action row in the middle. The Generate more tile ends the
|
|
4
|
+
* selection and its panel opens under it. Fluid at any width (`min-width: 0`
|
|
5
|
+
* on every grid and flex parent).
|
|
6
|
+
*
|
|
7
|
+
* The selection's thumbnails are --thumb-rail (144 px), so its column is sized
|
|
8
|
+
* to hold whole ones: 168 px (one per row) from 640px to 899px, where the image
|
|
9
|
+
* keeps its room in the desktop app's default 708 px tab; 320 px (two per row)
|
|
10
|
+
* from 900px; 472 px (three per row) from 1400px. Below 640px the selection
|
|
11
|
+
* becomes one horizontal row above the image, scrolling inside itself, with each
|
|
12
|
+
* option's version chips under its thumbnail.
|
|
13
|
+
*
|
|
14
|
+
* The action row is right-aligned and as wide as the picture (--ar is set by
|
|
15
|
+
* the script on the shared parent), so Select, last, ends at the picture's
|
|
16
|
+
* right edge.
|
|
17
|
+
*/
|
|
18
|
+
export const SLATE_UI_STAGE_STYLES = String.raw `
|
|
19
|
+
#stage { min-width: 0; max-width: 1800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
|
|
20
|
+
#stage.hidden { display: none !important; }
|
|
21
|
+
.stagehead { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
|
22
|
+
.stagebody { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; min-width: 0; align-items: start; }
|
|
23
|
+
.selection { min-width: 0; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 96px); }
|
|
24
|
+
.rail { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; overflow: auto; padding: 4px; }
|
|
25
|
+
.morehost:empty { display: none; }
|
|
26
|
+
.moreslot { position: sticky; bottom: 0; padding: 4px 0; background: var(--bg); }
|
|
27
|
+
.round { min-width: 0; }
|
|
28
|
+
.roundhead { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
|
|
29
|
+
.options { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, var(--thumb-rail)); gap: 10px 8px; }
|
|
30
|
+
.option { min-width: 0; width: var(--thumb-rail); }
|
|
31
|
+
.opt { display: block; width: var(--thumb-rail); height: var(--thumb-rail); }
|
|
32
|
+
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
|
|
33
|
+
.chip { padding: 1px 7px; font-size: 11px; font-weight: 500; }
|
|
34
|
+
.chip.selected { background: var(--inverse); color: var(--inverse-text); border-color: var(--inverse); }
|
|
35
|
+
.main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
|
|
36
|
+
#stage .main { --cap: max(240px, calc(100vh - 230px)); --w: min(100%, calc(var(--cap) * var(--ar, 100))); }
|
|
37
|
+
#stage .band, #stage .actionrow, #stage .main > .status { width: var(--w); margin-left: auto; margin-right: auto; }
|
|
38
|
+
.band { display: flex; align-items: center; gap: 12px; min-height: 28px; min-width: 0; font-size: 13px; color: var(--text2); }
|
|
39
|
+
.bandtext { min-width: 0; overflow-wrap: anywhere; }
|
|
40
|
+
.textbtn { flex: none; padding: 2px 6px; border: 0; background: none; font-weight: 600; text-decoration: underline; }
|
|
41
|
+
.actionrow { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 0; }
|
|
42
|
+
.actionrow button { flex: none; }
|
|
43
|
+
#stage .main > .status { text-align: right; }
|
|
44
|
+
.inspiration { min-width: 0; max-width: 1800px; width: 100%; margin: 0 auto; }
|
|
45
|
+
@media (min-width: 1400px) {
|
|
46
|
+
.stagebody { grid-template-columns: 472px minmax(0, 1fr); }
|
|
47
|
+
}
|
|
48
|
+
@media (max-width: 480px) {
|
|
49
|
+
.actionrow { gap: 6px; }
|
|
50
|
+
.actionrow button { flex: 1 1 auto; padding: 8px 9px; }
|
|
51
|
+
#stage .main > .status { text-align: left; }
|
|
52
|
+
}
|
|
53
|
+
@media (max-width: 899px) {
|
|
54
|
+
.stagebody { grid-template-columns: 168px minmax(0, 1fr); gap: 12px; }
|
|
55
|
+
}
|
|
56
|
+
@media (max-width: 639px) {
|
|
57
|
+
.stagebody { grid-template-columns: minmax(0, 1fr); }
|
|
58
|
+
.selection { max-height: none; }
|
|
59
|
+
.rail { flex: none; flex-direction: row; gap: 14px; overflow-x: auto; overflow-y: hidden; padding: 4px 4px 8px; }
|
|
60
|
+
/* The selection is a row that scrolls sideways: the tile sticks to its right edge, so it is in view however many options there are. */
|
|
61
|
+
.moreslot { position: sticky; bottom: auto; right: 0; flex: none; align-self: flex-end; padding: 0 0 0 8px; }
|
|
62
|
+
.round { flex: none; }
|
|
63
|
+
.options { display: flex; }
|
|
64
|
+
#stage .main { --cap: 60vh; }
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
//# sourceMappingURL=mcp-slate-ui-styles-stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-slate-ui-styles-stage.js","sourceRoot":"","sources":["../src/mcp-slate-ui-styles-stage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD9C,CAAC"}
|