@dexhq/canvas 0.13.0 → 0.15.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/CHANGELOG.md +53 -0
- package/README.md +21 -18
- package/app/canvas/activity.tsx +8 -15
- package/app/canvas/anchoring.ts +3 -5
- package/app/canvas/canvas-input.ts +151 -14
- package/app/canvas/canvas-keys.ts +9 -0
- package/app/canvas/canvas-model.ts +5 -42
- package/app/canvas/canvas-panels.ts +1 -17
- package/app/canvas/canvas-scene.ts +7 -3
- package/app/canvas/canvas-ui.ts +2 -1
- package/app/canvas/canvas.css +61 -26
- package/app/canvas/change-notice.tsx +10 -1
- package/app/canvas/comment-layer.tsx +2 -1
- package/app/canvas/comments.tsx +204 -82
- package/app/canvas/element-picker.ts +200 -27
- package/app/canvas/engine/canvas-gestures.ts +72 -17
- package/app/canvas/engine/canvas-store.ts +17 -1
- package/app/canvas/engine/engine.css +6 -3
- package/app/canvas/find-bar.tsx +817 -0
- package/app/canvas/find-model.ts +135 -0
- package/app/canvas/flow-canvas.tsx +18 -2
- package/app/canvas/follow-pin.ts +26 -6
- package/app/canvas/frame-node.tsx +43 -26
- package/app/canvas/imported-reviews.tsx +12 -22
- package/app/canvas/layout.ts +27 -0
- package/app/canvas/live-page.ts +142 -19
- package/app/canvas/page-find.ts +220 -0
- package/app/canvas/page-style.ts +23 -0
- package/app/canvas/section-node.tsx +2 -0
- package/app/canvas/spec-threads.ts +24 -23
- package/app/canvas/thread-focus.tsx +14 -12
- package/app/canvas/tool-cursors.ts +16 -16
- package/app/canvas/use-activity.ts +0 -8
- package/app/canvas/use-agent-changes.tsx +34 -40
- package/app/canvas/use-canvas-clipboard.tsx +11 -14
- package/app/canvas/xray.ts +3 -12
- package/app/frame.tsx +5 -0
- package/app/i18n/locales/en/messages.po +114 -12
- package/app/i18n/locales/en/messages.ts +1 -1
- package/app/i18n/locales/pseudo/messages.po +114 -12
- package/app/i18n/locales/pseudo/messages.ts +1 -1
- package/app/icons/{sets/lucide.tsx → glyphs.tsx} +7 -5
- package/app/icons/index.tsx +3 -3
- package/app/icons/types.ts +3 -10
- package/app/index.html +3 -3
- package/app/main.tsx +3 -0
- package/app/pages/canvas-settings.tsx +35 -0
- package/app/pages/canvas.tsx +27 -8
- package/app/pages/commands-settings.tsx +16 -2
- package/app/shell/about.tsx +5 -4
- package/app/shell/feedback-details.ts +0 -3
- package/app/shell/feedback-form.tsx +10 -21
- package/app/shell/feedback-link.tsx +2 -1
- package/app/shell/instructions-editor.tsx +1 -1
- package/app/shell/presence-style.ts +59 -0
- package/app/shell/presence.tsx +6 -3
- package/app/shell/scaled-frame.tsx +21 -9
- package/app/shell/settings-sections.ts +12 -0
- package/app/shell/sidebar.tsx +1 -1
- package/app/studio-ui.d.ts +0 -9
- package/app/types.ts +21 -205
- package/app/ui/file-drop.ts +128 -0
- package/app/ui/prompt-editor.tsx +1 -1
- package/app/ui/shadcn/input-group.tsx +2 -2
- package/dist/cli/banner.d.mts +4 -2
- package/dist/cli/banner.mjs +34 -11
- package/dist/cli/commands/app.mjs +19 -11
- package/dist/cli/commands/create.d.mts +26 -14
- package/dist/cli/commands/create.mjs +13 -7
- package/dist/cli/commands/dev.mjs +2 -3
- package/dist/cli/commands/hook.mjs +2 -1
- package/dist/cli/commands/init.d.mts +11 -6
- package/dist/cli/help.d.mts +1 -1
- package/dist/cli/help.mjs +3 -3
- package/dist/cli/main.d.mts +22 -12
- package/dist/config/index.d.mts +6 -5
- package/dist/config/project-files.d.mts +6 -3
- package/dist/config/project-files.mjs +14 -5
- package/dist/config/renamed.d.mts +0 -2
- package/dist/config/renamed.mjs +1 -3
- package/dist/config/schema.d.mts +0 -5
- package/dist/config/schema.mjs +0 -5
- package/dist/content/capture.d.mts +2 -2
- package/dist/content/capture.mjs +2 -2
- package/dist/content/content.d.mts +3 -141
- package/dist/content/content.mjs +7 -65
- package/dist/content/flow-specs.mjs +1 -1
- package/dist/content/prototype-summary.d.mts +3 -39
- package/dist/content/prototype-summary.mjs +2 -3
- package/dist/content/prototypes.mjs +1 -1
- package/dist/content/snapshot-client.mjs +1 -1
- package/dist/content/text-replace.d.mts +30 -0
- package/dist/content/text-replace.mjs +309 -0
- package/dist/content/thread-module.mjs +1 -1
- package/dist/content/threads.mjs +1 -1
- package/dist/paths.d.mts +0 -2
- package/dist/paths.mjs +1 -3
- package/dist/server/agent-env.d.mts +5 -1
- package/dist/server/agent-env.mjs +7 -2
- package/dist/server/agent-session.d.mts +14 -1
- package/dist/server/agent-session.mjs +84 -19
- package/dist/server/brief.mjs +3 -3
- package/dist/server/build-pictures.mjs +1 -1
- package/dist/server/channel.d.mts +19 -24
- package/dist/server/channel.mjs +70 -37
- package/dist/server/claimed-presence.d.mts +18 -0
- package/dist/server/claimed-presence.mjs +58 -0
- package/dist/server/close-check.mjs +2 -2
- package/dist/server/comments/actions.d.mts +153 -0
- package/dist/server/comments/actions.mjs +154 -0
- package/dist/server/comments/routes.d.mts +25 -0
- package/dist/server/comments/routes.mjs +88 -0
- package/dist/server/comments/tools.d.mts +6 -0
- package/dist/server/comments/tools.mjs +154 -0
- package/dist/server/dev-server.mjs +36 -13
- package/dist/server/file-errors.d.mts +7 -2
- package/dist/server/file-errors.mjs +31 -8
- package/dist/server/file-lock.d.mts +2 -2
- package/dist/server/file-lock.mjs +130 -36
- package/dist/server/mcp.d.mts +0 -2
- package/dist/server/mcp.mjs +7 -8
- package/dist/server/me.d.mts +1 -1
- package/dist/server/open-page.d.mts +22 -0
- package/dist/server/open-page.mjs +20 -2
- package/dist/server/outcome.d.mts +22 -0
- package/dist/server/outcome.mjs +8 -0
- package/dist/server/own-copies.mjs +2 -2
- package/dist/server/people.d.mts +1 -1
- package/dist/server/port.d.mts +12 -0
- package/dist/server/port.mjs +66 -14
- package/dist/server/presence.d.mts +4 -1
- package/dist/server/presence.mjs +2 -2
- package/dist/server/requests.d.mts +5 -1
- package/dist/server/requests.mjs +32 -47
- package/dist/server/studio-for.d.mts +5 -0
- package/dist/server/studio-for.mjs +18 -4
- package/dist/server/sync-install.d.mts +8 -12
- package/dist/server/sync-install.mjs +12 -30
- package/dist/server/thread-source.mjs +2 -2
- package/dist/server/tools/describe.d.mts +1 -1
- package/dist/server/tools/describe.mjs +1 -1
- package/dist/server/tools/feedback.d.mts +1 -1
- package/dist/server/tools/reading.mjs +13 -4
- package/dist/server/tools/show.d.mts +1 -1
- package/dist/server/tools/snapshot.d.mts +1 -1
- package/dist/server/tools/thread-list.mjs +1 -1
- package/dist/server/tools/watch.mjs +5 -3
- package/dist/server/vite.mjs +28 -31
- package/dist/server/web-app.mjs +7 -10
- package/dist/server/work-groups.mjs +1 -1
- package/dist/setup/apply.mjs +8 -14
- package/dist/setup/create.d.mts +4 -2
- package/dist/setup/create.mjs +118 -36
- package/dist/setup/design-system-checks.mjs +3 -12
- package/dist/setup/desktop-app-script.mjs +4 -3
- package/dist/setup/desktop-app-start.d.mts +8 -2
- package/dist/setup/desktop-app-start.mjs +64 -29
- package/dist/setup/desktop-app.d.mts +8 -0
- package/dist/setup/desktop-app.mjs +20 -4
- package/dist/setup/detect.d.mts +14 -7
- package/dist/setup/detect.mjs +56 -10
- package/dist/setup/doctor.mjs +2 -4
- package/dist/setup/existing-setup.d.mts +1 -3
- package/dist/setup/existing-setup.mjs +10 -11
- package/dist/setup/migrate/row-titles.mjs +1 -1
- package/dist/setup/own-app.d.mts +1 -2
- package/dist/setup/own-app.mjs +4 -5
- package/dist/setup/plan.d.mts +8 -6
- package/dist/setup/plan.mjs +64 -48
- package/dist/setup/project.d.mts +6 -17
- package/dist/setup/project.mjs +17 -61
- package/dist/setup/prompts.d.mts +5 -5
- package/dist/setup/prompts.mjs +28 -61
- package/dist/setup/questions.d.mts +12 -4
- package/dist/setup/questions.mjs +10 -25
- package/dist/setup/starters.d.mts +2 -0
- package/dist/setup/starters.mjs +26 -9
- package/dist/setup/workspace-setup.d.mts +1 -2
- package/dist/setup/workspace-setup.mjs +4 -6
- package/dist/setup/write.d.mts +15 -5
- package/dist/setup/write.mjs +35 -9
- package/dist/shared/annotations-core.mjs +1 -1
- package/dist/shared/canvas-core.mjs +1 -1
- package/dist/shared/canvas-file.d.mts +201 -0
- package/dist/shared/canvas-file.mjs +1 -0
- package/dist/shared/comments/routes.d.mts +53 -0
- package/dist/shared/comments/routes.mjs +37 -0
- package/dist/shared/feedback.d.mts +8 -0
- package/dist/shared/feedback.mjs +10 -2
- package/dist/shared/page-review.d.mts +2 -11
- package/dist/shared/page-review.mjs +4 -13
- package/dist/shared/presence-core.d.mts +11 -0
- package/dist/shared/presence-core.mjs +11 -2
- package/dist/shared/review-file.d.mts +5 -0
- package/dist/shared/review-file.mjs +23 -13
- package/dist/shared/server-page.mjs +7 -1
- package/dist/shared/signup.d.mts +2 -5
- package/dist/shared/signup.mjs +2 -35
- package/dist/shared/studio-events.d.mts +0 -6
- package/dist/shared/studio-events.mjs +1 -5
- package/dist/shared/studio-files.d.mts +12 -0
- package/dist/shared/studio-files.mjs +6 -1
- package/dist/shared/studio-routes.d.mts +16 -62
- package/dist/shared/studio-routes.mjs +1 -69
- package/dist/shared/threads-core.d.mts +2 -2
- package/dist/shared/threads-core.mjs +1 -1
- package/extension/dist/feedback.js +148 -138
- package/extension/dist/manifest.json +1 -1
- package/extension/dist/picker.js +146 -136
- package/package.json +3 -20
- package/src/cli/banner.ts +45 -11
- package/src/cli/commands/app.ts +23 -8
- package/src/cli/commands/create.ts +17 -9
- package/src/cli/commands/dev.ts +0 -3
- package/src/cli/commands/hook.ts +4 -1
- package/src/cli/help.ts +3 -3
- package/src/config/index.ts +6 -5
- package/src/config/project-files.ts +21 -11
- package/src/config/renamed.ts +0 -3
- package/src/config/schema.ts +0 -1
- package/src/content/capture.ts +6 -12
- package/src/content/content.ts +7 -244
- package/src/content/flow-specs.ts +2 -1
- package/src/content/prototype-summary.ts +4 -44
- package/src/content/review-pages.ts +2 -1
- package/src/content/snapshot-client.ts +1 -1
- package/src/content/text-replace.ts +449 -0
- package/src/paths.ts +0 -8
- package/src/server/agent-env.ts +12 -2
- package/src/server/agent-session.ts +124 -34
- package/src/server/brief.ts +8 -3
- package/src/server/channel.ts +121 -52
- package/src/server/claimed-presence.ts +93 -0
- package/src/server/comments/actions.ts +352 -0
- package/src/server/comments/routes.ts +176 -0
- package/src/server/comments/tools.ts +317 -0
- package/src/server/dev-server.ts +49 -15
- package/src/server/file-errors.ts +47 -13
- package/src/server/file-lock.ts +205 -54
- package/src/server/mcp.ts +13 -14
- package/src/server/me.ts +2 -5
- package/src/server/open-page.ts +54 -4
- package/src/server/outcome.ts +26 -0
- package/src/server/people.ts +2 -1
- package/src/server/port.ts +94 -20
- package/src/server/presence.ts +11 -3
- package/src/server/requests.ts +60 -70
- package/src/server/studio-for.ts +27 -3
- package/src/server/sync-install.ts +35 -26
- package/src/server/thread-place.ts +2 -4
- package/src/server/tools/reading.ts +16 -3
- package/src/server/tools/watch.ts +7 -7
- package/src/server/vite.ts +37 -40
- package/src/server/web-app.ts +14 -12
- package/src/setup/apply.ts +10 -16
- package/src/setup/create.ts +143 -37
- package/src/setup/design-system-checks.ts +7 -15
- package/src/setup/desktop-app-script.ts +4 -3
- package/src/setup/desktop-app-start.ts +94 -26
- package/src/setup/desktop-app.ts +24 -3
- package/src/setup/detect.ts +56 -14
- package/src/setup/doctor.ts +4 -4
- package/src/setup/existing-setup.ts +10 -12
- package/src/setup/own-app.ts +2 -5
- package/src/setup/plan.ts +93 -84
- package/src/setup/project.ts +25 -118
- package/src/setup/prompts.ts +44 -127
- package/src/setup/questions.ts +27 -29
- package/src/setup/starters.ts +35 -10
- package/src/setup/workspace-setup.ts +8 -18
- package/src/setup/write.ts +52 -9
- package/src/shared/canvas-file.ts +205 -0
- package/src/shared/comments/routes.ts +79 -0
- package/src/shared/feedback.ts +14 -4
- package/src/shared/page-review.ts +11 -16
- package/src/shared/presence-core.ts +16 -2
- package/src/shared/review-file.ts +28 -12
- package/src/shared/server-page.ts +11 -1
- package/src/shared/signup.ts +4 -28
- package/src/shared/studio-events.ts +0 -13
- package/src/shared/studio-files.ts +14 -0
- package/src/shared/studio-routes.ts +21 -64
- package/src/shared/threads-core.ts +2 -2
- package/templates/methods/review.md +2 -2
- package/templates/rules/canvas-frames.md +104 -0
- package/templates/rules/canvas.md +8 -142
- package/templates/rules/prototypes.md +1 -1
- package/templates/rules/snapshots.md +52 -0
- package/templates/starters/standalone/README.md +7 -7
- package/templates/starters/standalone/components.json +1 -1
- package/templates/starters/standalone/package.json +1 -2
- package/templates/starters/turborepo/README.md +6 -6
- package/templates/starters/turborepo/apps/web/components.json +1 -1
- package/templates/starters/turborepo/apps/web/package.json +1 -2
- package/templates/starters/turborepo/apps/web/src/app.tsx +4 -5
- package/templates/starters/turborepo/packages/ui/components.json +1 -1
- package/templates/starters/turborepo/packages/ui/package.json +1 -2
- package/templates/starters/vite/README.md +7 -6
- package/templates/starters/vite/components.json +1 -1
- package/templates/starters/vite/package.json +1 -2
- package/templates/starters/vite/src/app.tsx +3 -4
- package/templates/starters/vite/src/components/ui/accordion.tsx +71 -0
- package/templates/starters/vite/src/components/ui/attachment.tsx +1 -1
- package/templates/starters/vite/src/components/ui/badge.tsx +2 -2
- package/templates/starters/vite/src/components/ui/button.tsx +17 -12
- package/templates/starters/vite/src/components/ui/card.tsx +1 -1
- package/templates/starters/vite/src/components/ui/checkbox.tsx +28 -0
- package/templates/starters/vite/src/components/ui/dialog.tsx +5 -5
- package/templates/starters/vite/src/components/ui/dropdown-menu.tsx +17 -14
- package/templates/starters/vite/src/components/ui/field.tsx +3 -1
- package/templates/starters/vite/src/components/ui/input-group.tsx +5 -3
- package/templates/starters/vite/src/components/ui/input.tsx +1 -1
- package/templates/starters/vite/src/components/ui/label.tsx +2 -0
- package/templates/starters/vite/src/components/ui/native-select.tsx +3 -4
- package/templates/starters/vite/src/components/ui/popover.tsx +1 -1
- package/templates/starters/vite/src/components/ui/separator.tsx +2 -0
- package/templates/starters/vite/src/components/ui/spinner.tsx +3 -7
- package/templates/starters/vite/src/components/ui/switch.tsx +1 -1
- package/templates/starters/vite/src/components/ui/textarea.tsx +1 -1
- package/templates/starters/vite/src/components/ui/toggle.tsx +4 -2
- package/templates/starters/vite/src/index.css +533 -111
- package/app/icons/sets/hugeicons.tsx +0 -259
- package/app/icons/sets/phosphor.tsx +0 -251
- package/dist/server/icon-set.d.mts +0 -15
- package/dist/server/icon-set.mjs +0 -31
- package/dist/server/tools/close-reply.d.mts +0 -6
- package/dist/server/tools/close-reply.mjs +0 -138
- package/dist/server/tools/comment.d.mts +0 -6
- package/dist/server/tools/comment.mjs +0 -49
- package/dist/shared/icon-sets.d.mts +0 -9
- package/dist/shared/icon-sets.mjs +0 -21
- package/src/server/icon-set.ts +0 -56
- package/src/server/tools/close-reply.ts +0 -271
- package/src/server/tools/comment.ts +0 -96
- package/src/shared/icon-sets.ts +0 -23
- /package/app/public/{sudio-192.png → dex-192.png} +0 -0
- /package/app/public/{sudio-512.png → dex-512.png} +0 -0
- /package/app/public/{apple-touch-icon.png → dex-apple-touch-icon.png} +0 -0
- /package/app/public/{favicon-32.png → dex-icon-32.png} +0 -0
- /package/app/public/{favicon.svg → dex-icon.svg} +0 -0
- /package/app/public/{sudio-maskable-512.png → dex-maskable-512.png} +0 -0
|
@@ -32,6 +32,16 @@ const SETUP_ARGS = {
|
|
|
32
32
|
type: "boolean",
|
|
33
33
|
description: "No components yet: set up shadcn first"
|
|
34
34
|
},
|
|
35
|
+
preset: {
|
|
36
|
+
type: "string",
|
|
37
|
+
valueHint: "code",
|
|
38
|
+
description: "shadcn's look for --shadcn: a preset's name (nova, lyra) or the code ui.shadcn.com/create gives you; implies --shadcn (default: shadcn's, base-nova)"
|
|
39
|
+
},
|
|
40
|
+
base: {
|
|
41
|
+
type: "string",
|
|
42
|
+
valueHint: "library",
|
|
43
|
+
description: "shadcn's component library for --shadcn: base (Base UI), radix or aria; implies --shadcn (default: the preset's)"
|
|
44
|
+
},
|
|
35
45
|
styles: {
|
|
36
46
|
type: "string",
|
|
37
47
|
valueHint: "file",
|
|
@@ -39,12 +49,7 @@ const SETUP_ARGS = {
|
|
|
39
49
|
},
|
|
40
50
|
primitives: {
|
|
41
51
|
type: "boolean",
|
|
42
|
-
description: "Build the studio's own buttons, menus and dialogs from your components
|
|
43
|
-
},
|
|
44
|
-
icons: {
|
|
45
|
-
type: "string",
|
|
46
|
-
valueHint: "set",
|
|
47
|
-
description: "The icon set Dex's interface draws with: lucide, phosphor or hugeicons (default: the one your components use, else lucide)"
|
|
52
|
+
description: "Build the studio's own buttons, menus and dialogs from your components, shadcn on Base UI (default: no, Dex's own)"
|
|
48
53
|
},
|
|
49
54
|
provider: {
|
|
50
55
|
type: "string",
|
|
@@ -93,15 +98,16 @@ const SETUP_ARGS = {
|
|
|
93
98
|
const setupFlags = (args) => ({
|
|
94
99
|
agent: args.agent,
|
|
95
100
|
app: args.app,
|
|
101
|
+
base: args.base,
|
|
96
102
|
in: args.in,
|
|
97
103
|
components: args.components,
|
|
98
104
|
designMd: args["design-md"],
|
|
99
105
|
dir: args.dir,
|
|
100
106
|
dryRun: args["dry-run"],
|
|
101
|
-
icons: args.icons,
|
|
102
107
|
import: args.import,
|
|
103
108
|
json: args.json,
|
|
104
109
|
pm: args.pm,
|
|
110
|
+
preset: args.preset,
|
|
105
111
|
primitives: args.primitives,
|
|
106
112
|
provider: args.provider,
|
|
107
113
|
shadcn: args.shadcn,
|
|
@@ -46,11 +46,10 @@ var dev_default = defineCommand({
|
|
|
46
46
|
const { superviseDev } = await import("../supervise.mjs");
|
|
47
47
|
process.exit(await superviseDev());
|
|
48
48
|
}
|
|
49
|
-
const [{ createServer }, { unbuiltPackages }, { viteConfig }, {
|
|
49
|
+
const [{ createServer }, { unbuiltPackages }, { viteConfig }, { listenOnPort, PortInUseError }, { lookOf, machineLines, movedLines, noteLine, portTakenLines, startedLines, updateLine }, { studioVersion }, { checkForUpdate }, { logMachineLine, machineState, updateMachine }, { queueSync }, { FROM_APP_ENV }] = await Promise.all([
|
|
50
50
|
import("vite"),
|
|
51
51
|
import("../../setup/design-system-checks.mjs"),
|
|
52
52
|
import("../../server/vite.mjs"),
|
|
53
|
-
import("../../server/icon-set.mjs"),
|
|
54
53
|
import("../../server/port.mjs"),
|
|
55
54
|
import("../banner.mjs"),
|
|
56
55
|
import("../../paths.mjs"),
|
|
@@ -115,7 +114,7 @@ var dev_default = defineCommand({
|
|
|
115
114
|
if (!restarted) checkForUpdate(project.content, project.root).then((fresh) => {
|
|
116
115
|
if (fresh && fresh.latest !== update?.latest) print(updateLine(fresh, look));
|
|
117
116
|
}).catch(() => void 0);
|
|
118
|
-
const warnings = [...
|
|
117
|
+
const warnings = [...unbuiltPackages(project).map(({ name }) => `${name} is not built, so views cannot import it. Build it first (in a monorepo, \`npx turbo run build --filter=${name}\`).`)];
|
|
119
118
|
for (const line of warnings) print(noteLine("warn", line, look));
|
|
120
119
|
import("../../content/content.mjs").then(({ linkGithub }) => linkGithub(project.content)).then((login) => {
|
|
121
120
|
if (login) print(noteLine("note", `Your comments now show your GitHub avatar (@${login}).`, look));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { contentRoot, print } from "../command.mjs";
|
|
2
|
+
import { workerSession } from "../../shared/presence-core.mjs";
|
|
2
3
|
import { defineCommand } from "citty";
|
|
3
4
|
//#region src/cli/commands/hook.ts
|
|
4
5
|
const STOPPED = /* @__PURE__ */ new Set([
|
|
@@ -39,7 +40,7 @@ var hook_default = defineCommand({
|
|
|
39
40
|
const [root, { openPresence }] = await Promise.all([contentRoot(args.root), import("../../server/presence.mjs")]);
|
|
40
41
|
const presence = openPresence(root);
|
|
41
42
|
const session = event.session_id ?? "claude";
|
|
42
|
-
const worker = event.agent_id ?
|
|
43
|
+
const worker = event.agent_id ? workerSession(session, event.agent_id) : session;
|
|
43
44
|
if (event.hook_event_name === "UserPromptSubmit") {
|
|
44
45
|
const { promptNotices } = await import("../../server/notices.mjs");
|
|
45
46
|
const context = await promptNotices(root, session, event.cwd);
|
|
@@ -33,6 +33,16 @@ declare const _default: import("citty").CommandDef<{
|
|
|
33
33
|
readonly type: "boolean";
|
|
34
34
|
readonly description: "No components yet: set up shadcn first";
|
|
35
35
|
};
|
|
36
|
+
readonly preset: {
|
|
37
|
+
readonly type: "string";
|
|
38
|
+
readonly valueHint: "code";
|
|
39
|
+
readonly description: "shadcn's look for --shadcn: a preset's name (nova, lyra) or the code ui.shadcn.com/create gives you; implies --shadcn (default: shadcn's, base-nova)";
|
|
40
|
+
};
|
|
41
|
+
readonly base: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
readonly valueHint: "library";
|
|
44
|
+
readonly description: "shadcn's component library for --shadcn: base (Base UI), radix or aria; implies --shadcn (default: the preset's)";
|
|
45
|
+
};
|
|
36
46
|
readonly styles: {
|
|
37
47
|
readonly type: "string";
|
|
38
48
|
readonly valueHint: "file";
|
|
@@ -40,12 +50,7 @@ declare const _default: import("citty").CommandDef<{
|
|
|
40
50
|
};
|
|
41
51
|
readonly primitives: {
|
|
42
52
|
readonly type: "boolean";
|
|
43
|
-
readonly description: "Build the studio's own buttons, menus and dialogs from your components
|
|
44
|
-
};
|
|
45
|
-
readonly icons: {
|
|
46
|
-
readonly type: "string";
|
|
47
|
-
readonly valueHint: "set";
|
|
48
|
-
readonly description: "The icon set Dex's interface draws with: lucide, phosphor or hugeicons (default: the one your components use, else lucide)";
|
|
53
|
+
readonly description: "Build the studio's own buttons, menus and dialogs from your components, shadcn on Base UI (default: no, Dex's own)";
|
|
49
54
|
};
|
|
50
55
|
readonly provider: {
|
|
51
56
|
readonly type: "string";
|
package/dist/cli/help.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Described } from "./command.mjs";
|
|
2
2
|
//#region src/cli/help.d.ts
|
|
3
3
|
/** `dex --help`. Every command and flag in it is tested to exist. */
|
|
4
|
-
export declare const ROOT_HELP = "Dex\n\nUsage: dex <command> [options]\n dex <command> --help that command's options\n\nSet up and maintain\n create [folder] [--yes] [--dry-run] [--json]\n [--template vite|standalone|turborepo]\n [--components <folder>|none] [--import <specifier>]
|
|
4
|
+
export declare const ROOT_HELP = "Dex\n\nUsage: dex <command> [options]\n dex <command> --help that command's options\n\nSet up and maintain\n create [folder] [--yes] [--dry-run] [--json]\n [--template vite|standalone|turborepo]\n [--components <folder>|none] [--import <specifier>]\n [--shadcn] [--preset <code>] [--base base|radix|aria]\n [--styles <file>|none] [--primitives]\n [--agent <ids>|none] [--dir studio] [--pm <manager>]\n [--provider <module>|none] [--design-md draft|none|<path>|<url>]\n [--app <name> | --in <package>]\n [--studio <spec>] [--skip-install]\n Set up a studio: in a project it adds one in studio/,\n in a workspace its own app (--app) or inside an app\n (--in), in an empty folder a new project from a\n starter (--template). It confirms what it finds,\n shows the plan, then says what it does. Without a\n terminal, or with --yes, it takes what it finds;\n --dry-run only shows the plan\n agents add <agent> Add the studio to claude, codex, cursor, copilot or\n opencode, as the studio's \"Add MCP config\" does\n doctor [--json] Check the setup and say how to fix it; --json prints\n one JSON object per check\n components [--json] [--components <folder>]\n List the design system's components and how to\n import them; --components scans another folder and\n prints the config that points at it\n upgrade [--dry-run] Bring a studio set up by an older version up to date:\n rename studio.config.ts to dex.config.ts, move\n design-system/index.ts into it (its prose into\n DESIGN.md), its state into .studio/, use the\n installed rules and delete old explorations/\n folders. --dry-run says what would change and\n writes nothing\n\nRun\n dev [--live] Start the studio; --live also keeps it in step with\n the linked cloud workspace (see cloud live)\n stop Stop this checkout's studio, and no other\n build Check, then build a static site\n preview Serve the built site\n extension Install the Chrome extension that copies elements from\n any page to paste on a canvas\n app install On a Mac, make ~/Applications/Dex.app: it starts\n the studio when it isn't running and opens it in its\n own window\n app remove Remove that app\n app start What that app runs when it opens: starts the studio\n unless this project's Dex already holds its port\n\nWork (usually run by your agent)\n whoami Who you are, from GitHub or git: added the first time\n new [--person <slug>] --title \"<title>\"\n contributor --name \"<name>\" --git \"<git user>\" --discipline <product|brand|engineering> [--github <username>]\n threads [--slug <file>] [--all]\n Comments and requests waiting for an agent\n thread --id <id> [--note \"<message, or what changed>\"] [--acknowledge | --resolve | --dismiss]\n Answer one\n check Validate files, canvases and references\n scope --person <slug>\n Changes outside that contributor's folders\n presence --slug <file> --view <view> [--agent <name>] [--clear]\n snapshot --slug <file> [--view <view>]\n\nCloud workspaces (Team)\n cloud login --token <token> [--url <service url>]\n cloud link --workspace <slug> [--url <service url>]\n Keep comments in the workspace, shared by the team\n cloud live [--workspace <slug>] [--url <service url>] [--token <token>]\n Work live with the team: this studio's files stay\n in step with the workspace, both ways, while it runs.\n Your own agents work on them as usual\n cloud status What this studio is linked to\n cloud push Copy comment threads into the workspace\n cloud publish Build and publish the studio; prints a share link\n cloud unlink\n\nAgents\n claude [...] Claude Code, with feedback from the studio arriving in\n the session as it is left (a channel; no watching)\n mcp [--agent \"<name>\"] The studio's MCP server (stdio): guidelines and feedback\n hook Claude Code hook: presence and guidelines\n";
|
|
5
5
|
/** `dex --help`, with its headings in bold in a terminal. */
|
|
6
6
|
export declare const rootHelp: () => string;
|
|
7
7
|
/** `dex <command> --help`: what it does, and its arguments and options. */
|
package/dist/cli/help.mjs
CHANGED
|
@@ -11,9 +11,9 @@ Usage: dex <command> [options]
|
|
|
11
11
|
Set up and maintain
|
|
12
12
|
create [folder] [--yes] [--dry-run] [--json]
|
|
13
13
|
[--template vite|standalone|turborepo]
|
|
14
|
-
[--components <folder>|none] [--import <specifier>]
|
|
15
|
-
[--
|
|
16
|
-
[--
|
|
14
|
+
[--components <folder>|none] [--import <specifier>]
|
|
15
|
+
[--shadcn] [--preset <code>] [--base base|radix|aria]
|
|
16
|
+
[--styles <file>|none] [--primitives]
|
|
17
17
|
[--agent <ids>|none] [--dir studio] [--pm <manager>]
|
|
18
18
|
[--provider <module>|none] [--design-md draft|none|<path>|<url>]
|
|
19
19
|
[--app <name> | --in <package>]
|
package/dist/cli/main.d.mts
CHANGED
|
@@ -31,6 +31,16 @@ export declare const COMMANDS: {
|
|
|
31
31
|
readonly type: "boolean";
|
|
32
32
|
readonly description: "No components yet: set up shadcn first";
|
|
33
33
|
};
|
|
34
|
+
readonly preset: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
readonly valueHint: "code";
|
|
37
|
+
readonly description: "shadcn's look for --shadcn: a preset's name (nova, lyra) or the code ui.shadcn.com/create gives you; implies --shadcn (default: shadcn's, base-nova)";
|
|
38
|
+
};
|
|
39
|
+
readonly base: {
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
readonly valueHint: "library";
|
|
42
|
+
readonly description: "shadcn's component library for --shadcn: base (Base UI), radix or aria; implies --shadcn (default: the preset's)";
|
|
43
|
+
};
|
|
34
44
|
readonly styles: {
|
|
35
45
|
readonly type: "string";
|
|
36
46
|
readonly valueHint: "file";
|
|
@@ -38,12 +48,7 @@ export declare const COMMANDS: {
|
|
|
38
48
|
};
|
|
39
49
|
readonly primitives: {
|
|
40
50
|
readonly type: "boolean";
|
|
41
|
-
readonly description: "Build the studio's own buttons, menus and dialogs from your components
|
|
42
|
-
};
|
|
43
|
-
readonly icons: {
|
|
44
|
-
readonly type: "string";
|
|
45
|
-
readonly valueHint: "set";
|
|
46
|
-
readonly description: "The icon set Dex's interface draws with: lucide, phosphor or hugeicons (default: the one your components use, else lucide)";
|
|
51
|
+
readonly description: "Build the studio's own buttons, menus and dialogs from your components, shadcn on Base UI (default: no, Dex's own)";
|
|
47
52
|
};
|
|
48
53
|
readonly provider: {
|
|
49
54
|
readonly type: "string";
|
|
@@ -133,6 +138,16 @@ export declare const COMMANDS: {
|
|
|
133
138
|
readonly type: "boolean";
|
|
134
139
|
readonly description: "No components yet: set up shadcn first";
|
|
135
140
|
};
|
|
141
|
+
readonly preset: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly valueHint: "code";
|
|
144
|
+
readonly description: "shadcn's look for --shadcn: a preset's name (nova, lyra) or the code ui.shadcn.com/create gives you; implies --shadcn (default: shadcn's, base-nova)";
|
|
145
|
+
};
|
|
146
|
+
readonly base: {
|
|
147
|
+
readonly type: "string";
|
|
148
|
+
readonly valueHint: "library";
|
|
149
|
+
readonly description: "shadcn's component library for --shadcn: base (Base UI), radix or aria; implies --shadcn (default: the preset's)";
|
|
150
|
+
};
|
|
136
151
|
readonly styles: {
|
|
137
152
|
readonly type: "string";
|
|
138
153
|
readonly valueHint: "file";
|
|
@@ -140,12 +155,7 @@ export declare const COMMANDS: {
|
|
|
140
155
|
};
|
|
141
156
|
readonly primitives: {
|
|
142
157
|
readonly type: "boolean";
|
|
143
|
-
readonly description: "Build the studio's own buttons, menus and dialogs from your components
|
|
144
|
-
};
|
|
145
|
-
readonly icons: {
|
|
146
|
-
readonly type: "string";
|
|
147
|
-
readonly valueHint: "set";
|
|
148
|
-
readonly description: "The icon set Dex's interface draws with: lucide, phosphor or hugeicons (default: the one your components use, else lucide)";
|
|
158
|
+
readonly description: "Build the studio's own buttons, menus and dialogs from your components, shadcn on Base UI (default: no, Dex's own)";
|
|
149
159
|
};
|
|
150
160
|
readonly provider: {
|
|
151
161
|
readonly type: "string";
|
package/dist/config/index.d.mts
CHANGED
|
@@ -123,10 +123,10 @@ export interface StudioInterface {
|
|
|
123
123
|
*/
|
|
124
124
|
components?: string;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
126
|
+
* @deprecated No longer read: the interface always draws with Lucide.
|
|
127
|
+
* `create` takes it out of the config.
|
|
128
128
|
*/
|
|
129
|
-
icons?:
|
|
129
|
+
icons?: string;
|
|
130
130
|
/**
|
|
131
131
|
* The interface's language, when not the person's browser's: "en", or
|
|
132
132
|
* "pseudo" to check that every string is localised. ?locale= overrides it.
|
|
@@ -138,8 +138,9 @@ export interface StudioInterface {
|
|
|
138
138
|
* ("./src/components/ui") or an import path ("@acme/ui/shadcn"). Each is
|
|
139
139
|
* used when you have one of that name; the studio's own fills the gaps.
|
|
140
140
|
* `true` uses `designSystem.components`: its import, or its folder.
|
|
141
|
-
* They need shadcn's Base UI API (a components.json style of "base-…")
|
|
142
|
-
*
|
|
141
|
+
* They need shadcn's Base UI API (a components.json style of "base-…").
|
|
142
|
+
* Off by default, so the interface looks like Dex whatever your
|
|
143
|
+
* components' corners and icons: `create --primitives` sets it.
|
|
143
144
|
*/
|
|
144
145
|
primitives?: string | true;
|
|
145
146
|
/** Under the title in the sidebar. Default: your design system's name. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StylingApproach } from "../shared/design-system.mjs";
|
|
2
|
-
import { InterfaceIcons } from "../shared/icon-sets.mjs";
|
|
3
2
|
import { Alias } from "vite";
|
|
4
3
|
//#region src/config/project-files.d.ts
|
|
5
4
|
type Json = Record<string, unknown>;
|
|
@@ -33,6 +32,12 @@ export declare const stylingIn: (all: Record<string, string>) => StylingApproach
|
|
|
33
32
|
/** The folder the app's framework serves at "/": what root-relative URLs name. */
|
|
34
33
|
export declare function publicFolder(root: string): string | undefined;
|
|
35
34
|
export declare function packageFolder(dir: string): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Where package `name` is installed: the first node_modules folder that holds
|
|
37
|
+
* it, looking up from `from` as Node does. Not `require.resolve`, which under
|
|
38
|
+
* Bun, with no node_modules above, finds Bun's global cache instead.
|
|
39
|
+
*/
|
|
40
|
+
export declare function installedPackageDir(from: string, name: string): string | undefined;
|
|
36
41
|
export declare function workspaceDirs(root: string): string[];
|
|
37
42
|
export interface Manifest extends Json {
|
|
38
43
|
exports?: unknown;
|
|
@@ -58,8 +63,6 @@ export interface ComponentsJson {
|
|
|
58
63
|
file: string;
|
|
59
64
|
/** The folder its `ui` alias points at. */
|
|
60
65
|
folder: string;
|
|
61
|
-
/** The icon set it draws with (`iconLibrary`), when the interface has it. */
|
|
62
|
-
icons: InterfaceIcons | undefined;
|
|
63
66
|
/** How code at the root imports the folder's files: "@/components/ui". */
|
|
64
67
|
import: string;
|
|
65
68
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { highestMajor, isDirectory, isFile, posix as posix$1 } from "../paths.mjs";
|
|
2
2
|
import { isRecord } from "../shared/checks.mjs";
|
|
3
|
-
import { INTERFACE_ICONS } from "../shared/icon-sets.mjs";
|
|
4
3
|
import { createRequire } from "node:module";
|
|
5
4
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
6
5
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
@@ -199,6 +198,18 @@ function packageFolder(dir) {
|
|
|
199
198
|
if (dirname(at) === at) return;
|
|
200
199
|
}
|
|
201
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Where package `name` is installed: the first node_modules folder that holds
|
|
203
|
+
* it, looking up from `from` as Node does. Not `require.resolve`, which under
|
|
204
|
+
* Bun, with no node_modules above, finds Bun's global cache instead.
|
|
205
|
+
*/
|
|
206
|
+
function installedPackageDir(from, name) {
|
|
207
|
+
for (let at = resolve(from);; at = dirname(at)) {
|
|
208
|
+
const dir = join(at, "node_modules", name);
|
|
209
|
+
if (isFile(join(dir, "package.json"))) return dir;
|
|
210
|
+
if (dirname(at) === at) return;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
202
213
|
const GLOB_STAR_RE = /\/\*$/;
|
|
203
214
|
const QUOTES_RE = /["']/g;
|
|
204
215
|
function workspaceDirs(root) {
|
|
@@ -345,13 +356,11 @@ function readComponentsJson(dir, root) {
|
|
|
345
356
|
const exported = exportedFolder(alias, root);
|
|
346
357
|
const folder = resolveAlias(alias, dir) ?? exported ?? join(dir, "components", "ui");
|
|
347
358
|
const css = stringAt(objectAt(config, "tailwind"), "css");
|
|
348
|
-
const iconLibrary = stringAt(config, "iconLibrary");
|
|
349
359
|
return {
|
|
350
360
|
file,
|
|
351
361
|
folder,
|
|
352
362
|
import: dir === root || exported === resolve(folder) ? alias : importBaseFor(folder, root) ?? alias,
|
|
353
363
|
css: css ? join(dir, css) : void 0,
|
|
354
|
-
icons: INTERFACE_ICONS.find((set) => set === iconLibrary),
|
|
355
364
|
baseUi: String(config.style ?? "").startsWith("base-")
|
|
356
365
|
};
|
|
357
366
|
}
|
|
@@ -411,7 +420,7 @@ function packageDir(name, from) {
|
|
|
411
420
|
folders.push(at);
|
|
412
421
|
if (dirname(at) === at) break;
|
|
413
422
|
}
|
|
414
|
-
return folders.flatMap(workspaceDirs).find((dir) => readJson(join(dir, "package.json"))?.name === name) ??
|
|
423
|
+
return folders.flatMap(workspaceDirs).find((dir) => readJson(join(dir, "package.json"))?.name === name) ?? installedPackageDir(from, name);
|
|
415
424
|
}
|
|
416
425
|
function packageEntry(name, from) {
|
|
417
426
|
const dir = packageDir(name, from);
|
|
@@ -504,4 +513,4 @@ function exportedNames(file) {
|
|
|
504
513
|
const COMPONENT_EXPORT_RE = /^[A-Z](?=[\dA-Za-z]*[a-z])[\dA-Za-z]*$/;
|
|
505
514
|
const exportedComponents = (file) => exportedNames(file).filter((name) => COMPONENT_EXPORT_RE.test(name));
|
|
506
515
|
//#endregion
|
|
507
|
-
export { canImport, compilerOption, componentsJsonError, dependenciesOf, exportedComponents, exportedFolder, exportedNames, filesImport, importBaseFor, packageAt, packageEntry, packageFolder, parseJsonc, projectAliases, projectBaseUrl, projectPaths, publicFolder, readComponentsJson, readJson, resolveAlias, runtimeDependencies, stringRecord, stylingIn, tailwind3Config, tailwindSetup, tsconfigFile, workspaceDirs };
|
|
516
|
+
export { canImport, compilerOption, componentsJsonError, dependenciesOf, exportedComponents, exportedFolder, exportedNames, filesImport, importBaseFor, installedPackageDir, packageAt, packageEntry, packageFolder, parseJsonc, projectAliases, projectBaseUrl, projectPaths, publicFolder, readComponentsJson, readJson, resolveAlias, runtimeDependencies, stringRecord, stylingIn, tailwind3Config, tailwindSetup, tsconfigFile, workspaceDirs };
|
package/dist/config/renamed.mjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
//#region src/config/renamed.ts
|
|
2
|
-
/** The product's name before Dex, as old names start with it. */
|
|
3
|
-
const OLD_PRODUCT = "sudio";
|
|
4
2
|
const said = /* @__PURE__ */ new Set();
|
|
5
3
|
/** Notices said so far, for tests. */
|
|
6
4
|
const resetRenamedNotices = () => said.clear();
|
|
@@ -31,4 +29,4 @@ const importsOldPackage = (source) => source.match(OLD_PACKAGE_RE) !== null;
|
|
|
31
29
|
/** `source` with its imports of @sudio/core pointed at @dexhq/canvas. */
|
|
32
30
|
const withNewPackage = (source) => source.replace(OLD_PACKAGE_RE, (_match, quote, path = "") => `${quote}@dexhq/canvas${path}${quote}`);
|
|
33
31
|
//#endregion
|
|
34
|
-
export {
|
|
32
|
+
export { dexEnv, importsOldPackage, renamedNotice, resetRenamedNotices, withNewPackage };
|
package/dist/config/schema.d.mts
CHANGED
|
@@ -215,11 +215,6 @@ export declare const configSchema: z.ZodObject<{
|
|
|
215
215
|
"studio-presence": "studio-presence";
|
|
216
216
|
}> & core.$partial, z.ZodString>>;
|
|
217
217
|
components: z.ZodOptional<z.ZodString>;
|
|
218
|
-
icons: z.ZodOptional<z.ZodEnum<{
|
|
219
|
-
phosphor: "phosphor";
|
|
220
|
-
lucide: "lucide";
|
|
221
|
-
hugeicons: "hugeicons";
|
|
222
|
-
}>>;
|
|
223
218
|
locale: z.ZodOptional<z.ZodString>;
|
|
224
219
|
primitives: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<true>]>>;
|
|
225
220
|
subtitle: z.ZodOptional<z.ZodString>;
|
package/dist/config/schema.mjs
CHANGED
|
@@ -105,11 +105,6 @@ const ui = z.looseObject({
|
|
|
105
105
|
accent: z.string().optional(),
|
|
106
106
|
chromeTheme: z.partialRecord(z.enum(CHROME_VARIABLES), z.string()).optional(),
|
|
107
107
|
components: text.optional(),
|
|
108
|
-
icons: z.enum([
|
|
109
|
-
"phosphor",
|
|
110
|
-
"lucide",
|
|
111
|
-
"hugeicons"
|
|
112
|
-
]).optional(),
|
|
113
108
|
locale: z.string().optional(),
|
|
114
109
|
primitives: z.union([text, z.literal(true)]).optional(),
|
|
115
110
|
subtitle: z.string().optional(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cell } from "../shared/canvas-core.mjs";
|
|
2
|
-
import { Canvas,
|
|
2
|
+
import { Canvas, Frame } from "../shared/canvas-file.mjs";
|
|
3
3
|
import { Capture } from "../shared/snapshot-clipboard.mjs";
|
|
4
4
|
//#region src/content/capture.d.ts
|
|
5
5
|
/** The longest side a snapshot's frame may have, in pixels. */
|
|
@@ -26,7 +26,7 @@ export interface Placed {
|
|
|
26
26
|
/** A snapshot about to be saved, as placing its frame sees it. */
|
|
27
27
|
export interface Snapshot {
|
|
28
28
|
capture: Capture;
|
|
29
|
-
frame:
|
|
29
|
+
frame: Frame;
|
|
30
30
|
name: string;
|
|
31
31
|
}
|
|
32
32
|
/** Where a saved snapshot went: its view, its frame's key. */
|
package/dist/content/capture.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isSlug, prototypeFiles, prototypePage, slugify } from "../shared/prototypes-core.mjs";
|
|
2
|
-
import { prototypeExists, prototypePaths } from "./prototypes.mjs";
|
|
3
1
|
import { gridProblems } from "../shared/frame-grids.mjs";
|
|
2
|
+
import { isSlug, prototypeFiles, prototypePage, slugify } from "../shared/prototypes-core.mjs";
|
|
4
3
|
import { appendRow, insertRowBelow, parseFrameKey, placeFrameInCell, uniqueId } from "../shared/canvas-core.mjs";
|
|
4
|
+
import { prototypeExists, prototypePaths } from "./prototypes.mjs";
|
|
5
5
|
import { knownFor, ownCell, readCanvas, writeCanvas } from "./content.mjs";
|
|
6
6
|
import { arrangeRows } from "../shared/paste-arrangement.mjs";
|
|
7
7
|
import { posix } from "node:path";
|
|
@@ -1,145 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Sketch } from "../shared/sketch-core.mjs";
|
|
1
|
+
import { Cell, Viewport } from "../shared/canvas-core.mjs";
|
|
3
2
|
import { ResolvedDesignSystem } from "../config/design-system.mjs";
|
|
4
3
|
import { Authored } from "../shared/annotations-core.mjs";
|
|
5
|
-
import {
|
|
4
|
+
import { Canvas, ViewFrame } from "../shared/canvas-file.mjs";
|
|
6
5
|
import { PresenceTarget } from "../shared/presence-core.mjs";
|
|
6
|
+
import { Contributor } from "../shared/studio-files.mjs";
|
|
7
7
|
//#region src/content/content.d.ts
|
|
8
|
-
/** A person who makes prototypes, from contributors.json. */
|
|
9
|
-
export interface Contributor {
|
|
10
|
-
discipline: string;
|
|
11
|
-
/** Git user names that identify this person. */
|
|
12
|
-
git: string[];
|
|
13
|
-
/** Their GitHub username, for their avatar. */
|
|
14
|
-
github?: string;
|
|
15
|
-
name: string;
|
|
16
|
-
slug: string;
|
|
17
|
-
}
|
|
18
|
-
interface FrameBase {
|
|
19
|
-
/** On a column's first frame: the stacked frame its column starts level with. */
|
|
20
|
-
beside?: string;
|
|
21
|
-
id: string;
|
|
22
|
-
step?: number;
|
|
23
|
-
title?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Which frame this is, for good: kept when it moves or is renamed, new on
|
|
26
|
-
* a copy. Picks follow it. Given to the saver's frames that have none when
|
|
27
|
-
* they save.
|
|
28
|
-
*/
|
|
29
|
-
uid?: string;
|
|
30
|
-
/** Stacked below the frame before it, in its column. */
|
|
31
|
-
under?: true;
|
|
32
|
-
}
|
|
33
|
-
/** A frame that shows one of the prototype's views. */
|
|
34
|
-
export interface ViewFrame extends FrameBase {
|
|
35
|
-
doc?: undefined;
|
|
36
|
-
/** The frame's own grids and guides, shown in place of the canvas's grid. */
|
|
37
|
-
grids?: FrameGrid[];
|
|
38
|
-
guides?: FrameGuide[];
|
|
39
|
-
params?: Record<string, string>;
|
|
40
|
-
/** A fixed size in pixels, for a snapshot of one element. */
|
|
41
|
-
size?: {
|
|
42
|
-
height: number;
|
|
43
|
-
width: number;
|
|
44
|
-
};
|
|
45
|
-
sketch?: undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Where a snapshot was captured from, and when; and the image it is, when
|
|
48
|
-
* it is one, in the prototype's folder: "images/….png".
|
|
49
|
-
*/
|
|
50
|
-
snapshot?: {
|
|
51
|
-
captured: string;
|
|
52
|
-
image?: string;
|
|
53
|
-
url: string;
|
|
54
|
-
};
|
|
55
|
-
spec?: undefined;
|
|
56
|
-
view: string;
|
|
57
|
-
viewport?: Viewport;
|
|
58
|
-
}
|
|
59
|
-
/** A frame that shows one of the prototype's docs. */
|
|
60
|
-
export interface DocFrame extends FrameBase {
|
|
61
|
-
doc: string;
|
|
62
|
-
sketch?: undefined;
|
|
63
|
-
spec?: undefined;
|
|
64
|
-
view?: undefined;
|
|
65
|
-
}
|
|
66
|
-
/** A spec, edited in place: its markdown file, from the file's folder. */
|
|
67
|
-
export interface SpecFrame extends FrameBase {
|
|
68
|
-
doc?: undefined;
|
|
69
|
-
size?: {
|
|
70
|
-
height: number;
|
|
71
|
-
width: number;
|
|
72
|
-
};
|
|
73
|
-
sketch?: undefined;
|
|
74
|
-
spec: string;
|
|
75
|
-
view?: undefined;
|
|
76
|
-
}
|
|
77
|
-
export interface SketchFrame extends FrameBase {
|
|
78
|
-
doc?: undefined;
|
|
79
|
-
sketch: Sketch;
|
|
80
|
-
spec?: undefined;
|
|
81
|
-
/** Required, as an older Dex names a frame by its title or view. */
|
|
82
|
-
title: string;
|
|
83
|
-
view?: undefined;
|
|
84
|
-
}
|
|
85
|
-
declare const readFromDisk: unique symbol;
|
|
86
|
-
/**
|
|
87
|
-
* A frame this Dex cannot show: a kind from a newer Dex, or a mistake.
|
|
88
|
-
* Only reading a canvas makes one, so Dex never writes a frame that shows
|
|
89
|
-
* nothing.
|
|
90
|
-
*/
|
|
91
|
-
export interface UnknownFrame extends FrameBase {
|
|
92
|
-
doc?: undefined;
|
|
93
|
-
sketch?: undefined;
|
|
94
|
-
spec?: undefined;
|
|
95
|
-
view?: undefined;
|
|
96
|
-
readonly [readFromDisk]: true;
|
|
97
|
-
}
|
|
98
|
-
export type CanvasFrame = ViewFrame | DocFrame | SpecFrame | SketchFrame | UnknownFrame;
|
|
99
|
-
/** A pass through a section; its frames are the steps, left to right. */
|
|
100
|
-
export interface CanvasRow {
|
|
101
|
-
/**
|
|
102
|
-
* In a person's copy of someone else's section: the id of their row this one
|
|
103
|
-
* is shown under (people-core.ts).
|
|
104
|
-
*/
|
|
105
|
-
after?: string;
|
|
106
|
-
/** Whose it is, when not its section's: set when read, never written. */
|
|
107
|
-
author?: string;
|
|
108
|
-
/** The id of the section in its author's file that keeps it. */
|
|
109
|
-
copy?: string;
|
|
110
|
-
frames: CanvasFrame[];
|
|
111
|
-
id: string;
|
|
112
|
-
title?: string;
|
|
113
|
-
}
|
|
114
|
-
/** A section on the canvas; with `at`, a frame of its own drawn at that point. */
|
|
115
|
-
export interface CanvasSection {
|
|
116
|
-
at?: CanvasPoint;
|
|
117
|
-
/** Whose it is, from the folder it was read from; never written to a file. */
|
|
118
|
-
author?: string;
|
|
119
|
-
/** The id of the section it is a copy of, shown right below it. */
|
|
120
|
-
copyOf?: string;
|
|
121
|
-
/** When it was added, as an ISO date. */
|
|
122
|
-
created?: string;
|
|
123
|
-
description?: string;
|
|
124
|
-
/** Whose section it was copied from, when it is a copy. */
|
|
125
|
-
from?: string;
|
|
126
|
-
id: string;
|
|
127
|
-
/** Where a placed section's area starts; none stacks it with the others. */
|
|
128
|
-
position?: CanvasPoint;
|
|
129
|
-
rows: CanvasRow[];
|
|
130
|
-
title: string;
|
|
131
|
-
}
|
|
132
|
-
/** canvas.json: sections stacked top to bottom. */
|
|
133
|
-
export interface Canvas {
|
|
134
|
-
/**
|
|
135
|
-
* Set once the person's frames have uids (with uids on): from then on, a
|
|
136
|
-
* frame of theirs with none is new. Read, a canvas lists whose files have
|
|
137
|
-
* it in `uidsGiven`.
|
|
138
|
-
*/
|
|
139
|
-
frameUids?: true;
|
|
140
|
-
sections: CanvasSection[];
|
|
141
|
-
uidsGiven?: string[];
|
|
142
|
-
}
|
|
143
8
|
/** The views and docs that exist in a prototype, which frames may show. */
|
|
144
9
|
export interface Known {
|
|
145
10
|
docs: string[];
|
|
@@ -206,7 +71,6 @@ export interface CommandValues {
|
|
|
206
71
|
wait?: string;
|
|
207
72
|
}
|
|
208
73
|
export declare const STATUSES: string[];
|
|
209
|
-
export declare const DISCIPLINES: string[];
|
|
210
74
|
export declare function contributorProblems(contributors: unknown): string[];
|
|
211
75
|
export declare function manifestProblems(manifest: unknown): string[];
|
|
212
76
|
export declare function loadStudio(root: string): Promise<{
|
|
@@ -220,8 +84,6 @@ export interface CheckReport {
|
|
|
220
84
|
problems: string[];
|
|
221
85
|
warnings: string[];
|
|
222
86
|
}
|
|
223
|
-
/** The studio's own interface must not import a design system. */
|
|
224
|
-
export declare function chromeIssues(appDir: string): Promise<string[]>;
|
|
225
87
|
/**
|
|
226
88
|
* Every problem in the studio, as readable lines, and the warnings the
|
|
227
89
|
* prototype checks found (prototype-checks.ts). No problems when all is
|