@dxos/plugin-wnfs 0.8.3-main.672df60 → 0.8.3-staging.0fa589b
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-SEU43TLT.mjs → FileContainer-7YOCEQ6P.mjs} +2 -2
- package/dist/lib/browser/{chunk-RY5XZCVP.mjs → chunk-SCL6PT4P.mjs} +1 -1
- package/dist/lib/browser/chunk-SCL6PT4P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-LQYDI474.mjs → chunk-WJVYRUYQ.mjs} +4 -4
- package/dist/lib/browser/{file-uploader-OQHVKRQ5.mjs → file-uploader-RHINBPDQ.mjs} +2 -2
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/{intent-resolver-42B3MXJZ.mjs → intent-resolver-JDRRPIZC.mjs} +4 -4
- package/dist/lib/browser/intent-resolver-JDRRPIZC.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-GTYQZY3L.mjs → react-surface-6GM4J4YG.mjs} +5 -5
- package/dist/lib/browser/react-surface-6GM4J4YG.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/types/src/types/file.d.ts.map +1 -1
- package/package.json +23 -23
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/types/file.ts +4 -1
- package/dist/lib/browser/chunk-RY5XZCVP.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-42B3MXJZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-GTYQZY3L.mjs.map +0 -7
- /package/dist/lib/browser/{FileContainer-SEU43TLT.mjs.map → FileContainer-7YOCEQ6P.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-LQYDI474.mjs.map → chunk-WJVYRUYQ.mjs.map} +0 -0
- /package/dist/lib/browser/{file-uploader-OQHVKRQ5.mjs.map → file-uploader-RHINBPDQ.mjs.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-WJVYRUYQ.mjs";
|
|
2
2
|
import {
|
|
3
3
|
filePath,
|
|
4
4
|
getBlobUrl,
|
|
@@ -103,4 +103,4 @@ var FileContainer_default = FileContainer;
|
|
|
103
103
|
export {
|
|
104
104
|
FileContainer_default as default
|
|
105
105
|
};
|
|
106
|
-
//# sourceMappingURL=FileContainer-
|
|
106
|
+
//# sourceMappingURL=FileContainer-7YOCEQ6P.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/file.ts", "../../../src/types/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\n\nexport class FileType extends TypedObject({\n typename: 'dxos.org/type/File',\n version: '0.1.0',\n})({\n name: Schema.optional(Schema.String),\n type: Schema.String,\n cid: Schema.String,\n timestamp: Schema.optional(Schema.String),\n}) {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { FileInfoSchema } from '@dxos/app-framework';\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { FileType } from './file';\nimport { WNFS_PLUGIN } from '../meta';\n\nexport namespace WnfsAction {\n export class Create extends Schema.TaggedClass<Create>()(`${WNFS_PLUGIN}/action/create`, {\n input: FileInfoSchema.pick('name', 'type', 'cid').pipe(Schema.required),\n output: Schema.Struct({\n object: FileType,\n }),\n }) {}\n\n export const UploadAnnotationId = Symbol.for(`${WNFS_PLUGIN}/annotation/upload`);\n\n export const UploadFileSchema = Schema.Struct({\n file: Schema.instanceOf(File).annotations({\n [UploadAnnotationId]: {\n // Accept file types.\n 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],\n 'application/pdf': ['.pdf'],\n // TODO(wittjosiah): Add more file types.\n },\n }),\n });\n\n export type UploadFileForm = Schema.Schema.Type<typeof UploadFileSchema>;\n\n export class Upload extends Schema.TaggedClass<Upload>()(`${WNFS_PLUGIN}/action/upload`, {\n input: Schema.extend(UploadFileSchema, Schema.Struct({ space: SpaceSchema })),\n output: Schema.required(FileInfoSchema),\n }) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAErB,IAAMC,WAAN,cAAuBC,YAAY;EACxCC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;EACDC,MAAMC,OAAOC,SAASD,OAAOE,MAAM;EACnCC,MAAMH,OAAOE;EACbE,KAAKJ,OAAOE;EACZG,WAAWL,OAAOC,SAASD,OAAOE,MAAM;AAC1C,CAAA,EAAA;AAAI;;;ACZJ,SAASI,UAAAA,eAAc;AAEvB,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;UAKXC,aAAAA;EACR,MAAMC,eAAeC,QAAOC,YAAW,EAAW,GAAGC,WAAAA,kBAA6B;IACvFC,OAAOC,eAAeC,KAAK,QAAQ,QAAQ,KAAA,EAAOC,KAAKN,QAAOO,QAAQ;IACtEC,QAAQR,QAAOS,OAAO;MACpBC,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;cALSZ,SAAAA;cAOAa,qBAAqBC,OAAOC,IAAI,GAAGZ,WAAAA,oBAA+B;cAElEa,mBAAmBf,QAAOS,OAAO;IAC5CO,MAAMhB,QAAOiB,WAAWC,IAAAA,EAAMC,YAAY;MACxC,CAAArB,YAACc,kBAAAA,GAAqB;;QAEpB,WAAW;UAAC;UAAQ;UAAS;UAAQ;;QACrC,mBAAmB;UAAC;;MAEtB;IACF,CAAA;EACF,CAAA;EAIO,MAAMQ,eAAepB,QAAOC,YAAW,EAAW,GAAGC,WAAAA,kBAA6B;IACvFC,OAAOH,QAAOqB,OAAMvB,YAACiB,kBAAkBf,QAAOS,OAAO;MAAEa,OAAOC;IAAY,CAAA,CAAA;IAC1Ef,QAAQR,QAAOO,SAASH,cAAAA;EAC1B,CAAA,EAAA;EAAI;cAHSgB,SAAAA;AAIf,GA3BiBtB,eAAAA,aAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["Schema", "TypedObject", "FileType", "TypedObject", "typename", "version", "name", "Schema", "optional", "String", "type", "cid", "timestamp", "Schema", "FileInfoSchema", "SpaceSchema", "WnfsAction", "Create", "Schema", "TaggedClass", "WNFS_PLUGIN", "input", "FileInfoSchema", "pick", "pipe", "required", "output", "Struct", "object", "FileType", "UploadAnnotationId", "Symbol", "for", "UploadFileSchema", "file", "instanceOf", "File", "annotations", "Upload", "extend", "space", "SpaceSchema"]
|
|
7
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// packages/plugins/plugin-wnfs/src/capabilities/index.ts
|
|
2
2
|
import { lazy } from "@dxos/app-framework";
|
|
3
3
|
var Blockstore = lazy(() => import("./blockstore-UT7233RJ.mjs"));
|
|
4
|
-
var FileUploader = lazy(() => import("./file-uploader-
|
|
5
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
4
|
+
var FileUploader = lazy(() => import("./file-uploader-RHINBPDQ.mjs"));
|
|
5
|
+
var IntentResolver = lazy(() => import("./intent-resolver-JDRRPIZC.mjs"));
|
|
6
6
|
var Markdown = lazy(() => import("./markdown-BWBHUHHH.mjs"));
|
|
7
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
7
|
+
var ReactSurface = lazy(() => import("./react-surface-6GM4J4YG.mjs"));
|
|
8
8
|
|
|
9
9
|
export {
|
|
10
10
|
Blockstore,
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
Markdown,
|
|
14
14
|
ReactSurface
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-WJVYRUYQ.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WnfsAction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCL6PT4P.mjs";
|
|
4
4
|
import "./chunk-PHTWWADN.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-wnfs/src/capabilities/file-uploader.ts
|
|
@@ -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-RHINBPDQ.mjs.map
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
IntentResolver,
|
|
5
5
|
Markdown,
|
|
6
6
|
ReactSurface
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WJVYRUYQ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
WnfsCapabilities
|
|
10
10
|
} from "./chunk-DL7BBH57.mjs";
|
|
11
11
|
import {
|
|
12
12
|
FileType,
|
|
13
13
|
WnfsAction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SCL6PT4P.mjs";
|
|
15
15
|
import {
|
|
16
16
|
WNFS_PLUGIN,
|
|
17
17
|
meta
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
FileType,
|
|
9
9
|
WnfsAction
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SCL6PT4P.mjs";
|
|
11
11
|
import "./chunk-PHTWWADN.mjs";
|
|
12
12
|
|
|
13
13
|
// packages/plugins/plugin-wnfs/src/capabilities/intent-resolver.ts
|
|
14
14
|
import { contributes, Capabilities, createResolver } from "@dxos/app-framework";
|
|
15
|
-
import {
|
|
15
|
+
import { Obj } from "@dxos/echo";
|
|
16
16
|
var intent_resolver_default = (context) => contributes(Capabilities.IntentResolver, [
|
|
17
17
|
// TODO(wittjosiah): Deleting the object doesn't delete the wnfs blob.
|
|
18
18
|
// Consider ways to trigger blob deletion based on object deletion and/or adding file system manager.
|
|
@@ -20,7 +20,7 @@ var intent_resolver_default = (context) => contributes(Capabilities.IntentResolv
|
|
|
20
20
|
intent: WnfsAction.Create,
|
|
21
21
|
resolve: ({ name, type, cid }) => ({
|
|
22
22
|
data: {
|
|
23
|
-
object:
|
|
23
|
+
object: Obj.make(FileType, {
|
|
24
24
|
name,
|
|
25
25
|
type,
|
|
26
26
|
cid
|
|
@@ -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-JDRRPIZC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, Capabilities, createResolver, type PluginContext } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\n\nimport { WnfsCapabilities } from './capabilities';\nimport { upload } from '../helpers';\nimport { FileType, WnfsAction } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.IntentResolver, [\n // TODO(wittjosiah): Deleting the object doesn't delete the wnfs blob.\n // Consider ways to trigger blob deletion based on object deletion and/or adding file system manager.\n createResolver({\n intent: WnfsAction.Create,\n resolve: ({ name, type, cid }) => ({\n data: {\n object: Obj.make(FileType, { name, type, cid }),\n },\n }),\n }),\n createResolver({\n intent: WnfsAction.Upload,\n resolve: async ({ file, space }) => {\n const blockstore = context.getCapability(WnfsCapabilities.Blockstore);\n const info = await upload({ file, blockstore, space });\n return { data: info };\n },\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,aAAaC,cAAcC,sBAA0C;AAC9E,SAASC,WAAW;AAMpB,IAAA,0BAAe,CAACC,YACdC,YAAYC,aAAaC,gBAAgB;;;EAGvCC,eAAe;IACbC,QAAQC,WAAWC;IACnBC,SAAS,CAAC,EAAEC,MAAMC,MAAMC,IAAG,OAAQ;MACjCC,MAAM;QACJC,QAAQC,IAAIC,KAAKC,UAAU;UAAEP;UAAMC;UAAMC;QAAI,CAAA;MAC/C;IACF;EACF,CAAA;EACAP,eAAe;IACbC,QAAQC,WAAWW;IACnBT,SAAS,OAAO,EAAEU,MAAMC,MAAK,MAAE;AAC7B,YAAMC,aAAapB,QAAQqB,cAAcC,iBAAiBC,UAAU;AACpE,YAAMC,OAAO,MAAMC,OAAO;QAAEP;QAAME;QAAYD;MAAM,CAAA;AACpD,aAAO;QAAEP,MAAMY;MAAK;IACtB;EACF,CAAA;CACD;",
|
|
6
|
+
"names": ["contributes", "Capabilities", "createResolver", "Obj", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "WnfsAction", "Create", "resolve", "name", "type", "cid", "data", "object", "Obj", "make", "FileType", "Upload", "file", "space", "blockstore", "getCapability", "WnfsCapabilities", "Blockstore", "info", "upload"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytes":1463,"imports":[],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts":{"bytes":1937,"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":7615,"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":8933,"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":3338,"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":6696,"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":724,"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":19260,"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":2526,"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":1641,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytes":4909,"imports":[{"path":"effect","kind":"import-statement","external":true},{"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/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":547,"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":3392,"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":4473,"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":21204,"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":472,"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":3134,"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":5198,"imports":[{"path":"@preact-signals/safe-react/tracking","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/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":3109,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"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":6271,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"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":852,"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":5940,"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":1832,"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":1852,"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":10989,"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":737,"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-LQYDI474.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RY5XZCVP.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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-RY5XZCVP.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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-UT7233RJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10739},"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-UT7233RJ.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":449},"packages/plugins/plugin-wnfs/src/blockstore.ts":{"bytesInOutput":4273}},"bytes":5136},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-OQHVKRQ5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1829},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-OQHVKRQ5.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RY5XZCVP.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":742}},"bytes":992},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-42B3MXJZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2093},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-42B3MXJZ.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RY5XZCVP.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":928}},"bytes":1304},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-BWBHUHHH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12475},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-BWBHUHHH.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":643},"packages/plugins/plugin-wnfs/src/extensions/image.tsx":{"bytesInOutput":4786},"packages/plugins/plugin-wnfs/src/extensions/index.ts":{"bytesInOutput":0}},"bytes":5873},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-SEU43TLT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4340},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-SEU43TLT.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-LQYDI474.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"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":"@preact-signals/safe-react/tracking","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":1767},"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx":{"bytesInOutput":863}},"bytes":3134},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-LQYDI474.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":909},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-LQYDI474.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-UT7233RJ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-OQHVKRQ5.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-42B3MXJZ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-BWBHUHHH.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-GTYQZY3L.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-YYAW4U6J.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13383},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.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":567},"packages/plugins/plugin-wnfs/src/helpers/upload.ts":{"bytesInOutput":1281},"packages/plugins/plugin-wnfs/src/helpers/index.ts":{"bytesInOutput":0}},"bytes":5208},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1040},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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-GTYQZY3L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5929},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-GTYQZY3L.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RY5XZCVP.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":"@preact-signals/safe-react/tracking","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-SEU43TLT.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":102},"packages/plugins/plugin-wnfs/src/components/FileInput.tsx":{"bytesInOutput":1320}},"bytes":3209},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RY5XZCVP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3259},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RY5XZCVP.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":320},"packages/plugins/plugin-wnfs/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytesInOutput":1197}},"bytes":1756},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":711},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs":{"imports":[],"exports":["WNFS_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytesInOutput":292}},"bytes":415}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytes":1463,"imports":[],"format":"esm"},"packages/plugins/plugin-wnfs/src/capabilities/capabilities.ts":{"bytes":1937,"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":7615,"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":8933,"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":3338,"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":6696,"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":724,"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":19260,"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":2526,"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":1653,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytes":4909,"imports":[{"path":"effect","kind":"import-statement","external":true},{"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/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":547,"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":3392,"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":4471,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/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":21204,"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":472,"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":3134,"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":5198,"imports":[{"path":"@preact-signals/safe-react/tracking","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/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":3109,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"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":6271,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"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":852,"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":5922,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","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":1832,"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":1852,"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":10989,"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":737,"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-WJVYRUYQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCL6PT4P.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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-SCL6PT4P.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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-UT7233RJ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10739},"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-UT7233RJ.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":449},"packages/plugins/plugin-wnfs/src/blockstore.ts":{"bytesInOutput":4273}},"bytes":5136},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-RHINBPDQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1829},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-RHINBPDQ.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCL6PT4P.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":742}},"bytes":992},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-JDRRPIZC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2095},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-JDRRPIZC.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCL6PT4P.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/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":918}},"bytes":1294},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-BWBHUHHH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12475},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-BWBHUHHH.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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":643},"packages/plugins/plugin-wnfs/src/extensions/image.tsx":{"bytesInOutput":4786},"packages/plugins/plugin-wnfs/src/extensions/index.ts":{"bytesInOutput":0}},"bytes":5873},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-7YOCEQ6P.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4340},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-7YOCEQ6P.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-WJVYRUYQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"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":"@preact-signals/safe-react/tracking","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":1767},"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx":{"bytesInOutput":863}},"bytes":3134},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-WJVYRUYQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":909},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-WJVYRUYQ.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-UT7233RJ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-RHINBPDQ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-JDRRPIZC.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-BWBHUHHH.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-6GM4J4YG.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-YYAW4U6J.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13383},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-YYAW4U6J.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":567},"packages/plugins/plugin-wnfs/src/helpers/upload.ts":{"bytesInOutput":1281},"packages/plugins/plugin-wnfs/src/helpers/index.ts":{"bytesInOutput":0}},"bytes":5208},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1040},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DL7BBH57.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.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-6GM4J4YG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5915},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-6GM4J4YG.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCL6PT4P.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-7YOCEQ6P.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":1243},"packages/plugins/plugin-wnfs/src/components/index.ts":{"bytesInOutput":102},"packages/plugins/plugin-wnfs/src/components/FileInput.tsx":{"bytesInOutput":1320}},"bytes":3195},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCL6PT4P.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3266},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-SCL6PT4P.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs","kind":"import-statement"},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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":320},"packages/plugins/plugin-wnfs/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-wnfs/src/types/types.ts":{"bytesInOutput":1197}},"bytes":1756},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":711},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-PHTWWADN.mjs":{"imports":[],"exports":["WNFS_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytesInOutput":292}},"bytes":415}}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FileType,
|
|
3
3
|
WnfsAction
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SCL6PT4P.mjs";
|
|
5
5
|
import {
|
|
6
6
|
WNFS_PLUGIN
|
|
7
7
|
} from "./chunk-PHTWWADN.mjs";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
// packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx
|
|
10
10
|
import React2, { useCallback as useCallback2 } from "react";
|
|
11
11
|
import { contributes, Capabilities, createSurface } from "@dxos/app-framework";
|
|
12
|
-
import {
|
|
12
|
+
import { Obj } from "@dxos/echo";
|
|
13
13
|
import { findAnnotation as findAnnotation2 } from "@dxos/effect";
|
|
14
14
|
|
|
15
15
|
// packages/plugins/plugin-wnfs/src/components/index.ts
|
|
@@ -45,7 +45,7 @@ var FileInput = ({ schema, onChange }) => {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
// packages/plugins/plugin-wnfs/src/components/index.ts
|
|
48
|
-
var FileContainer = lazy(() => import("./FileContainer-
|
|
48
|
+
var FileContainer = lazy(() => import("./FileContainer-7YOCEQ6P.mjs"));
|
|
49
49
|
|
|
50
50
|
// packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx
|
|
51
51
|
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
@@ -56,7 +56,7 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
56
56
|
"section",
|
|
57
57
|
"slide"
|
|
58
58
|
],
|
|
59
|
-
filter: (data) =>
|
|
59
|
+
filter: (data) => Obj.instanceOf(FileType, data.subject),
|
|
60
60
|
component: ({ data, role }) => /* @__PURE__ */ React2.createElement(FileContainer, {
|
|
61
61
|
role,
|
|
62
62
|
file: data.subject
|
|
@@ -85,4 +85,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
|
85
85
|
export {
|
|
86
86
|
react_surface_default as default
|
|
87
87
|
};
|
|
88
|
-
//# sourceMappingURL=react-surface-
|
|
88
|
+
//# sourceMappingURL=react-surface-6GM4J4YG.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 { type Schema } from 'effect';\nimport React, { useCallback } from 'react';\n\nimport { contributes, Capabilities, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\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 } => Obj.instanceOf(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: Schema.Schema.Any } => {\n const annotation = findAnnotation<boolean>(\n (data.schema as Schema.Schema.All).ast,\n WnfsAction.UploadAnnotationId,\n );\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 { lazy } from 'react';\n\nexport const FileContainer = lazy(() => import('./FileContainer'));\n\nexport * from './FileInput';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } 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: Schema.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": ";;;;;;;;;AAKA,OAAOA,UAASC,eAAAA,oBAAmB;AAEnC,SAASC,aAAaC,cAAcC,qBAAqB;AACzD,SAASC,WAAW;AACpB,SAASC,kBAAAA,uBAAsB;;;ACL/B,SAASC,YAAY;;;;ACCrB,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,UAAM,EAAEC,EAAC,IAAKC,eAAeC,WAAAA;AAC7B,UAAMC,SAASC,eAAyCN,OAAOO,KAAKC,WAAWC,kBAAkB;AAEjG,UAAMC,iBAAiBC,YAAY,CAACC,UAAkBX,WAAWW,MAAM,CAAA,CAAE,GAAG;MAACX;KAAS;AAEtF,UAAM,EAAEY,eAAeC,cAAcC,eAAeC,WAAWC,cAAcC,aAAY,IAAKC,YAAY;MACxGC,UAAU;MACVf;MACAK;IACF,CAAA;AAEA,WACE,sBAAA,cAACW,OAAAA;MACE,GAAGP,aAAAA;MACJQ,WAAWC,GACT,0DACAP,aAAa,cACbC,gBAAgB,gBAChBC,gBAAgB,cAAA;OAGlB,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,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ADU/C,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;MAAC;MAAW;MAAW;;IAC7BC,QAAQ,CAACC,SAAwCC,IAAIC,WAAWC,UAAUH,KAAKI,OAAO;IACtFC,WAAW,CAAC,EAAEL,MAAMF,KAAI,MAAO,gBAAAQ,OAAA,cAACC,eAAAA;MAAcT;MAAYU,MAAMR,KAAKI;;EACvE,CAAA;EACAT,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;IACNC,QAAQ,CAACC,SAAAA;AACP,YAAMS,aAAaC,gBAChBV,KAAKW,OAA6BC,KACnCC,WAAWC,kBAAkB;AAE/B,aAAO,CAAC,CAACL;IACX;IACAJ,WAAW,CAAC,EAAEL,MAAM,EAAEe,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", "Obj", "findAnnotation", "lazy", "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", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "WNFS_PLUGIN", "role", "filter", "data", "Obj", "instanceOf", "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":"file.d.ts","sourceRoot":"","sources":["../../../../src/types/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;AAIhC,qBAAa,QAAS,SAAQ,
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/types/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;AAIhC,qBAAa,QAAS,SAAQ,aAQ5B;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-wnfs",
|
|
3
|
-
"version": "0.8.3-
|
|
3
|
+
"version": "0.8.3-staging.0fa589b",
|
|
4
4
|
"description": "WNFS file management plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -46,23 +46,23 @@
|
|
|
46
46
|
"react-dropzone": "^14.2.3",
|
|
47
47
|
"uint8arrays": "^5.1.0",
|
|
48
48
|
"wnfs": "0.2.2",
|
|
49
|
-
"@dxos/app-framework": "0.8.3-
|
|
50
|
-
"@dxos/crypto": "0.8.3-
|
|
51
|
-
"@dxos/echo": "0.8.3-
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/invariant": "0.8.3-
|
|
55
|
-
"@dxos/log": "0.8.3-
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/plugin-
|
|
58
|
-
"@dxos/plugin-
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/react-
|
|
61
|
-
"@dxos/react-ui": "0.8.3-
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/react-ui-
|
|
64
|
-
"@dxos/react-ui-
|
|
65
|
-
"@dxos/util": "0.8.3-
|
|
49
|
+
"@dxos/app-framework": "0.8.3-staging.0fa589b",
|
|
50
|
+
"@dxos/crypto": "0.8.3-staging.0fa589b",
|
|
51
|
+
"@dxos/echo": "0.8.3-staging.0fa589b",
|
|
52
|
+
"@dxos/effect": "0.8.3-staging.0fa589b",
|
|
53
|
+
"@dxos/echo-schema": "0.8.3-staging.0fa589b",
|
|
54
|
+
"@dxos/invariant": "0.8.3-staging.0fa589b",
|
|
55
|
+
"@dxos/log": "0.8.3-staging.0fa589b",
|
|
56
|
+
"@dxos/plugin-markdown": "0.8.3-staging.0fa589b",
|
|
57
|
+
"@dxos/plugin-space": "0.8.3-staging.0fa589b",
|
|
58
|
+
"@dxos/plugin-client": "0.8.3-staging.0fa589b",
|
|
59
|
+
"@dxos/react-client": "0.8.3-staging.0fa589b",
|
|
60
|
+
"@dxos/react-ui": "0.8.3-staging.0fa589b",
|
|
61
|
+
"@dxos/react-ui-form": "0.8.3-staging.0fa589b",
|
|
62
|
+
"@dxos/local-storage": "0.8.3-staging.0fa589b",
|
|
63
|
+
"@dxos/react-ui-stack": "0.8.3-staging.0fa589b",
|
|
64
|
+
"@dxos/react-ui-editor": "0.8.3-staging.0fa589b",
|
|
65
|
+
"@dxos/util": "0.8.3-staging.0fa589b"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -71,17 +71,17 @@
|
|
|
71
71
|
"react": "~18.2.0",
|
|
72
72
|
"react-dom": "~18.2.0",
|
|
73
73
|
"vite": "5.4.7",
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/storybook-utils": "0.8.3-
|
|
74
|
+
"@dxos/random": "0.8.3-staging.0fa589b",
|
|
75
|
+
"@dxos/react-ui-theme": "0.8.3-staging.0fa589b",
|
|
76
|
+
"@dxos/storybook-utils": "0.8.3-staging.0fa589b"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@phosphor-icons/react": "^2.0.5",
|
|
80
80
|
"effect": "^3.13.3",
|
|
81
81
|
"react": "~18.2.0",
|
|
82
82
|
"react-dom": "~18.2.0",
|
|
83
|
-
"@dxos/react-ui
|
|
84
|
-
"@dxos/react-ui": "0.8.3-
|
|
83
|
+
"@dxos/react-ui": "0.8.3-staging.0fa589b",
|
|
84
|
+
"@dxos/react-ui-theme": "0.8.3-staging.0fa589b"
|
|
85
85
|
},
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { contributes, Capabilities, createResolver, type PluginContext } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { Obj } from '@dxos/echo';
|
|
7
7
|
|
|
8
8
|
import { WnfsCapabilities } from './capabilities';
|
|
9
9
|
import { upload } from '../helpers';
|
|
@@ -17,7 +17,7 @@ export default (context: PluginContext) =>
|
|
|
17
17
|
intent: WnfsAction.Create,
|
|
18
18
|
resolve: ({ name, type, cid }) => ({
|
|
19
19
|
data: {
|
|
20
|
-
object:
|
|
20
|
+
object: Obj.make(FileType, { name, type, cid }),
|
|
21
21
|
},
|
|
22
22
|
}),
|
|
23
23
|
}),
|
|
@@ -6,7 +6,7 @@ import { type Schema } from 'effect';
|
|
|
6
6
|
import React, { useCallback } from 'react';
|
|
7
7
|
|
|
8
8
|
import { contributes, Capabilities, createSurface } from '@dxos/app-framework';
|
|
9
|
-
import {
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { findAnnotation } from '@dxos/effect';
|
|
11
11
|
import { type InputProps } from '@dxos/react-ui-form';
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@ export default () =>
|
|
|
19
19
|
createSurface({
|
|
20
20
|
id: `${WNFS_PLUGIN}/article`,
|
|
21
21
|
role: ['article', 'section', 'slide'],
|
|
22
|
-
filter: (data): data is { subject: FileType } =>
|
|
22
|
+
filter: (data): data is { subject: FileType } => Obj.instanceOf(FileType, data.subject),
|
|
23
23
|
component: ({ data, role }) => <FileContainer role={role} file={data.subject} />,
|
|
24
24
|
}),
|
|
25
25
|
createSurface({
|
package/src/types/file.ts
CHANGED
|
@@ -6,7 +6,10 @@ import { Schema } from 'effect';
|
|
|
6
6
|
|
|
7
7
|
import { TypedObject } from '@dxos/echo-schema';
|
|
8
8
|
|
|
9
|
-
export class FileType extends TypedObject({
|
|
9
|
+
export class FileType extends TypedObject({
|
|
10
|
+
typename: 'dxos.org/type/File',
|
|
11
|
+
version: '0.1.0',
|
|
12
|
+
})({
|
|
10
13
|
name: Schema.optional(Schema.String),
|
|
11
14
|
type: Schema.String,
|
|
12
15
|
cid: Schema.String,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/file.ts", "../../../src/types/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\n\nexport class FileType extends TypedObject({ typename: 'dxos.org/type/File', version: '0.1.0' })({\n name: Schema.optional(Schema.String),\n type: Schema.String,\n cid: Schema.String,\n timestamp: Schema.optional(Schema.String),\n}) {}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { FileInfoSchema } from '@dxos/app-framework';\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { FileType } from './file';\nimport { WNFS_PLUGIN } from '../meta';\n\nexport namespace WnfsAction {\n export class Create extends Schema.TaggedClass<Create>()(`${WNFS_PLUGIN}/action/create`, {\n input: FileInfoSchema.pick('name', 'type', 'cid').pipe(Schema.required),\n output: Schema.Struct({\n object: FileType,\n }),\n }) {}\n\n export const UploadAnnotationId = Symbol.for(`${WNFS_PLUGIN}/annotation/upload`);\n\n export const UploadFileSchema = Schema.Struct({\n file: Schema.instanceOf(File).annotations({\n [UploadAnnotationId]: {\n // Accept file types.\n 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],\n 'application/pdf': ['.pdf'],\n // TODO(wittjosiah): Add more file types.\n },\n }),\n });\n\n export type UploadFileForm = Schema.Schema.Type<typeof UploadFileSchema>;\n\n export class Upload extends Schema.TaggedClass<Upload>()(`${WNFS_PLUGIN}/action/upload`, {\n input: Schema.extend(UploadFileSchema, Schema.Struct({ space: SpaceSchema })),\n output: Schema.required(FileInfoSchema),\n }) {}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAErB,IAAMC,WAAN,cAAuBC,YAAY;EAAEC,UAAU;EAAsBC,SAAS;AAAQ,CAAA,EAAG;EAC9FC,MAAMC,OAAOC,SAASD,OAAOE,MAAM;EACnCC,MAAMH,OAAOE;EACbE,KAAKJ,OAAOE;EACZG,WAAWL,OAAOC,SAASD,OAAOE,MAAM;AAC1C,CAAA,EAAA;AAAI;;;ACTJ,SAASI,UAAAA,eAAc;AAEvB,SAASC,sBAAsB;AAC/B,SAASC,mBAAmB;UAKXC,aAAAA;EACR,MAAMC,eAAeC,QAAOC,YAAW,EAAW,GAAGC,WAAAA,kBAA6B;IACvFC,OAAOC,eAAeC,KAAK,QAAQ,QAAQ,KAAA,EAAOC,KAAKN,QAAOO,QAAQ;IACtEC,QAAQR,QAAOS,OAAO;MACpBC,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;cALSZ,SAAAA;cAOAa,qBAAqBC,OAAOC,IAAI,GAAGZ,WAAAA,oBAA+B;cAElEa,mBAAmBf,QAAOS,OAAO;IAC5CO,MAAMhB,QAAOiB,WAAWC,IAAAA,EAAMC,YAAY;MACxC,CAAArB,YAACc,kBAAAA,GAAqB;;QAEpB,WAAW;UAAC;UAAQ;UAAS;UAAQ;;QACrC,mBAAmB;UAAC;;MAEtB;IACF,CAAA;EACF,CAAA;EAIO,MAAMQ,eAAepB,QAAOC,YAAW,EAAW,GAAGC,WAAAA,kBAA6B;IACvFC,OAAOH,QAAOqB,OAAMvB,YAACiB,kBAAkBf,QAAOS,OAAO;MAAEa,OAAOC;IAAY,CAAA,CAAA;IAC1Ef,QAAQR,QAAOO,SAASH,cAAAA;EAC1B,CAAA,EAAA;EAAI;cAHSgB,SAAAA;AAIf,GA3BiBtB,eAAAA,aAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "TypedObject", "FileType", "TypedObject", "typename", "version", "name", "Schema", "optional", "String", "type", "cid", "timestamp", "Schema", "FileInfoSchema", "SpaceSchema", "WnfsAction", "Create", "Schema", "TaggedClass", "WNFS_PLUGIN", "input", "FileInfoSchema", "pick", "pipe", "required", "output", "Struct", "object", "FileType", "UploadAnnotationId", "Symbol", "for", "UploadFileSchema", "file", "instanceOf", "File", "annotations", "Upload", "extend", "space", "SpaceSchema"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/intent-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, Capabilities, createResolver, type PluginContext } from '@dxos/app-framework';\nimport { live } from '@dxos/react-client/echo';\n\nimport { WnfsCapabilities } from './capabilities';\nimport { upload } from '../helpers';\nimport { FileType, WnfsAction } from '../types';\n\nexport default (context: PluginContext) =>\n contributes(Capabilities.IntentResolver, [\n // TODO(wittjosiah): Deleting the object doesn't delete the wnfs blob.\n // Consider ways to trigger blob deletion based on object deletion and/or adding file system manager.\n createResolver({\n intent: WnfsAction.Create,\n resolve: ({ name, type, cid }) => ({\n data: {\n object: live(FileType, { name, type, cid }),\n },\n }),\n }),\n createResolver({\n intent: WnfsAction.Upload,\n resolve: async ({ file, space }) => {\n const blockstore = context.getCapability(WnfsCapabilities.Blockstore);\n const info = await upload({ file, blockstore, space });\n return { data: info };\n },\n }),\n ]);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,SAASA,aAAaC,cAAcC,sBAA0C;AAC9E,SAASC,YAAY;AAMrB,IAAA,0BAAe,CAACC,YACdC,YAAYC,aAAaC,gBAAgB;;;EAGvCC,eAAe;IACbC,QAAQC,WAAWC;IACnBC,SAAS,CAAC,EAAEC,MAAMC,MAAMC,IAAG,OAAQ;MACjCC,MAAM;QACJC,QAAQC,KAAKC,UAAU;UAAEN;UAAMC;UAAMC;QAAI,CAAA;MAC3C;IACF;EACF,CAAA;EACAP,eAAe;IACbC,QAAQC,WAAWU;IACnBR,SAAS,OAAO,EAAES,MAAMC,MAAK,MAAE;AAC7B,YAAMC,aAAanB,QAAQoB,cAAcC,iBAAiBC,UAAU;AACpE,YAAMC,OAAO,MAAMC,OAAO;QAAEP;QAAME;QAAYD;MAAM,CAAA;AACpD,aAAO;QAAEN,MAAMW;MAAK;IACtB;EACF,CAAA;CACD;",
|
|
6
|
-
"names": ["contributes", "Capabilities", "createResolver", "live", "context", "contributes", "Capabilities", "IntentResolver", "createResolver", "intent", "WnfsAction", "Create", "resolve", "name", "type", "cid", "data", "object", "live", "FileType", "Upload", "file", "space", "blockstore", "getCapability", "WnfsCapabilities", "Blockstore", "info", "upload"]
|
|
7
|
-
}
|
|
@@ -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 { type Schema } from 'effect';\nimport React, { useCallback } from 'react';\n\nimport { contributes, Capabilities, createSurface } from '@dxos/app-framework';\nimport { isInstanceOf } 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: Schema.Schema.Any } => {\n const annotation = findAnnotation<boolean>(\n (data.schema as Schema.Schema.All).ast,\n WnfsAction.UploadAnnotationId,\n );\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 { lazy } from 'react';\n\nexport const FileContainer = lazy(() => import('./FileContainer'));\n\nexport * from './FileInput';\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Schema } 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: Schema.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": ";;;;;;;;;AAKA,OAAOA,UAASC,eAAAA,oBAAmB;AAEnC,SAASC,aAAaC,cAAcC,qBAAqB;AACzD,SAASC,oBAAoB;AAC7B,SAASC,kBAAAA,uBAAsB;;;ACL/B,SAASC,YAAY;;;;ACCrB,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,UAAM,EAAEC,EAAC,IAAKC,eAAeC,WAAAA;AAC7B,UAAMC,SAASC,eAAyCN,OAAOO,KAAKC,WAAWC,kBAAkB;AAEjG,UAAMC,iBAAiBC,YAAY,CAACC,UAAkBX,WAAWW,MAAM,CAAA,CAAE,GAAG;MAACX;KAAS;AAEtF,UAAM,EAAEY,eAAeC,cAAcC,eAAeC,WAAWC,cAAcC,aAAY,IAAKC,YAAY;MACxGC,UAAU;MACVf;MACAK;IACF,CAAA;AAEA,WACE,sBAAA,cAACW,OAAAA;MACE,GAAGP,aAAAA;MACJQ,WAAWC,GACT,0DACAP,aAAa,cACbC,gBAAgB,gBAChBC,gBAAgB,cAAA;OAGlB,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,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ADU/C,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,gBAChBT,KAAKU,OAA6BC,KACnCC,WAAWC,kBAAkB;AAE/B,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", "lazy", "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", "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
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|