@immediately-run/sdk 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dnd.cjs ADDED
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var dnd_exports = {};
20
+ __export(dnd_exports, {
21
+ cancelItemDrag: () => cancelItemDrag,
22
+ onItemDrop: () => onItemDrop,
23
+ startItemDrag: () => startItemDrag,
24
+ useDroppedItem: () => useDroppedItem
25
+ });
26
+ module.exports = __toCommonJS(dnd_exports);
27
+ var import_react = require("react");
28
+ var import_sandboxUtils = require("./sandboxUtils");
29
+ const startItemDrag = async (item) => {
30
+ const res = await (0, import_sandboxUtils.protocolRequest)("dnd", "startDrag", [item]);
31
+ if (!res || res.ok !== true) {
32
+ const err = new Error(res?.message ?? "dnd startDrag failed");
33
+ err.code = res?.code ?? "unknown";
34
+ throw err;
35
+ }
36
+ };
37
+ const cancelItemDrag = () => {
38
+ (0, import_sandboxUtils.sendMessage)("dnd-cancel", {});
39
+ };
40
+ const onItemDrop = (listener) => (0, import_sandboxUtils.addListener)(
41
+ "dropped-item",
42
+ (m) => listener({ item: m.item, from: m.from, position: m.position })
43
+ );
44
+ const useDroppedItem = () => {
45
+ const [dropped, setDropped] = (0, import_react.useState)(null);
46
+ (0, import_react.useEffect)(() => onItemDrop(setDropped), []);
47
+ return dropped;
48
+ };
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ cancelItemDrag,
52
+ onItemDrop,
53
+ startItemDrag,
54
+ useDroppedItem
55
+ });
56
+ //# sourceMappingURL=dnd.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dnd.ts"],"sourcesContent":["// Cross-app drag-out (FILE_EXPLORER_SPEC §7; UI_AS_APPS_SPEC §2 host-mediated).\n//\n// Native HTML5 drag-and-drop does NOT cross the sandboxed cross-origin iframe\n// boundary, and pointer events inside one app's iframe never reach the host or a\n// sibling. So a drag that STARTS in one app (the file explorer) and ENDS over\n// another (the previewed app) can only be mediated by the host (the TCB). This\n// module is the SDK surface for that one net-new platform primitive:\n//\n// - SOURCE side (the file explorer, needs the first-party `dnd:source` cap):\n// `startItemDrag(item)` asks the host to begin a host-mediated drag carrying a\n// file/dir reference (+ optional inlined bytes for a small file). The host draws\n// the trusted drag ghost, tracks the pointer across regions, and on drop over the\n// preview delivers the item to that app. `cancelItemDrag()` aborts.\n// - RECEIVER side (the previewed app, NO new grant — it opts in by subscribing):\n// `onItemDrop(cb)` / `useDroppedItem()` deliver the dropped item with host-attached,\n// unspoofable provenance (`from` = source region id) and the drop position.\n//\n// The payload is UNTRUSTED app data (CLAUDE.md §5): the host attaches `from`; the app\n// validates everything else. v1 inlines bytes only for small files (the source can\n// only relay data it can already read — no new read authority is minted).\nimport { useEffect, useState } from 'react';\nimport { protocolRequest, sendMessage, addListener } from './sandboxUtils';\n\n/** A file/dir being dragged out of an app. `bytes` is present only for a small file\n * the source chose to inline (transferred zero-copy); a dir or an over-cap file\n * carries the reference only (`kind`/`name`/`mountId`/`relPath`). */\nexport interface DraggableItem {\n kind: 'file' | 'dir';\n /** Basename — display only. */\n name: string;\n /** Which mounted filesystem the item lives in. */\n mountId: string;\n /** Path within that mount (leading slash, no `..`). */\n relPath: string;\n /** Optional inlined content for a small file. */\n bytes?: Uint8Array;\n}\n\n/** An item dropped onto THIS app by a host-mediated cross-app drag. */\nexport interface DroppedItem {\n /** The dragged item (`bytes` present iff the source inlined them). */\n item: DraggableItem;\n /** Host-attached source region id — unspoofable (T19), like an `ipc` `from`. */\n from: string;\n /** Drop point in this app's viewport. */\n position: { x: number; y: number };\n}\n\n/** An error from {@link startItemDrag}, carrying a machine-readable `.code`. */\nexport interface ItemDragError extends Error {\n code:\n | 'forbidden' // the frame lacks the first-party `dnd:source` capability\n | 'invalid-params' // the item was malformed (empty path / `..` / URI / bad kind)\n | 'too-large' // inlined `bytes` exceed the host's size limit\n | 'rate-limited' // too many drags started too fast (capacity-class, fail-open)\n | 'unknown';\n}\n\n/**\n * Begin a host-mediated drag of `item` out of this app. Resolves once the host has\n * taken over the drag (drawn the ghost, installed the pointer-capture layer); rejects\n * with an {@link ItemDragError} if this app may not initiate drags (`forbidden`) or the\n * item is invalid. Only a first-party chrome app holding `dnd:source` may call this — a\n * previewed/third-party app is refused at the gate (it must not synthesize drags into\n * sibling apps).\n */\nexport const startItemDrag = async (item: DraggableItem): Promise<void> => {\n const res = (await protocolRequest('dnd', 'startDrag', [item])) as\n | { ok: true }\n | { ok: false; code?: string; message?: string }\n | undefined;\n if (!res || res.ok !== true) {\n const err = new Error(res?.message ?? 'dnd startDrag failed') as ItemDragError;\n err.code = (res?.code as ItemDragError['code']) ?? 'unknown';\n throw err;\n }\n};\n\n/** Abort an in-progress host-mediated drag this app started (e.g. the user pressed\n * Escape, or the gesture was cancelled). Best-effort and fire-and-forget. */\nexport const cancelItemDrag = (): void => {\n sendMessage('dnd-cancel', {});\n};\n\n/** Subscribe to items dropped onto this app by a host-mediated cross-app drag.\n * Returns an unsubscribe fn. Subscribing is the opt-in: an app that never subscribes\n * receives nothing (the host shows a \"not accepted\" cue and the drop is a no-op). */\nexport const onItemDrop = (listener: (d: DroppedItem) => void): (() => void) =>\n addListener('dropped-item', (m: { item: DraggableItem; from: string; position: { x: number; y: number } }) =>\n listener({ item: m.item, from: m.from, position: m.position }),\n );\n\n/** React hook: the most recently dropped item (or `null`). */\nexport const useDroppedItem = (): DroppedItem | null => {\n const [dropped, setDropped] = useState<DroppedItem | null>(null);\n useEffect(() => onItemDrop(setDropped), []);\n return dropped;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBA,mBAAoC;AACpC,0BAA0D;AA6CnD,MAAM,gBAAgB,OAAO,SAAuC;AACzE,QAAM,MAAO,UAAM,qCAAgB,OAAO,aAAa,CAAC,IAAI,CAAC;AAI7D,MAAI,CAAC,OAAO,IAAI,OAAO,MAAM;AAC3B,UAAM,MAAM,IAAI,MAAM,KAAK,WAAW,sBAAsB;AAC5D,QAAI,OAAQ,KAAK,QAAkC;AACnD,UAAM;AAAA,EACR;AACF;AAIO,MAAM,iBAAiB,MAAY;AACxC,uCAAY,cAAc,CAAC,CAAC;AAC9B;AAKO,MAAM,aAAa,CAAC,iBACzB;AAAA,EAAY;AAAA,EAAgB,CAAC,MAC3B,SAAS,EAAE,MAAM,EAAE,MAAM,MAAM,EAAE,MAAM,UAAU,EAAE,SAAS,CAAC;AAC/D;AAGK,MAAM,iBAAiB,MAA0B;AACtD,QAAM,CAAC,SAAS,UAAU,QAAI,uBAA6B,IAAI;AAC/D,8BAAU,MAAM,WAAW,UAAU,GAAG,CAAC,CAAC;AAC1C,SAAO;AACT;","names":[]}
package/dist/dnd.d.cts ADDED
@@ -0,0 +1,50 @@
1
+ /** A file/dir being dragged out of an app. `bytes` is present only for a small file
2
+ * the source chose to inline (transferred zero-copy); a dir or an over-cap file
3
+ * carries the reference only (`kind`/`name`/`mountId`/`relPath`). */
4
+ interface DraggableItem {
5
+ kind: 'file' | 'dir';
6
+ /** Basename — display only. */
7
+ name: string;
8
+ /** Which mounted filesystem the item lives in. */
9
+ mountId: string;
10
+ /** Path within that mount (leading slash, no `..`). */
11
+ relPath: string;
12
+ /** Optional inlined content for a small file. */
13
+ bytes?: Uint8Array;
14
+ }
15
+ /** An item dropped onto THIS app by a host-mediated cross-app drag. */
16
+ interface DroppedItem {
17
+ /** The dragged item (`bytes` present iff the source inlined them). */
18
+ item: DraggableItem;
19
+ /** Host-attached source region id — unspoofable (T19), like an `ipc` `from`. */
20
+ from: string;
21
+ /** Drop point in this app's viewport. */
22
+ position: {
23
+ x: number;
24
+ y: number;
25
+ };
26
+ }
27
+ /** An error from {@link startItemDrag}, carrying a machine-readable `.code`. */
28
+ interface ItemDragError extends Error {
29
+ code: 'forbidden' | 'invalid-params' | 'too-large' | 'rate-limited' | 'unknown';
30
+ }
31
+ /**
32
+ * Begin a host-mediated drag of `item` out of this app. Resolves once the host has
33
+ * taken over the drag (drawn the ghost, installed the pointer-capture layer); rejects
34
+ * with an {@link ItemDragError} if this app may not initiate drags (`forbidden`) or the
35
+ * item is invalid. Only a first-party chrome app holding `dnd:source` may call this — a
36
+ * previewed/third-party app is refused at the gate (it must not synthesize drags into
37
+ * sibling apps).
38
+ */
39
+ declare const startItemDrag: (item: DraggableItem) => Promise<void>;
40
+ /** Abort an in-progress host-mediated drag this app started (e.g. the user pressed
41
+ * Escape, or the gesture was cancelled). Best-effort and fire-and-forget. */
42
+ declare const cancelItemDrag: () => void;
43
+ /** Subscribe to items dropped onto this app by a host-mediated cross-app drag.
44
+ * Returns an unsubscribe fn. Subscribing is the opt-in: an app that never subscribes
45
+ * receives nothing (the host shows a "not accepted" cue and the drop is a no-op). */
46
+ declare const onItemDrop: (listener: (d: DroppedItem) => void) => (() => void);
47
+ /** React hook: the most recently dropped item (or `null`). */
48
+ declare const useDroppedItem: () => DroppedItem | null;
49
+
50
+ export { type DraggableItem, type DroppedItem, type ItemDragError, cancelItemDrag, onItemDrop, startItemDrag, useDroppedItem };
package/dist/dnd.d.ts ADDED
@@ -0,0 +1,50 @@
1
+ /** A file/dir being dragged out of an app. `bytes` is present only for a small file
2
+ * the source chose to inline (transferred zero-copy); a dir or an over-cap file
3
+ * carries the reference only (`kind`/`name`/`mountId`/`relPath`). */
4
+ interface DraggableItem {
5
+ kind: 'file' | 'dir';
6
+ /** Basename — display only. */
7
+ name: string;
8
+ /** Which mounted filesystem the item lives in. */
9
+ mountId: string;
10
+ /** Path within that mount (leading slash, no `..`). */
11
+ relPath: string;
12
+ /** Optional inlined content for a small file. */
13
+ bytes?: Uint8Array;
14
+ }
15
+ /** An item dropped onto THIS app by a host-mediated cross-app drag. */
16
+ interface DroppedItem {
17
+ /** The dragged item (`bytes` present iff the source inlined them). */
18
+ item: DraggableItem;
19
+ /** Host-attached source region id — unspoofable (T19), like an `ipc` `from`. */
20
+ from: string;
21
+ /** Drop point in this app's viewport. */
22
+ position: {
23
+ x: number;
24
+ y: number;
25
+ };
26
+ }
27
+ /** An error from {@link startItemDrag}, carrying a machine-readable `.code`. */
28
+ interface ItemDragError extends Error {
29
+ code: 'forbidden' | 'invalid-params' | 'too-large' | 'rate-limited' | 'unknown';
30
+ }
31
+ /**
32
+ * Begin a host-mediated drag of `item` out of this app. Resolves once the host has
33
+ * taken over the drag (drawn the ghost, installed the pointer-capture layer); rejects
34
+ * with an {@link ItemDragError} if this app may not initiate drags (`forbidden`) or the
35
+ * item is invalid. Only a first-party chrome app holding `dnd:source` may call this — a
36
+ * previewed/third-party app is refused at the gate (it must not synthesize drags into
37
+ * sibling apps).
38
+ */
39
+ declare const startItemDrag: (item: DraggableItem) => Promise<void>;
40
+ /** Abort an in-progress host-mediated drag this app started (e.g. the user pressed
41
+ * Escape, or the gesture was cancelled). Best-effort and fire-and-forget. */
42
+ declare const cancelItemDrag: () => void;
43
+ /** Subscribe to items dropped onto this app by a host-mediated cross-app drag.
44
+ * Returns an unsubscribe fn. Subscribing is the opt-in: an app that never subscribes
45
+ * receives nothing (the host shows a "not accepted" cue and the drop is a no-op). */
46
+ declare const onItemDrop: (listener: (d: DroppedItem) => void) => (() => void);
47
+ /** React hook: the most recently dropped item (or `null`). */
48
+ declare const useDroppedItem: () => DroppedItem | null;
49
+
50
+ export { type DraggableItem, type DroppedItem, type ItemDragError, cancelItemDrag, onItemDrop, startItemDrag, useDroppedItem };
package/dist/dnd.js ADDED
@@ -0,0 +1,29 @@
1
+ import { useEffect, useState } from "react";
2
+ import { protocolRequest, sendMessage, addListener } from "./sandboxUtils";
3
+ const startItemDrag = async (item) => {
4
+ const res = await protocolRequest("dnd", "startDrag", [item]);
5
+ if (!res || res.ok !== true) {
6
+ const err = new Error(res?.message ?? "dnd startDrag failed");
7
+ err.code = res?.code ?? "unknown";
8
+ throw err;
9
+ }
10
+ };
11
+ const cancelItemDrag = () => {
12
+ sendMessage("dnd-cancel", {});
13
+ };
14
+ const onItemDrop = (listener) => addListener(
15
+ "dropped-item",
16
+ (m) => listener({ item: m.item, from: m.from, position: m.position })
17
+ );
18
+ const useDroppedItem = () => {
19
+ const [dropped, setDropped] = useState(null);
20
+ useEffect(() => onItemDrop(setDropped), []);
21
+ return dropped;
22
+ };
23
+ export {
24
+ cancelItemDrag,
25
+ onItemDrop,
26
+ startItemDrag,
27
+ useDroppedItem
28
+ };
29
+ //# sourceMappingURL=dnd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dnd.ts"],"sourcesContent":["// Cross-app drag-out (FILE_EXPLORER_SPEC §7; UI_AS_APPS_SPEC §2 host-mediated).\n//\n// Native HTML5 drag-and-drop does NOT cross the sandboxed cross-origin iframe\n// boundary, and pointer events inside one app's iframe never reach the host or a\n// sibling. So a drag that STARTS in one app (the file explorer) and ENDS over\n// another (the previewed app) can only be mediated by the host (the TCB). This\n// module is the SDK surface for that one net-new platform primitive:\n//\n// - SOURCE side (the file explorer, needs the first-party `dnd:source` cap):\n// `startItemDrag(item)` asks the host to begin a host-mediated drag carrying a\n// file/dir reference (+ optional inlined bytes for a small file). The host draws\n// the trusted drag ghost, tracks the pointer across regions, and on drop over the\n// preview delivers the item to that app. `cancelItemDrag()` aborts.\n// - RECEIVER side (the previewed app, NO new grant — it opts in by subscribing):\n// `onItemDrop(cb)` / `useDroppedItem()` deliver the dropped item with host-attached,\n// unspoofable provenance (`from` = source region id) and the drop position.\n//\n// The payload is UNTRUSTED app data (CLAUDE.md §5): the host attaches `from`; the app\n// validates everything else. v1 inlines bytes only for small files (the source can\n// only relay data it can already read — no new read authority is minted).\nimport { useEffect, useState } from 'react';\nimport { protocolRequest, sendMessage, addListener } from './sandboxUtils';\n\n/** A file/dir being dragged out of an app. `bytes` is present only for a small file\n * the source chose to inline (transferred zero-copy); a dir or an over-cap file\n * carries the reference only (`kind`/`name`/`mountId`/`relPath`). */\nexport interface DraggableItem {\n kind: 'file' | 'dir';\n /** Basename — display only. */\n name: string;\n /** Which mounted filesystem the item lives in. */\n mountId: string;\n /** Path within that mount (leading slash, no `..`). */\n relPath: string;\n /** Optional inlined content for a small file. */\n bytes?: Uint8Array;\n}\n\n/** An item dropped onto THIS app by a host-mediated cross-app drag. */\nexport interface DroppedItem {\n /** The dragged item (`bytes` present iff the source inlined them). */\n item: DraggableItem;\n /** Host-attached source region id — unspoofable (T19), like an `ipc` `from`. */\n from: string;\n /** Drop point in this app's viewport. */\n position: { x: number; y: number };\n}\n\n/** An error from {@link startItemDrag}, carrying a machine-readable `.code`. */\nexport interface ItemDragError extends Error {\n code:\n | 'forbidden' // the frame lacks the first-party `dnd:source` capability\n | 'invalid-params' // the item was malformed (empty path / `..` / URI / bad kind)\n | 'too-large' // inlined `bytes` exceed the host's size limit\n | 'rate-limited' // too many drags started too fast (capacity-class, fail-open)\n | 'unknown';\n}\n\n/**\n * Begin a host-mediated drag of `item` out of this app. Resolves once the host has\n * taken over the drag (drawn the ghost, installed the pointer-capture layer); rejects\n * with an {@link ItemDragError} if this app may not initiate drags (`forbidden`) or the\n * item is invalid. Only a first-party chrome app holding `dnd:source` may call this — a\n * previewed/third-party app is refused at the gate (it must not synthesize drags into\n * sibling apps).\n */\nexport const startItemDrag = async (item: DraggableItem): Promise<void> => {\n const res = (await protocolRequest('dnd', 'startDrag', [item])) as\n | { ok: true }\n | { ok: false; code?: string; message?: string }\n | undefined;\n if (!res || res.ok !== true) {\n const err = new Error(res?.message ?? 'dnd startDrag failed') as ItemDragError;\n err.code = (res?.code as ItemDragError['code']) ?? 'unknown';\n throw err;\n }\n};\n\n/** Abort an in-progress host-mediated drag this app started (e.g. the user pressed\n * Escape, or the gesture was cancelled). Best-effort and fire-and-forget. */\nexport const cancelItemDrag = (): void => {\n sendMessage('dnd-cancel', {});\n};\n\n/** Subscribe to items dropped onto this app by a host-mediated cross-app drag.\n * Returns an unsubscribe fn. Subscribing is the opt-in: an app that never subscribes\n * receives nothing (the host shows a \"not accepted\" cue and the drop is a no-op). */\nexport const onItemDrop = (listener: (d: DroppedItem) => void): (() => void) =>\n addListener('dropped-item', (m: { item: DraggableItem; from: string; position: { x: number; y: number } }) =>\n listener({ item: m.item, from: m.from, position: m.position }),\n );\n\n/** React hook: the most recently dropped item (or `null`). */\nexport const useDroppedItem = (): DroppedItem | null => {\n const [dropped, setDropped] = useState<DroppedItem | null>(null);\n useEffect(() => onItemDrop(setDropped), []);\n return dropped;\n};\n"],"mappings":"AAoBA,SAAS,WAAW,gBAAgB;AACpC,SAAS,iBAAiB,aAAa,mBAAmB;AA6CnD,MAAM,gBAAgB,OAAO,SAAuC;AACzE,QAAM,MAAO,MAAM,gBAAgB,OAAO,aAAa,CAAC,IAAI,CAAC;AAI7D,MAAI,CAAC,OAAO,IAAI,OAAO,MAAM;AAC3B,UAAM,MAAM,IAAI,MAAM,KAAK,WAAW,sBAAsB;AAC5D,QAAI,OAAQ,KAAK,QAAkC;AACnD,UAAM;AAAA,EACR;AACF;AAIO,MAAM,iBAAiB,MAAY;AACxC,cAAY,cAAc,CAAC,CAAC;AAC9B;AAKO,MAAM,aAAa,CAAC,aACzB;AAAA,EAAY;AAAA,EAAgB,CAAC,MAC3B,SAAS,EAAE,MAAM,EAAE,MAAM,MAAM,EAAE,MAAM,UAAU,EAAE,SAAS,CAAC;AAC/D;AAGK,MAAM,iBAAiB,MAA0B;AACtD,QAAM,CAAC,SAAS,UAAU,IAAI,SAA6B,IAAI;AAC/D,YAAU,MAAM,WAAW,UAAU,GAAG,CAAC,CAAC;AAC1C,SAAO;AACT;","names":[]}
package/dist/index.cjs CHANGED
@@ -30,6 +30,7 @@ __reExport(index_exports, require("./mounts"), module.exports);
30
30
  __reExport(index_exports, require("./contribute"), module.exports);
31
31
  __reExport(index_exports, require("./catalog"), module.exports);
32
32
  __reExport(index_exports, require("./ipc"), module.exports);
33
+ __reExport(index_exports, require("./dnd"), module.exports);
33
34
  __reExport(index_exports, require("./netFetch"), module.exports);
34
35
  __reExport(index_exports, require("./secrets"), module.exports);
35
36
  __reExport(index_exports, require("./tasks"), module.exports);
@@ -55,6 +56,7 @@ __reExport(index_exports, require("./sandboxTypes"), module.exports);
55
56
  ...require("./contribute"),
56
57
  ...require("./catalog"),
57
58
  ...require("./ipc"),
59
+ ...require("./dnd"),
58
60
  ...require("./netFetch"),
59
61
  ...require("./secrets"),
60
62
  ...require("./tasks"),
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAIA,0BAAc,uCAJd;AAKA,0BAAc,oBALd;AAMA,0BAAc,mBANd;AAOA,0BAAc,oBAPd;AAQA,0BAAc,4BARd;AASA,0BAAc,qBATd;AAUA,0BAAc,yBAVd;AAWA,0BAAc,qBAXd;AAYA,0BAAc,yBAZd;AAaA,0BAAc,sBAbd;AAcA,0BAAc,kBAdd;AAeA,0BAAc,uBAfd;AAgBA,0BAAc,sBAhBd;AAiBA,0BAAc,oBAjBd;AAkBA,0BAAc,sBAlBd;AAmBA,0BAAc,wBAnBd;AAoBA,0BAAc,oBApBd;AAqBA,0BAAc,6BArBd;AAsBA,0BAAc,2BAtBd;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,0BAAd;AACA,0BAAc,sBADd;AAEA,0BAAc,mBAFd;AAGA,0BAAc,iCAHd;AAIA,0BAAc,uCAJd;AAKA,0BAAc,oBALd;AAMA,0BAAc,mBANd;AAOA,0BAAc,oBAPd;AAQA,0BAAc,4BARd;AASA,0BAAc,qBATd;AAUA,0BAAc,yBAVd;AAWA,0BAAc,qBAXd;AAYA,0BAAc,yBAZd;AAaA,0BAAc,sBAbd;AAcA,0BAAc,kBAdd;AAeA,0BAAc,kBAfd;AAgBA,0BAAc,uBAhBd;AAiBA,0BAAc,sBAjBd;AAkBA,0BAAc,oBAlBd;AAmBA,0BAAc,sBAnBd;AAoBA,0BAAc,wBApBd;AAqBA,0BAAc,oBArBd;AAsBA,0BAAc,6BAtBd;AAuBA,0BAAc,2BAvBd;","names":[]}
package/dist/index.d.cts CHANGED
@@ -13,6 +13,7 @@ export { GrantRecord, Member, MountQuery, MountRemoveReason, MountRule, RemovedM
13
13
  export { ContributeMode, ContributeOptions, ContributionEvent, ContributionResult, contribute } from './contribute.cjs';
14
14
  export { ApiMethod, getCatalog, invoke, invokeStream, onCatalogChange, useCatalog } from './catalog.cjs';
15
15
  export { RegionMessage, onRegionMessage, postToRegion, useRegionMessage } from './ipc.cjs';
16
+ export { DraggableItem, DroppedItem, ItemDragError, cancelItemDrag, onItemDrop, startItemDrag, useDroppedItem } from './dnd.cjs';
16
17
  export { HostFetchInit, HostFetchResponse, HostFetchStreamEvent, HostFetchStreamResult, hostFetch, hostFetchStream } from './netFetch.cjs';
17
18
  export { SecretError, SecretGrant, SecretHints, SecretQuery, SecretType, SecretView, getSecrets, onSecretsChange, requestAddSecret, requestSecret, revokeSecret, useSecrets } from './secrets.cjs';
18
19
  export { DirCap, FileCap, TaskInput, cancelTask, capDir, capFile, completeTask, getTaskInput, invokeTask, useTaskInput } from './tasks.cjs';
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export { GrantRecord, Member, MountQuery, MountRemoveReason, MountRule, RemovedM
13
13
  export { ContributeMode, ContributeOptions, ContributionEvent, ContributionResult, contribute } from './contribute.js';
14
14
  export { ApiMethod, getCatalog, invoke, invokeStream, onCatalogChange, useCatalog } from './catalog.js';
15
15
  export { RegionMessage, onRegionMessage, postToRegion, useRegionMessage } from './ipc.js';
16
+ export { DraggableItem, DroppedItem, ItemDragError, cancelItemDrag, onItemDrop, startItemDrag, useDroppedItem } from './dnd.js';
16
17
  export { HostFetchInit, HostFetchResponse, HostFetchStreamEvent, HostFetchStreamResult, hostFetch, hostFetchStream } from './netFetch.js';
17
18
  export { SecretError, SecretGrant, SecretHints, SecretQuery, SecretType, SecretView, getSecrets, onSecretsChange, requestAddSecret, requestSecret, revokeSecret, useSecrets } from './secrets.js';
18
19
  export { DirCap, FileCap, TaskInput, cancelTask, capDir, capFile, completeTask, getTaskInput, invokeTask, useTaskInput } from './tasks.js';
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ export * from "./mounts";
13
13
  export * from "./contribute";
14
14
  export * from "./catalog";
15
15
  export * from "./ipc";
16
+ export * from "./dnd";
16
17
  export * from "./netFetch";
17
18
  export * from "./secrets";
18
19
  export * from "./tasks";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./MDXProvider\";\nexport * from \"./routing\";\nexport * from \"./boot\";\nexport * from './components/Include';\nexport * from './components/MDXComponents';\nexport * from './hooks'\nexport * from './auth';\nexport * from './theme';\nexport * from './editorContext';\nexport * from './editor';\nexport * from './formFactor';\nexport * from './mounts';\nexport * from './contribute';\nexport * from './catalog';\nexport * from './ipc';\nexport * from './dnd';\nexport * from './netFetch';\nexport * from './secrets';\nexport * from './tasks';\nexport * from './runtime';\nexport * from './irMarkers';\nexport * from './ready';\nexport * from './protocolStream';\nexport * from './sandboxTypes';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
package/dist/version.cjs CHANGED
@@ -21,7 +21,7 @@ __export(version_exports, {
21
21
  SDK_VERSION: () => SDK_VERSION
22
22
  });
23
23
  module.exports = __toCommonJS(version_exports);
24
- const SDK_VERSION = "0.10.0";
24
+ const SDK_VERSION = "0.11.0";
25
25
  // Annotate the CommonJS export names for ESM import in node:
26
26
  0 && (module.exports = {
27
27
  SDK_VERSION
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.10.0';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.11.0';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,MAAM,cAAc;","names":[]}
@@ -1,4 +1,4 @@
1
1
  /** This SDK's package version, baked from package.json at build (SP2-6). */
2
- declare const SDK_VERSION = "0.10.0";
2
+ declare const SDK_VERSION = "0.11.0";
3
3
 
4
4
  export { SDK_VERSION };
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  /** This SDK's package version, baked from package.json at build (SP2-6). */
2
- declare const SDK_VERSION = "0.10.0";
2
+ declare const SDK_VERSION = "0.11.0";
3
3
 
4
4
  export { SDK_VERSION };
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.10.0";
1
+ const SDK_VERSION = "0.11.0";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.10.0';\n"],"mappings":"AAIO,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["// GENERATED by scripts/gen-version.mjs from package.json — do not edit by hand.\n// Regenerated on every build (prebuild); kept honest by version.test.ts.\n\n/** This SDK's package version, baked from package.json at build (SP2-6). */\nexport const SDK_VERSION = '0.11.0';\n"],"mappings":"AAIO,MAAM,cAAc;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immediately-run/sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Runtime SDK for code executing inside an immediately.run sandbox.",
5
5
  "license": "MIT",
6
6
  "repository": "github:immediately-run/immediately-run-sdk",