@dxos/plugin-script 0.6.12-staging.e11e696 → 0.6.12

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-AGDWRBHJ.mjs → ScriptEditor-5Y3EROG3.mjs} +106 -258
  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 +62 -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 +82 -95
  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 +55 -61
  81. package/src/ScriptPlugin.tsx +38 -22
  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-AGDWRBHJ.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-5R3NWYKS.cjs +0 -668
  104. package/dist/lib/node/ScriptContainer-5R3NWYKS.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-ZY2XG3GH.mjs +0 -666
  109. package/dist/lib/node-esm/ScriptContainer-ZY2XG3GH.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 -310
  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,310 +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 wasmUrl from "esbuild-wasm/esbuild.wasm?url";
19
- import React3 from "react";
20
- import { parseIntentPlugin, resolvePlugin, NavigationAction } from "@dxos/app-framework";
21
- import { create } from "@dxos/echo-schema";
22
- import { parseClientPlugin } from "@dxos/plugin-client";
23
- import { createExtension, isActionGroup } from "@dxos/plugin-graph";
24
- import { TextType } from "@dxos/plugin-markdown/types";
25
- import { SpaceAction } from "@dxos/plugin-space";
26
- import { loadObjectReferences } from "@dxos/react-client/echo";
27
-
28
- // packages/plugins/experimental/plugin-script/src/compiler/compiler.ts
29
- import { createDefaultMapFromCDN, createSystem, createVirtualTypeScriptEnvironment } from "@typescript/vfs";
30
- import ts from "typescript";
31
- import { invariant } from "@dxos/invariant";
32
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/experimental/plugin-script/src/compiler/compiler.ts";
33
- var defaultOptions = {
34
- lib: [
35
- "DOM",
36
- "es2022"
37
- ],
38
- target: ts.ScriptTarget.ES2022
39
- };
40
- var Compiler = class {
41
- constructor(_options = defaultOptions) {
42
- this._options = _options;
43
- }
44
- async initialize() {
45
- if (this._env) {
46
- return;
47
- }
48
- this._fsMap = await createDefaultMapFromCDN(this._options, "5.5.4", true, ts);
49
- const system = createSystem(this._fsMap);
50
- this._env = createVirtualTypeScriptEnvironment(system, [], ts, this._options);
51
- }
52
- get environment() {
53
- invariant(this._env, "Compiler environment not initialized.", {
54
- F: __dxlog_file,
55
- L: 39,
56
- S: this,
57
- A: [
58
- "this._env",
59
- "'Compiler environment not initialized.'"
60
- ]
61
- });
62
- return this._env;
63
- }
64
- setFile(fileName, content) {
65
- invariant(this._fsMap, "File system map not initialized.", {
66
- F: __dxlog_file,
67
- L: 44,
68
- S: this,
69
- A: [
70
- "this._fsMap",
71
- "'File system map not initialized.'"
72
- ]
73
- });
74
- this.environment.createFile(fileName, content);
75
- }
76
- compile(fileName) {
77
- return this.environment.languageService.getEmitOutput(fileName);
78
- }
79
- };
80
-
81
- // packages/plugins/experimental/plugin-script/src/components/index.ts
82
- import React2 from "react";
83
-
84
- // packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx
85
- import React from "react";
86
- import { SettingsValue } from "@dxos/plugin-settings";
87
- import { useClient } from "@dxos/react-client";
88
- import { Button, useTranslation } from "@dxos/react-ui";
89
- var ScriptSettings = ({ settings }) => {
90
- const { t } = useTranslation(SCRIPT_PLUGIN);
91
- const client = useClient();
92
- const handleAuthenticate = async () => {
93
- const { identityKey } = client.halo.identity.get();
94
- await client.halo.writeCredentials([
95
- {
96
- issuer: identityKey,
97
- issuanceDate: /* @__PURE__ */ new Date(),
98
- subject: {
99
- id: identityKey,
100
- assertion: {
101
- "@type": "dxos.halo.credentials.ServiceAccess",
102
- serverName: "hub.dxos.network",
103
- serverKey: identityKey,
104
- identityKey,
105
- capabilities: [
106
- "composer:beta"
107
- ]
108
- }
109
- }
110
- }
111
- ]);
112
- };
113
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SettingsValue, {
114
- label: t("authenticate action label")
115
- }, /* @__PURE__ */ React.createElement(Button, {
116
- onClick: handleAuthenticate
117
- }, t("authenticate button label"))));
118
- };
119
-
120
- // packages/plugins/experimental/plugin-script/src/components/index.ts
121
- var ScriptContainer = React2.lazy(() => import("./ScriptContainer-ZY2XG3GH.mjs"));
122
-
123
- // packages/plugins/experimental/plugin-script/src/translations.ts
124
- var translations_default = [
125
- {
126
- "en-US": {
127
- [SCRIPT_PLUGIN]: {
128
- "plugin name": "Scripts",
129
- "object title placeholder": "New script",
130
- "create object label": "Create script",
131
- "create stack section label": "Create script",
132
- "binding placeholder": "Function name",
133
- "function request placeholder": "Function request",
134
- "deploy label": "Deploy",
135
- "deployed label": "Current version of the script is deployed",
136
- "upload failed label": "Upload failed",
137
- "copy link label": "Copy function link",
138
- "format label": "Format",
139
- "toggle details label": "Toggle details panel",
140
- "authenticate action label": "Authenticate functions service",
141
- "authenticate button label": "Authenticate"
142
- }
143
- }
144
- }
145
- ];
146
-
147
- // packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx
148
- var ScriptPlugin = () => {
149
- const compiler = new Compiler();
150
- return {
151
- meta: meta_default,
152
- initialize: async () => {
153
- await compiler.initialize();
154
- compiler.setFile("/src/typings.d.ts", "declare module 'https://*';");
155
- compiler.setFile("/src/runtime.ts", `
156
- export const Filter: any = {};
157
- export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;
158
- export const functionHandler = (handler: FunctionHandler) => handler;
159
- `);
160
- await initializeBundler({
161
- wasmUrl
162
- });
163
- },
164
- provides: {
165
- settings: {},
166
- metadata: {
167
- records: {
168
- [ScriptType.typename]: {
169
- placeholder: [
170
- "object title placeholder",
171
- {
172
- ns: SCRIPT_PLUGIN
173
- }
174
- ],
175
- icon: "ph--code--regular",
176
- // TODO(wittjosiah): Move out of metadata.
177
- loadReferences: (script) => loadObjectReferences(script, (script2) => [
178
- script2.source
179
- ])
180
- }
181
- }
182
- },
183
- translations: translations_default,
184
- echo: {
185
- schema: [
186
- ScriptType,
187
- FunctionType
188
- ]
189
- },
190
- space: {
191
- onSpaceCreate: {
192
- label: [
193
- "create object label",
194
- {
195
- ns: SCRIPT_PLUGIN
196
- }
197
- ],
198
- action: ScriptAction.CREATE
199
- }
200
- },
201
- graph: {
202
- builder: (plugins) => {
203
- const client = resolvePlugin(plugins, parseClientPlugin)?.provides.client;
204
- const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatch;
205
- if (!client || !dispatch) {
206
- return [];
207
- }
208
- return createExtension({
209
- id: ScriptAction.CREATE,
210
- filter: (node) => isActionGroup(node) && node.id.startsWith(SpaceAction.ADD_OBJECT),
211
- actions: ({ node }) => {
212
- const id = node.id.split("/").at(-1);
213
- const [spaceId, objectId] = id?.split(":") ?? [];
214
- const space = client.spaces.get().find((space2) => space2.id === spaceId);
215
- const object = objectId && space?.db.getObjectById(objectId);
216
- const target = objectId ? object : space;
217
- if (!target) {
218
- return;
219
- }
220
- return [
221
- {
222
- id: `${SCRIPT_PLUGIN}/create/${node.id}`,
223
- data: async () => {
224
- await dispatch([
225
- {
226
- plugin: SCRIPT_PLUGIN,
227
- action: ScriptAction.CREATE
228
- },
229
- {
230
- action: SpaceAction.ADD_OBJECT,
231
- data: {
232
- target
233
- }
234
- },
235
- {
236
- action: NavigationAction.OPEN
237
- }
238
- ]);
239
- },
240
- properties: {
241
- label: [
242
- "create object label",
243
- {
244
- ns: SCRIPT_PLUGIN
245
- }
246
- ],
247
- icon: "ph--code--regular",
248
- testId: "scriptPlugin.createObject"
249
- }
250
- }
251
- ];
252
- }
253
- });
254
- }
255
- },
256
- surface: {
257
- component: ({ data, role }) => {
258
- switch (role) {
259
- case "settings": {
260
- return data.plugin === meta_default.id ? /* @__PURE__ */ React3.createElement(ScriptSettings, {
261
- settings: {}
262
- }) : null;
263
- }
264
- case "article": {
265
- if (data.object instanceof ScriptType) {
266
- return /* @__PURE__ */ React3.createElement(ScriptContainer, {
267
- script: data.object,
268
- env: compiler.environment
269
- });
270
- }
271
- break;
272
- }
273
- }
274
- return null;
275
- }
276
- },
277
- intent: {
278
- resolver: (intent) => {
279
- switch (intent.action) {
280
- case ScriptAction.CREATE: {
281
- return {
282
- data: create(ScriptType, {
283
- source: create(TextType, {
284
- content: templates[0].source
285
- })
286
- })
287
- };
288
- }
289
- }
290
- }
291
- }
292
- }
293
- };
294
- };
295
-
296
- // packages/plugins/experimental/plugin-script/src/index.ts
297
- var src_default = ScriptPlugin;
298
- export {
299
- Bundler,
300
- Compiler,
301
- FunctionType,
302
- ScriptAction,
303
- ScriptContainer,
304
- ScriptPlugin,
305
- ScriptSettings,
306
- ScriptType,
307
- src_default as default,
308
- initializeBundler
309
- };
310
- //# 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\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: 'ph--code--regular',\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": ["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", "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", "React", "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":2763,"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":19990,"imports":[{"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":15663},"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":"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-ZY2XG3GH.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":5036},"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":9721},"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-ZY2XG3GH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":42939},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-ZY2XG3GH.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":649},"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":23064},"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"}
@@ -1,2 +0,0 @@
1
- export * from './TypescriptEditor';
2
- //# sourceMappingURL=index.d.ts.map