@dxos/plugin-wnfs 0.8.0 → 0.8.1-main.013e445

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/lib/browser/{FileContainer-JP3ZCHVO.mjs → FileContainer-UCXAQK5D.mjs} +4 -4
  2. package/dist/lib/browser/{blockstore-55OY65BY.mjs → blockstore-G47Q25U6.mjs} +3 -3
  3. package/dist/lib/browser/chunk-DCUX7JID.mjs +16 -0
  4. package/dist/lib/browser/{chunk-RYOWC7TX.mjs → chunk-FKYLWLNM.mjs} +2 -2
  5. package/dist/lib/browser/{chunk-KFKLBRAQ.mjs → chunk-NIDFBTNY.mjs} +2 -2
  6. package/dist/lib/browser/{chunk-EELFT4QP.mjs → chunk-X54OT4V3.mjs} +2 -2
  7. package/dist/lib/browser/chunk-X54OT4V3.mjs.map +7 -0
  8. package/dist/lib/browser/{file-uploader-3DF5T3EZ.mjs → file-uploader-L4TDVJBE.mjs} +3 -3
  9. package/dist/lib/browser/index.mjs +6 -12
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/{intent-resolver-6IX7MROZ.mjs → intent-resolver-VSMIQLGS.mjs} +4 -4
  12. package/dist/lib/browser/{markdown-MGMT4KWF.mjs → markdown-MWMZVPEX.mjs} +3 -3
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/{react-surface-DPJ6WGOE.mjs → react-surface-QSENSGO5.mjs} +6 -5
  15. package/dist/lib/browser/react-surface-QSENSGO5.mjs.map +7 -0
  16. package/dist/lib/browser/types/index.mjs +2 -2
  17. package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
  18. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  19. package/dist/types/src/components/FileContainer.d.ts +2 -1
  20. package/dist/types/src/components/FileContainer.d.ts.map +1 -1
  21. package/dist/types/src/components/FileInput.d.ts +3 -2
  22. package/dist/types/src/components/FileInput.d.ts.map +1 -1
  23. package/dist/types/src/components/FilePreview.d.ts +2 -1
  24. package/dist/types/src/components/FilePreview.d.ts.map +1 -1
  25. package/dist/types/src/components/index.d.ts +1 -1
  26. package/dist/types/src/components/index.d.ts.map +1 -1
  27. package/dist/types/src/extensions/image.stories.d.ts +2 -1
  28. package/dist/types/src/extensions/image.stories.d.ts.map +1 -1
  29. package/dist/types/src/meta.d.ts +2 -7
  30. package/dist/types/src/meta.d.ts.map +1 -1
  31. package/dist/types/src/translations.d.ts +2 -3
  32. package/dist/types/src/translations.d.ts.map +1 -1
  33. package/package.json +23 -23
  34. package/src/WnfsPlugin.tsx +1 -2
  35. package/src/capabilities/react-surface.tsx +2 -1
  36. package/src/components/FileInput.tsx +2 -1
  37. package/src/meta.ts +3 -3
  38. package/src/translations.ts +1 -1
  39. package/dist/lib/browser/chunk-3ERFJ7W2.mjs +0 -16
  40. package/dist/lib/browser/chunk-EELFT4QP.mjs.map +0 -7
  41. package/dist/lib/browser/react-surface-DPJ6WGOE.mjs.map +0 -7
  42. /package/dist/lib/browser/{FileContainer-JP3ZCHVO.mjs.map → FileContainer-UCXAQK5D.mjs.map} +0 -0
  43. /package/dist/lib/browser/{blockstore-55OY65BY.mjs.map → blockstore-G47Q25U6.mjs.map} +0 -0
  44. /package/dist/lib/browser/{chunk-3ERFJ7W2.mjs.map → chunk-DCUX7JID.mjs.map} +0 -0
  45. /package/dist/lib/browser/{chunk-RYOWC7TX.mjs.map → chunk-FKYLWLNM.mjs.map} +0 -0
  46. /package/dist/lib/browser/{chunk-KFKLBRAQ.mjs.map → chunk-NIDFBTNY.mjs.map} +0 -0
  47. /package/dist/lib/browser/{file-uploader-3DF5T3EZ.mjs.map → file-uploader-L4TDVJBE.mjs.map} +0 -0
  48. /package/dist/lib/browser/{intent-resolver-6IX7MROZ.mjs.map → intent-resolver-VSMIQLGS.mjs.map} +0 -0
  49. /package/dist/lib/browser/{markdown-MGMT4KWF.mjs.map → markdown-MWMZVPEX.mjs.map} +0 -0
@@ -1,4 +1,4 @@
1
- import "./chunk-3ERFJ7W2.mjs";
1
+ import "./chunk-DCUX7JID.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-KFKLBRAQ.mjs";
11
- import "./chunk-EELFT4QP.mjs";
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";
@@ -91,4 +91,4 @@ var FileContainer_default = FileContainer;
91
91
  export {
92
92
  FileContainer_default as default
93
93
  };
94
- //# sourceMappingURL=FileContainer-JP3ZCHVO.mjs.map
94
+ //# sourceMappingURL=FileContainer-UCXAQK5D.mjs.map
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-SCQWJNHD.mjs";
4
4
  import {
5
5
  WnfsCapabilities
6
- } from "./chunk-KFKLBRAQ.mjs";
7
- import "./chunk-EELFT4QP.mjs";
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-55OY65BY.mjs.map
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-QSENSGO5.mjs"));
8
+
9
+ export {
10
+ Blockstore,
11
+ FileUploader,
12
+ IntentResolver,
13
+ Markdown,
14
+ ReactSurface
15
+ };
16
+ //# sourceMappingURL=chunk-DCUX7JID.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WNFS_PLUGIN
3
- } from "./chunk-EELFT4QP.mjs";
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-RYOWC7TX.mjs.map
60
+ //# sourceMappingURL=chunk-FKYLWLNM.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WNFS_PLUGIN
3
- } from "./chunk-EELFT4QP.mjs";
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-KFKLBRAQ.mjs.map
16
+ //# sourceMappingURL=chunk-NIDFBTNY.mjs.map
@@ -3,7 +3,7 @@ var WNFS_PLUGIN = "dxos.org/plugin/wnfs";
3
3
  var meta = {
4
4
  id: WNFS_PLUGIN,
5
5
  name: "WNFS",
6
- description: "Upload & view files with WNFS.",
6
+ description: "Manage and view files with via the Web Native File System (WNFS).",
7
7
  icon: "ph--file-cloud--regular",
8
8
  source: "https://github.com/dxos/dxos/tree/main/packages/plugins/experimental/plugin-wnfs"
9
9
  };
@@ -12,4 +12,4 @@ export {
12
12
  WNFS_PLUGIN,
13
13
  meta
14
14
  };
15
- //# sourceMappingURL=chunk-EELFT4QP.mjs.map
15
+ //# sourceMappingURL=chunk-X54OT4V3.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-RYOWC7TX.mjs";
4
- import "./chunk-EELFT4QP.mjs";
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-3DF5T3EZ.mjs.map
29
+ //# sourceMappingURL=file-uploader-L4TDVJBE.mjs.map
@@ -4,18 +4,18 @@ import {
4
4
  IntentResolver,
5
5
  Markdown,
6
6
  ReactSurface
7
- } from "./chunk-3ERFJ7W2.mjs";
7
+ } from "./chunk-DCUX7JID.mjs";
8
8
  import {
9
9
  WnfsCapabilities
10
- } from "./chunk-KFKLBRAQ.mjs";
10
+ } from "./chunk-NIDFBTNY.mjs";
11
11
  import {
12
12
  FileType,
13
13
  WnfsAction
14
- } from "./chunk-RYOWC7TX.mjs";
14
+ } from "./chunk-FKYLWLNM.mjs";
15
15
  import {
16
16
  WNFS_PLUGIN,
17
17
  meta
18
- } from "./chunk-EELFT4QP.mjs";
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, WNFS_PLUGIN } 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 placeholder: ['file title placeholder', { ns: WNFS_PLUGIN }],\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 },\n [WNFS_PLUGIN]: {\n 'plugin name': 'Files',\n 'file title placeholder': 'New file',\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;MACpB;MACA,CAACC,WAAAA,GAAc;QACb,eAAe;QACf,0BAA0B;QAC1B,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;QACpEC,aAAa;UAAC;UAA0B;YAAEC,IAAIC;UAAY;;;QAE1DC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACA5B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,aAAa0B;IAC1BxB,UAAU,MACRG,YACEsB,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcf;MACdgB,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;EACA7C,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,aAAaC;IAC1BC,UAAUyC;EACZ,CAAA;EACA9C,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAa6C,eAAeC;IAC5B3C,UAAU4C;EACZ,CAAA;EACAjD,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaS,OAAOuC;IACpB7C,UAAU8C;EACZ,CAAA;EACAnD,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaS,OAAOyC;IACpB/C,UAAUgD;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", "placeholder", "ns", "WNFS_PLUGIN", "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"]
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-KFKLBRAQ.mjs";
6
+ } from "./chunk-NIDFBTNY.mjs";
7
7
  import {
8
8
  FileType,
9
9
  WnfsAction
10
- } from "./chunk-RYOWC7TX.mjs";
11
- import "./chunk-EELFT4QP.mjs";
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-6IX7MROZ.mjs.map
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-KFKLBRAQ.mjs";
9
- import "./chunk-EELFT4QP.mjs";
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-MGMT4KWF.mjs.map
198
+ //# sourceMappingURL=markdown-MWMZVPEX.mjs.map
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytes":1461,"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":4980,"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-3ERFJ7W2.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-KFKLBRAQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RYOWC7TX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-RYOWC7TX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-55OY65BY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10631},"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-55OY65BY.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-KFKLBRAQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-3DF5T3EZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1841},"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-3DF5T3EZ.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RYOWC7TX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-6IX7MROZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2113},"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-6IX7MROZ.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-KFKLBRAQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RYOWC7TX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-MGMT4KWF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":12473},"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-MGMT4KWF.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-KFKLBRAQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-JP3ZCHVO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4327},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-JP3ZCHVO.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-3ERFJ7W2.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-KFKLBRAQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-3ERFJ7W2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":909},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-3ERFJ7W2.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/blockstore-55OY65BY.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/file-uploader-3DF5T3EZ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/intent-resolver-6IX7MROZ.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/markdown-MGMT4KWF.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-DPJ6WGOE.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-KFKLBRAQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1040},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-KFKLBRAQ.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-DPJ6WGOE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5752},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-DPJ6WGOE.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RYOWC7TX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-JP3ZCHVO.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-RYOWC7TX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3061},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-RYOWC7TX.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.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-EELFT4QP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":697},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-EELFT4QP.mjs":{"imports":[],"exports":["WNFS_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-wnfs/src/meta.ts":{"bytesInOutput":270}},"bytes":393}}}
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":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":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-DCUX7JID.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-UCXAQK5D.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4327},"packages/plugins/plugin-wnfs/dist/lib/browser/FileContainer-UCXAQK5D.mjs":{"imports":[{"path":"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DCUX7JID.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":1519},"packages/plugins/plugin-wnfs/src/components/FilePreview.tsx":{"bytesInOutput":674}},"bytes":2697},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DCUX7JID.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":909},"packages/plugins/plugin-wnfs/dist/lib/browser/chunk-DCUX7JID.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-QSENSGO5.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-QSENSGO5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5903},"packages/plugins/plugin-wnfs/dist/lib/browser/react-surface-QSENSGO5.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-UCXAQK5D.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-RYOWC7TX.mjs";
4
+ } from "./chunk-FKYLWLNM.mjs";
5
5
  import {
6
6
  WNFS_PLUGIN
7
- } from "./chunk-EELFT4QP.mjs";
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-JP3ZCHVO.mjs"));
42
+ var FileContainer = React2.lazy(() => import("./FileContainer-UCXAQK5D.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 instanceof FileType,
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-DPJ6WGOE.mjs.map
82
+ //# sourceMappingURL=react-surface-QSENSGO5.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,8 +1,8 @@
1
1
  import {
2
2
  FileType,
3
3
  WnfsAction
4
- } from "../chunk-RYOWC7TX.mjs";
5
- import "../chunk-EELFT4QP.mjs";
4
+ } from "../chunk-FKYLWLNM.mjs";
5
+ import "../chunk-X54OT4V3.mjs";
6
6
  export {
7
7
  FileType,
8
8
  WnfsAction
@@ -1 +1 @@
1
- {"version":3,"file":"WnfsPlugin.d.ts","sourceRoot":"","sources":["../../../src/WnfsPlugin.tsx"],"names":[],"mappings":"AAyBA,eAAO,MAAM,UAAU,4CAoEnB,CAAC"}
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;;AAS/E,wBAyBK"}
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
- }) => import("react/jsx-runtime").JSX.Element | null;
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":"AAcA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,QAAA,MAAM,aAAa,mBAAoB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,mDA2BtE,CAAC;AAEF,eAAe,aAAa,CAAC"}
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
- import { type S } from '@dxos/effect';
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) => import("react/jsx-runtime").JSX.Element;
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":"AAOA,OAAO,EAAkB,KAAK,CAAC,EAAE,MAAM,cAAc,CAAC;AAOtD,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,4CA0B7D,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) => import("react/jsx-runtime").JSX.Element;
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":"AAMA,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,4CAQtE,CAAC"}
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
- }) => import("react/jsx-runtime").JSX.Element | null>;
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;;;qDAA8C,CAAC;AAEzE,cAAc,aAAa,CAAC"}
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: () => import("react/jsx-runtime").JSX.Element;
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;;;;;;AAyFrB,wBAIE;AAEF,eAAO,MAAM,OAAO,IAAK,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"}
@@ -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":"AAMA,eAAO,MAAM,WAAW,yBAAyB,CAAC;AAElD,eAAO,MAAM,IAAI;;;;;;CAMK,CAAC"}
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":";;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAcE"}
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.0",
3
+ "version": "0.8.1-main.013e445",
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": "^3.12.3",
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.0",
49
- "@dxos/crypto": "0.8.0",
50
- "@dxos/echo-schema": "0.8.0",
51
- "@dxos/effect": "0.8.0",
52
- "@dxos/log": "0.8.0",
53
- "@dxos/invariant": "0.8.0",
54
- "@dxos/plugin-markdown": "0.8.0",
55
- "@dxos/plugin-space": "0.8.0",
56
- "@dxos/local-storage": "0.8.0",
57
- "@dxos/react-client": "0.8.0",
58
- "@dxos/react-ui": "0.8.0",
59
- "@dxos/react-ui-form": "0.8.0",
60
- "@dxos/react-ui-stack": "0.8.0",
61
- "@dxos/react-ui-editor": "0.8.0",
62
- "@dxos/util": "0.8.0",
63
- "@dxos/plugin-client": "0.8.0"
48
+ "@dxos/app-framework": "0.8.1-main.013e445",
49
+ "@dxos/echo-schema": "0.8.1-main.013e445",
50
+ "@dxos/crypto": "0.8.1-main.013e445",
51
+ "@dxos/effect": "0.8.1-main.013e445",
52
+ "@dxos/invariant": "0.8.1-main.013e445",
53
+ "@dxos/local-storage": "0.8.1-main.013e445",
54
+ "@dxos/log": "0.8.1-main.013e445",
55
+ "@dxos/plugin-markdown": "0.8.1-main.013e445",
56
+ "@dxos/plugin-space": "0.8.1-main.013e445",
57
+ "@dxos/plugin-client": "0.8.1-main.013e445",
58
+ "@dxos/react-ui": "0.8.1-main.013e445",
59
+ "@dxos/react-client": "0.8.1-main.013e445",
60
+ "@dxos/react-ui-editor": "0.8.1-main.013e445",
61
+ "@dxos/react-ui-stack": "0.8.1-main.013e445",
62
+ "@dxos/react-ui-form": "0.8.1-main.013e445",
63
+ "@dxos/util": "0.8.1-main.013e445"
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.0",
73
- "@dxos/react-ui-theme": "0.8.0",
74
- "@dxos/storybook-utils": "0.8.0"
72
+ "@dxos/random": "0.8.1-main.013e445",
73
+ "@dxos/react-ui-theme": "0.8.1-main.013e445",
74
+ "@dxos/storybook-utils": "0.8.1-main.013e445"
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-theme": "0.8.0",
81
- "@dxos/react-ui": "0.8.0"
80
+ "@dxos/react-ui": "0.8.1-main.013e445",
81
+ "@dxos/react-ui-theme": "0.8.1-main.013e445"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public"
@@ -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, WNFS_PLUGIN } from './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 instanceof FileType,
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({
@@ -2,10 +2,11 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { type Schema as S } from 'effect';
5
6
  import React, { useCallback } from 'react';
6
7
  import { useDropzone } from 'react-dropzone';
7
8
 
8
- import { findAnnotation, type S } from '@dxos/effect';
9
+ import { findAnnotation } from '@dxos/effect';
9
10
  import { useTranslation } from '@dxos/react-ui';
10
11
  import { mx } from '@dxos/react-ui-theme';
11
12
 
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
- description: 'Upload & view files with WNFS.',
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
- } satisfies PluginMeta;
15
+ };
@@ -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,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-55OY65BY.mjs"));
4
- var FileUploader = lazy(() => import("./file-uploader-3DF5T3EZ.mjs"));
5
- var IntentResolver = lazy(() => import("./intent-resolver-6IX7MROZ.mjs"));
6
- var Markdown = lazy(() => import("./markdown-MGMT4KWF.mjs"));
7
- var ReactSurface = lazy(() => import("./react-surface-DPJ6WGOE.mjs"));
8
-
9
- export {
10
- Blockstore,
11
- FileUploader,
12
- IntentResolver,
13
- Markdown,
14
- ReactSurface
15
- };
16
- //# sourceMappingURL=chunk-3ERFJ7W2.mjs.map
@@ -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: 'Upload & view files with 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,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 React, { useCallback } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\nimport { findAnnotation, type S } 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;;;ACAlB,OAAOC,SAASC,mBAAmB;AACnC,SAASC,mBAAmB;AAE5B,SAASC,sBAA8B;AACvC,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;;;ADvCO,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
- }