@theoremjs/studio 0.0.0-stage → 0.3.2
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/LICENSE +21 -0
- package/README.md +295 -2
- package/agreement.d.ts +14 -0
- package/agreement.js +80 -0
- package/asks.d.ts +47 -0
- package/asks.js +54 -0
- package/browser-connection.d.ts +49 -0
- package/browser-connection.js +215 -0
- package/browser-engine.d.ts +11 -0
- package/browser-engine.js +11 -0
- package/browser-execution.d.ts +6 -0
- package/browser-execution.js +18 -0
- package/browser-live.d.ts +4 -0
- package/browser-live.js +132 -0
- package/browser-transport.d.ts +33 -0
- package/browser-transport.js +229 -0
- package/browser.d.ts +4 -0
- package/browser.js +4 -0
- package/canonical.d.ts +10 -0
- package/canonical.js +25 -0
- package/compile-workspace.d.ts +28 -0
- package/compile-workspace.js +295 -0
- package/compile.d.ts +65 -0
- package/compile.js +1605 -0
- package/concierge-demo.d.ts +17 -0
- package/concierge-demo.js +1230 -0
- package/conversation-key.d.ts +5 -0
- package/conversation-key.js +10 -0
- package/decision-example-images.d.ts +30 -0
- package/decision-example-images.js +30 -0
- package/deno.json +3 -0
- package/draft.d.ts +407 -0
- package/draft.js +505 -0
- package/editors.d.ts +29 -0
- package/editors.js +51 -0
- package/example-embedding-files.d.ts +11 -0
- package/example-embedding-files.js +20 -0
- package/example.d.ts +36 -0
- package/example.js +357 -0
- package/guardrail-probe.d.ts +100 -0
- package/guardrail-probe.js +722 -0
- package/held-credentials.d.ts +28 -0
- package/held-credentials.js +87 -0
- package/installed.mjs +40 -0
- package/lent-keys.d.ts +122 -0
- package/lent-keys.js +47 -0
- package/line-diff.d.ts +15 -0
- package/line-diff.js +41 -0
- package/live-connection.d.ts +22 -0
- package/live-connection.js +27 -0
- package/live-session-bridge.d.ts +15 -0
- package/live-session-bridge.js +202 -0
- package/map-line.d.ts +19 -0
- package/map-line.js +42 -0
- package/map.d.ts +154 -0
- package/map.js +525 -0
- package/media-accept.d.ts +19 -0
- package/media-accept.js +65 -0
- package/mod.d.ts +39 -0
- package/mod.js +33 -0
- package/origins.d.ts +52 -0
- package/origins.js +165 -0
- package/package.json +85 -4
- package/page/assets/Banner-BISz3nXA.js +2 -0
- package/page/assets/BottomSheet-BwfBDtje.js +1 -0
- package/page/assets/Card-Lp-0P5eL.js +1 -0
- package/page/assets/CardWall-CBRLdDZW.js +1 -0
- package/page/assets/Center-nHS1JSux.js +1 -0
- package/page/assets/CheckboxInput-Cj5pk-KI.js +2 -0
- package/page/assets/CodeBlock-C7XJ4ioE.js +51 -0
- package/page/assets/CollapsibleGroup-N7_SOjbm.js +2 -0
- package/page/assets/ContextMenu-CBu9H-9H.js +2 -0
- package/page/assets/DateInput-BGrQ5tPC.js +1 -0
- package/page/assets/Dialog-DELWQo-v.js +1 -0
- package/page/assets/EmptyState-C8W4JKBZ.js +1 -0
- package/page/assets/HoverCard-D1Y1ltWQ.js +1 -0
- package/page/assets/Icon-JrysT8aU.js +3 -0
- package/page/assets/IconAlertTriangle-BqAEqqdU.js +1 -0
- package/page/assets/IconButton-DlOGzJIX.js +1 -0
- package/page/assets/IconEye-BB5aY-wQ.js +1 -0
- package/page/assets/IconFileText-6zOFKKrF.js +1 -0
- package/page/assets/IconSearch-BTx66a40.js +1 -0
- package/page/assets/IconShield-DDOh7Gr5.js +1 -0
- package/page/assets/ItemSwipeLayer-Ckn4X6h9.js +1 -0
- package/page/assets/PaneState-BvA2tLQg.js +1 -0
- package/page/assets/PaneState-eUzUkNE8.css +1 -0
- package/page/assets/ScrollableArea-Ckugdj1N.js +1 -0
- package/page/assets/Section-DJ97F7QE.js +1 -0
- package/page/assets/SegmentedControlItem-h-aaXzyS.js +1 -0
- package/page/assets/SidePanel-BL32abk8.js +1 -0
- package/page/assets/StackItem-CQviqAfM.js +1 -0
- package/page/assets/Text-bum6zWWx.js +2 -0
- package/page/assets/TimestampHoverCard-DQIG0RZF.js +1 -0
- package/page/assets/ToolResultCharts-CgshSv9Q.js +1 -0
- package/page/assets/Tooltip-BH9xiRMl.js +1 -0
- package/page/assets/TraceInspector-_yZiz05W.js +1 -0
- package/page/assets/TraceOverview-BPO-HIYK.js +57 -0
- package/page/assets/VStack-CkVMcNiK.js +1 -0
- package/page/assets/_virtual_studio-type-sources-ByxqQaOG.js +12936 -0
- package/page/assets/arrive-DvbqpeRS.js +1 -0
- package/page/assets/browser-engine-CYq9DQAM.js +9 -0
- package/page/assets/browser-transport-D-2jDYe7.js +47 -0
- package/page/assets/codicon-DF1abBS2.ttf +0 -0
- package/page/assets/compile-egress-BSxOdX4K.js +23 -0
- package/page/assets/container.stylex-BmOi-8DQ.js +1 -0
- package/page/assets/createReactComponent-CZwsv6DD.js +1 -0
- package/page/assets/decision-example-images-CZGr7YIT.js +1 -0
- package/page/assets/devWarning-DxuplmRl.js +1 -0
- package/page/assets/editor-DjpsE8to.css +1 -0
- package/page/assets/editor.api-Cd3ViPQa.js +908 -0
- package/page/assets/editor.worker-6GY8RhDc.js +1 -0
- package/page/assets/editor.worker-BmdWdrHZ.js +33 -0
- package/page/assets/editors-BJX_S59A.js +1 -0
- package/page/assets/egress-automata-B5ZGE1mT.js +1 -0
- package/page/assets/embedding-space-view-CfQBPDxD.js +140 -0
- package/page/assets/encode-files-Bc3HJyAh.js +1 -0
- package/page/assets/export-agent-C3yyzXH8.js +43 -0
- package/page/assets/figtree-latin-400-normal-BD4aNku5.woff +0 -0
- package/page/assets/figtree-latin-400-normal-g7Dtegnw.woff2 +0 -0
- package/page/assets/figtree-latin-500-normal-BWnGEVsr.woff2 +0 -0
- package/page/assets/figtree-latin-500-normal-B_yy1phn.woff +0 -0
- package/page/assets/figtree-latin-600-normal-BM_oTo4n.woff +0 -0
- package/page/assets/figtree-latin-600-normal-Cv_xCTDl.woff2 +0 -0
- package/page/assets/figtree-latin-700-normal-BCCt2T1q.woff +0 -0
- package/page/assets/figtree-latin-700-normal-th6qEP7c.woff2 +0 -0
- package/page/assets/focusOutline.stylex-BT0kfa4t.js +1 -0
- package/page/assets/focusableSelector-DXZeMU85.js +1 -0
- package/page/assets/groupStyles-C7Ter7zC.js +1 -0
- package/page/assets/guardrail-tester-Gut5xK4a.js +9 -0
- package/page/assets/host-patterns-C9RMP16Q.js +1 -0
- package/page/assets/index-CvvmFKgS.js +105 -0
- package/page/assets/index-DOaHlqBo.css +1 -0
- package/page/assets/isRtlElement-BG33-k_H.js +1 -0
- package/page/assets/labels-provider-4TIWDvsE.js +3 -0
- package/page/assets/lent-keys-C32ems-I.js +1 -0
- package/page/assets/live-ingress-lDUGPwth.js +1 -0
- package/page/assets/live-messages-CnkL4GWi.js +1 -0
- package/page/assets/mergeProps-ptS-gIMz.js +1 -0
- package/page/assets/padding.stylex-B76907Zf.js +1 -0
- package/page/assets/preload-helper-DpV6A1kQ.js +1 -0
- package/page/assets/reader-BOCCYaRp.js +7 -0
- package/page/assets/register-CDgivxvX.js +2 -0
- package/page/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/page/assets/schemas-BQ9Jydzb.js +56 -0
- package/page/assets/shaped-data-BcarWqd5.js +16 -0
- package/page/assets/sharedResizeObserver-4U9Xq5Oq.js +1 -0
- package/page/assets/stub-DhdcU_Ew.js +471 -0
- package/page/assets/studio-code-pane-C_SAbcOa.js +8 -0
- package/page/assets/studio-console-DZwlEsvr.js +3 -0
- package/page/assets/studio-decision-B0FnCAXA.js +1 -0
- package/page/assets/studio-embedding-CmA51HVo.js +2 -0
- package/page/assets/studio-host-console-By7hqu2l.js +2 -0
- package/page/assets/studio-live-BrcVQcyV.js +1 -0
- package/page/assets/studio-map-B_xSia-z.js +1 -0
- package/page/assets/studio-map-Bb06Tw1F.css +1 -0
- package/page/assets/studio-monaco-CbKf90i6.css +1 -0
- package/page/assets/studio-monaco-xfyfezQS.js +34 -0
- package/page/assets/studio-ts.worker-B-EXG4Sv.js +67741 -0
- package/page/assets/studio-ts.worker-BXtW3z-O.js +1 -0
- package/page/assets/studio-type-checker-BOvxudki.js +23 -0
- package/page/assets/themeProps-3IqahpCr.js +1 -0
- package/page/assets/tokens.stylex-DkHf0P9C.js +1 -0
- package/page/assets/tool-schema-idaOe2nI.js +18 -0
- package/page/assets/trace-patterns-DnYJa0nI.js +1 -0
- package/page/assets/trace-record-C3zNksA_.js +1 -0
- package/page/assets/trace-schema-9CdEyG6Q.js +1 -0
- package/page/assets/tree-DqyAMsbI.js +3 -0
- package/page/assets/turn-client-Du3Um3Mg.js +2 -0
- package/page/assets/types-BhfXQCLx.js +1 -0
- package/page/assets/typescript-20GgZ8PJ.js +1 -0
- package/page/assets/use-one-call-Hcs8YBp1.js +1 -0
- package/page/assets/useAdaptivePresentation-BzmPCddb.js +1 -0
- package/page/assets/useClipboard-BgGRxRMJ.js +1 -0
- package/page/assets/useContainerReveal-BFy8N_QU.js +1 -0
- package/page/assets/useDevWarning-Z9SoixOP.js +1 -0
- package/page/assets/useLayerDismissal-B_G7IWpC.js +1 -0
- package/page/assets/useMediaQuery-BCT0NUeZ.js +1 -0
- package/page/assets/useScrollLock-Dyf6PHJt.js +1 -0
- package/page/assets/useScrollableArea-0NzdiBCq.js +1 -0
- package/page/assets/useTooltip-CJM_xhLB.js +1 -0
- package/page/assets/workspace-DZALqEDX.js +1 -0
- package/page/assets/zip-DTcEfps6.js +1 -0
- package/page/index.html +90 -0
- package/page.mjs +49 -0
- package/people.d.ts +87 -0
- package/people.js +110 -0
- package/policy.d.ts +43 -0
- package/policy.js +102 -0
- package/ports.d.mts +32 -0
- package/ports.mjs +85 -0
- package/probe-battery.d.ts +13 -0
- package/probe-battery.js +404 -0
- package/providers.d.ts +149 -0
- package/providers.js +306 -0
- package/read-source.d.ts +48 -0
- package/read-source.js +1301 -0
- package/read-steps.d.ts +23 -0
- package/read-steps.js +2 -0
- package/reader.d.ts +11 -0
- package/reader.js +11 -0
- package/registrations.d.ts +83 -0
- package/registrations.js +1 -0
- package/requirements.d.ts +22 -0
- package/requirements.js +38 -0
- package/run-payload-core.d.ts +28 -0
- package/run-payload-core.js +123 -0
- package/run-payload.d.ts +32 -0
- package/run-payload.js +26 -0
- package/runtime-scope.d.ts +84 -0
- package/runtime-scope.js +308 -0
- package/runtime.d.ts +84 -0
- package/runtime.js +387 -0
- package/section-notes.d.ts +33 -0
- package/section-notes.js +38 -0
- package/serve-page.mjs +96 -0
- package/server/draft-decide.d.ts +72 -0
- package/server/draft-decide.js +111 -0
- package/server/draft-embedding.d.ts +3 -0
- package/server/draft-embedding.js +35 -0
- package/server/draft-handler.d.ts +82 -0
- package/server/draft-handler.js +213 -0
- package/server/draft-probe.d.ts +14 -0
- package/server/draft-probe.js +61 -0
- package/server/draft-replies.d.ts +22 -0
- package/server/draft-replies.js +46 -0
- package/server/edited-session.d.ts +28 -0
- package/server/edited-session.js +83 -0
- package/server/edits.d.ts +38 -0
- package/server/edits.js +195 -0
- package/server/handler.d.ts +133 -0
- package/server/handler.js +598 -0
- package/server/lent-draft.d.ts +19 -0
- package/server/lent-draft.js +23 -0
- package/server/live.d.ts +15 -0
- package/server/live.js +96 -0
- package/server/open-editor.d.ts +63 -0
- package/server/open-editor.js +115 -0
- package/server/origins.d.ts +18 -0
- package/server/origins.js +330 -0
- package/server/project-source.d.ts +208 -0
- package/server/project-source.js +1042 -0
- package/server/project.d.ts +22 -0
- package/server/project.js +56 -0
- package/server/run-traces.d.ts +20 -0
- package/server/run-traces.js +96 -0
- package/server/save-new.d.ts +29 -0
- package/server/save-new.js +514 -0
- package/server/save-plan.d.ts +46 -0
- package/server/save-plan.js +1134 -0
- package/server/save-remove.d.ts +21 -0
- package/server/save-remove.js +528 -0
- package/server/save-session.d.ts +96 -0
- package/server/save-session.js +418 -0
- package/server/save-wire.d.ts +235 -0
- package/server/save-wire.js +8 -0
- package/server/save.d.ts +52 -0
- package/server/save.js +209 -0
- package/server/serve.d.ts +23 -0
- package/server/serve.js +413 -0
- package/server/test-connection.d.ts +17 -0
- package/server/test-connection.js +362 -0
- package/server/test-key.d.ts +2 -0
- package/server/test-key.js +83 -0
- package/server/watch.d.ts +28 -0
- package/server/watch.js +93 -0
- package/server/zod-edit.d.ts +74 -0
- package/server/zod-edit.js +558 -0
- package/server.d.ts +8 -0
- package/server.js +8 -0
- package/setups.mjs +170 -0
- package/shared-carry.d.ts +114 -0
- package/shared-carry.js +523 -0
- package/shared-settings.d.ts +34 -0
- package/shared-settings.js +70 -0
- package/source.d.ts +75 -0
- package/source.js +414 -0
- package/start.mjs +169 -0
- package/stream-lines.d.ts +9 -0
- package/stream-lines.js +27 -0
- package/stub.d.ts +6 -0
- package/stub.js +33 -0
- package/surface.d.ts +53 -0
- package/surface.js +631 -0
- package/system-markup.d.ts +20 -0
- package/system-markup.js +51 -0
- package/tool-schema.d.ts +23 -0
- package/tool-schema.js +69 -0
- package/tools.d.ts +16 -0
- package/tools.js +91 -0
- package/traces.d.ts +24 -0
- package/traces.js +29 -0
- package/transport.d.ts +57 -0
- package/transport.js +187 -0
- package/tree.d.ts +32 -0
- package/tree.js +83 -0
- package/types.d.ts +62 -0
- package/types.js +6 -0
- package/ui/acting-as-button.d.ts +2 -0
- package/ui/acting-as-button.js +16 -0
- package/ui/add-provider.d.ts +13 -0
- package/ui/add-provider.js +20 -0
- package/ui/boot-mark.css +53 -0
- package/ui/boot-mark.d.ts +19 -0
- package/ui/boot-mark.js +128 -0
- package/ui/boot-paint.d.ts +8 -0
- package/ui/boot-paint.js +8 -0
- package/ui/brand-icons.d.ts +57 -0
- package/ui/brand-icons.js +148 -0
- package/ui/built/theme.css +830 -0
- package/ui/built/theme.css.d.ts +9 -0
- package/ui/built/theorem-studio.d.ts +13 -0
- package/ui/built/theorem-studio.js +705 -0
- package/ui/built/theorem-studio.variants.d.ts +28 -0
- package/ui/code/monaco-contributions.d.ts +45 -0
- package/ui/code/studio-code.d.ts +7 -0
- package/ui/code/studio-code.js +253 -0
- package/ui/code/studio-monaco.d.ts +44 -0
- package/ui/code/studio-monaco.js +48 -0
- package/ui/code/studio-ts.worker.d.ts +1 -0
- package/ui/code/studio-ts.worker.js +16 -0
- package/ui/code/studio-type-checker.d.ts +12 -0
- package/ui/code/studio-type-checker.js +308 -0
- package/ui/code/studio-type-sources.d.ts +26 -0
- package/ui/confirm-write.d.ts +12 -0
- package/ui/confirm-write.js +45 -0
- package/ui/diff-block.d.ts +21 -0
- package/ui/diff-block.js +17 -0
- package/ui/figtree.css +59 -0
- package/ui/file-place.d.ts +4 -0
- package/ui/file-place.js +26 -0
- package/ui/guardrail-tester.d.ts +18 -0
- package/ui/guardrail-tester.js +248 -0
- package/ui/inspector-context.d.ts +119 -0
- package/ui/inspector-context.js +84 -0
- package/ui/inspector.d.ts +247 -0
- package/ui/inspector.js +284 -0
- package/ui/lib/acting-as.d.ts +25 -0
- package/ui/lib/acting-as.js +90 -0
- package/ui/lib/boot-sequence.d.ts +32 -0
- package/ui/lib/boot-sequence.js +57 -0
- package/ui/lib/export-agent.d.ts +11 -0
- package/ui/lib/export-agent.js +335 -0
- package/ui/lib/facet-icons.d.ts +20 -0
- package/ui/lib/facet-icons.js +21 -0
- package/ui/lib/panel-motion.d.ts +8 -0
- package/ui/lib/panel-motion.js +74 -0
- package/ui/lib/project-address.d.ts +14 -0
- package/ui/lib/project-address.js +24 -0
- package/ui/lib/project-starting.d.ts +13 -0
- package/ui/lib/project-starting.js +30 -0
- package/ui/lib/project-traces.d.ts +17 -0
- package/ui/lib/project-traces.js +54 -0
- package/ui/lib/read-map.d.ts +30 -0
- package/ui/lib/read-map.js +173 -0
- package/ui/lib/read-progress.d.ts +14 -0
- package/ui/lib/read-progress.js +12 -0
- package/ui/lib/refusal-lines.d.ts +3 -0
- package/ui/lib/refusal-lines.js +8 -0
- package/ui/lib/studio-activity.d.ts +5 -0
- package/ui/lib/studio-activity.js +17 -0
- package/ui/lib/studio-console.d.ts +27 -0
- package/ui/lib/studio-console.js +9 -0
- package/ui/lib/studio-conversation.d.ts +20 -0
- package/ui/lib/studio-conversation.js +130 -0
- package/ui/lib/studio-examples.d.ts +31 -0
- package/ui/lib/studio-examples.js +25 -0
- package/ui/lib/studio-labels.d.ts +6 -0
- package/ui/lib/studio-labels.js +13 -0
- package/ui/lib/studio-map-kept.d.ts +17 -0
- package/ui/lib/studio-map-kept.js +48 -0
- package/ui/lib/studio-open.d.ts +22 -0
- package/ui/lib/studio-open.js +54 -0
- package/ui/lib/studio-page.d.ts +33 -0
- package/ui/lib/studio-page.js +121 -0
- package/ui/lib/studio-prefs.d.ts +26 -0
- package/ui/lib/studio-prefs.js +87 -0
- package/ui/lib/studio-project.d.ts +106 -0
- package/ui/lib/studio-project.js +177 -0
- package/ui/lib/studio-restore.d.ts +49 -0
- package/ui/lib/studio-restore.js +251 -0
- package/ui/lib/studio-run-open.d.ts +15 -0
- package/ui/lib/studio-run-open.js +16 -0
- package/ui/lib/studio-session.d.ts +34 -0
- package/ui/lib/studio-session.js +17 -0
- package/ui/lib/studio-settings.d.ts +15 -0
- package/ui/lib/studio-settings.js +48 -0
- package/ui/lib/studio-store.d.ts +64 -0
- package/ui/lib/studio-store.js +391 -0
- package/ui/lib/studio-watch.d.ts +12 -0
- package/ui/lib/studio-watch.js +27 -0
- package/ui/lib/tab-fills.d.ts +6 -0
- package/ui/lib/tab-fills.js +14 -0
- package/ui/lib/tool-credentials.d.ts +3 -0
- package/ui/lib/tool-credentials.js +23 -0
- package/ui/lib/tool-probe.d.ts +19 -0
- package/ui/lib/tool-probe.js +104 -0
- package/ui/lib/type-icons.d.ts +35 -0
- package/ui/lib/type-icons.js +38 -0
- package/ui/lib/when-idle.d.ts +5 -0
- package/ui/lib/when-idle.js +14 -0
- package/ui/lib/zip.d.ts +5 -0
- package/ui/lib/zip.js +8 -0
- package/ui/map-token.css +11 -0
- package/ui/map-token.d.ts +17 -0
- package/ui/map-token.js +29 -0
- package/ui/mcp-icon.d.ts +6 -0
- package/ui/mcp-icon.js +8 -0
- package/ui/motion.css +113 -0
- package/ui/pan.d.ts +32 -0
- package/ui/pan.js +90 -0
- package/ui/profile-editor.d.ts +33 -0
- package/ui/profile-editor.js +2638 -0
- package/ui/provider-editor.d.ts +15 -0
- package/ui/provider-editor.js +92 -0
- package/ui/read-map.css +48 -0
- package/ui/read-map.d.ts +7 -0
- package/ui/read-map.js +163 -0
- package/ui/refusal-detail.d.ts +4 -0
- package/ui/refusal-detail.js +21 -0
- package/ui/shared-change.d.ts +9 -0
- package/ui/shared-change.js +28 -0
- package/ui/shell-motion.css +121 -0
- package/ui/shell-motion.d.ts +73 -0
- package/ui/shell-motion.js +194 -0
- package/ui/studio-code-pane.d.ts +19 -0
- package/ui/studio-code-pane.js +44 -0
- package/ui/studio-compare.d.ts +80 -0
- package/ui/studio-compare.js +326 -0
- package/ui/studio-conflicts.d.ts +17 -0
- package/ui/studio-conflicts.js +87 -0
- package/ui/studio-connection.d.ts +64 -0
- package/ui/studio-connection.js +286 -0
- package/ui/studio-decision.d.ts +6 -0
- package/ui/studio-decision.js +49 -0
- package/ui/studio-embedding.d.ts +6 -0
- package/ui/studio-embedding.js +30 -0
- package/ui/studio-host-console.d.ts +6 -0
- package/ui/studio-host-console.js +17 -0
- package/ui/studio-host.d.ts +73 -0
- package/ui/studio-host.js +12 -0
- package/ui/studio-live.d.ts +17 -0
- package/ui/studio-live.js +26 -0
- package/ui/studio-map.css +273 -0
- package/ui/studio-map.d.ts +17 -0
- package/ui/studio-map.js +397 -0
- package/ui/studio-nav.d.ts +24 -0
- package/ui/studio-nav.js +17 -0
- package/ui/studio-no-project.d.ts +5 -0
- package/ui/studio-no-project.js +9 -0
- package/ui/studio-run.css +76 -0
- package/ui/studio-run.d.ts +14 -0
- package/ui/studio-run.js +119 -0
- package/ui/studio-runner.d.ts +45 -0
- package/ui/studio-runner.js +187 -0
- package/ui/studio-save.d.ts +49 -0
- package/ui/studio-save.js +307 -0
- package/ui/studio-screen.d.ts +61 -0
- package/ui/studio-screen.js +2078 -0
- package/ui/studio-settings.d.ts +31 -0
- package/ui/studio-settings.js +288 -0
- package/ui/studio-shell.css +27 -0
- package/ui/studio-shell.d.ts +43 -0
- package/ui/studio-shell.js +87 -0
- package/ui/studio-theme.d.ts +7 -0
- package/ui/studio-theme.js +94 -0
- package/ui/studio.css +427 -0
- package/ui/theorem-mark.css +84 -0
- package/ui/theorem-mark.d.ts +22 -0
- package/ui/theorem-mark.js +21 -0
- package/vite.d.mts +30 -0
- package/vite.mjs +277 -0
- package/workspace.d.ts +230 -0
- package/workspace.js +1054 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated by `astryx theme build` — do not edit manually.
|
|
3
|
+
* Source: ui/studio-theme.ts
|
|
4
|
+
* Command: astryx theme build ui/studio-theme.ts --out ui/built/theme.css
|
|
5
|
+
* CLI: @astryxdesign/cli@0.7.0
|
|
6
|
+
* Core: @astryxdesign/core@0.7.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Generated by astryx theme build
|
|
10
|
+
export {};
|
|
11
|
+
|
|
12
|
+
declare module '@astryxdesign/core/Badge' {
|
|
13
|
+
interface BadgeVariantMap {
|
|
14
|
+
'gray': true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module '@astryxdesign/core/Card' {
|
|
19
|
+
interface CardVariantMap {
|
|
20
|
+
'bubble': true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '@astryxdesign/core/Section' {
|
|
25
|
+
interface SectionVariantMap {
|
|
26
|
+
'raised': true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Side-effect registers. Monaco ships these as JavaScript with no declarations. */
|
|
2
|
+
declare module 'monaco-editor/editor/browser/coreCommands';
|
|
3
|
+
declare module 'monaco-editor/editor/browser/widget/codeEditor/codeEditorWidget';
|
|
4
|
+
declare module 'monaco-editor/editor/common/standaloneStrings';
|
|
5
|
+
declare module 'monaco-editor/editor/contrib/bracketMatching/browser/bracketMatching';
|
|
6
|
+
declare module 'monaco-editor/editor/contrib/caretOperations/browser/caretOperations';
|
|
7
|
+
declare module 'monaco-editor/editor/contrib/clipboard/browser/clipboard';
|
|
8
|
+
declare module 'monaco-editor/editor/contrib/comment/browser/comment';
|
|
9
|
+
declare module 'monaco-editor/editor/contrib/contextmenu/browser/contextmenu';
|
|
10
|
+
declare module 'monaco-editor/editor/contrib/cursorUndo/browser/cursorUndo';
|
|
11
|
+
declare module 'monaco-editor/editor/contrib/find/browser/findController';
|
|
12
|
+
declare module 'monaco-editor/editor/contrib/folding/browser/folding';
|
|
13
|
+
declare module 'monaco-editor/editor/contrib/gotoError/browser/gotoError';
|
|
14
|
+
declare module 'monaco-editor/editor/contrib/gotoError/browser/markerSelectionStatus';
|
|
15
|
+
declare module 'monaco-editor/editor/contrib/gotoSymbol/browser/goToCommands';
|
|
16
|
+
declare module 'monaco-editor/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition';
|
|
17
|
+
declare module 'monaco-editor/editor/contrib/hover/browser/hoverContribution';
|
|
18
|
+
declare module 'monaco-editor/editor/contrib/indentation/browser/indentation';
|
|
19
|
+
declare module 'monaco-editor/editor/contrib/linesOperations/browser/linesOperations';
|
|
20
|
+
declare module 'monaco-editor/editor/contrib/links/browser/links';
|
|
21
|
+
declare module 'monaco-editor/editor/contrib/multicursor/browser/multicursor';
|
|
22
|
+
declare module 'monaco-editor/editor/contrib/parameterHints/browser/parameterHints';
|
|
23
|
+
declare module 'monaco-editor/editor/contrib/placeholderText/browser/placeholderText.contribution';
|
|
24
|
+
declare module 'monaco-editor/editor/contrib/readOnlyMessage/browser/contribution';
|
|
25
|
+
declare module 'monaco-editor/editor/contrib/smartSelect/browser/smartSelect';
|
|
26
|
+
declare module 'monaco-editor/editor/contrib/snippet/browser/snippetController2';
|
|
27
|
+
declare module 'monaco-editor/editor/contrib/suggest/browser/suggestController';
|
|
28
|
+
declare module 'monaco-editor/editor/contrib/tokenization/browser/tokenization';
|
|
29
|
+
declare module 'monaco-editor/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter';
|
|
30
|
+
declare module 'monaco-editor/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators';
|
|
31
|
+
declare module 'monaco-editor/editor/contrib/wordHighlighter/browser/wordHighlighter';
|
|
32
|
+
declare module 'monaco-editor/editor/contrib/wordOperations/browser/wordOperations';
|
|
33
|
+
declare module 'monaco-editor/editor/contrib/wordPartOperations/browser/wordPartOperations';
|
|
34
|
+
declare module 'monaco-editor/features/find/register';
|
|
35
|
+
|
|
36
|
+
declare module 'monaco-editor/languages/features/typescript/tsWorker' {
|
|
37
|
+
export class TypeScriptWorker {
|
|
38
|
+
constructor(ctx: unknown, createData: unknown);
|
|
39
|
+
getScriptFileNames(): string[];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare module 'monaco-editor/internal/common/initialize' {
|
|
44
|
+
export function initialize(callback: (ctx: unknown, createData: unknown) => object): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StudioCodeProps } from '../studio-host.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The open agent's or provider's file. `text` is the latest print. While the visitor is
|
|
4
|
+
* typing, the model keeps their text. `hold` means there is no new print,
|
|
5
|
+
* so the text they have stays. `isReadOnly` takes no edit.
|
|
6
|
+
*/
|
|
7
|
+
export declare function StudioCode({ text, hold, isReadOnly, issues, onApply }: StudioCodeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
/** What reading the file produced: errors at a spot, or the fields it read. */
|
|
4
|
+
const APPLY_MS = 300;
|
|
5
|
+
/** How long typing has to stay quiet before the typechecker worker is terminated. */
|
|
6
|
+
const TYPE_IDLE_MS = 2000;
|
|
7
|
+
/** Marks the text's own errors and the draft's issues on the lines they belong to. */
|
|
8
|
+
function paintMarkers({ editor, monaco, spans, errors }, issues) {
|
|
9
|
+
const model = editor?.getModel();
|
|
10
|
+
if (!monaco || !model)
|
|
11
|
+
return;
|
|
12
|
+
monaco.editor.setModelMarkers(model, 'studio', [
|
|
13
|
+
...errors.map((error) => marker(monaco, error.line, error.column, error.message)),
|
|
14
|
+
...issueMarkers(monaco, spans, issues),
|
|
15
|
+
]);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The open agent's or provider's file. `text` is the latest print. While the visitor is
|
|
19
|
+
* typing, the model keeps their text. `hold` means there is no new print,
|
|
20
|
+
* so the text they have stays. `isReadOnly` takes no edit.
|
|
21
|
+
*/
|
|
22
|
+
export function StudioCode({ text, hold, isReadOnly = false, issues, onApply }) {
|
|
23
|
+
const node = useRef(null);
|
|
24
|
+
const apply = useRef(onApply);
|
|
25
|
+
const printed = useRef(text);
|
|
26
|
+
const readOnly = useRef(isReadOnly);
|
|
27
|
+
readOnly.current = isReadOnly;
|
|
28
|
+
const issuesRef = useRef(issues);
|
|
29
|
+
const session = useRef({ spans: [], errors: [], setting: false, dirty: false });
|
|
30
|
+
apply.current = onApply;
|
|
31
|
+
printed.current = text;
|
|
32
|
+
issuesRef.current = issues;
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const host = node.current;
|
|
35
|
+
if (!host)
|
|
36
|
+
return;
|
|
37
|
+
const life = { disposed: false };
|
|
38
|
+
let timer;
|
|
39
|
+
let idleTimer;
|
|
40
|
+
let typeToken = 0;
|
|
41
|
+
let typeSession;
|
|
42
|
+
let typeStarting = false;
|
|
43
|
+
let typeReady = false;
|
|
44
|
+
const stopTypes = () => {
|
|
45
|
+
typeToken += 1;
|
|
46
|
+
if (idleTimer)
|
|
47
|
+
clearTimeout(idleTimer);
|
|
48
|
+
idleTimer = undefined;
|
|
49
|
+
typeSession?.stop();
|
|
50
|
+
typeSession = undefined;
|
|
51
|
+
typeStarting = false;
|
|
52
|
+
typeReady = false;
|
|
53
|
+
};
|
|
54
|
+
const inTypeUi = (node) => {
|
|
55
|
+
if (host.contains(node))
|
|
56
|
+
return true;
|
|
57
|
+
return (node instanceof Element &&
|
|
58
|
+
!!node.closest('.suggest-widget, .parameter-hints-widget, .monaco-hover, .monaco-menu-container, .context-view'));
|
|
59
|
+
};
|
|
60
|
+
const typeUiOpen = () => !!document.querySelector('.suggest-widget.visible, .parameter-hints-widget.visible');
|
|
61
|
+
let removeLeave;
|
|
62
|
+
const paint = () => {
|
|
63
|
+
paintMarkers(session.current, issuesRef.current);
|
|
64
|
+
};
|
|
65
|
+
void (async () => {
|
|
66
|
+
const monaco = await import("./studio-monaco.js");
|
|
67
|
+
// Colour only, until the visitor types. The typechecker is a compiler in
|
|
68
|
+
// a worker, so it stays out of this import.
|
|
69
|
+
await import('monaco-editor/languages/definitions/typescript/register');
|
|
70
|
+
const editorWorker = (await import('monaco-editor/editor/editor.worker?worker')).default;
|
|
71
|
+
self.MonacoEnvironment = {
|
|
72
|
+
getWorker() {
|
|
73
|
+
return new editorWorker();
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
if (life.disposed || !host.isConnected)
|
|
77
|
+
return;
|
|
78
|
+
const dark = document.documentElement.dataset.theme === 'dark' ||
|
|
79
|
+
globalThis.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
80
|
+
const uri = monaco.Uri.parse('file:///agent.ts');
|
|
81
|
+
monaco.editor.getModel(uri)?.dispose();
|
|
82
|
+
const model = monaco.editor.createModel(printed.current, 'typescript', uri);
|
|
83
|
+
const editor = monaco.editor.create(host, {
|
|
84
|
+
model,
|
|
85
|
+
readOnly: readOnly.current,
|
|
86
|
+
language: 'typescript',
|
|
87
|
+
theme: dark ? 'vs-dark' : 'vs',
|
|
88
|
+
minimap: { enabled: false },
|
|
89
|
+
fontSize: 13,
|
|
90
|
+
wordWrap: 'on',
|
|
91
|
+
wrappingIndent: 'indent',
|
|
92
|
+
scrollBeyondLastLine: false,
|
|
93
|
+
automaticLayout: true,
|
|
94
|
+
fixedOverflowWidgets: true,
|
|
95
|
+
tabSize: 2,
|
|
96
|
+
padding: { top: 12 },
|
|
97
|
+
quickSuggestions: { other: true, comments: false, strings: true },
|
|
98
|
+
suggestOnTriggerCharacters: true,
|
|
99
|
+
acceptSuggestionOnEnter: 'on',
|
|
100
|
+
tabCompletion: 'on',
|
|
101
|
+
wordBasedSuggestions: 'currentDocument',
|
|
102
|
+
parameterHints: { enabled: true },
|
|
103
|
+
suggest: { preview: true, showIcons: true },
|
|
104
|
+
});
|
|
105
|
+
session.current.editor = editor;
|
|
106
|
+
session.current.monaco = monaco;
|
|
107
|
+
const scheduleTypeStop = () => {
|
|
108
|
+
if (idleTimer)
|
|
109
|
+
clearTimeout(idleTimer);
|
|
110
|
+
idleTimer = setTimeout(() => {
|
|
111
|
+
if (life.disposed)
|
|
112
|
+
return;
|
|
113
|
+
if (typeUiOpen()) {
|
|
114
|
+
scheduleTypeStop();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
stopTypes();
|
|
118
|
+
}, TYPE_IDLE_MS);
|
|
119
|
+
};
|
|
120
|
+
const ensureTypes = () => {
|
|
121
|
+
if (typeSession) {
|
|
122
|
+
if (typeReady)
|
|
123
|
+
scheduleTypeStop();
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (typeStarting)
|
|
127
|
+
return;
|
|
128
|
+
const mine = typeToken;
|
|
129
|
+
const isStale = () => life.disposed || mine !== typeToken;
|
|
130
|
+
typeStarting = true;
|
|
131
|
+
void import("./studio-type-checker.js")
|
|
132
|
+
.then(({ openTypeChecker }) => {
|
|
133
|
+
if (isStale())
|
|
134
|
+
return;
|
|
135
|
+
const checker = openTypeChecker(monaco, editor, () => {
|
|
136
|
+
if (life.disposed || mine !== typeToken)
|
|
137
|
+
return;
|
|
138
|
+
typeReady = true;
|
|
139
|
+
scheduleTypeStop();
|
|
140
|
+
});
|
|
141
|
+
if (isStale()) {
|
|
142
|
+
checker.stop();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
typeSession = checker;
|
|
146
|
+
})
|
|
147
|
+
.catch(() => { })
|
|
148
|
+
.finally(() => {
|
|
149
|
+
if (mine === typeToken)
|
|
150
|
+
typeStarting = false;
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
editor.onKeyDown((event) => {
|
|
154
|
+
const native = event.browserEvent;
|
|
155
|
+
if (native.metaKey || native.ctrlKey || native.altKey)
|
|
156
|
+
return;
|
|
157
|
+
if (typeReady)
|
|
158
|
+
scheduleTypeStop();
|
|
159
|
+
});
|
|
160
|
+
// A pointer outside the editor kills the checker in that event. The
|
|
161
|
+
// suggestion list is part of typing, so a press on it does not count.
|
|
162
|
+
const onLeave = (event) => {
|
|
163
|
+
const target = event.target;
|
|
164
|
+
if (!(target instanceof Node) || inTypeUi(target))
|
|
165
|
+
return;
|
|
166
|
+
stopTypes();
|
|
167
|
+
};
|
|
168
|
+
document.addEventListener('pointerdown', onLeave, true);
|
|
169
|
+
removeLeave = () => {
|
|
170
|
+
document.removeEventListener('pointerdown', onLeave, true);
|
|
171
|
+
};
|
|
172
|
+
editor.onDidBlurEditorText(() => {
|
|
173
|
+
queueMicrotask(() => {
|
|
174
|
+
if (life.disposed || editor.hasTextFocus())
|
|
175
|
+
return;
|
|
176
|
+
const next = document.activeElement;
|
|
177
|
+
if (next && inTypeUi(next))
|
|
178
|
+
return;
|
|
179
|
+
stopTypes();
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
editor.onDidChangeModelContent(() => {
|
|
183
|
+
if (session.current.setting)
|
|
184
|
+
return;
|
|
185
|
+
ensureTypes();
|
|
186
|
+
const value = editor.getValue();
|
|
187
|
+
session.current.dirty = value !== printed.current;
|
|
188
|
+
if (timer)
|
|
189
|
+
clearTimeout(timer);
|
|
190
|
+
timer = setTimeout(() => {
|
|
191
|
+
const applied = apply.current(value);
|
|
192
|
+
session.current.spans = applied.spans;
|
|
193
|
+
session.current.errors = applied.errors;
|
|
194
|
+
paint();
|
|
195
|
+
}, APPLY_MS);
|
|
196
|
+
});
|
|
197
|
+
paint();
|
|
198
|
+
})();
|
|
199
|
+
return () => {
|
|
200
|
+
life.disposed = true;
|
|
201
|
+
removeLeave?.();
|
|
202
|
+
stopTypes();
|
|
203
|
+
if (timer)
|
|
204
|
+
clearTimeout(timer);
|
|
205
|
+
const model = session.current.editor?.getModel();
|
|
206
|
+
session.current.editor?.dispose();
|
|
207
|
+
model?.dispose();
|
|
208
|
+
session.current.editor = undefined;
|
|
209
|
+
};
|
|
210
|
+
}, []);
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
const { editor } = session.current;
|
|
213
|
+
if (!editor || hold)
|
|
214
|
+
return;
|
|
215
|
+
if (session.current.dirty && editor.getValue() !== text)
|
|
216
|
+
return;
|
|
217
|
+
if (editor.getValue() === text) {
|
|
218
|
+
session.current.dirty = false;
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
session.current.setting = true;
|
|
222
|
+
editor.setValue(text);
|
|
223
|
+
session.current.setting = false;
|
|
224
|
+
session.current.dirty = false;
|
|
225
|
+
}, [text, hold]);
|
|
226
|
+
useEffect(() => {
|
|
227
|
+
session.current.editor?.updateOptions({ readOnly: isReadOnly });
|
|
228
|
+
}, [isReadOnly]);
|
|
229
|
+
useEffect(() => {
|
|
230
|
+
paintMarkers(session.current, issues);
|
|
231
|
+
}, [issues]);
|
|
232
|
+
return _jsx("div", { ref: node, className: "studio-fill" });
|
|
233
|
+
}
|
|
234
|
+
function marker(monaco, line, column, message) {
|
|
235
|
+
return {
|
|
236
|
+
startLineNumber: line,
|
|
237
|
+
startColumn: column,
|
|
238
|
+
endLineNumber: line,
|
|
239
|
+
endColumn: column + 1,
|
|
240
|
+
message,
|
|
241
|
+
severity: monaco.MarkerSeverity.Error,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
function issueMarkers(monaco, spans, issues) {
|
|
245
|
+
return issues.flatMap((issue) => {
|
|
246
|
+
const exact = issue.field ? `${issue.nodeId}.${issue.field}` : issue.nodeId;
|
|
247
|
+
const span = spans.find((item) => item.path === exact) ??
|
|
248
|
+
(issue.field ? spans.find((item) => item.path === issue.field) : undefined);
|
|
249
|
+
if (!span)
|
|
250
|
+
return [];
|
|
251
|
+
return [marker(monaco, span.line, span.column, issue.message)];
|
|
252
|
+
});
|
|
253
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Monaco editor and the contributions this view uses, without the other
|
|
3
|
+
* language grammars. `editor.api` is the widget. Typing, suggestions, hover,
|
|
4
|
+
* and find are registered below.
|
|
5
|
+
*
|
|
6
|
+
* Semantic tokens, inlay hints, and inline completions are left out. They ask
|
|
7
|
+
* the typechecker to walk the file continuously, which is the memory we are
|
|
8
|
+
* keeping down.
|
|
9
|
+
*/
|
|
10
|
+
import { editor, languages, MarkerSeverity, Uri } from 'monaco-editor/editor/editor.api';
|
|
11
|
+
import 'monaco-editor/editor/browser/coreCommands';
|
|
12
|
+
import 'monaco-editor/editor/browser/widget/codeEditor/codeEditorWidget';
|
|
13
|
+
import 'monaco-editor/editor/common/standaloneStrings';
|
|
14
|
+
import 'monaco-editor/editor/contrib/bracketMatching/browser/bracketMatching';
|
|
15
|
+
import 'monaco-editor/editor/contrib/caretOperations/browser/caretOperations';
|
|
16
|
+
import 'monaco-editor/editor/contrib/clipboard/browser/clipboard';
|
|
17
|
+
import 'monaco-editor/editor/contrib/comment/browser/comment';
|
|
18
|
+
import 'monaco-editor/editor/contrib/contextmenu/browser/contextmenu';
|
|
19
|
+
import 'monaco-editor/editor/contrib/cursorUndo/browser/cursorUndo';
|
|
20
|
+
import 'monaco-editor/editor/contrib/find/browser/findController';
|
|
21
|
+
import 'monaco-editor/editor/contrib/folding/browser/folding';
|
|
22
|
+
import 'monaco-editor/editor/contrib/gotoError/browser/gotoError';
|
|
23
|
+
import 'monaco-editor/editor/contrib/gotoError/browser/markerSelectionStatus';
|
|
24
|
+
import 'monaco-editor/editor/contrib/gotoSymbol/browser/goToCommands';
|
|
25
|
+
import 'monaco-editor/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition';
|
|
26
|
+
import 'monaco-editor/editor/contrib/hover/browser/hoverContribution';
|
|
27
|
+
import 'monaco-editor/editor/contrib/indentation/browser/indentation';
|
|
28
|
+
import 'monaco-editor/editor/contrib/linesOperations/browser/linesOperations';
|
|
29
|
+
import 'monaco-editor/editor/contrib/links/browser/links';
|
|
30
|
+
import 'monaco-editor/editor/contrib/multicursor/browser/multicursor';
|
|
31
|
+
import 'monaco-editor/editor/contrib/parameterHints/browser/parameterHints';
|
|
32
|
+
import 'monaco-editor/editor/contrib/placeholderText/browser/placeholderText.contribution';
|
|
33
|
+
import 'monaco-editor/editor/contrib/readOnlyMessage/browser/contribution';
|
|
34
|
+
import 'monaco-editor/editor/contrib/smartSelect/browser/smartSelect';
|
|
35
|
+
import 'monaco-editor/editor/contrib/snippet/browser/snippetController2';
|
|
36
|
+
import 'monaco-editor/editor/contrib/suggest/browser/suggestController';
|
|
37
|
+
import 'monaco-editor/editor/contrib/tokenization/browser/tokenization';
|
|
38
|
+
import 'monaco-editor/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter';
|
|
39
|
+
import 'monaco-editor/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators';
|
|
40
|
+
import 'monaco-editor/editor/contrib/wordHighlighter/browser/wordHighlighter';
|
|
41
|
+
import 'monaco-editor/editor/contrib/wordOperations/browser/wordOperations';
|
|
42
|
+
import 'monaco-editor/editor/contrib/wordPartOperations/browser/wordPartOperations';
|
|
43
|
+
import 'monaco-editor/features/find/register';
|
|
44
|
+
export { editor, languages, MarkerSeverity, Uri };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Monaco editor and the contributions this view uses, without the other
|
|
3
|
+
* language grammars. `editor.api` is the widget. Typing, suggestions, hover,
|
|
4
|
+
* and find are registered below.
|
|
5
|
+
*
|
|
6
|
+
* Semantic tokens, inlay hints, and inline completions are left out. They ask
|
|
7
|
+
* the typechecker to walk the file continuously, which is the memory we are
|
|
8
|
+
* keeping down.
|
|
9
|
+
*/
|
|
10
|
+
import { editor, languages, MarkerSeverity, Uri } from 'monaco-editor/editor/editor.api';
|
|
11
|
+
// Monaco's package exports append `.js`, so its icon sheets cannot be imported by specifier;
|
|
12
|
+
// the studio's Vite plugin resolves these two to the host's install.
|
|
13
|
+
import 'virtual:studio-codicons/codicon.css';
|
|
14
|
+
import 'virtual:studio-codicons/codicon-modifiers.css';
|
|
15
|
+
import 'monaco-editor/editor/browser/coreCommands';
|
|
16
|
+
import 'monaco-editor/editor/browser/widget/codeEditor/codeEditorWidget';
|
|
17
|
+
import 'monaco-editor/editor/common/standaloneStrings';
|
|
18
|
+
import 'monaco-editor/editor/contrib/bracketMatching/browser/bracketMatching';
|
|
19
|
+
import 'monaco-editor/editor/contrib/caretOperations/browser/caretOperations';
|
|
20
|
+
import 'monaco-editor/editor/contrib/clipboard/browser/clipboard';
|
|
21
|
+
import 'monaco-editor/editor/contrib/comment/browser/comment';
|
|
22
|
+
import 'monaco-editor/editor/contrib/contextmenu/browser/contextmenu';
|
|
23
|
+
import 'monaco-editor/editor/contrib/cursorUndo/browser/cursorUndo';
|
|
24
|
+
import 'monaco-editor/editor/contrib/find/browser/findController';
|
|
25
|
+
import 'monaco-editor/editor/contrib/folding/browser/folding';
|
|
26
|
+
import 'monaco-editor/editor/contrib/gotoError/browser/gotoError';
|
|
27
|
+
import 'monaco-editor/editor/contrib/gotoError/browser/markerSelectionStatus';
|
|
28
|
+
import 'monaco-editor/editor/contrib/gotoSymbol/browser/goToCommands';
|
|
29
|
+
import 'monaco-editor/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition';
|
|
30
|
+
import 'monaco-editor/editor/contrib/hover/browser/hoverContribution';
|
|
31
|
+
import 'monaco-editor/editor/contrib/indentation/browser/indentation';
|
|
32
|
+
import 'monaco-editor/editor/contrib/linesOperations/browser/linesOperations';
|
|
33
|
+
import 'monaco-editor/editor/contrib/links/browser/links';
|
|
34
|
+
import 'monaco-editor/editor/contrib/multicursor/browser/multicursor';
|
|
35
|
+
import 'monaco-editor/editor/contrib/parameterHints/browser/parameterHints';
|
|
36
|
+
import 'monaco-editor/editor/contrib/placeholderText/browser/placeholderText.contribution';
|
|
37
|
+
import 'monaco-editor/editor/contrib/readOnlyMessage/browser/contribution';
|
|
38
|
+
import 'monaco-editor/editor/contrib/smartSelect/browser/smartSelect';
|
|
39
|
+
import 'monaco-editor/editor/contrib/snippet/browser/snippetController2';
|
|
40
|
+
import 'monaco-editor/editor/contrib/suggest/browser/suggestController';
|
|
41
|
+
import 'monaco-editor/editor/contrib/tokenization/browser/tokenization';
|
|
42
|
+
import 'monaco-editor/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter';
|
|
43
|
+
import 'monaco-editor/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators';
|
|
44
|
+
import 'monaco-editor/editor/contrib/wordHighlighter/browser/wordHighlighter';
|
|
45
|
+
import 'monaco-editor/editor/contrib/wordOperations/browser/wordOperations';
|
|
46
|
+
import 'monaco-editor/editor/contrib/wordPartOperations/browser/wordPartOperations';
|
|
47
|
+
import 'monaco-editor/features/find/register';
|
|
48
|
+
export { editor, languages, MarkerSeverity, Uri };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { initialize } from 'monaco-editor/internal/common/initialize';
|
|
2
|
+
import { TypeScriptWorker } from 'monaco-editor/languages/features/typescript/tsWorker';
|
|
3
|
+
/**
|
|
4
|
+
* The package declarations are resolved when the file imports them. They are
|
|
5
|
+
* not compilation roots: a root is typechecked, and that is what held the
|
|
6
|
+
* memory.
|
|
7
|
+
*/
|
|
8
|
+
class StudioTypeScriptWorker extends TypeScriptWorker {
|
|
9
|
+
getScriptFileNames() {
|
|
10
|
+
return super.getScriptFileNames().filter((name) => name.startsWith('file:///agent'));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const scope = self;
|
|
14
|
+
scope.onmessage = () => {
|
|
15
|
+
initialize((ctx, createData) => new StudioTypeScriptWorker(ctx, createData));
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as Monaco from 'monaco-editor';
|
|
2
|
+
import type { editor, languages, MarkerSeverity, Uri } from './studio-monaco.ts';
|
|
3
|
+
export type MonacoApi = {
|
|
4
|
+
editor: typeof editor;
|
|
5
|
+
languages: typeof languages;
|
|
6
|
+
MarkerSeverity: typeof MarkerSeverity;
|
|
7
|
+
Uri: typeof Uri;
|
|
8
|
+
};
|
|
9
|
+
/** Package types for the open file. Call `stop` to terminate the worker. */
|
|
10
|
+
export declare function openTypeChecker(monaco: MonacoApi, codeEditor: Monaco.editor.IStandaloneCodeEditor, onReady: () => void): {
|
|
11
|
+
stop(): void;
|
|
12
|
+
};
|