@dxos/plugin-wnfs 0.8.1-main.ae460ac → 0.8.1-staging.31c3ee1
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/lib/browser/{FileContainer-IK7S6VBW.mjs → FileContainer-4HNP22HU.mjs} +5 -6
- package/dist/lib/browser/{FileContainer-IK7S6VBW.mjs.map → FileContainer-4HNP22HU.mjs.map} +3 -3
- package/dist/lib/browser/{blockstore-7XIICCYU.mjs → blockstore-G47Q25U6.mjs} +3 -3
- package/dist/lib/browser/chunk-FH2Q7ZBE.mjs +16 -0
- package/dist/lib/browser/{chunk-I4V75JSO.mjs → chunk-FKYLWLNM.mjs} +2 -2
- package/dist/lib/browser/{chunk-462MHCWG.mjs → chunk-NIDFBTNY.mjs} +2 -2
- package/dist/lib/browser/{chunk-CRN4JB6V.mjs → chunk-X54OT4V3.mjs} +1 -1
- package/dist/lib/browser/chunk-X54OT4V3.mjs.map +7 -0
- package/dist/lib/browser/{file-uploader-XXHZOW37.mjs → file-uploader-L4TDVJBE.mjs} +3 -3
- package/dist/lib/browser/index.mjs +6 -12
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-WXSSL4FI.mjs → intent-resolver-VSMIQLGS.mjs} +4 -4
- package/dist/lib/browser/{markdown-PJWHZHGJ.mjs → markdown-MWMZVPEX.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-TYJKCUPX.mjs → react-surface-MKJYHQ4P.mjs} +6 -5
- package/dist/lib/browser/react-surface-MKJYHQ4P.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/FileContainer.d.ts +2 -1
- package/dist/types/src/components/FileContainer.d.ts.map +1 -1
- package/dist/types/src/components/FileInput.d.ts +2 -1
- package/dist/types/src/components/FileInput.d.ts.map +1 -1
- package/dist/types/src/components/FilePreview.d.ts +2 -1
- package/dist/types/src/components/FilePreview.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions/image.stories.d.ts +2 -1
- package/dist/types/src/extensions/image.stories.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -7
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -3
- package/dist/types/src/translations.d.ts.map +1 -1
- package/package.json +23 -23
- package/src/WnfsPlugin.tsx +1 -2
- package/src/capabilities/react-surface.tsx +2 -1
- package/src/components/FileContainer.tsx +1 -1
- package/src/meta.ts +2 -2
- package/src/translations.ts +1 -1
- package/dist/lib/browser/chunk-CRN4JB6V.mjs.map +0 -7
- package/dist/lib/browser/chunk-TOOHDL3I.mjs +0 -16
- package/dist/lib/browser/react-surface-TYJKCUPX.mjs.map +0 -7
- /package/dist/lib/browser/{blockstore-7XIICCYU.mjs.map → blockstore-G47Q25U6.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-TOOHDL3I.mjs.map → chunk-FH2Q7ZBE.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-I4V75JSO.mjs.map → chunk-FKYLWLNM.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-462MHCWG.mjs.map → chunk-NIDFBTNY.mjs.map} +0 -0
- /package/dist/lib/browser/{file-uploader-XXHZOW37.mjs.map → file-uploader-L4TDVJBE.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-WXSSL4FI.mjs.map → intent-resolver-VSMIQLGS.mjs.map} +0 -0
- /package/dist/lib/browser/{markdown-PJWHZHGJ.mjs.map → markdown-MWMZVPEX.mjs.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-FH2Q7ZBE.mjs";
|
|
2
2
|
import {
|
|
3
3
|
filePath,
|
|
4
4
|
getBlobUrl,
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
} from "./chunk-SCQWJNHD.mjs";
|
|
8
8
|
import {
|
|
9
9
|
WnfsCapabilities
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-NIDFBTNY.mjs";
|
|
11
|
+
import "./chunk-X54OT4V3.mjs";
|
|
12
12
|
|
|
13
13
|
// packages/plugins/plugin-wnfs/src/components/FileContainer.tsx
|
|
14
14
|
import React2, { useEffect, useState } from "react";
|
|
@@ -80,8 +80,7 @@ var FileContainer = ({ file, role }) => {
|
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
82
|
return /* @__PURE__ */ React2.createElement(StackItem.Content, {
|
|
83
|
-
role
|
|
84
|
-
toolbar: false
|
|
83
|
+
role
|
|
85
84
|
}, /* @__PURE__ */ React2.createElement(FilePreview, {
|
|
86
85
|
type: file.type,
|
|
87
86
|
url: blobUrl
|
|
@@ -91,4 +90,4 @@ var FileContainer_default = FileContainer;
|
|
|
91
90
|
export {
|
|
92
91
|
FileContainer_default as default
|
|
93
92
|
};
|
|
94
|
-
//# sourceMappingURL=FileContainer-
|
|
93
|
+
//# sourceMappingURL=FileContainer-4HNP22HU.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/FileContainer.tsx", "../../../src/components/FilePreview.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useEffect, useState } from 'react';\n\nimport { useCapability } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { FilePreview } from './FilePreview';\nimport { WnfsCapabilities } from '../capabilities';\nimport { filePath, getBlobUrl, loadWnfs, wnfsUrl } from '../helpers';\nimport { type FileType } from '../types';\n\nconst FileContainer = ({ file, role }: { file: FileType; role: string }) => {\n const blockstore = useCapability(WnfsCapabilities.Blockstore);\n const instances = useCapability(WnfsCapabilities.Instances);\n const [blobUrl, setBlobUrl] = useState<string>();\n\n useEffect(() => {\n const timeout = setTimeout(async () => {\n const space = getSpace(file);\n invariant(space);\n const { directory, forest } = await loadWnfs({ blockstore, instances, space });\n const path = filePath(file.cid.toString(), space);\n const url = await getBlobUrl({ wnfsUrl: wnfsUrl(path), blockstore, directory, forest });\n setBlobUrl(url);\n });\n\n return () => clearTimeout(timeout);\n }, [file]);\n\n if (!blobUrl) {\n return null;\n }\n\n return (\n <StackItem.Content role={role}
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,OAAOA,UAASC,WAAWC,gBAAgB;AAE3C,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;;;ACL1B,OAAOC,WAAW;AAGlB,SAASC,UAAU;AAOZ,IAAMC,cAAc,CAAC,EAAEC,MAAMC,KAAKC,WAAU,MAAoB;AACrE,MAAIF,KAAKG,WAAW,QAAA,GAAW;AAC7B,WAAO,sBAAA,cAACC,OAAAA;MAAIC,WAAWC,GAAG,gCAAgCJ,UAAAA;MAAaK,KAAKN;;EAC9E,WAAWD,KAAKG,WAAW,QAAA,GAAW;AACpC,WAAO,sBAAA,cAACK,SAAAA;MAAMH,WAAWC,GAAG,gCAAgCJ,UAAAA;MAAaK,KAAKN;MAAKQ,UAAAA;;EACrF,OAAO;AACL,WAAO,sBAAA,cAACC,UAAAA;MAAOL,WAAWC,GAAG,+BAA+BJ,UAAAA;MAAaK,KAAKN;;EAChF;AACF;;;;ADNA,IAAMU,gBAAgB,CAAC,EAAEC,MAAMC,KAAI,MAAoC;AACrE,QAAMC,aAAaC,cAAcC,iBAAiBC,UAAU;AAC5D,QAAMC,YAAYH,cAAcC,iBAAiBG,SAAS;AAC1D,QAAM,CAACC,SAASC,UAAAA,IAAcC,SAAAA;AAE9BC,YAAU,MAAA;AACR,UAAMC,UAAUC,WAAW,YAAA;AACzB,YAAMC,QAAQC,SAASf,IAAAA;AACvBgB,gBAAUF,OAAAA,QAAAA;;;;;;;;;AACV,YAAM,EAAEG,WAAWC,OAAM,IAAK,MAAMC,SAAS;QAAEjB;QAAYI;QAAWQ;MAAM,CAAA;AAC5E,YAAMM,OAAOC,SAASrB,KAAKsB,IAAIC,SAAQ,GAAIT,KAAAA;AAC3C,YAAMU,MAAM,MAAMC,WAAW;QAAEC,SAASA,QAAQN,IAAAA;QAAOlB;QAAYe;QAAWC;MAAO,CAAA;AACrFT,iBAAWe,GAAAA;IACb,CAAA;AAEA,WAAO,MAAMG,aAAaf,OAAAA;EAC5B,GAAG;IAACZ;GAAK;AAET,MAAI,CAACQ,SAAS;AACZ,WAAO;EACT;AAEA,SACE,gBAAAoB,OAAA,cAACC,UAAUC,SAAO;IAAC7B;
|
|
6
|
-
"names": ["React", "useEffect", "useState", "useCapability", "invariant", "getSpace", "StackItem", "React", "mx", "FilePreview", "type", "url", "classNames", "startsWith", "img", "className", "mx", "src", "video", "controls", "iframe", "FileContainer", "file", "role", "blockstore", "useCapability", "WnfsCapabilities", "Blockstore", "instances", "Instances", "blobUrl", "setBlobUrl", "useState", "useEffect", "timeout", "setTimeout", "space", "getSpace", "invariant", "directory", "forest", "loadWnfs", "path", "filePath", "cid", "toString", "url", "getBlobUrl", "wnfsUrl", "clearTimeout", "React", "StackItem", "Content", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useEffect, useState } from 'react';\n\nimport { useCapability } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { FilePreview } from './FilePreview';\nimport { WnfsCapabilities } from '../capabilities';\nimport { filePath, getBlobUrl, loadWnfs, wnfsUrl } from '../helpers';\nimport { type FileType } from '../types';\n\nconst FileContainer = ({ file, role }: { file: FileType; role: string }) => {\n const blockstore = useCapability(WnfsCapabilities.Blockstore);\n const instances = useCapability(WnfsCapabilities.Instances);\n const [blobUrl, setBlobUrl] = useState<string>();\n\n useEffect(() => {\n const timeout = setTimeout(async () => {\n const space = getSpace(file);\n invariant(space);\n const { directory, forest } = await loadWnfs({ blockstore, instances, space });\n const path = filePath(file.cid.toString(), space);\n const url = await getBlobUrl({ wnfsUrl: wnfsUrl(path), blockstore, directory, forest });\n setBlobUrl(url);\n });\n\n return () => clearTimeout(timeout);\n }, [file]);\n\n if (!blobUrl) {\n return null;\n }\n\n return (\n <StackItem.Content role={role}>\n <FilePreview type={file.type} url={blobUrl} />\n </StackItem.Content>\n );\n};\n\nexport default FileContainer;\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nexport type FilePreviewProps = ThemedClassName<{ type: string; url: string }>;\n\n/**\n * File/content preview iframe.\n */\nexport const FilePreview = ({ type, url, classNames }: FilePreviewProps) => {\n if (type.startsWith('image/')) {\n return <img className={mx('w-full h-full object-contain', classNames)} src={url} />;\n } else if (type.startsWith('video/')) {\n return <video className={mx('w-full h-full object-contain', classNames)} src={url} controls />;\n } else {\n return <iframe className={mx('w-full h-full overflow-auto', classNames)} src={url} />;\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAIA,OAAOA,UAASC,WAAWC,gBAAgB;AAE3C,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;;;ACL1B,OAAOC,WAAW;AAGlB,SAASC,UAAU;AAOZ,IAAMC,cAAc,CAAC,EAAEC,MAAMC,KAAKC,WAAU,MAAoB;AACrE,MAAIF,KAAKG,WAAW,QAAA,GAAW;AAC7B,WAAO,sBAAA,cAACC,OAAAA;MAAIC,WAAWC,GAAG,gCAAgCJ,UAAAA;MAAaK,KAAKN;;EAC9E,WAAWD,KAAKG,WAAW,QAAA,GAAW;AACpC,WAAO,sBAAA,cAACK,SAAAA;MAAMH,WAAWC,GAAG,gCAAgCJ,UAAAA;MAAaK,KAAKN;MAAKQ,UAAAA;;EACrF,OAAO;AACL,WAAO,sBAAA,cAACC,UAAAA;MAAOL,WAAWC,GAAG,+BAA+BJ,UAAAA;MAAaK,KAAKN;;EAChF;AACF;;;;ADNA,IAAMU,gBAAgB,CAAC,EAAEC,MAAMC,KAAI,MAAoC;AACrE,QAAMC,aAAaC,cAAcC,iBAAiBC,UAAU;AAC5D,QAAMC,YAAYH,cAAcC,iBAAiBG,SAAS;AAC1D,QAAM,CAACC,SAASC,UAAAA,IAAcC,SAAAA;AAE9BC,YAAU,MAAA;AACR,UAAMC,UAAUC,WAAW,YAAA;AACzB,YAAMC,QAAQC,SAASf,IAAAA;AACvBgB,gBAAUF,OAAAA,QAAAA;;;;;;;;;AACV,YAAM,EAAEG,WAAWC,OAAM,IAAK,MAAMC,SAAS;QAAEjB;QAAYI;QAAWQ;MAAM,CAAA;AAC5E,YAAMM,OAAOC,SAASrB,KAAKsB,IAAIC,SAAQ,GAAIT,KAAAA;AAC3C,YAAMU,MAAM,MAAMC,WAAW;QAAEC,SAASA,QAAQN,IAAAA;QAAOlB;QAAYe;QAAWC;MAAO,CAAA;AACrFT,iBAAWe,GAAAA;IACb,CAAA;AAEA,WAAO,MAAMG,aAAaf,OAAAA;EAC5B,GAAG;IAACZ;GAAK;AAET,MAAI,CAACQ,SAAS;AACZ,WAAO;EACT;AAEA,SACE,gBAAAoB,OAAA,cAACC,UAAUC,SAAO;IAAC7B;KACjB,gBAAA2B,OAAA,cAACG,aAAAA;IAAYC,MAAMhC,KAAKgC;IAAMR,KAAKhB;;AAGzC;AAEA,IAAA,wBAAeT;",
|
|
6
|
+
"names": ["React", "useEffect", "useState", "useCapability", "invariant", "getSpace", "StackItem", "React", "mx", "FilePreview", "type", "url", "classNames", "startsWith", "img", "className", "mx", "src", "video", "controls", "iframe", "FileContainer", "file", "role", "blockstore", "useCapability", "WnfsCapabilities", "Blockstore", "instances", "Instances", "blobUrl", "setBlobUrl", "useState", "useEffect", "timeout", "setTimeout", "space", "getSpace", "invariant", "directory", "forest", "loadWnfs", "path", "filePath", "cid", "toString", "url", "getBlobUrl", "wnfsUrl", "clearTimeout", "React", "StackItem", "Content", "FilePreview", "type"]
|
|
7
7
|
}
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "./chunk-SCQWJNHD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
WnfsCapabilities
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-NIDFBTNY.mjs";
|
|
7
|
+
import "./chunk-X54OT4V3.mjs";
|
|
8
8
|
|
|
9
9
|
// packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts
|
|
10
10
|
import { contributes } from "@dxos/app-framework";
|
|
@@ -188,4 +188,4 @@ var blockstore_default = async (context) => {
|
|
|
188
188
|
export {
|
|
189
189
|
blockstore_default as default
|
|
190
190
|
};
|
|
191
|
-
//# sourceMappingURL=blockstore-
|
|
191
|
+
//# sourceMappingURL=blockstore-G47Q25U6.mjs.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// packages/plugins/plugin-wnfs/src/capabilities/index.ts
|
|
2
|
+
import { lazy } from "@dxos/app-framework";
|
|
3
|
+
var Blockstore = lazy(() => import("./blockstore-G47Q25U6.mjs"));
|
|
4
|
+
var FileUploader = lazy(() => import("./file-uploader-L4TDVJBE.mjs"));
|
|
5
|
+
var IntentResolver = lazy(() => import("./intent-resolver-VSMIQLGS.mjs"));
|
|
6
|
+
var Markdown = lazy(() => import("./markdown-MWMZVPEX.mjs"));
|
|
7
|
+
var ReactSurface = lazy(() => import("./react-surface-MKJYHQ4P.mjs"));
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
Blockstore,
|
|
11
|
+
FileUploader,
|
|
12
|
+
IntentResolver,
|
|
13
|
+
Markdown,
|
|
14
|
+
ReactSurface
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-FH2Q7ZBE.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WNFS_PLUGIN
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X54OT4V3.mjs";
|
|
4
4
|
|
|
5
5
|
// packages/plugins/plugin-wnfs/src/types/file.ts
|
|
6
6
|
import { S, TypedObject } from "@dxos/echo-schema";
|
|
@@ -57,4 +57,4 @@ export {
|
|
|
57
57
|
FileType,
|
|
58
58
|
WnfsAction
|
|
59
59
|
};
|
|
60
|
-
//# sourceMappingURL=chunk-
|
|
60
|
+
//# sourceMappingURL=chunk-FKYLWLNM.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WNFS_PLUGIN
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X54OT4V3.mjs";
|
|
4
4
|
|
|
5
5
|
// packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts
|
|
6
6
|
import { defineCapability } from "@dxos/app-framework";
|
|
@@ -13,4 +13,4 @@ var WnfsCapabilities;
|
|
|
13
13
|
export {
|
|
14
14
|
WnfsCapabilities
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-NIDFBTNY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const WNFS_PLUGIN = 'dxos.org/plugin/wnfs';\n\nexport const meta: PluginMeta = {\n id: WNFS_PLUGIN,\n name: 'WNFS',\n description: 'Manage and view files with via the Web Native File System (WNFS).',\n icon: 'ph--file-cloud--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-wnfs',\n};\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,cAAc;AAEpB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
+
"names": ["WNFS_PLUGIN", "meta", "id", "name", "description", "icon", "source"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WnfsAction
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FKYLWLNM.mjs";
|
|
4
|
+
import "./chunk-X54OT4V3.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts
|
|
7
7
|
import { Effect, pipe } from "effect";
|
|
@@ -26,4 +26,4 @@ var file_uploader_default = (context) => {
|
|
|
26
26
|
export {
|
|
27
27
|
file_uploader_default as default
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=file-uploader-
|
|
29
|
+
//# sourceMappingURL=file-uploader-L4TDVJBE.mjs.map
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
IntentResolver,
|
|
5
5
|
Markdown,
|
|
6
6
|
ReactSurface
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FH2Q7ZBE.mjs";
|
|
8
8
|
import {
|
|
9
9
|
WnfsCapabilities
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NIDFBTNY.mjs";
|
|
11
11
|
import {
|
|
12
12
|
FileType,
|
|
13
13
|
WnfsAction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FKYLWLNM.mjs";
|
|
15
15
|
import {
|
|
16
16
|
WNFS_PLUGIN,
|
|
17
17
|
meta
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-X54OT4V3.mjs";
|
|
19
19
|
|
|
20
20
|
// packages/plugins/plugin-wnfs/src/WnfsPlugin.tsx
|
|
21
21
|
import { pipe } from "effect";
|
|
@@ -30,11 +30,11 @@ var translations_default = [
|
|
|
30
30
|
{
|
|
31
31
|
"en-US": {
|
|
32
32
|
[FileType.typename]: {
|
|
33
|
-
"typename label": "File"
|
|
33
|
+
"typename label": "File",
|
|
34
|
+
"object name placeholder": "New file"
|
|
34
35
|
},
|
|
35
36
|
[WNFS_PLUGIN]: {
|
|
36
37
|
"plugin name": "Files",
|
|
37
|
-
"file title placeholder": "New file",
|
|
38
38
|
"delete object label": "Delete",
|
|
39
39
|
"file input placeholder": "Drop a file here, or click to select a file"
|
|
40
40
|
}
|
|
@@ -69,12 +69,6 @@ var WnfsPlugin = () => definePlugin(meta, [
|
|
|
69
69
|
id: FileType.typename,
|
|
70
70
|
metadata: {
|
|
71
71
|
label: (object) => object instanceof FileType ? object.name : void 0,
|
|
72
|
-
placeholder: [
|
|
73
|
-
"file title placeholder",
|
|
74
|
-
{
|
|
75
|
-
ns: WNFS_PLUGIN
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
72
|
// TODO(wittjosiah): Would be nice if icon could change based on the type of the file.
|
|
79
73
|
icon: "ph--file--regular"
|
|
80
74
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/WnfsPlugin.tsx", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { pipe } from 'effect';\n\nimport {\n Capabilities,\n Events,\n chain,\n contributes,\n createIntent,\n defineModule,\n definePlugin,\n} from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { Blockstore, FileUploader, IntentResolver, Markdown, ReactSurface, WnfsCapabilities } from './capabilities';\nimport { meta
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAErB,SACEC,cACAC,QACAC,OACAC,aACAC,cACAC,cACAC,oBACK;AACP,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACXjC,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,SAASC,QAAQ,GAAG;QACnB,kBAAkB;
|
|
6
|
-
"names": ["pipe", "Capabilities", "Events", "chain", "contributes", "createIntent", "defineModule", "definePlugin", "ClientEvents", "MarkdownEvents", "SpaceCapabilities", "defineObjectForm", "FileType", "typename", "WNFS_PLUGIN", "WnfsPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "ClientEvents", "ClientReady", "activate", "Blockstore", "instances", "contributes", "WnfsCapabilities", "Instances", "Events", "SetupTranslations", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "FileType", "typename", "metadata", "label", "object", "name", "undefined", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { pipe } from 'effect';\n\nimport {\n Capabilities,\n Events,\n chain,\n contributes,\n createIntent,\n defineModule,\n definePlugin,\n} from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { Blockstore, FileUploader, IntentResolver, Markdown, ReactSurface, WnfsCapabilities } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { FileType, WnfsAction } from './types';\n\nexport const WnfsPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/blockstore`,\n activatesOn: ClientEvents.ClientReady,\n activate: Blockstore,\n }),\n defineModule({\n id: `${meta.id}/module/instances`,\n activatesOn: ClientEvents.ClientReady,\n activate: () => {\n const instances: WnfsCapabilities.Instances = {};\n return contributes(WnfsCapabilities.Instances, instances);\n },\n }),\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: FileType.typename,\n metadata: {\n label: (object: any) => (object instanceof FileType ? object.name : undefined),\n // TODO(wittjosiah): Would be nice if icon could change based on the type of the file.\n icon: 'ph--file--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: FileType,\n formSchema: WnfsAction.UploadFileSchema,\n getIntent: (props, options) =>\n pipe(createIntent(WnfsAction.Upload, { ...props, space: options.space }), chain(WnfsAction.Create, {})),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/file-uploader`,\n activatesOn: ClientEvents.ClientReady,\n activate: FileUploader,\n }),\n defineModule({\n id: `${meta.id}/module/markdown`,\n activatesOn: MarkdownEvents.SetupExtensions,\n activate: Markdown,\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { WNFS_PLUGIN } from './meta';\nimport { FileType } from './types';\n\nexport default [\n {\n 'en-US': {\n [FileType.typename]: {\n 'typename label': 'File',\n 'object name placeholder': 'New file',\n },\n [WNFS_PLUGIN]: {\n 'plugin name': 'Files',\n 'delete object label': 'Delete',\n 'file input placeholder': 'Drop a file here, or click to select a file',\n },\n },\n },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAErB,SACEC,cACAC,QACAC,OACAC,aACAC,cACAC,cACAC,oBACK;AACP,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACXjC,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,SAASC,QAAQ,GAAG;QACnB,kBAAkB;QAClB,2BAA2B;MAC7B;MACA,CAACC,WAAAA,GAAc;QACb,eAAe;QACf,uBAAuB;QACvB,0BAA0B;MAC5B;IACF;EACF;;;;ADKK,IAAMC,aAAa,MACxBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,aAAaC;IAC1BC,UAAUC;EACZ,CAAA;EACAN,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,aAAaC;IAC1BC,UAAU,MAAA;AACR,YAAME,YAAwC,CAAC;AAC/C,aAAOC,YAAYC,iBAAiBC,WAAWH,SAAAA;IACjD;EACF,CAAA;EACAP,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaS,OAAOC;IACpBP,UAAU,MAAMG,YAAYK,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaS,OAAOK;IACpBX,UAAU,MACRG,YAAYK,aAAaI,UAAU;MACjChB,IAAIiB,SAASC;MACbC,UAAU;QACRC,OAAO,CAACC,WAAiBA,kBAAkBJ,WAAWI,OAAOC,OAAOC;;QAEpEC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,aAAauB;IAC1BrB,UAAU,MACRG,YACEmB,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcZ;MACda,YAAYC,WAAWC;MACvBC,WAAW,CAACC,OAAOC,YACjBC,KAAKC,aAAaN,WAAWO,QAAQ;QAAE,GAAGJ;QAAOK,OAAOJ,QAAQI;MAAM,CAAA,GAAIC,MAAMT,WAAWU,QAAQ,CAAC,CAAA,CAAA;IACxG,CAAA,CAAA;EAEN,CAAA;EACA1C,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,aAAaC;IAC1BC,UAAUsC;EACZ,CAAA;EACA3C,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAa0C,eAAeC;IAC5BxC,UAAUyC;EACZ,CAAA;EACA9C,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaS,OAAOoC;IACpB1C,UAAU2C;EACZ,CAAA;EACAhD,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaS,OAAOsC;IACpB5C,UAAU6C;EACZ,CAAA;CACD;",
|
|
6
|
+
"names": ["pipe", "Capabilities", "Events", "chain", "contributes", "createIntent", "defineModule", "definePlugin", "ClientEvents", "MarkdownEvents", "SpaceCapabilities", "defineObjectForm", "FileType", "typename", "WNFS_PLUGIN", "WnfsPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "ClientEvents", "ClientReady", "activate", "Blockstore", "instances", "contributes", "WnfsCapabilities", "Instances", "Events", "SetupTranslations", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "FileType", "typename", "metadata", "label", "object", "name", "undefined", "icon", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "formSchema", "WnfsAction", "UploadFileSchema", "getIntent", "props", "options", "pipe", "createIntent", "Upload", "space", "chain", "Create", "FileUploader", "MarkdownEvents", "SetupExtensions", "Markdown", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver"]
|
|
7
7
|
}
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./chunk-SCQWJNHD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
WnfsCapabilities
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NIDFBTNY.mjs";
|
|
7
7
|
import {
|
|
8
8
|
FileType,
|
|
9
9
|
WnfsAction
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-FKYLWLNM.mjs";
|
|
11
|
+
import "./chunk-X54OT4V3.mjs";
|
|
12
12
|
|
|
13
13
|
// packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts
|
|
14
14
|
import { contributes, Capabilities, createResolver } from "@dxos/app-framework";
|
|
@@ -46,4 +46,4 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
46
46
|
export {
|
|
47
47
|
intent_resolver_default as default
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=intent-resolver-
|
|
49
|
+
//# sourceMappingURL=intent-resolver-VSMIQLGS.mjs.map
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
} from "./chunk-SCQWJNHD.mjs";
|
|
6
6
|
import {
|
|
7
7
|
WnfsCapabilities
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-NIDFBTNY.mjs";
|
|
9
|
+
import "./chunk-X54OT4V3.mjs";
|
|
10
10
|
|
|
11
11
|
// packages/plugins/plugin-wnfs/src/capabilities/markdown.ts
|
|
12
12
|
import { contributes } from "@dxos/app-framework";
|
|
@@ -195,4 +195,4 @@ var markdown_default = (context) => contributes(MarkdownCapabilities.Extensions,
|
|
|
195
195
|
export {
|
|
196
196
|
markdown_default as default
|
|
197
197
|
};
|
|
198
|
-
//# sourceMappingURL=markdown-
|
|
198
|
+
//# sourceMappingURL=markdown-MWMZVPEX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytes":1544,"imports":[],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts":{"bytes":1989,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/common.ts":{"bytes":7743,"imports":[{"path":"multiformats/cid","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/load.ts":{"bytes":9037,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true},{"path":"wnfs","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts":{"bytes":3266,"imports":[{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/upload.ts":{"bytes":6784,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/codecs/raw","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"},{"path":"packages/plugins/plugin-wnfs/src/helpers/load.ts","kind":"import-statement","original":"./load"},{"path":"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts","kind":"import-statement","original":"./wnfs-url"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/index.ts":{"bytes":756,"imports":[{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"},{"path":"packages/plugins/plugin-wnfs/src/helpers/load.ts","kind":"import-statement","original":"./load"},{"path":"packages/plugins/plugin-wnfs/src/helpers/upload.ts","kind":"import-statement","original":"./upload"},{"path":"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts","kind":"import-statement","original":"./wnfs-url"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/blockstore.ts":{"bytes":19672,"imports":[{"path":"@ipld/car","kind":"import-statement","external":true},{"path":"blockstore-core","kind":"import-statement","external":true},{"path":"blockstore-idb","kind":"import-statement","external":true},{"path":"debounce","kind":"import-statement","external":true},{"path":"idb-keyval","kind":"import-statement","external":true},{"path":"it-all","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts":{"bytes":2590,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/blockstore.ts","kind":"import-statement","original":"../blockstore"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/file.ts":{"bytes":1513,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytes":4735,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/types/file.ts","kind":"import-statement","original":"./file"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/index.ts":{"bytes":579,"imports":[{"path":"packages/plugins/plugin-wnfs/src/types/file.ts","kind":"import-statement","original":"./file"},{"path":"packages/plugins/plugin-wnfs/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts":{"bytes":3468,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts":{"bytes":4581,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"../helpers"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/extensions/image.tsx":{"bytes":21460,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","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/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/extensions/index.ts":{"bytes":504,"imports":[{"path":"packages/plugins/plugin-wnfs/src/extensions/image.tsx","kind":"import-statement","original":"./image"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts":{"bytes":3222,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/extensions/index.ts","kind":"import-statement","original":"../extensions"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/FileInput.tsx":{"bytes":5028,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-dropzone","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx":{"bytes":2915,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx":{"bytes":6000,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx","kind":"import-statement","original":"./FilePreview"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/index.ts","kind":"import-statement","original":"../capabilities"},{"path":"packages/plugins/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/index.ts":{"bytes":911,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/components/FileInput.tsx","kind":"import-statement","original":"./FileInput"},{"path":"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx","kind":"dynamic-import","original":"./FileContainer"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx":{"bytes":5790,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/index.ts":{"bytes":1872,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts","kind":"dynamic-import","original":"./blockstore"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts","kind":"dynamic-import","original":"./file-uploader"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts","kind":"dynamic-import","original":"./markdown"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/translations.ts":{"bytes":1903,"imports":[{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/WnfsPlugin.tsx":{"bytes":11678,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-wnfs/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/index.ts":{"bytes":773,"imports":[{"path":"packages/plugins/plugin-wnfs/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-wnfs/src/WnfsPlugin.tsx","kind":"import-statement","original":"./WnfsPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-wnfs/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6349},"packages/plugins/plugin-wnfs/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-TOOHDL3I.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-462MHCWG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-I4V75JSO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["WNFS_PLUGIN","WnfsCapabilities","WnfsPlugin","meta"],"entryPoint":"packages/plugins/plugin-wnfs/src/index.ts","inputs":{"packages/plugins/plugin-wnfs/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-wnfs/src/WnfsPlugin.tsx":{"bytesInOutput":2502},"packages/plugins/plugin-wnfs/src/translations.ts":{"bytesInOutput":362}},"bytes":3425},"packages/plugins/plugin-wnfs/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-wnfs/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-I4V75JSO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"}],"exports":["FileType","WnfsAction"],"entryPoint":"packages/plugins/plugin-wnfs/src/types/index.ts","inputs":{},"bytes":170},"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-7XIICCYU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10631},"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-7XIICCYU.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-462MHCWG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@ipld/car","kind":"import-statement","external":true},{"path":"blockstore-core","kind":"import-statement","external":true},{"path":"blockstore-idb","kind":"import-statement","external":true},{"path":"debounce","kind":"import-statement","external":true},{"path":"idb-keyval","kind":"import-statement","external":true},{"path":"it-all","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts":{"bytesInOutput":453},"packages/plugins/plugin-wnfs/src/blockstore.ts":{"bytesInOutput":4273}},"bytes":5140},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-XXHZOW37.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1841},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-XXHZOW37.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-I4V75JSO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts":{"bytesInOutput":746}},"bytes":996},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-WXSSL4FI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2113},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-WXSSL4FI.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-462MHCWG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-I4V75JSO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts":{"bytesInOutput":936}},"bytes":1312},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-PJWHZHGJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12473},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-PJWHZHGJ.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-462MHCWG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts":{"bytesInOutput":651},"packages/plugins/plugin-wnfs/src/extensions/image.tsx":{"bytesInOutput":4794},"packages/plugins/plugin-wnfs/src/extensions/index.ts":{"bytesInOutput":0}},"bytes":5889},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-IK7S6VBW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4327},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-IK7S6VBW.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-TOOHDL3I.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-462MHCWG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx","inputs":{"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx":{"bytesInOutput":1519},"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx":{"bytesInOutput":674}},"bytes":2697},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-TOOHDL3I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":909},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-TOOHDL3I.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-7XIICCYU.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-XXHZOW37.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-WXSSL4FI.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-PJWHZHGJ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-TYJKCUPX.mjs","kind":"dynamic-import"}],"exports":["Blockstore","FileUploader","IntentResolver","Markdown","ReactSurface"],"inputs":{"packages/plugins/plugin-wnfs/src/capabilities/index.ts":{"bytesInOutput":389}},"bytes":579},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13316},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs":{"imports":[{"path":"multiformats/cid","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true},{"path":"wnfs","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/codecs/raw","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["filePath","getBlobUrl","getPathFromUrl","loadWnfs","storeName","upload","wnfsUrl"],"inputs":{"packages/plugins/plugin-wnfs/src/helpers/common.ts":{"bytesInOutput":1077},"packages/plugins/plugin-wnfs/src/helpers/load.ts":{"bytesInOutput":1918},"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts":{"bytesInOutput":545},"packages/plugins/plugin-wnfs/src/helpers/upload.ts":{"bytesInOutput":1281},"packages/plugins/plugin-wnfs/src/helpers/index.ts":{"bytesInOutput":0}},"bytes":5186},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-462MHCWG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1040},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-462MHCWG.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["WnfsCapabilities"],"inputs":{"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts":{"bytesInOutput":338}},"bytes":534},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-TYJKCUPX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5788},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-TYJKCUPX.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-I4V75JSO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dropzone","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-IK7S6VBW.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx":{"bytesInOutput":1203},"packages/plugins/plugin-wnfs/src/components/index.ts":{"bytesInOutput":107},"packages/plugins/plugin-wnfs/src/components/FileInput.tsx":{"bytesInOutput":1137}},"bytes":2977},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-I4V75JSO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3061},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-I4V75JSO.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","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/react-client/echo","kind":"import-statement","external":true}],"exports":["FileType","WnfsAction"],"inputs":{"packages/plugins/plugin-wnfs/src/types/file.ts":{"bytesInOutput":260},"packages/plugins/plugin-wnfs/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytesInOutput":1096}},"bytes":1595},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":732},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-CRN4JB6V.mjs":{"imports":[],"exports":["WNFS_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytesInOutput":305}},"bytes":428}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytes":1532,"imports":[],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts":{"bytes":1989,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/common.ts":{"bytes":7743,"imports":[{"path":"multiformats/cid","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/load.ts":{"bytes":9037,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true},{"path":"wnfs","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts":{"bytes":3266,"imports":[{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/upload.ts":{"bytes":6784,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/codecs/raw","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"},{"path":"packages/plugins/plugin-wnfs/src/helpers/load.ts","kind":"import-statement","original":"./load"},{"path":"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts","kind":"import-statement","original":"./wnfs-url"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/helpers/index.ts":{"bytes":756,"imports":[{"path":"packages/plugins/plugin-wnfs/src/helpers/common.ts","kind":"import-statement","original":"./common"},{"path":"packages/plugins/plugin-wnfs/src/helpers/load.ts","kind":"import-statement","original":"./load"},{"path":"packages/plugins/plugin-wnfs/src/helpers/upload.ts","kind":"import-statement","original":"./upload"},{"path":"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts","kind":"import-statement","original":"./wnfs-url"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/blockstore.ts":{"bytes":19672,"imports":[{"path":"@ipld/car","kind":"import-statement","external":true},{"path":"blockstore-core","kind":"import-statement","external":true},{"path":"blockstore-idb","kind":"import-statement","external":true},{"path":"debounce","kind":"import-statement","external":true},{"path":"idb-keyval","kind":"import-statement","external":true},{"path":"it-all","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts":{"bytes":2590,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/blockstore.ts","kind":"import-statement","original":"../blockstore"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/file.ts":{"bytes":1513,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytes":4735,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/types/file.ts","kind":"import-statement","original":"./file"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/index.ts":{"bytes":579,"imports":[{"path":"packages/plugins/plugin-wnfs/src/types/file.ts","kind":"import-statement","original":"./file"},{"path":"packages/plugins/plugin-wnfs/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts":{"bytes":3468,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts":{"bytes":4581,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"../helpers"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/extensions/image.tsx":{"bytes":21460,"imports":[{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","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/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/extensions/index.ts":{"bytes":504,"imports":[{"path":"packages/plugins/plugin-wnfs/src/extensions/image.tsx","kind":"import-statement","original":"./image"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts":{"bytes":3222,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/extensions/index.ts","kind":"import-statement","original":"../extensions"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/FileInput.tsx":{"bytes":5028,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-dropzone","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx":{"bytes":2915,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx":{"bytes":5924,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx","kind":"import-statement","original":"./FilePreview"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/index.ts","kind":"import-statement","original":"../capabilities"},{"path":"packages/plugins/plugin-wnfs/src/helpers/index.ts","kind":"import-statement","original":"../helpers"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/components/index.ts":{"bytes":911,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/components/FileInput.tsx","kind":"import-statement","original":"./FileInput"},{"path":"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx","kind":"dynamic-import","original":"./FileContainer"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx":{"bytes":5984,"imports":[{"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/effect","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/index.ts":{"bytes":1872,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts","kind":"dynamic-import","original":"./blockstore"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts","kind":"dynamic-import","original":"./file-uploader"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts","kind":"dynamic-import","original":"./markdown"},{"path":"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/translations.ts":{"bytes":1904,"imports":[{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/WnfsPlugin.tsx":{"bytes":11177,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-wnfs/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-wnfs/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-wnfs/src/index.ts":{"bytes":773,"imports":[{"path":"packages/plugins/plugin-wnfs/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-wnfs/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-wnfs/src/WnfsPlugin.tsx","kind":"import-statement","original":"./WnfsPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-wnfs/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6184},"packages/plugins/plugin-wnfs/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FH2Q7ZBE.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-NIDFBTNY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FKYLWLNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["WNFS_PLUGIN","WnfsCapabilities","WnfsPlugin","meta"],"entryPoint":"packages/plugins/plugin-wnfs/src/index.ts","inputs":{"packages/plugins/plugin-wnfs/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-wnfs/src/WnfsPlugin.tsx":{"bytesInOutput":2380},"packages/plugins/plugin-wnfs/src/translations.ts":{"bytesInOutput":363}},"bytes":3304},"packages/plugins/plugin-wnfs/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-wnfs/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FKYLWLNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"}],"exports":["FileType","WnfsAction"],"entryPoint":"packages/plugins/plugin-wnfs/src/types/index.ts","inputs":{},"bytes":170},"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-G47Q25U6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10631},"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-G47Q25U6.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-NIDFBTNY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@ipld/car","kind":"import-statement","external":true},{"path":"blockstore-core","kind":"import-statement","external":true},{"path":"blockstore-idb","kind":"import-statement","external":true},{"path":"debounce","kind":"import-statement","external":true},{"path":"idb-keyval","kind":"import-statement","external":true},{"path":"it-all","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/blockstore.ts":{"bytesInOutput":453},"packages/plugins/plugin-wnfs/src/blockstore.ts":{"bytesInOutput":4273}},"bytes":5140},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-L4TDVJBE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1841},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-L4TDVJBE.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FKYLWLNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts":{"bytesInOutput":746}},"bytes":996},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-VSMIQLGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2113},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-VSMIQLGS.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-NIDFBTNY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FKYLWLNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts":{"bytesInOutput":936}},"bytes":1312},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-MWMZVPEX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12473},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-MWMZVPEX.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-NIDFBTNY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@codemirror/language","kind":"import-statement","external":true},{"path":"@codemirror/state","kind":"import-statement","external":true},{"path":"@codemirror/view","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dom/client","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}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/markdown.ts":{"bytesInOutput":651},"packages/plugins/plugin-wnfs/src/extensions/image.tsx":{"bytesInOutput":4794},"packages/plugins/plugin-wnfs/src/extensions/index.ts":{"bytesInOutput":0}},"bytes":5889},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-4HNP22HU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4289},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-4HNP22HU.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FH2Q7ZBE.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-NIDFBTNY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx","inputs":{"packages/plugins/plugin-wnfs/src/components/FileContainer.tsx":{"bytesInOutput":1499},"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx":{"bytesInOutput":674}},"bytes":2677},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FH2Q7ZBE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":909},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FH2Q7ZBE.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-G47Q25U6.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-L4TDVJBE.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-VSMIQLGS.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-MWMZVPEX.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-MKJYHQ4P.mjs","kind":"dynamic-import"}],"exports":["Blockstore","FileUploader","IntentResolver","Markdown","ReactSurface"],"inputs":{"packages/plugins/plugin-wnfs/src/capabilities/index.ts":{"bytesInOutput":389}},"bytes":579},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13316},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCQWJNHD.mjs":{"imports":[{"path":"multiformats/cid","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"uint8arrays","kind":"import-statement","external":true},{"path":"wnfs","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/codecs/raw","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["filePath","getBlobUrl","getPathFromUrl","loadWnfs","storeName","upload","wnfsUrl"],"inputs":{"packages/plugins/plugin-wnfs/src/helpers/common.ts":{"bytesInOutput":1077},"packages/plugins/plugin-wnfs/src/helpers/load.ts":{"bytesInOutput":1918},"packages/plugins/plugin-wnfs/src/helpers/wnfs-url.ts":{"bytesInOutput":545},"packages/plugins/plugin-wnfs/src/helpers/upload.ts":{"bytesInOutput":1281},"packages/plugins/plugin-wnfs/src/helpers/index.ts":{"bytesInOutput":0}},"bytes":5186},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-NIDFBTNY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1040},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-NIDFBTNY.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["WnfsCapabilities"],"inputs":{"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts":{"bytesInOutput":338}},"bytes":534},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-MKJYHQ4P.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5903},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-MKJYHQ4P.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FKYLWLNM.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"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/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-dropzone","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-4HNP22HU.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx":{"bytesInOutput":1257},"packages/plugins/plugin-wnfs/src/components/index.ts":{"bytesInOutput":107},"packages/plugins/plugin-wnfs/src/components/FileInput.tsx":{"bytesInOutput":1137}},"bytes":3031},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FKYLWLNM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3061},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-FKYLWLNM.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","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/react-client/echo","kind":"import-statement","external":true}],"exports":["FileType","WnfsAction"],"inputs":{"packages/plugins/plugin-wnfs/src/types/file.ts":{"bytesInOutput":260},"packages/plugins/plugin-wnfs/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytesInOutput":1096}},"bytes":1595},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":724},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-X54OT4V3.mjs":{"imports":[],"exports":["WNFS_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytesInOutput":305}},"bytes":428}}}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FileType,
|
|
3
3
|
WnfsAction
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FKYLWLNM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
WNFS_PLUGIN
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X54OT4V3.mjs";
|
|
8
8
|
|
|
9
9
|
// packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx
|
|
10
10
|
import React3, { useCallback as useCallback2 } from "react";
|
|
11
11
|
import { contributes, Capabilities, createSurface } from "@dxos/app-framework";
|
|
12
|
+
import { isInstanceOf } from "@dxos/echo-schema";
|
|
12
13
|
import { findAnnotation as findAnnotation2 } from "@dxos/effect";
|
|
13
14
|
|
|
14
15
|
// packages/plugins/plugin-wnfs/src/components/index.ts
|
|
@@ -38,7 +39,7 @@ var FileInput = ({ schema, onChange }) => {
|
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
// packages/plugins/plugin-wnfs/src/components/index.ts
|
|
41
|
-
var FileContainer = React2.lazy(() => import("./FileContainer-
|
|
42
|
+
var FileContainer = React2.lazy(() => import("./FileContainer-4HNP22HU.mjs"));
|
|
42
43
|
|
|
43
44
|
// packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx
|
|
44
45
|
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
@@ -49,7 +50,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
49
50
|
"section",
|
|
50
51
|
"slide"
|
|
51
52
|
],
|
|
52
|
-
filter: (data) => data.subject
|
|
53
|
+
filter: (data) => isInstanceOf(FileType, data.subject),
|
|
53
54
|
component: ({ data, role }) => /* @__PURE__ */ React3.createElement(FileContainer, {
|
|
54
55
|
role,
|
|
55
56
|
file: data.subject
|
|
@@ -78,4 +79,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
78
79
|
export {
|
|
79
80
|
react_surface_default as default
|
|
80
81
|
};
|
|
81
|
-
//# sourceMappingURL=react-surface-
|
|
82
|
+
//# sourceMappingURL=react-surface-MKJYHQ4P.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts", "../../../src/components/FileInput.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { contributes, Capabilities, createSurface } from '@dxos/app-framework';\nimport { isInstanceOf } from '@dxos/echo-schema';\nimport { type S } from '@dxos/echo-schema';\nimport { findAnnotation } from '@dxos/effect';\nimport { type InputProps } from '@dxos/react-ui-form';\n\nimport { FileContainer, FileInput } from '../components';\nimport { WNFS_PLUGIN } from '../meta';\nimport { FileType, WnfsAction } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${WNFS_PLUGIN}/article`,\n role: ['article', 'section', 'slide'],\n filter: (data): data is { subject: FileType } => isInstanceOf(FileType, data.subject),\n component: ({ data, role }) => <FileContainer role={role} file={data.subject} />,\n }),\n createSurface({\n id: `${WNFS_PLUGIN}/create-form`,\n role: 'form-input',\n filter: (data): data is { prop: string; schema: S.Schema.Any } => {\n const annotation = findAnnotation<boolean>((data.schema as S.Schema.All).ast, WnfsAction.UploadAnnotationId);\n return !!annotation;\n },\n component: ({ data: { prop, schema }, ...props }) => {\n const inputProps = props as unknown as InputProps;\n const handleChange = useCallback(\n (file: File) => inputProps.onValueChange?.('object', file),\n [prop, inputProps.onValueChange],\n );\n\n return <FileInput schema={schema} onChange={handleChange} />;\n },\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nexport const FileContainer = React.lazy(() => import('./FileContainer'));\n\nexport * from './FileInput';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema as S } from 'effect';\nimport React, { useCallback } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\nimport { findAnnotation } from '@dxos/effect';\nimport { useTranslation } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { WNFS_PLUGIN } from '../meta';\nimport { WnfsAction } from '../types';\n\nexport type FileInputProps = {\n schema: S.Schema.Any;\n onChange: (file: File) => void;\n};\n\nexport const FileInput = ({ schema, onChange }: FileInputProps) => {\n const { t } = useTranslation(WNFS_PLUGIN);\n const accept = findAnnotation<Record<string, string[]>>(schema.ast, WnfsAction.UploadAnnotationId);\n\n const onDropAccepted = useCallback((files: File[]) => onChange?.(files[0]), [onChange]);\n\n const { acceptedFiles, getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone({\n multiple: false,\n accept,\n onDropAccepted,\n });\n\n return (\n <div\n {...getRootProps()}\n className={mx(\n 'flex flex-col items-center p-8 border border-separator',\n isFocused && 'focus-ring',\n isDragAccept && 'bg-attention',\n isDragReject && 'border-error',\n )}\n >\n <input {...getInputProps()} />\n {acceptedFiles[0] ? <p>{acceptedFiles[0].name}</p> : <p>{t('file input placeholder')}</p>}\n </div>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,OAAOA,UAASC,eAAAA,oBAAmB;AAEnC,SAASC,aAAaC,cAAcC,qBAAqB;AACzD,SAASC,oBAAoB;AAE7B,SAASC,kBAAAA,uBAAsB;;;ACL/B,OAAOC,YAAW;;;ACClB,OAAOC,SAASC,mBAAmB;AACnC,SAASC,mBAAmB;AAE5B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,UAAU;AAUZ,IAAMC,YAAY,CAAC,EAAEC,QAAQC,SAAQ,MAAkB;AAC5D,QAAM,EAAEC,EAAC,IAAKC,eAAeC,WAAAA;AAC7B,QAAMC,SAASC,eAAyCN,OAAOO,KAAKC,WAAWC,kBAAkB;AAEjG,QAAMC,iBAAiBC,YAAY,CAACC,UAAkBX,WAAWW,MAAM,CAAA,CAAE,GAAG;IAACX;GAAS;AAEtF,QAAM,EAAEY,eAAeC,cAAcC,eAAeC,WAAWC,cAAcC,aAAY,IAAKC,YAAY;IACxGC,UAAU;IACVf;IACAK;EACF,CAAA;AAEA,SACE,sBAAA,cAACW,OAAAA;IACE,GAAGP,aAAAA;IACJQ,WAAWC,GACT,0DACAP,aAAa,cACbC,gBAAgB,gBAChBC,gBAAgB,cAAA;KAGlB,sBAAA,cAACM,SAAUT,cAAAA,CAAAA,GACVF,cAAc,CAAA,IAAK,sBAAA,cAACY,KAAAA,MAAGZ,cAAc,CAAA,EAAGa,IAAI,IAAQ,sBAAA,cAACD,KAAAA,MAAGvB,EAAE,wBAAA,CAAA,CAAA;AAGjE;;;ADxCO,IAAMyB,gBAAgBC,OAAMC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ADUrD,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;MAAC;MAAW;MAAW;;IAC7BC,QAAQ,CAACC,SAAwCC,aAAaC,UAAUF,KAAKG,OAAO;IACpFC,WAAW,CAAC,EAAEJ,MAAMF,KAAI,MAAO,gBAAAO,OAAA,cAACC,eAAAA;MAAcR;MAAYS,MAAMP,KAAKG;;EACvE,CAAA;EACAR,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,SAAAA;AACP,YAAMQ,aAAaC,gBAAyBT,KAAKU,OAAwBC,KAAKC,WAAWC,kBAAkB;AAC3G,aAAO,CAAC,CAACL;IACX;IACAJ,WAAW,CAAC,EAAEJ,MAAM,EAAEc,MAAMJ,OAAM,GAAI,GAAGK,MAAAA,MAAO;AAC9C,YAAMC,aAAaD;AACnB,YAAME,eAAeC,aACnB,CAACX,SAAeS,WAAWG,gBAAgB,UAAUZ,IAAAA,GACrD;QAACO;QAAME,WAAWG;OAAc;AAGlC,aAAO,gBAAAd,OAAA,cAACe,WAAAA;QAAUV;QAAgBW,UAAUJ;;IAC9C;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "useCallback", "contributes", "Capabilities", "createSurface", "isInstanceOf", "findAnnotation", "React", "React", "useCallback", "useDropzone", "findAnnotation", "useTranslation", "mx", "FileInput", "schema", "onChange", "t", "useTranslation", "WNFS_PLUGIN", "accept", "findAnnotation", "ast", "WnfsAction", "UploadAnnotationId", "onDropAccepted", "useCallback", "files", "acceptedFiles", "getRootProps", "getInputProps", "isFocused", "isDragAccept", "isDragReject", "useDropzone", "multiple", "div", "className", "mx", "input", "p", "name", "FileContainer", "React", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "WNFS_PLUGIN", "role", "filter", "data", "isInstanceOf", "FileType", "subject", "component", "React", "FileContainer", "file", "annotation", "findAnnotation", "schema", "ast", "WnfsAction", "UploadAnnotationId", "prop", "props", "inputProps", "handleChange", "useCallback", "onValueChange", "FileInput", "onChange"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WnfsPlugin.d.ts","sourceRoot":"","sources":["../../../src/WnfsPlugin.tsx"],"names":[],"mappings":"AAyBA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"WnfsPlugin.d.ts","sourceRoot":"","sources":["../../../src/WnfsPlugin.tsx"],"names":[],"mappings":"AAyBA,eAAO,MAAM,UAAU,4CAmEnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAe,YAAY,EAAiB,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAe,YAAY,EAAiB,MAAM,qBAAqB,CAAC;;AAU/E,wBAyBK"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type FileType } from '../types';
|
|
2
3
|
declare const FileContainer: ({ file, role }: {
|
|
3
4
|
file: FileType;
|
|
4
5
|
role: string;
|
|
5
|
-
}) =>
|
|
6
|
+
}) => React.JSX.Element | null;
|
|
6
7
|
export default FileContainer;
|
|
7
8
|
//# sourceMappingURL=FileContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/FileContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/FileContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,QAAA,MAAM,aAAa,mBAAoB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,6BA2BtE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type Schema as S } from 'effect';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export type FileInputProps = {
|
|
3
4
|
schema: S.Schema.Any;
|
|
4
5
|
onChange: (file: File) => void;
|
|
5
6
|
};
|
|
6
|
-
export declare const FileInput: ({ schema, onChange }: FileInputProps) =>
|
|
7
|
+
export declare const FileInput: ({ schema, onChange }: FileInputProps) => React.JSX.Element;
|
|
7
8
|
//# sourceMappingURL=FileInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAsB,MAAM,OAAO,CAAC;AAU3C,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,SAAS,yBAA0B,cAAc,sBA0B7D,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
2
3
|
export type FilePreviewProps = ThemedClassName<{
|
|
3
4
|
type: string;
|
|
@@ -6,5 +7,5 @@ export type FilePreviewProps = ThemedClassName<{
|
|
|
6
7
|
/**
|
|
7
8
|
* File/content preview iframe.
|
|
8
9
|
*/
|
|
9
|
-
export declare const FilePreview: ({ type, url, classNames }: FilePreviewProps) =>
|
|
10
|
+
export declare const FilePreview: ({ type, url, classNames }: FilePreviewProps) => React.JSX.Element;
|
|
10
11
|
//# sourceMappingURL=FilePreview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/FilePreview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/FilePreview.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,WAAW,8BAA+B,gBAAgB,sBAQtE,CAAC"}
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
export declare const FileContainer: React.LazyExoticComponent<({ file, role }: {
|
|
3
3
|
file: import("../types").FileType;
|
|
4
4
|
role: string;
|
|
5
|
-
}) =>
|
|
5
|
+
}) => React.JSX.Element | null>;
|
|
6
6
|
export * from './FileInput';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,aAAa;;;+BAA8C,CAAC;AAEzE,cAAc,aAAa,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
|
-
render: () =>
|
|
5
|
+
render: () => React.JSX.Element;
|
|
5
6
|
decorators: import("@storybook/react").Decorator[];
|
|
6
7
|
};
|
|
7
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.stories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;;
|
|
1
|
+
{"version":3,"file":"image.stories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAA8B,MAAM,OAAO,CAAC;;;;;;AAsFnD,wBAIE;AAEF,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
+
import { type PluginMeta } from '@dxos/app-framework';
|
|
1
2
|
export declare const WNFS_PLUGIN = "dxos.org/plugin/wnfs";
|
|
2
|
-
export declare const meta:
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
icon: string;
|
|
7
|
-
source: string;
|
|
8
|
-
};
|
|
3
|
+
export declare const meta: PluginMeta;
|
|
9
4
|
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,WAAW,yBAAyB,CAAC;AAElD,eAAO,MAAM,IAAI,EAAE,UAMlB,CAAC"}
|
|
@@ -2,20 +2,19 @@ declare const _default: {
|
|
|
2
2
|
'en-US': {
|
|
3
3
|
[x: string]: {
|
|
4
4
|
'typename label': string;
|
|
5
|
+
'object name placeholder': string;
|
|
5
6
|
'plugin name'?: undefined;
|
|
6
|
-
'file title placeholder'?: undefined;
|
|
7
7
|
'delete object label'?: undefined;
|
|
8
8
|
'file input placeholder'?: undefined;
|
|
9
9
|
} | {
|
|
10
10
|
'plugin name': string;
|
|
11
|
-
'file title placeholder': string;
|
|
12
11
|
'delete object label': string;
|
|
13
12
|
'file input placeholder': string;
|
|
14
13
|
'typename label'?: undefined;
|
|
14
|
+
'object name placeholder'?: undefined;
|
|
15
15
|
};
|
|
16
16
|
"dxos.org/plugin/wnfs": {
|
|
17
17
|
'plugin name': string;
|
|
18
|
-
'file title placeholder': string;
|
|
19
18
|
'delete object label': string;
|
|
20
19
|
'file input placeholder': string;
|
|
21
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOA,wBAcE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-wnfs",
|
|
3
|
-
"version": "0.8.1-
|
|
3
|
+
"version": "0.8.1-staging.31c3ee1",
|
|
4
4
|
"description": "WNFS file management plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"blockstore-core": "^5.0.1",
|
|
38
38
|
"blockstore-idb": "^2.0.0",
|
|
39
39
|
"debounce": "^2.2.0",
|
|
40
|
-
"effect": "
|
|
40
|
+
"effect": "3.13.3",
|
|
41
41
|
"idb-keyval": "^6.2.1",
|
|
42
42
|
"interface-blockstore": "^5.2.10",
|
|
43
43
|
"it-all": "^3.0.6",
|
|
@@ -45,22 +45,22 @@
|
|
|
45
45
|
"react-dropzone": "^14.2.3",
|
|
46
46
|
"uint8arrays": "^5.1.0",
|
|
47
47
|
"wnfs": "0.2.2",
|
|
48
|
-
"@dxos/app-framework": "0.8.1-
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/plugin-space": "0.8.1-
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/react-ui
|
|
60
|
-
"@dxos/react-ui": "0.8.1-
|
|
61
|
-
"@dxos/react-ui-
|
|
62
|
-
"@dxos/react-ui-
|
|
63
|
-
"@dxos/util": "0.8.1-
|
|
48
|
+
"@dxos/app-framework": "0.8.1-staging.31c3ee1",
|
|
49
|
+
"@dxos/effect": "0.8.1-staging.31c3ee1",
|
|
50
|
+
"@dxos/crypto": "0.8.1-staging.31c3ee1",
|
|
51
|
+
"@dxos/invariant": "0.8.1-staging.31c3ee1",
|
|
52
|
+
"@dxos/echo-schema": "0.8.1-staging.31c3ee1",
|
|
53
|
+
"@dxos/local-storage": "0.8.1-staging.31c3ee1",
|
|
54
|
+
"@dxos/plugin-client": "0.8.1-staging.31c3ee1",
|
|
55
|
+
"@dxos/react-client": "0.8.1-staging.31c3ee1",
|
|
56
|
+
"@dxos/log": "0.8.1-staging.31c3ee1",
|
|
57
|
+
"@dxos/plugin-space": "0.8.1-staging.31c3ee1",
|
|
58
|
+
"@dxos/plugin-markdown": "0.8.1-staging.31c3ee1",
|
|
59
|
+
"@dxos/react-ui": "0.8.1-staging.31c3ee1",
|
|
60
|
+
"@dxos/react-ui-form": "0.8.1-staging.31c3ee1",
|
|
61
|
+
"@dxos/react-ui-stack": "0.8.1-staging.31c3ee1",
|
|
62
|
+
"@dxos/react-ui-editor": "0.8.1-staging.31c3ee1",
|
|
63
|
+
"@dxos/util": "0.8.1-staging.31c3ee1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
"react": "~18.2.0",
|
|
70
70
|
"react-dom": "~18.2.0",
|
|
71
71
|
"vite": "5.4.7",
|
|
72
|
-
"@dxos/random": "0.8.1-
|
|
73
|
-
"@dxos/storybook-utils": "0.8.1-
|
|
74
|
-
"@dxos/react-ui-theme": "0.8.1-
|
|
72
|
+
"@dxos/random": "0.8.1-staging.31c3ee1",
|
|
73
|
+
"@dxos/storybook-utils": "0.8.1-staging.31c3ee1",
|
|
74
|
+
"@dxos/react-ui-theme": "0.8.1-staging.31c3ee1"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@phosphor-icons/react": "^2.0.5",
|
|
78
78
|
"react": "~18.2.0",
|
|
79
79
|
"react-dom": "~18.2.0",
|
|
80
|
-
"@dxos/react-ui": "0.8.1-
|
|
81
|
-
"@dxos/react-ui-theme": "0.8.1-
|
|
80
|
+
"@dxos/react-ui": "0.8.1-staging.31c3ee1",
|
|
81
|
+
"@dxos/react-ui-theme": "0.8.1-staging.31c3ee1"
|
|
82
82
|
},
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
package/src/WnfsPlugin.tsx
CHANGED
|
@@ -19,7 +19,7 @@ import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
|
19
19
|
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
20
20
|
|
|
21
21
|
import { Blockstore, FileUploader, IntentResolver, Markdown, ReactSurface, WnfsCapabilities } from './capabilities';
|
|
22
|
-
import { meta
|
|
22
|
+
import { meta } from './meta';
|
|
23
23
|
import translations from './translations';
|
|
24
24
|
import { FileType, WnfsAction } from './types';
|
|
25
25
|
|
|
@@ -51,7 +51,6 @@ export const WnfsPlugin = () =>
|
|
|
51
51
|
id: FileType.typename,
|
|
52
52
|
metadata: {
|
|
53
53
|
label: (object: any) => (object instanceof FileType ? object.name : undefined),
|
|
54
|
-
placeholder: ['file title placeholder', { ns: WNFS_PLUGIN }],
|
|
55
54
|
// TODO(wittjosiah): Would be nice if icon could change based on the type of the file.
|
|
56
55
|
icon: 'ph--file--regular',
|
|
57
56
|
},
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
|
|
7
7
|
import { contributes, Capabilities, createSurface } from '@dxos/app-framework';
|
|
8
|
+
import { isInstanceOf } from '@dxos/echo-schema';
|
|
8
9
|
import { type S } from '@dxos/echo-schema';
|
|
9
10
|
import { findAnnotation } from '@dxos/effect';
|
|
10
11
|
import { type InputProps } from '@dxos/react-ui-form';
|
|
@@ -18,7 +19,7 @@ export default () =>
|
|
|
18
19
|
createSurface({
|
|
19
20
|
id: `${WNFS_PLUGIN}/article`,
|
|
20
21
|
role: ['article', 'section', 'slide'],
|
|
21
|
-
filter: (data): data is { subject: FileType } => data.subject
|
|
22
|
+
filter: (data): data is { subject: FileType } => isInstanceOf(FileType, data.subject),
|
|
22
23
|
component: ({ data, role }) => <FileContainer role={role} file={data.subject} />,
|
|
23
24
|
}),
|
|
24
25
|
createSurface({
|
|
@@ -37,7 +37,7 @@ const FileContainer = ({ file, role }: { file: FileType; role: string }) => {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<StackItem.Content role={role}
|
|
40
|
+
<StackItem.Content role={role}>
|
|
41
41
|
<FilePreview type={file.type} url={blobUrl} />
|
|
42
42
|
</StackItem.Content>
|
|
43
43
|
);
|
package/src/meta.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { type PluginMeta } from '@dxos/app-framework';
|
|
|
6
6
|
|
|
7
7
|
export const WNFS_PLUGIN = 'dxos.org/plugin/wnfs';
|
|
8
8
|
|
|
9
|
-
export const meta = {
|
|
9
|
+
export const meta: PluginMeta = {
|
|
10
10
|
id: WNFS_PLUGIN,
|
|
11
11
|
name: 'WNFS',
|
|
12
12
|
description: 'Manage and view files with via the Web Native File System (WNFS).',
|
|
13
13
|
icon: 'ph--file-cloud--regular',
|
|
14
14
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-wnfs',
|
|
15
|
-
}
|
|
15
|
+
};
|
package/src/translations.ts
CHANGED
|
@@ -10,10 +10,10 @@ export default [
|
|
|
10
10
|
'en-US': {
|
|
11
11
|
[FileType.typename]: {
|
|
12
12
|
'typename label': 'File',
|
|
13
|
+
'object name placeholder': 'New file',
|
|
13
14
|
},
|
|
14
15
|
[WNFS_PLUGIN]: {
|
|
15
16
|
'plugin name': 'Files',
|
|
16
|
-
'file title placeholder': 'New file',
|
|
17
17
|
'delete object label': 'Delete',
|
|
18
18
|
'file input placeholder': 'Drop a file here, or click to select a file',
|
|
19
19
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const WNFS_PLUGIN = 'dxos.org/plugin/wnfs';\n\nexport const meta = {\n id: WNFS_PLUGIN,\n name: 'WNFS',\n description: 'Manage and view files with via the Web Native File System (WNFS).',\n icon: 'ph--file-cloud--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-wnfs',\n} satisfies PluginMeta;\n"],
|
|
5
|
-
"mappings": ";AAMO,IAAMA,cAAc;AAEpB,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
|
-
"names": ["WNFS_PLUGIN", "meta", "id", "name", "description", "icon", "source"]
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// packages/plugins/plugin-wnfs/src/capabilities/index.ts
|
|
2
|
-
import { lazy } from "@dxos/app-framework";
|
|
3
|
-
var Blockstore = lazy(() => import("./blockstore-7XIICCYU.mjs"));
|
|
4
|
-
var FileUploader = lazy(() => import("./file-uploader-XXHZOW37.mjs"));
|
|
5
|
-
var IntentResolver = lazy(() => import("./intent-resolver-WXSSL4FI.mjs"));
|
|
6
|
-
var Markdown = lazy(() => import("./markdown-PJWHZHGJ.mjs"));
|
|
7
|
-
var ReactSurface = lazy(() => import("./react-surface-TYJKCUPX.mjs"));
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
Blockstore,
|
|
11
|
-
FileUploader,
|
|
12
|
-
IntentResolver,
|
|
13
|
-
Markdown,
|
|
14
|
-
ReactSurface
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-TOOHDL3I.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts", "../../../src/components/FileInput.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback } from 'react';\n\nimport { contributes, Capabilities, createSurface } from '@dxos/app-framework';\nimport { type S } from '@dxos/echo-schema';\nimport { findAnnotation } from '@dxos/effect';\nimport { type InputProps } from '@dxos/react-ui-form';\n\nimport { FileContainer, FileInput } from '../components';\nimport { WNFS_PLUGIN } from '../meta';\nimport { FileType, WnfsAction } from '../types';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${WNFS_PLUGIN}/article`,\n role: ['article', 'section', 'slide'],\n filter: (data): data is { subject: FileType } => data.subject instanceof FileType,\n component: ({ data, role }) => <FileContainer role={role} file={data.subject} />,\n }),\n createSurface({\n id: `${WNFS_PLUGIN}/create-form`,\n role: 'form-input',\n filter: (data): data is { prop: string; schema: S.Schema.Any } => {\n const annotation = findAnnotation<boolean>((data.schema as S.Schema.All).ast, WnfsAction.UploadAnnotationId);\n return !!annotation;\n },\n component: ({ data: { prop, schema }, ...props }) => {\n const inputProps = props as unknown as InputProps;\n const handleChange = useCallback(\n (file: File) => inputProps.onValueChange?.('object', file),\n [prop, inputProps.onValueChange],\n );\n\n return <FileInput schema={schema} onChange={handleChange} />;\n },\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nexport const FileContainer = React.lazy(() => import('./FileContainer'));\n\nexport * from './FileInput';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema as S } from 'effect';\nimport React, { useCallback } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\nimport { findAnnotation } from '@dxos/effect';\nimport { useTranslation } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { WNFS_PLUGIN } from '../meta';\nimport { WnfsAction } from '../types';\n\nexport type FileInputProps = {\n schema: S.Schema.Any;\n onChange: (file: File) => void;\n};\n\nexport const FileInput = ({ schema, onChange }: FileInputProps) => {\n const { t } = useTranslation(WNFS_PLUGIN);\n const accept = findAnnotation<Record<string, string[]>>(schema.ast, WnfsAction.UploadAnnotationId);\n\n const onDropAccepted = useCallback((files: File[]) => onChange?.(files[0]), [onChange]);\n\n const { acceptedFiles, getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone({\n multiple: false,\n accept,\n onDropAccepted,\n });\n\n return (\n <div\n {...getRootProps()}\n className={mx(\n 'flex flex-col items-center p-8 border border-separator',\n isFocused && 'focus-ring',\n isDragAccept && 'bg-attention',\n isDragReject && 'border-error',\n )}\n >\n <input {...getInputProps()} />\n {acceptedFiles[0] ? <p>{acceptedFiles[0].name}</p> : <p>{t('file input placeholder')}</p>}\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,OAAOA,UAASC,eAAAA,oBAAmB;AAEnC,SAASC,aAAaC,cAAcC,qBAAqB;AAEzD,SAASC,kBAAAA,uBAAsB;;;ACJ/B,OAAOC,YAAW;;;ACClB,OAAOC,SAASC,mBAAmB;AACnC,SAASC,mBAAmB;AAE5B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,UAAU;AAUZ,IAAMC,YAAY,CAAC,EAAEC,QAAQC,SAAQ,MAAkB;AAC5D,QAAM,EAAEC,EAAC,IAAKC,eAAeC,WAAAA;AAC7B,QAAMC,SAASC,eAAyCN,OAAOO,KAAKC,WAAWC,kBAAkB;AAEjG,QAAMC,iBAAiBC,YAAY,CAACC,UAAkBX,WAAWW,MAAM,CAAA,CAAE,GAAG;IAACX;GAAS;AAEtF,QAAM,EAAEY,eAAeC,cAAcC,eAAeC,WAAWC,cAAcC,aAAY,IAAKC,YAAY;IACxGC,UAAU;IACVf;IACAK;EACF,CAAA;AAEA,SACE,sBAAA,cAACW,OAAAA;IACE,GAAGP,aAAAA;IACJQ,WAAWC,GACT,0DACAP,aAAa,cACbC,gBAAgB,gBAChBC,gBAAgB,cAAA;KAGlB,sBAAA,cAACM,SAAUT,cAAAA,CAAAA,GACVF,cAAc,CAAA,IAAK,sBAAA,cAACY,KAAAA,MAAGZ,cAAc,CAAA,EAAGa,IAAI,IAAQ,sBAAA,cAACD,KAAAA,MAAGvB,EAAE,wBAAA,CAAA,CAAA;AAGjE;;;ADxCO,IAAMyB,gBAAgBC,OAAMC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ADSrD,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;MAAC;MAAW;MAAW;;IAC7BC,QAAQ,CAACC,SAAwCA,KAAKC,mBAAmBC;IACzEC,WAAW,CAAC,EAAEH,MAAMF,KAAI,MAAO,gBAAAM,OAAA,cAACC,eAAAA;MAAcP;MAAYQ,MAAMN,KAAKC;;EACvE,CAAA;EACAN,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,SAAAA;AACP,YAAMO,aAAaC,gBAAyBR,KAAKS,OAAwBC,KAAKC,WAAWC,kBAAkB;AAC3G,aAAO,CAAC,CAACL;IACX;IACAJ,WAAW,CAAC,EAAEH,MAAM,EAAEa,MAAMJ,OAAM,GAAI,GAAGK,MAAAA,MAAO;AAC9C,YAAMC,aAAaD;AACnB,YAAME,eAAeC,aACnB,CAACX,SAAeS,WAAWG,gBAAgB,UAAUZ,IAAAA,GACrD;QAACO;QAAME,WAAWG;OAAc;AAGlC,aAAO,gBAAAd,OAAA,cAACe,WAAAA;QAAUV;QAAgBW,UAAUJ;;IAC9C;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["React", "useCallback", "contributes", "Capabilities", "createSurface", "findAnnotation", "React", "React", "useCallback", "useDropzone", "findAnnotation", "useTranslation", "mx", "FileInput", "schema", "onChange", "t", "useTranslation", "WNFS_PLUGIN", "accept", "findAnnotation", "ast", "WnfsAction", "UploadAnnotationId", "onDropAccepted", "useCallback", "files", "acceptedFiles", "getRootProps", "getInputProps", "isFocused", "isDragAccept", "isDragReject", "useDropzone", "multiple", "div", "className", "mx", "input", "p", "name", "FileContainer", "React", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "WNFS_PLUGIN", "role", "filter", "data", "subject", "FileType", "component", "React", "FileContainer", "file", "annotation", "findAnnotation", "schema", "ast", "WnfsAction", "UploadAnnotationId", "prop", "props", "inputProps", "handleChange", "useCallback", "onValueChange", "FileInput", "onChange"]
|
|
7
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/lib/browser/{intent-resolver-WXSSL4FI.mjs.map → intent-resolver-VSMIQLGS.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|