@dxos/plugin-script 0.6.12-main.ed7cda7 → 0.6.12-staging.0b4bb48

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.
Files changed (179) hide show
  1. package/dist/lib/browser/{ScriptContainer-7DE7USCY.mjs → ScriptEditor-5Y3EROG3.mjs} +106 -257
  2. package/dist/lib/browser/ScriptEditor-5Y3EROG3.mjs.map +7 -0
  3. package/dist/lib/browser/TypescriptEditor-GPE72Y6I.mjs +9 -0
  4. package/dist/lib/browser/{chunk-G6FWCTGT.mjs → chunk-DL5XQRQM.mjs} +5 -7
  5. package/dist/lib/browser/chunk-DL5XQRQM.mjs.map +7 -0
  6. package/dist/lib/browser/{chunk-MDX7ACIK.mjs → chunk-JBACGDOJ.mjs} +6 -3
  7. package/dist/lib/browser/chunk-JBACGDOJ.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-MRGOT5RF.mjs +78 -0
  9. package/dist/lib/browser/chunk-MRGOT5RF.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-CAEANETO.mjs → chunk-O4LWBX6A.mjs} +2 -2
  11. package/dist/lib/browser/{chunk-CAEANETO.mjs.map → chunk-O4LWBX6A.mjs.map} +2 -2
  12. package/dist/lib/browser/{chunk-G6H56WFS.mjs → chunk-RHEZ5LUU.mjs} +2 -51
  13. package/dist/lib/browser/{chunk-G6H56WFS.mjs.map → chunk-RHEZ5LUU.mjs.map} +4 -4
  14. package/dist/lib/browser/edge/index.mjs +1 -3
  15. package/dist/lib/browser/index.mjs +61 -80
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/meta.mjs +1 -1
  19. package/dist/lib/browser/types/index.mjs +2 -2
  20. package/dist/lib/node/ScriptEditor-YCUQFWQM.cjs +526 -0
  21. package/dist/lib/node/ScriptEditor-YCUQFWQM.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-OJ77BZRH.cjs → TypescriptEditor-M3WWFIP2.cjs} +8 -19
  23. package/dist/lib/node/TypescriptEditor-M3WWFIP2.cjs.map +7 -0
  24. package/dist/lib/node/{chunk-ACLCRWDB.cjs → chunk-4GTXIELQ.cjs} +6 -44
  25. package/dist/lib/node/chunk-4GTXIELQ.cjs.map +7 -0
  26. package/dist/lib/node/chunk-4VMNBXWU.cjs +54 -0
  27. package/dist/lib/node/chunk-4VMNBXWU.cjs.map +7 -0
  28. package/dist/lib/node/{chunk-2PZKJXNP.cjs → chunk-5RBVXKXT.cjs} +6 -6
  29. package/dist/lib/node/{chunk-2PZKJXNP.cjs.map → chunk-5RBVXKXT.cjs.map} +2 -2
  30. package/dist/lib/node/chunk-IMLDKD5Y.cjs +111 -0
  31. package/dist/lib/node/chunk-IMLDKD5Y.cjs.map +7 -0
  32. package/dist/lib/node/{chunk-UZ3ZXEBF.cjs → chunk-PFH3ROEH.cjs} +8 -11
  33. package/dist/lib/node/chunk-PFH3ROEH.cjs.map +7 -0
  34. package/dist/lib/node/edge/index.cjs +8 -10
  35. package/dist/lib/node/edge/index.cjs.map +2 -2
  36. package/dist/lib/node/index.cjs +79 -93
  37. package/dist/lib/node/index.cjs.map +4 -4
  38. package/dist/lib/node/meta.cjs +3 -3
  39. package/dist/lib/node/meta.cjs.map +1 -1
  40. package/dist/lib/node/meta.json +1 -1
  41. package/dist/lib/node/types/index.cjs +5 -5
  42. package/dist/lib/node/types/index.cjs.map +1 -1
  43. package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
  44. package/dist/types/src/components/DebugPanel.d.ts.map +1 -0
  45. package/dist/types/src/components/{FrameContainer → ScriptBlock/FrameContainer}/FrameContainer.d.ts +1 -1
  46. package/dist/types/src/components/ScriptBlock/FrameContainer/FrameContainer.d.ts.map +1 -0
  47. package/dist/types/src/components/ScriptBlock/FrameContainer/frame.d.ts.map +1 -0
  48. package/dist/types/src/components/ScriptBlock/FrameContainer/index.d.ts.map +1 -0
  49. package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +3 -1
  50. package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -1
  51. package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts +1 -1
  52. package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +1 -1
  53. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts +15 -0
  54. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts.map +1 -0
  55. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts +13 -0
  56. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts.map +1 -0
  57. package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts +2 -0
  58. package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts.map +1 -0
  59. package/dist/types/src/components/ScriptEditor.d.ts +5 -4
  60. package/dist/types/src/components/ScriptEditor.d.ts.map +1 -1
  61. package/dist/types/src/components/Toolbar.d.ts +13 -0
  62. package/dist/types/src/components/Toolbar.d.ts.map +1 -0
  63. package/dist/types/src/components/Toolbar.stories.d.ts +14 -0
  64. package/dist/types/src/components/Toolbar.stories.d.ts.map +1 -0
  65. package/dist/types/src/components/{TypescriptEditor/TypescriptEditor.d.ts → TypescriptEditor.d.ts} +2 -1
  66. package/dist/types/src/components/TypescriptEditor.d.ts.map +1 -0
  67. package/dist/types/src/components/TypescriptEditor.stories.d.ts +10 -0
  68. package/dist/types/src/components/TypescriptEditor.stories.d.ts.map +1 -0
  69. package/dist/types/src/components/index.d.ts +2 -2
  70. package/dist/types/src/components/index.d.ts.map +1 -1
  71. package/dist/types/src/edge/functions.d.ts +0 -1
  72. package/dist/types/src/edge/functions.d.ts.map +1 -1
  73. package/dist/types/src/meta.d.ts +4 -1
  74. package/dist/types/src/meta.d.ts.map +1 -1
  75. package/dist/types/src/translations.d.ts +0 -2
  76. package/dist/types/src/translations.d.ts.map +1 -1
  77. package/dist/types/src/types/script.d.ts +4 -4
  78. package/dist/types/src/types/types.d.ts +3 -4
  79. package/dist/types/src/types/types.d.ts.map +1 -1
  80. package/package.json +49 -54
  81. package/src/ScriptPlugin.tsx +36 -21
  82. package/src/bundler/bundler.test.ts +2 -12
  83. package/src/components/{DebugPanel/DebugPanel.tsx → DebugPanel.tsx} +41 -48
  84. package/src/components/{FrameContainer → ScriptBlock/FrameContainer}/FrameContainer.tsx +1 -1
  85. package/src/components/ScriptBlock/ScriptBlock.stories.tsx +3 -4
  86. package/src/components/ScriptBlock/ScriptBlock.tsx +36 -10
  87. package/src/components/ScriptBlock/Splitter/Splitter.stories.tsx +37 -0
  88. package/src/components/ScriptBlock/Splitter/Splitter.tsx +52 -0
  89. package/src/components/{Toolbar → ScriptBlock/Splitter}/index.ts +1 -1
  90. package/src/components/ScriptEditor.tsx +46 -47
  91. package/src/components/{Toolbar/Toolbar.stories.tsx → Toolbar.stories.tsx} +1 -10
  92. package/src/components/Toolbar.tsx +147 -0
  93. package/src/components/{TypescriptEditor/TypescriptEditor.stories.tsx → TypescriptEditor.stories.tsx} +28 -7
  94. package/src/components/{TypescriptEditor/TypescriptEditor.tsx → TypescriptEditor.tsx} +3 -1
  95. package/src/components/index.ts +2 -3
  96. package/src/edge/functions.ts +0 -1
  97. package/src/meta.tsx +6 -2
  98. package/src/translations.ts +0 -2
  99. package/src/types/types.ts +5 -9
  100. package/dist/lib/browser/ScriptContainer-7DE7USCY.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-G6FWCTGT.mjs.map +0 -7
  102. package/dist/lib/browser/chunk-MDX7ACIK.mjs.map +0 -7
  103. package/dist/lib/node/ScriptContainer-J76LKPAM.cjs +0 -667
  104. package/dist/lib/node/ScriptContainer-J76LKPAM.cjs.map +0 -7
  105. package/dist/lib/node/chunk-ACLCRWDB.cjs.map +0 -7
  106. package/dist/lib/node/chunk-OJ77BZRH.cjs.map +0 -7
  107. package/dist/lib/node/chunk-UZ3ZXEBF.cjs.map +0 -7
  108. package/dist/lib/node-esm/ScriptContainer-F6ACEA63.mjs +0 -665
  109. package/dist/lib/node-esm/ScriptContainer-F6ACEA63.mjs.map +0 -7
  110. package/dist/lib/node-esm/chunk-2NX3HWPM.mjs +0 -245
  111. package/dist/lib/node-esm/chunk-2NX3HWPM.mjs.map +0 -7
  112. package/dist/lib/node-esm/chunk-7BZDZF7Z.mjs +0 -47
  113. package/dist/lib/node-esm/chunk-7BZDZF7Z.mjs.map +0 -7
  114. package/dist/lib/node-esm/chunk-LDLNTVAK.mjs +0 -280
  115. package/dist/lib/node-esm/chunk-LDLNTVAK.mjs.map +0 -7
  116. package/dist/lib/node-esm/chunk-TZ3Z4SII.mjs +0 -20
  117. package/dist/lib/node-esm/chunk-TZ3Z4SII.mjs.map +0 -7
  118. package/dist/lib/node-esm/edge/index.mjs +0 -22
  119. package/dist/lib/node-esm/index.mjs +0 -311
  120. package/dist/lib/node-esm/index.mjs.map +0 -7
  121. package/dist/lib/node-esm/meta.json +0 -1
  122. package/dist/lib/node-esm/meta.mjs +0 -10
  123. package/dist/lib/node-esm/meta.mjs.map +0 -7
  124. package/dist/lib/node-esm/types/index.mjs +0 -13
  125. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  126. package/dist/types/src/components/DebugPanel/DebugPanel.d.ts.map +0 -1
  127. package/dist/types/src/components/DebugPanel/index.d.ts +0 -2
  128. package/dist/types/src/components/DebugPanel/index.d.ts.map +0 -1
  129. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +0 -1
  130. package/dist/types/src/components/FrameContainer/frame.d.ts.map +0 -1
  131. package/dist/types/src/components/FrameContainer/index.d.ts.map +0 -1
  132. package/dist/types/src/components/ScriptContainer.d.ts +0 -5
  133. package/dist/types/src/components/ScriptContainer.d.ts.map +0 -1
  134. package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts +0 -6
  135. package/dist/types/src/components/ScriptSettings/ScriptSettings.d.ts.map +0 -1
  136. package/dist/types/src/components/ScriptSettings/index.d.ts +0 -2
  137. package/dist/types/src/components/ScriptSettings/index.d.ts.map +0 -1
  138. package/dist/types/src/components/Toolbar/Toolbar.d.ts +0 -23
  139. package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +0 -1
  140. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +0 -17
  141. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +0 -1
  142. package/dist/types/src/components/Toolbar/index.d.ts +0 -2
  143. package/dist/types/src/components/Toolbar/index.d.ts.map +0 -1
  144. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +0 -1
  145. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +0 -10
  146. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +0 -1
  147. package/dist/types/src/components/TypescriptEditor/index.d.ts +0 -2
  148. package/dist/types/src/components/TypescriptEditor/index.d.ts.map +0 -1
  149. package/dist/types/src/templates/chat.d.ts +0 -6
  150. package/dist/types/src/templates/chat.d.ts.map +0 -1
  151. package/dist/types/src/templates/chess.d.ts +0 -6
  152. package/dist/types/src/templates/chess.d.ts.map +0 -1
  153. package/dist/types/src/templates/echo.d.ts +0 -6
  154. package/dist/types/src/templates/echo.d.ts.map +0 -1
  155. package/dist/types/src/templates/email.d.ts +0 -6
  156. package/dist/types/src/templates/email.d.ts.map +0 -1
  157. package/dist/types/src/templates/forex.d.ts +0 -6
  158. package/dist/types/src/templates/forex.d.ts.map +0 -1
  159. package/dist/types/src/templates.d.ts +0 -8
  160. package/dist/types/src/templates.d.ts.map +0 -1
  161. package/src/components/DebugPanel/index.ts +0 -5
  162. package/src/components/ScriptContainer.tsx +0 -22
  163. package/src/components/ScriptSettings/ScriptSettings.tsx +0 -47
  164. package/src/components/ScriptSettings/index.ts +0 -5
  165. package/src/components/Toolbar/Toolbar.tsx +0 -180
  166. package/src/components/TypescriptEditor/index.ts +0 -5
  167. package/src/templates/chat.ts +0 -102
  168. package/src/templates/chess.ts +0 -41
  169. package/src/templates/echo.ts +0 -15
  170. package/src/templates/email.ts +0 -38
  171. package/src/templates/forex.ts +0 -21
  172. package/src/templates.ts +0 -54
  173. /package/dist/lib/{node-esm/edge/index.mjs.map → browser/TypescriptEditor-GPE72Y6I.mjs.map} +0 -0
  174. /package/dist/types/src/components/{DebugPanel/DebugPanel.d.ts → DebugPanel.d.ts} +0 -0
  175. /package/dist/types/src/components/{FrameContainer → ScriptBlock/FrameContainer}/frame.d.ts +0 -0
  176. /package/dist/types/src/components/{FrameContainer → ScriptBlock/FrameContainer}/index.d.ts +0 -0
  177. /package/src/components/{FrameContainer → ScriptBlock/FrameContainer}/frame.html +0 -0
  178. /package/src/components/{FrameContainer → ScriptBlock/FrameContainer}/frame.tsx +0 -0
  179. /package/src/components/{FrameContainer → ScriptBlock/FrameContainer}/index.ts +0 -0
@@ -1,311 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- Bundler,
4
- initializeBundler,
5
- templates
6
- } from "./chunk-LDLNTVAK.mjs";
7
- import {
8
- FunctionType,
9
- ScriptAction,
10
- ScriptType
11
- } from "./chunk-7BZDZF7Z.mjs";
12
- import {
13
- SCRIPT_PLUGIN,
14
- meta_default
15
- } from "./chunk-TZ3Z4SII.mjs";
16
-
17
- // packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx
18
- import { Code } from "@phosphor-icons/react";
19
- import wasmUrl from "esbuild-wasm/esbuild.wasm?url";
20
- import React3 from "react";
21
- import { parseIntentPlugin, resolvePlugin, NavigationAction } from "@dxos/app-framework";
22
- import { create } from "@dxos/echo-schema";
23
- import { parseClientPlugin } from "@dxos/plugin-client";
24
- import { createExtension, isActionGroup } from "@dxos/plugin-graph";
25
- import { TextType } from "@dxos/plugin-markdown/types";
26
- import { SpaceAction } from "@dxos/plugin-space";
27
- import { loadObjectReferences } from "@dxos/react-client/echo";
28
-
29
- // packages/plugins/experimental/plugin-script/src/compiler/compiler.ts
30
- import { createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment } from "@typescript/vfs";
31
- import ts from "typescript";
32
- import { invariant } from "@dxos/invariant";
33
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/compiler/compiler.ts";
34
- var defaultOptions = {
35
- lib: [
36
- "DOM",
37
- "es2022"
38
- ],
39
- target: ts.ScriptTarget.ES2022
40
- };
41
- var Compiler = class {
42
- constructor(_options = defaultOptions) {
43
- this._options = _options;
44
- }
45
- async initialize() {
46
- if (this._env) {
47
- return;
48
- }
49
- this._fsMap = await createDefaultMapFromCDN(this._options, "5.5.4", true, ts);
50
- const system = createSystem(this._fsMap);
51
- this._env = createVirtualTypeScriptEnvironment(system, [], ts, this._options);
52
- }
53
- get environment() {
54
- invariant(this._env, "Compiler environment not initialized.", {
55
- F: __dxlog_file,
56
- L: 39,
57
- S: this,
58
- A: [
59
- "this._env",
60
- "'Compiler environment not initialized.'"
61
- ]
62
- });
63
- return this._env;
64
- }
65
- setFile(fileName, content) {
66
- invariant(this._fsMap, "File system map not initialized.", {
67
- F: __dxlog_file,
68
- L: 44,
69
- S: this,
70
- A: [
71
- "this._fsMap",
72
- "'File system map not initialized.'"
73
- ]
74
- });
75
- this.environment.createFile(fileName, content);
76
- }
77
- compile(fileName) {
78
- return this.environment.languageService.getEmitOutput(fileName);
79
- }
80
- };
81
-
82
- // packages/plugins/experimental/plugin-script/src/components/index.ts
83
- import React2 from "react";
84
-
85
- // packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx
86
- import React from "react";
87
- import { SettingsValue } from "@dxos/plugin-settings";
88
- import { useClient } from "@dxos/react-client";
89
- import { Button, useTranslation } from "@dxos/react-ui";
90
- var ScriptSettings = ({ settings }) => {
91
- const { t } = useTranslation(SCRIPT_PLUGIN);
92
- const client = useClient();
93
- const handleAuthenticate = async () => {
94
- const { identityKey } = client.halo.identity.get();
95
- await client.halo.writeCredentials([
96
- {
97
- issuer: identityKey,
98
- issuanceDate: /* @__PURE__ */ new Date(),
99
- subject: {
100
- id: identityKey,
101
- assertion: {
102
- "@type": "dxos.halo.credentials.ServiceAccess",
103
- serverName: "hub.dxos.network",
104
- serverKey: identityKey,
105
- identityKey,
106
- capabilities: [
107
- "composer:beta"
108
- ]
109
- }
110
- }
111
- }
112
- ]);
113
- };
114
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SettingsValue, {
115
- label: t("authenticate action label")
116
- }, /* @__PURE__ */ React.createElement(Button, {
117
- onClick: handleAuthenticate
118
- }, t("authenticate button label"))));
119
- };
120
-
121
- // packages/plugins/experimental/plugin-script/src/components/index.ts
122
- var ScriptContainer = React2.lazy(() => import("./ScriptContainer-F6ACEA63.mjs"));
123
-
124
- // packages/plugins/experimental/plugin-script/src/translations.ts
125
- var translations_default = [
126
- {
127
- "en-US": {
128
- [SCRIPT_PLUGIN]: {
129
- "plugin name": "Scripts",
130
- "object title placeholder": "New script",
131
- "create object label": "Create script",
132
- "create stack section label": "Create script",
133
- "binding placeholder": "Function name",
134
- "function request placeholder": "Function request",
135
- "deploy label": "Deploy",
136
- "deployed label": "Current version of the script is deployed",
137
- "upload failed label": "Upload failed",
138
- "copy link label": "Copy function link",
139
- "format label": "Format",
140
- "toggle details label": "Toggle details panel",
141
- "authenticate action label": "Authenticate functions service",
142
- "authenticate button label": "Authenticate"
143
- }
144
- }
145
- }
146
- ];
147
-
148
- // packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx
149
- var ScriptPlugin = () => {
150
- const compiler = new Compiler();
151
- return {
152
- meta: meta_default,
153
- initialize: async () => {
154
- await compiler.initialize();
155
- compiler.setFile("/src/typings.d.ts", "declare module 'https://*';");
156
- compiler.setFile("/src/runtime.ts", `
157
- export const Filter: any = {};
158
- export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;
159
- export const functionHandler = (handler: FunctionHandler) => handler;
160
- `);
161
- await initializeBundler({
162
- wasmUrl
163
- });
164
- },
165
- provides: {
166
- settings: {},
167
- metadata: {
168
- records: {
169
- [ScriptType.typename]: {
170
- placeholder: [
171
- "object title placeholder",
172
- {
173
- ns: SCRIPT_PLUGIN
174
- }
175
- ],
176
- icon: (props) => /* @__PURE__ */ React3.createElement(Code, props),
177
- // TODO(wittjosiah): Move out of metadata.
178
- loadReferences: (script) => loadObjectReferences(script, (script2) => [
179
- script2.source
180
- ])
181
- }
182
- }
183
- },
184
- translations: translations_default,
185
- echo: {
186
- schema: [
187
- ScriptType,
188
- FunctionType
189
- ]
190
- },
191
- space: {
192
- onSpaceCreate: {
193
- label: [
194
- "create object label",
195
- {
196
- ns: SCRIPT_PLUGIN
197
- }
198
- ],
199
- action: ScriptAction.CREATE
200
- }
201
- },
202
- graph: {
203
- builder: (plugins) => {
204
- const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;
205
- const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;
206
- if (!client || !dispatch) {
207
- return [];
208
- }
209
- return createExtension({
210
- id: ScriptAction.CREATE,
211
- filter: (node) => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),
212
- actions: ({ node }) => {
213
- const id = node.id.split("/").at(-1);
214
- const [spaceId, objectId] = id?.split(":") ?? [];
215
- const space = client.spaces.get().find((space2) => space2.id === spaceId);
216
- const object = objectId && space?.db.getObjectById(objectId);
217
- const target = objectId ? object : space;
218
- if (!target) {
219
- return;
220
- }
221
- return [
222
- {
223
- id: `${SCRIPT_PLUGIN}/create/${node.id}`,
224
- data: async () => {
225
- await dispatch([
226
- {
227
- plugin: SCRIPT_PLUGIN,
228
- action: ScriptAction.CREATE
229
- },
230
- {
231
- action: SpaceAction.ADD_OBJECT,
232
- data: {
233
- target
234
- }
235
- },
236
- {
237
- action: NavigationAction.OPEN
238
- }
239
- ]);
240
- },
241
- properties: {
242
- label: [
243
- "create object label",
244
- {
245
- ns: SCRIPT_PLUGIN
246
- }
247
- ],
248
- icon: "ph--code--regular",
249
- testId: "scriptPlugin.createObject"
250
- }
251
- }
252
- ];
253
- }
254
- });
255
- }
256
- },
257
- surface: {
258
- component: ({ data, role }) => {
259
- switch (role) {
260
- case "settings": {
261
- return data.plugin === meta_default.id ? /* @__PURE__ */ React3.createElement(ScriptSettings, {
262
- settings: {}
263
- }) : null;
264
- }
265
- case "article": {
266
- if (data.object instanceof ScriptType) {
267
- return /* @__PURE__ */ React3.createElement(ScriptContainer, {
268
- script: data.object,
269
- env: compiler.environment
270
- });
271
- }
272
- break;
273
- }
274
- }
275
- return null;
276
- }
277
- },
278
- intent: {
279
- resolver: (intent) => {
280
- switch (intent.action) {
281
- case ScriptAction.CREATE: {
282
- return {
283
- data: create(ScriptType, {
284
- source: create(TextType, {
285
- content: templates[0].source
286
- })
287
- })
288
- };
289
- }
290
- }
291
- }
292
- }
293
- }
294
- };
295
- };
296
-
297
- // packages/plugins/experimental/plugin-script/src/index.ts
298
- var src_default = ScriptPlugin;
299
- export {
300
- Bundler,
301
- Compiler,
302
- FunctionType,
303
- ScriptAction,
304
- ScriptContainer,
305
- ScriptPlugin,
306
- ScriptSettings,
307
- ScriptType,
308
- src_default as default,
309
- initializeBundler
310
- };
311
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/ScriptPlugin.tsx", "../../../src/compiler/compiler.ts", "../../../src/components/index.ts", "../../../src/components/ScriptSettings/ScriptSettings.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Code, type IconProps } from '@phosphor-icons/react';\n// @ts-ignore\nimport wasmUrl from 'esbuild-wasm/esbuild.wasm?url';\nimport React from 'react';\n\nimport { parseIntentPlugin, type PluginDefinition, resolvePlugin, NavigationAction } from '@dxos/app-framework';\nimport { create } from '@dxos/echo-schema';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { type ActionGroup, createExtension, isActionGroup } from '@dxos/plugin-graph';\nimport { TextType } from '@dxos/plugin-markdown/types';\nimport { SpaceAction } from '@dxos/plugin-space';\nimport { loadObjectReferences } from '@dxos/react-client/echo';\n\nimport { initializeBundler } from './bundler';\nimport { Compiler } from './compiler';\nimport { ScriptContainer, ScriptSettings } from './components';\nimport meta, { SCRIPT_PLUGIN } from './meta';\nimport { templates } from './templates';\nimport translations from './translations';\nimport { FunctionType, ScriptType } from './types';\nimport { ScriptAction, type ScriptPluginProvides } from './types';\n\nexport const ScriptPlugin = (): PluginDefinition<ScriptPluginProvides> => {\n const compiler = new Compiler();\n\n return {\n meta,\n initialize: async () => {\n await compiler.initialize();\n // TODO(wittjosiah): Fetch types for https modules.\n compiler.setFile('/src/typings.d.ts', \"declare module 'https://*';\");\n // TODO(wittjosiah): Proper function handler types.\n // TODO(wittjosiah): Remove.\n compiler.setFile(\n '/src/runtime.ts',\n `\n export const Filter: any = {};\n export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;\n export const functionHandler = (handler: FunctionHandler) => handler;\n `,\n );\n await initializeBundler({ wasmUrl });\n },\n provides: {\n settings: {},\n metadata: {\n records: {\n [ScriptType.typename]: {\n placeholder: ['object title placeholder', { ns: SCRIPT_PLUGIN }],\n icon: (props: IconProps) => <Code {...props} />,\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (script: ScriptType) => loadObjectReferences(script, (script) => [script.source]),\n },\n },\n },\n translations,\n echo: {\n schema: [ScriptType, FunctionType],\n },\n space: {\n onSpaceCreate: {\n label: ['create object label', { ns: SCRIPT_PLUGIN }],\n action: ScriptAction.CREATE,\n },\n },\n graph: {\n builder: (plugins) => {\n const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;\n if (!client || !dispatch) {\n return [];\n }\n\n return createExtension({\n id: ScriptAction.CREATE,\n filter: (node): node is ActionGroup => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),\n actions: ({ node }) => {\n const id = node.id.split('/').at(-1);\n const [spaceId, objectId] = id?.split(':') ?? [];\n const space = client.spaces.get().find((space) => space.id === spaceId);\n const object = objectId && space?.db.getObjectById(objectId);\n const target = objectId ? object : space;\n if (!target) {\n return;\n }\n\n return [\n {\n id: `${SCRIPT_PLUGIN}/create/${node.id}`,\n data: async () => {\n await dispatch([\n { plugin: SCRIPT_PLUGIN, action: ScriptAction.CREATE },\n { action: SpaceAction.ADD_OBJECT, data: { target } },\n { action: NavigationAction.OPEN },\n ]);\n },\n properties: {\n label: ['create object label', { ns: SCRIPT_PLUGIN }],\n icon: 'ph--code--regular',\n testId: 'scriptPlugin.createObject',\n },\n },\n ];\n },\n });\n },\n },\n surface: {\n component: ({ data, role }) => {\n switch (role) {\n case 'settings': {\n return data.plugin === meta.id ? <ScriptSettings settings={{}} /> : null;\n }\n\n case 'article': {\n if (data.object instanceof ScriptType) {\n return <ScriptContainer script={data.object} env={compiler.environment} />;\n }\n break;\n }\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case ScriptAction.CREATE: {\n return { data: create(ScriptType, { source: create(TextType, { content: templates[0].source }) }) };\n }\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n createDefaultMapFromCDN,\n createSystem,\n createVirtualTypeScriptEnvironment,\n type VirtualTypeScriptEnvironment,\n} from '@typescript/vfs';\nimport ts from 'typescript';\n\nimport { invariant } from '@dxos/invariant';\n\nconst defaultOptions: ts.CompilerOptions = {\n lib: ['DOM', 'es2022'],\n target: ts.ScriptTarget.ES2022,\n};\n\nexport class Compiler {\n private _env: VirtualTypeScriptEnvironment | undefined;\n private _fsMap: Map<string, string> | undefined;\n\n constructor(private readonly _options: ts.CompilerOptions = defaultOptions) {}\n\n async initialize() {\n if (this._env) {\n return;\n }\n\n // TODO(wittjosiah): Figure out how to get workers working in plugin packages.\n // https://github.com/val-town/codemirror-ts?tab=readme-ov-file#setup-worker\n this._fsMap = await createDefaultMapFromCDN(this._options, '5.5.4', true, ts);\n const system = createSystem(this._fsMap);\n this._env = createVirtualTypeScriptEnvironment(system, [], ts, this._options);\n }\n\n get environment() {\n invariant(this._env, 'Compiler environment not initialized.');\n return this._env;\n }\n\n setFile(fileName: string, content: string) {\n invariant(this._fsMap, 'File system map not initialized.');\n this.environment.createFile(fileName, content);\n }\n\n compile(fileName: string) {\n return this.environment.languageService.getEmitOutput(fileName);\n }\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nexport * from './ScriptSettings';\n\nexport const ScriptContainer = React.lazy(() => import('./ScriptContainer'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { SettingsValue } from '@dxos/plugin-settings';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\nimport { useClient } from '@dxos/react-client';\nimport { Button, useTranslation } from '@dxos/react-ui';\n\nimport { SCRIPT_PLUGIN } from '../../meta';\nimport { type ScriptSettingsProps } from '../../types';\n\nexport const ScriptSettings = ({ settings }: { settings: ScriptSettingsProps }) => {\n const { t } = useTranslation(SCRIPT_PLUGIN);\n const client = useClient();\n\n // TODO(burdon): Check token.\n const handleAuthenticate = async () => {\n const { identityKey } = client.halo.identity.get()!;\n await client.halo.writeCredentials([\n {\n issuer: identityKey,\n issuanceDate: new Date(),\n subject: {\n id: identityKey,\n assertion: {\n '@type': 'dxos.halo.credentials.ServiceAccess',\n serverName: 'hub.dxos.network',\n serverKey: identityKey,\n identityKey,\n capabilities: ['composer:beta'],\n },\n },\n } satisfies Credential,\n ]);\n };\n\n return (\n <>\n <SettingsValue label={t('authenticate action label')}>\n <Button onClick={handleAuthenticate}>{t('authenticate button label')}</Button>\n </SettingsValue>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { SCRIPT_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [SCRIPT_PLUGIN]: {\n 'plugin name': 'Scripts',\n 'object title placeholder': 'New script',\n 'create object label': 'Create script',\n 'create stack section label': 'Create script',\n 'binding placeholder': 'Function name',\n 'function request placeholder': 'Function request',\n 'deploy label': 'Deploy',\n 'deployed label': 'Current version of the script is deployed',\n 'upload failed label': 'Upload failed',\n 'copy link label': 'Copy function link',\n 'format label': 'Format',\n 'toggle details label': 'Toggle details panel',\n 'authenticate action label': 'Authenticate functions service',\n 'authenticate button label': 'Authenticate',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ScriptPlugin } from './ScriptPlugin';\n\nexport default ScriptPlugin;\n\nexport * from './bundler';\nexport * from './compiler';\nexport * from './components';\nexport * from './types';\n\nexport * from './ScriptPlugin';\n"],
5
- "mappings": "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",
6
- "names": ["Code", "wasmUrl", "React", "parseIntentPlugin", "resolvePlugin", "NavigationAction", "create", "parseClientPlugin", "createExtension", "isActionGroup", "TextType", "SpaceAction", "loadObjectReferences", "createDefaultMapFromCDN", "createSystem", "createVirtualTypeScriptEnvironment", "ts", "invariant", "defaultOptions", "lib", "target", "ScriptTarget", "ES2022", "Compiler", "constructor", "_options", "initialize", "_env", "_fsMap", "system", "environment", "setFile", "fileName", "content", "createFile", "compile", "languageService", "getEmitOutput", "React", "React", "SettingsValue", "useClient", "Button", "useTranslation", "ScriptSettings", "settings", "t", "useTranslation", "SCRIPT_PLUGIN", "client", "useClient", "handleAuthenticate", "identityKey", "halo", "identity", "get", "writeCredentials", "issuer", "issuanceDate", "Date", "subject", "id", "assertion", "serverName", "serverKey", "capabilities", "SettingsValue", "label", "Button", "onClick", "ScriptContainer", "React", "lazy", "SCRIPT_PLUGIN", "ScriptPlugin", "compiler", "Compiler", "meta", "initialize", "setFile", "initializeBundler", "wasmUrl", "provides", "settings", "metadata", "records", "ScriptType", "typename", "placeholder", "ns", "SCRIPT_PLUGIN", "icon", "props", "React", "Code", "loadReferences", "script", "loadObjectReferences", "source", "translations", "echo", "schema", "FunctionType", "space", "onSpaceCreate", "label", "action", "ScriptAction", "CREATE", "graph", "builder", "plugins", "client", "resolvePlugin", "parseClientPlugin", "dispatch", "parseIntentPlugin", "intent", "createExtension", "id", "filter", "node", "isActionGroup", "startsWith", "SpaceAction", "ADD_OBJECT", "actions", "split", "at", "spaceId", "objectId", "spaces", "get", "find", "object", "db", "getObjectById", "target", "data", "plugin", "NavigationAction", "OPEN", "properties", "testId", "surface", "component", "role", "ScriptSettings", "ScriptContainer", "env", "environment", "resolver", "create", "TextType", "content", "templates", "ScriptPlugin"]
7
- }
@@ -1 +0,0 @@
1
- {"inputs":{"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytes":10228,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytes":1702,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytes":2750,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytes":15171,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytes":907,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/functions.ts","kind":"import-statement","original":"./functions"},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytes":28987,"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytes":522,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytes":5747,"imports":[{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/meta.tsx":{"bytes":1415,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytes":5063,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytes":559,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx","kind":"import-statement","original":"./ScriptSettings"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytes":30646,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytes":543,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx","kind":"import-statement","original":"./DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytes":16809,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytes":8497,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytes":563,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"}],"format":"esm"},"raw-loader:./templates/chat.ts?raw":{"bytes":2789,"imports":[]},"raw-loader:./templates/chess.ts?raw":{"bytes":887,"imports":[]},"raw-loader:./templates/echo.ts?raw":{"bytes":289,"imports":[]},"raw-loader:./templates/email.ts?raw":{"bytes":793,"imports":[]},"raw-loader:./templates/forex.ts?raw":{"bytes":436,"imports":[]},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytes":4007,"imports":[{"path":"raw-loader:./templates/chat.ts?raw","kind":"import-statement","original":"./templates/chat.ts?raw"},{"path":"raw-loader:./templates/chess.ts?raw","kind":"import-statement","original":"./templates/chess.ts?raw"},{"path":"raw-loader:./templates/echo.ts?raw","kind":"import-statement","original":"./templates/echo.ts?raw"},{"path":"raw-loader:./templates/email.ts?raw","kind":"import-statement","original":"./templates/email.ts?raw"},{"path":"raw-loader:./templates/forex.ts?raw","kind":"import-statement","original":"./templates/forex.ts?raw"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/script.ts":{"bytes":3930,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytes":1763,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytes":600,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/types/script.ts","kind":"import-statement","original":"./script"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":25633,"imports":[{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"./DebugPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts","kind":"import-statement","original":"./TypescriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"../bundler"},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"../templates"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytes":2683,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","kind":"import-statement","original":"./ScriptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytes":951,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts","kind":"import-statement","original":"./ScriptSettings"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","kind":"dynamic-import","original":"./ScriptContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytes":2998,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytes":20284,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/meta.tsx","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"./templates"},{"path":"packages/plugins/experimental/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytes":1149,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-script/dist/lib/node-esm/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/edge/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2NX3HWPM.mjs","kind":"import-statement"}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/plugins/experimental/plugin-script/src/edge/index.ts","inputs":{},"bytes":556},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15839},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7BZDZF7Z.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-TZ3Z4SII.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/plugin-settings","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-F6ACEA63.mjs","kind":"dynamic-import"}],"exports":["Bundler","Compiler","FunctionType","ScriptAction","ScriptContainer","ScriptPlugin","ScriptSettings","ScriptType","default","initializeBundler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5123},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":1440},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytesInOutput":111},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytesInOutput":1169},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":804},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":9808},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-TZ3Z4SII.mjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.tsx","inputs":{},"bytes":253},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7BZDZF7Z.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-TZ3Z4SII.mjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":302},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-F6ACEA63.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":42900},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-F6ACEA63.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2NX3HWPM.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7BZDZF7Z.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-TZ3Z4SII.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","inputs":{"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytesInOutput":625},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytesInOutput":6319},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytesInOutput":8340},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":4695},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytesInOutput":1915},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytesInOutput":0}},"bytes":23040},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2NX3HWPM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15156},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2NX3HWPM.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytesInOutput":221},"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytesInOutput":2132},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytesInOutput":3546},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":7079},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21091},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-LDLNTVAK.mjs":{"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler","templates"],"inputs":{"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytesInOutput":6790},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytesInOutput":0},"raw-loader:./templates/chat.ts?raw":{"bytesInOutput":2921},"raw-loader:./templates/chess.ts?raw":{"bytesInOutput":952},"raw-loader:./templates/echo.ts?raw":{"bytesInOutput":327},"raw-loader:./templates/email.ts?raw":{"bytesInOutput":855},"raw-loader:./templates/forex.ts?raw":{"bytesInOutput":481},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytesInOutput":703}},"bytes":13556},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7BZDZF7Z.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2817},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-7BZDZF7Z.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-TZ3Z4SII.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"exports":["FunctionType","ScriptAction","ScriptType"],"inputs":{"packages/plugins/experimental/plugin-script/src/types/script.ts":{"bytesInOutput":875},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytesInOutput":167}},"bytes":1427},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-TZ3Z4SII.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":665},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-TZ3Z4SII.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.tsx":{"bytesInOutput":275}},"bytes":517}}}
@@ -1,10 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- SCRIPT_PLUGIN,
4
- meta_default
5
- } from "./chunk-TZ3Z4SII.mjs";
6
- export {
7
- SCRIPT_PLUGIN,
8
- meta_default as default
9
- };
10
- //# sourceMappingURL=meta.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,13 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- FunctionType,
4
- ScriptAction,
5
- ScriptType
6
- } from "../chunk-7BZDZF7Z.mjs";
7
- import "../chunk-TZ3Z4SII.mjs";
8
- export {
9
- FunctionType,
10
- ScriptAction,
11
- ScriptType
12
- };
13
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"DebugPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/DebugPanel/DebugPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAKL,KAAK,eAAe,EAIrB,MAAM,gBAAgB,CAAC;AAaxB,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,oEAAqE,eAAe,sBAoL1G,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './DebugPanel';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/DebugPanel/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FrameContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/FrameContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,oCAA4C,mBAAmB,sBAyDzF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/frame.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FrameContainer/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { type ScriptEditorProps } from './ScriptEditor';
3
- declare const ScriptContainer: ({ script, ...props }: ScriptEditorProps) => React.JSX.Element;
4
- export default ScriptContainer;
5
- //# sourceMappingURL=ScriptContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScriptContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/ScriptContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,QAAA,MAAM,eAAe,yBAA0B,iBAAiB,sBAO/D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { type ScriptSettingsProps } from '../../types';
3
- export declare const ScriptSettings: ({ settings }: {
4
- settings: ScriptSettingsProps;
5
- }) => React.JSX.Element;
6
- //# sourceMappingURL=ScriptSettings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScriptSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptSettings/ScriptSettings.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,eAAO,MAAM,cAAc,iBAAkB;IAAE,QAAQ,EAAE,mBAAmB,CAAA;CAAE,sBAgC7E,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './ScriptSettings';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptSettings/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC"}
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { type ThemedClassName } from '@dxos/react-ui';
3
- import { type Template } from '../../templates';
4
- export type ToolbarProps = ThemedClassName<{
5
- deployed?: boolean;
6
- error?: string;
7
- functionUrl?: string;
8
- onDeploy?: () => Promise<void>;
9
- onFormat?: () => Promise<void>;
10
- } & TemplateSelectProps & ViewSelectorProps>;
11
- export declare const Toolbar: ({ classNames, deployed, error, functionUrl, view, templates, onDeploy, onFormat, onViewChange, onTemplateSelect, }: ToolbarProps) => React.JSX.Element;
12
- export type ViewType = 'editor' | 'split' | 'preview';
13
- export type TemplateSelectProps = {
14
- templates?: Template[];
15
- onTemplateSelect?: (id: string) => void;
16
- };
17
- export declare const TemplateSelect: ({ templates, onTemplateSelect }: TemplateSelectProps) => React.JSX.Element;
18
- export type ViewSelectorProps = {
19
- view?: ViewType;
20
- onViewChange?: (view: ViewType) => void;
21
- };
22
- export declare const ViewSelector: ({ view, onViewChange }: ViewSelectorProps) => React.JSX.Element;
23
- //# sourceMappingURL=Toolbar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAKL,KAAK,eAAe,EAOrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,eAAe,CACxC;IACE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC,GAAG,mBAAmB,GACrB,iBAAiB,CACpB,CAAC;AAEF,eAAO,MAAM,OAAO,uHAWjB,YAAY,sBA8Dd,CAAC;AA0BF,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,cAAc,oCAA0C,mBAAmB,sBAkBvF,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,YAAY,2BAA4B,iBAAiB,sBAcrE,CAAC"}
@@ -1,17 +0,0 @@
1
- import '@dxos-theme';
2
- declare const _default: {
3
- title: string;
4
- component: ({ classNames, deployed, error, functionUrl, view, templates, onDeploy, onFormat, onViewChange, onTemplateSelect, }: import("./Toolbar").ToolbarProps) => import("react").JSX.Element;
5
- decorators: import("@storybook/react/*").Decorator[];
6
- };
7
- export default _default;
8
- export declare const Default: {
9
- args: {
10
- binding: string;
11
- deployed: boolean;
12
- templates: import("../../templates").Template[];
13
- onFormat: () => void;
14
- onTogglePanel: () => void;
15
- };
16
- };
17
- //# sourceMappingURL=Toolbar.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Toolbar.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/Toolbar.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;;AAOrB,wBAIE;AAEF,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './Toolbar';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Toolbar/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TypescriptEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TypescriptEditor/TypescriptEditor.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EASL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,4BAA4B,CAAC;CACpC,GAAG,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC;AAErG,eAAO,MAAM,gBAAgB,2EAQ1B,qBAAqB,sBAwCvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,10 +0,0 @@
1
- import '@dxos-theme';
2
- import React from 'react';
3
- declare const _default: {
4
- title: string;
5
- component: ({ id, env, className, initialValue, extensions, scrollTo, selection, }: import("./TypescriptEditor").TypescriptEditorProps) => React.JSX.Element;
6
- render: () => React.JSX.Element;
7
- };
8
- export default _default;
9
- export declare const Default: {};
10
- //# sourceMappingURL=TypescriptEditor.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TypescriptEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TypescriptEditor/TypescriptEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAkB,MAAM,OAAO,CAAC;;;;;;AA0BvC,wBAIE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}