@dxos/plugin-wnfs 0.8.4-main.67995b8 → 0.8.4-main.6fa680abb7

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 (161) hide show
  1. package/dist/lib/browser/FileContainer-MPHQF5UK.mjs +72 -0
  2. package/dist/lib/browser/FileContainer-MPHQF5UK.mjs.map +7 -0
  3. package/dist/lib/browser/{blockstore-KQO2NTVM.mjs → blockstore-FZHYPYGC.mjs} +19 -19
  4. package/dist/lib/browser/blockstore-FZHYPYGC.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-KVFGUEQD.mjs +56 -0
  6. package/dist/lib/browser/chunk-KVFGUEQD.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-VRRXG6IB.mjs → chunk-UC4HMNZZ.mjs} +24 -14
  8. package/dist/lib/browser/chunk-UC4HMNZZ.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-YU2LIVB5.mjs +136 -0
  10. package/dist/lib/browser/chunk-YU2LIVB5.mjs.map +7 -0
  11. package/dist/lib/browser/file-uploader-FPEN2ZIO.mjs +35 -0
  12. package/dist/lib/browser/file-uploader-FPEN2ZIO.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +81 -86
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/{markdown-6VH477GB.mjs → markdown-5WOMJPEH.mjs} +31 -26
  16. package/dist/lib/browser/markdown-5WOMJPEH.mjs.map +7 -0
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/operation-resolver-ZU5F3K5U.mjs +86 -0
  19. package/dist/lib/browser/operation-resolver-ZU5F3K5U.mjs.map +7 -0
  20. package/dist/lib/browser/react-surface-2DTU3HUO.mjs +60 -0
  21. package/dist/lib/browser/react-surface-2DTU3HUO.mjs.map +7 -0
  22. package/dist/lib/browser/types/index.mjs +9 -6
  23. package/dist/types/src/WnfsPlugin.d.ts +2 -1
  24. package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/blockstore/blockstore.d.ts +5 -0
  26. package/dist/types/src/capabilities/blockstore/blockstore.d.ts.map +1 -0
  27. package/dist/types/src/capabilities/blockstore/index.d.ts +3 -0
  28. package/dist/types/src/capabilities/blockstore/index.d.ts.map +1 -0
  29. package/dist/types/src/capabilities/file-uploader/file-uploader.d.ts +6 -0
  30. package/dist/types/src/capabilities/file-uploader/file-uploader.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/file-uploader/index.d.ts +3 -0
  32. package/dist/types/src/capabilities/file-uploader/index.d.ts.map +1 -0
  33. package/dist/types/src/capabilities/index.d.ts +5 -6
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
  36. package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
  37. package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
  38. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
  39. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  40. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  41. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  42. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  43. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  44. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  46. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  47. package/dist/types/src/components/{FileInput.d.ts → FileInput/FileInput.d.ts} +1 -1
  48. package/dist/types/src/components/FileInput/FileInput.d.ts.map +1 -0
  49. package/dist/types/src/components/FileInput/index.d.ts +2 -0
  50. package/dist/types/src/components/FileInput/index.d.ts.map +1 -0
  51. package/dist/types/src/components/FilePreview/FilePreview.d.ts.map +1 -0
  52. package/dist/types/src/components/FilePreview/index.d.ts +2 -0
  53. package/dist/types/src/components/FilePreview/index.d.ts.map +1 -0
  54. package/dist/types/src/components/index.d.ts +1 -1
  55. package/dist/types/src/components/index.d.ts.map +1 -1
  56. package/dist/types/src/containers/FileContainer/FileContainer.d.ts +7 -0
  57. package/dist/types/src/containers/FileContainer/FileContainer.d.ts.map +1 -0
  58. package/dist/types/src/containers/FileContainer/index.d.ts +3 -0
  59. package/dist/types/src/containers/FileContainer/index.d.ts.map +1 -0
  60. package/dist/types/src/containers/index.d.ts +3 -0
  61. package/dist/types/src/containers/index.d.ts.map +1 -0
  62. package/dist/types/src/extensions/image.d.ts +1 -1
  63. package/dist/types/src/extensions/image.d.ts.map +1 -1
  64. package/dist/types/src/extensions/image.stories.d.ts +5 -4
  65. package/dist/types/src/extensions/image.stories.d.ts.map +1 -1
  66. package/dist/types/src/helpers/load.d.ts +2 -2
  67. package/dist/types/src/helpers/load.d.ts.map +1 -1
  68. package/dist/types/src/helpers/upload.d.ts +1 -1
  69. package/dist/types/src/helpers/upload.d.ts.map +1 -1
  70. package/dist/types/src/index.d.ts +1 -1
  71. package/dist/types/src/index.d.ts.map +1 -1
  72. package/dist/types/src/meta.d.ts +2 -3
  73. package/dist/types/src/meta.d.ts.map +1 -1
  74. package/dist/types/src/translations.d.ts +7 -3
  75. package/dist/types/src/translations.d.ts.map +1 -1
  76. package/dist/types/src/types/File.d.ts +16 -0
  77. package/dist/types/src/types/File.d.ts.map +1 -0
  78. package/dist/types/src/{capabilities → types}/capabilities.d.ts +3 -2
  79. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  80. package/dist/types/src/types/index.d.ts +2 -1
  81. package/dist/types/src/types/index.d.ts.map +1 -1
  82. package/dist/types/src/types/types.d.ts +88 -47
  83. package/dist/types/src/types/types.d.ts.map +1 -1
  84. package/dist/types/tsconfig.tsbuildinfo +1 -1
  85. package/package.json +46 -40
  86. package/src/WnfsPlugin.tsx +53 -81
  87. package/src/blockstore.ts +3 -3
  88. package/src/capabilities/blockstore/blockstore.ts +22 -0
  89. package/src/capabilities/blockstore/index.ts +7 -0
  90. package/src/capabilities/file-uploader/file-uploader.ts +34 -0
  91. package/src/capabilities/file-uploader/index.ts +7 -0
  92. package/src/capabilities/index.ts +5 -9
  93. package/src/capabilities/markdown/index.ts +7 -0
  94. package/src/capabilities/markdown/markdown.ts +33 -0
  95. package/src/capabilities/operation-resolver/index.ts +7 -0
  96. package/src/capabilities/operation-resolver/operation-resolver.ts +51 -0
  97. package/src/capabilities/react-surface/index.ts +7 -0
  98. package/src/capabilities/react-surface/react-surface.tsx +51 -0
  99. package/src/components/{FileInput.tsx → FileInput/FileInput.tsx} +7 -7
  100. package/src/components/FileInput/index.ts +5 -0
  101. package/src/components/{FilePreview.tsx → FilePreview/FilePreview.tsx} +1 -1
  102. package/src/components/FilePreview/index.ts +5 -0
  103. package/src/components/index.ts +1 -4
  104. package/src/containers/FileContainer/FileContainer.tsx +56 -0
  105. package/src/containers/FileContainer/index.ts +7 -0
  106. package/src/containers/index.ts +7 -0
  107. package/src/extensions/image.stories.tsx +18 -14
  108. package/src/extensions/image.tsx +9 -9
  109. package/src/helpers/load.ts +14 -8
  110. package/src/helpers/upload.ts +6 -2
  111. package/src/index.ts +1 -1
  112. package/src/meta.ts +9 -6
  113. package/src/translations.ts +7 -3
  114. package/src/types/File.ts +24 -0
  115. package/src/{capabilities → types}/capabilities.ts +4 -4
  116. package/src/types/index.ts +2 -1
  117. package/src/types/types.ts +44 -18
  118. package/dist/lib/browser/FileContainer-6P2SYTVH.mjs +0 -105
  119. package/dist/lib/browser/FileContainer-6P2SYTVH.mjs.map +0 -7
  120. package/dist/lib/browser/blockstore-KQO2NTVM.mjs.map +0 -7
  121. package/dist/lib/browser/chunk-GVBV2QWA.mjs +0 -64
  122. package/dist/lib/browser/chunk-GVBV2QWA.mjs.map +0 -7
  123. package/dist/lib/browser/chunk-KZANQHJY.mjs +0 -16
  124. package/dist/lib/browser/chunk-KZANQHJY.mjs.map +0 -7
  125. package/dist/lib/browser/chunk-VDDGZWAY.mjs +0 -15
  126. package/dist/lib/browser/chunk-VDDGZWAY.mjs.map +0 -7
  127. package/dist/lib/browser/chunk-VRRXG6IB.mjs.map +0 -7
  128. package/dist/lib/browser/chunk-WTYTESSC.mjs +0 -16
  129. package/dist/lib/browser/chunk-WTYTESSC.mjs.map +0 -7
  130. package/dist/lib/browser/file-uploader-JA55DPMW.mjs +0 -29
  131. package/dist/lib/browser/file-uploader-JA55DPMW.mjs.map +0 -7
  132. package/dist/lib/browser/intent-resolver-YM6QRFIH.mjs +0 -49
  133. package/dist/lib/browser/intent-resolver-YM6QRFIH.mjs.map +0 -7
  134. package/dist/lib/browser/markdown-6VH477GB.mjs.map +0 -7
  135. package/dist/lib/browser/react-surface-NOSB5MZ2.mjs +0 -88
  136. package/dist/lib/browser/react-surface-NOSB5MZ2.mjs.map +0 -7
  137. package/dist/types/src/capabilities/blockstore.d.ts +0 -4
  138. package/dist/types/src/capabilities/blockstore.d.ts.map +0 -1
  139. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  140. package/dist/types/src/capabilities/file-uploader.d.ts +0 -4
  141. package/dist/types/src/capabilities/file-uploader.d.ts.map +0 -1
  142. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  143. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  144. package/dist/types/src/capabilities/markdown.d.ts +0 -4
  145. package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
  146. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  147. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  148. package/dist/types/src/components/FileContainer.d.ts +0 -9
  149. package/dist/types/src/components/FileContainer.d.ts.map +0 -1
  150. package/dist/types/src/components/FileInput.d.ts.map +0 -1
  151. package/dist/types/src/components/FilePreview.d.ts.map +0 -1
  152. package/dist/types/src/types/file.d.ts +0 -16
  153. package/dist/types/src/types/file.d.ts.map +0 -1
  154. package/src/capabilities/blockstore.ts +0 -18
  155. package/src/capabilities/file-uploader.ts +0 -24
  156. package/src/capabilities/intent-resolver.ts +0 -32
  157. package/src/capabilities/markdown.ts +0 -25
  158. package/src/capabilities/react-surface.tsx +0 -45
  159. package/src/components/FileContainer.tsx +0 -51
  160. package/src/types/file.ts +0 -17
  161. /package/dist/types/src/components/{FilePreview.d.ts → FilePreview/FilePreview.d.ts} +0 -0
@@ -0,0 +1,86 @@
1
+ import {
2
+ upload
3
+ } from "./chunk-UC4HMNZZ.mjs";
4
+ import {
5
+ File_exports,
6
+ WnfsCapabilities,
7
+ WnfsOperation
8
+ } from "./chunk-YU2LIVB5.mjs";
9
+
10
+ // src/capabilities/operation-resolver/operation-resolver.ts
11
+ import * as Effect from "effect/Effect";
12
+ import { Capabilities, Capability } from "@dxos/app-framework";
13
+ import { invariant } from "@dxos/invariant";
14
+ import { OperationResolver } from "@dxos/operation";
15
+ import { ClientCapabilities } from "@dxos/plugin-client";
16
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-wnfs/src/capabilities/operation-resolver/operation-resolver.ts";
17
+ var operation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* () {
18
+ return Capability.contributes(Capabilities.OperationResolver, [
19
+ OperationResolver.make({
20
+ operation: WnfsOperation.Create,
21
+ handler: ({ name, type, cid }) => Effect.succeed({
22
+ object: File_exports.make({
23
+ name,
24
+ type,
25
+ cid
26
+ })
27
+ })
28
+ }),
29
+ OperationResolver.make({
30
+ operation: WnfsOperation.Upload,
31
+ handler: Effect.fnUntraced(function* ({ file, db }) {
32
+ const client = yield* Capability.get(ClientCapabilities.Client);
33
+ const blockstore = yield* Capability.get(WnfsCapabilities.Blockstore);
34
+ const space = client.spaces.get(db.spaceId);
35
+ invariant(space, "Space not found", {
36
+ F: __dxlog_file,
37
+ L: 31,
38
+ S: this,
39
+ A: [
40
+ "space",
41
+ "'Space not found'"
42
+ ]
43
+ });
44
+ const info = yield* Effect.promise(() => upload({
45
+ file,
46
+ blockstore,
47
+ space
48
+ }));
49
+ return info;
50
+ })
51
+ }),
52
+ OperationResolver.make({
53
+ operation: WnfsOperation.CreateFile,
54
+ handler: Effect.fnUntraced(function* ({ file, db }) {
55
+ const client = yield* Capability.get(ClientCapabilities.Client);
56
+ const blockstore = yield* Capability.get(WnfsCapabilities.Blockstore);
57
+ const space = client.spaces.get(db.spaceId);
58
+ invariant(space, "Space not found", {
59
+ F: __dxlog_file,
60
+ L: 42,
61
+ S: this,
62
+ A: [
63
+ "space",
64
+ "'Space not found'"
65
+ ]
66
+ });
67
+ const info = yield* Effect.promise(() => upload({
68
+ file,
69
+ blockstore,
70
+ space
71
+ }));
72
+ return {
73
+ object: File_exports.make({
74
+ name: info.name,
75
+ type: info.type,
76
+ cid: info.cid
77
+ })
78
+ };
79
+ })
80
+ })
81
+ ]);
82
+ }));
83
+ export {
84
+ operation_resolver_default as default
85
+ };
86
+ //# sourceMappingURL=operation-resolver-ZU5F3K5U.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/operation-resolver/operation-resolver.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { OperationResolver } from '@dxos/operation';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { upload } from '../../helpers';\nimport { WnfsCapabilities, WnfsFile, WnfsOperation } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationResolver, [\n OperationResolver.make({\n operation: WnfsOperation.Create,\n handler: ({ name, type, cid }) =>\n Effect.succeed({\n object: WnfsFile.make({ name, type, cid }),\n }),\n }),\n OperationResolver.make({\n operation: WnfsOperation.Upload,\n handler: Effect.fnUntraced(function* ({ file, db }) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const blockstore = yield* Capability.get(WnfsCapabilities.Blockstore);\n const space = client.spaces.get(db.spaceId);\n invariant(space, 'Space not found');\n const info = yield* Effect.promise(() => upload({ file, blockstore, space }));\n return info;\n }),\n }),\n OperationResolver.make({\n operation: WnfsOperation.CreateFile,\n handler: Effect.fnUntraced(function* ({ file, db }) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const blockstore = yield* Capability.get(WnfsCapabilities.Blockstore);\n const space = client.spaces.get(db.spaceId);\n invariant(space, 'Space not found');\n const info = yield* Effect.promise(() => upload({ file, blockstore, space }));\n return {\n object: WnfsFile.make({ name: info.name, type: info.type, cid: info.cid }),\n };\n }),\n }),\n ]);\n }),\n);\n"],
5
+ "mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiB;AAC1B,SAASC,yBAAyB;AAClC,SAASC,0BAA0B;;AAKnC,IAAA,6BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,SAAOF,WAAWG,YAAYC,aAAaC,mBAAmB;IAC5DA,kBAAkBC,KAAK;MACrBC,WAAWC,cAAcC;MACzBC,SAAS,CAAC,EAAEC,MAAMC,MAAMC,IAAG,MAClBC,eAAQ;QACbC,QAAQC,aAASV,KAAK;UAAEK;UAAMC;UAAMC;QAAI,CAAA;MAC1C,CAAA;IACJ,CAAA;IACAR,kBAAkBC,KAAK;MACrBC,WAAWC,cAAcS;MACzBP,SAAgBR,kBAAW,WAAW,EAAEgB,MAAMC,GAAE,GAAE;AAChD,cAAMC,SAAS,OAAOpB,WAAWqB,IAAIC,mBAAmBC,MAAM;AAC9D,cAAMC,aAAa,OAAOxB,WAAWqB,IAAII,iBAAiBC,UAAU;AACpE,cAAMC,QAAQP,OAAOQ,OAAOP,IAAIF,GAAGU,OAAO;AAC1CC,kBAAUH,OAAO,mBAAA;;;;;;;;;AACjB,cAAMI,OAAO,OAAcC,eAAQ,MAAMC,OAAO;UAAEf;UAAMM;UAAYG;QAAM,CAAA,CAAA;AAC1E,eAAOI;MACT,CAAA;IACF,CAAA;IACA1B,kBAAkBC,KAAK;MACrBC,WAAWC,cAAc0B;MACzBxB,SAAgBR,kBAAW,WAAW,EAAEgB,MAAMC,GAAE,GAAE;AAChD,cAAMC,SAAS,OAAOpB,WAAWqB,IAAIC,mBAAmBC,MAAM;AAC9D,cAAMC,aAAa,OAAOxB,WAAWqB,IAAII,iBAAiBC,UAAU;AACpE,cAAMC,QAAQP,OAAOQ,OAAOP,IAAIF,GAAGU,OAAO;AAC1CC,kBAAUH,OAAO,mBAAA;;;;;;;;;AACjB,cAAMI,OAAO,OAAcC,eAAQ,MAAMC,OAAO;UAAEf;UAAMM;UAAYG;QAAM,CAAA,CAAA;AAC1E,eAAO;UACLZ,QAAQC,aAASV,KAAK;YAAEK,MAAMoB,KAAKpB;YAAMC,MAAMmB,KAAKnB;YAAMC,KAAKkB,KAAKlB;UAAI,CAAA;QAC1E;MACF,CAAA;IACF,CAAA;GACD;AACH,CAAA,CAAA;",
6
+ "names": ["Effect", "Capabilities", "Capability", "invariant", "OperationResolver", "ClientCapabilities", "Capability", "makeModule", "fnUntraced", "contributes", "Capabilities", "OperationResolver", "make", "operation", "WnfsOperation", "Create", "handler", "name", "type", "cid", "succeed", "object", "WnfsFile", "Upload", "file", "db", "client", "get", "ClientCapabilities", "Client", "blockstore", "WnfsCapabilities", "Blockstore", "space", "spaces", "spaceId", "invariant", "info", "promise", "upload", "CreateFile"]
7
+ }
@@ -0,0 +1,60 @@
1
+ import {
2
+ FileInput
3
+ } from "./chunk-KVFGUEQD.mjs";
4
+ import {
5
+ File_exports,
6
+ WnfsAction,
7
+ meta
8
+ } from "./chunk-YU2LIVB5.mjs";
9
+
10
+ // src/capabilities/react-surface/react-surface.tsx
11
+ import * as Effect from "effect/Effect";
12
+ import React, { useCallback } from "react";
13
+ import { Capabilities, Capability } from "@dxos/app-framework";
14
+ import { Surface } from "@dxos/app-framework/ui";
15
+ import { Obj } from "@dxos/echo";
16
+ import { findAnnotation } from "@dxos/effect";
17
+
18
+ // src/containers/index.ts
19
+ import { lazy } from "react";
20
+ var FileContainer = lazy(() => import("./FileContainer-MPHQF5UK.mjs"));
21
+
22
+ // src/capabilities/react-surface/react-surface.tsx
23
+ var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, [
24
+ Surface.create({
25
+ id: `${meta.id}.article`,
26
+ role: [
27
+ "article",
28
+ "section",
29
+ "slide"
30
+ ],
31
+ filter: (data) => Obj.instanceOf(File_exports.File, data.subject),
32
+ component: ({ data, role }) => /* @__PURE__ */ React.createElement(FileContainer, {
33
+ role,
34
+ subject: data.subject
35
+ })
36
+ }),
37
+ Surface.create({
38
+ id: `${meta.id}.create-form`,
39
+ role: "form-input",
40
+ filter: (data) => {
41
+ const annotation = findAnnotation(data.schema.ast, WnfsAction.UploadAnnotationId);
42
+ return !!annotation;
43
+ },
44
+ component: ({ data: { schema }, ...props }) => {
45
+ const inputProps = props;
46
+ const handleChange = useCallback((file) => inputProps.onValueChange?.(inputProps.type, file), [
47
+ inputProps.type,
48
+ inputProps.onValueChange
49
+ ]);
50
+ return /* @__PURE__ */ React.createElement(FileInput, {
51
+ schema,
52
+ onChange: handleChange
53
+ });
54
+ }
55
+ })
56
+ ])));
57
+ export {
58
+ react_surface_default as default
59
+ };
60
+ //# sourceMappingURL=react-surface-2DTU3HUO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/containers/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport type * as Schema from 'effect/Schema';\nimport React, { useCallback } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { Obj } from '@dxos/echo';\nimport { findAnnotation } from '@dxos/effect';\nimport { type FormFieldComponentProps } from '@dxos/react-ui-form';\n\nimport { FileInput } from '../../components';\nimport { FileContainer } from '../../containers';\nimport { meta } from '../../meta';\nimport { WnfsAction, WnfsFile } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: `${meta.id}.article`,\n role: ['article', 'section', 'slide'],\n filter: (data): data is { subject: WnfsFile.File } => Obj.instanceOf(WnfsFile.File, data.subject),\n component: ({ data, role }) => <FileContainer role={role} subject={data.subject} />,\n }),\n Surface.create({\n id: `${meta.id}.create-form`,\n role: 'form-input',\n filter: (data): data is { prop: string; schema: Schema.Schema.Any } => {\n const annotation = findAnnotation<boolean>(\n (data.schema as Schema.Schema.All).ast,\n WnfsAction.UploadAnnotationId,\n );\n return !!annotation;\n },\n component: ({ data: { schema }, ...props }) => {\n const inputProps = props as unknown as FormFieldComponentProps;\n const handleChange = useCallback(\n (file: File) => inputProps.onValueChange?.(inputProps.type, file),\n [inputProps.type, inputProps.onValueChange],\n );\n\n return <FileInput schema={schema} onChange={handleChange} />;\n },\n }),\n ]),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const FileContainer: ComponentType<any> = lazy(() => import('./FileContainer'));\n"],
5
+ "mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,OAAOC,SAASC,mBAAmB;AAEnC,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;AACxB,SAASC,WAAW;AACpB,SAASC,sBAAsB;;;ACP/B,SAA6BC,YAAY;AAElC,IAAMC,gBAAoCC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ADanE,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,aAAaC,cAAc;EAChDC,QAAQC,OAAO;IACbC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;MAAC;MAAW;MAAW;;IAC7BC,QAAQ,CAACC,SAA6CC,IAAIC,WAAWC,aAASC,MAAMJ,KAAKK,OAAO;IAChGC,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAO,sBAAA,cAACS,eAAAA;MAAcT;MAAYO,SAASL,KAAKK;;EAC1E,CAAA;EACAX,QAAQC,OAAO;IACbC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,QAAQ,CAACC,SAAAA;AACP,YAAMQ,aAAaC,eAChBT,KAAKU,OAA6BC,KACnCC,WAAWC,kBAAkB;AAE/B,aAAO,CAAC,CAACL;IACX;IACAF,WAAW,CAAC,EAAEN,MAAM,EAAEU,OAAM,GAAI,GAAGI,MAAAA,MAAO;AACxC,YAAMC,aAAaD;AACnB,YAAME,eAAeC,YACnB,CAACC,SAAeH,WAAWI,gBAAgBJ,WAAWK,MAAMF,IAAAA,GAC5D;QAACH,WAAWK;QAAML,WAAWI;OAAc;AAG7C,aAAO,sBAAA,cAACE,WAAAA;QAAUX;QAAgBY,UAAUN;;IAC9C;EACF,CAAA;CACD,CAAA,CAAA;",
6
+ "names": ["Effect", "React", "useCallback", "Capabilities", "Capability", "Surface", "Obj", "findAnnotation", "lazy", "FileContainer", "lazy", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "WnfsFile", "File", "subject", "component", "FileContainer", "annotation", "findAnnotation", "schema", "ast", "WnfsAction", "UploadAnnotationId", "props", "inputProps", "handleChange", "useCallback", "file", "onValueChange", "type", "FileInput", "onChange"]
7
+ }
@@ -1,10 +1,13 @@
1
1
  import {
2
- FileType,
3
- WnfsAction
4
- } from "../chunk-GVBV2QWA.mjs";
5
- import "../chunk-VDDGZWAY.mjs";
2
+ File_exports,
3
+ WnfsAction,
4
+ WnfsCapabilities,
5
+ WnfsOperation
6
+ } from "../chunk-YU2LIVB5.mjs";
6
7
  export {
7
- FileType,
8
- WnfsAction
8
+ WnfsAction,
9
+ WnfsCapabilities,
10
+ File_exports as WnfsFile,
11
+ WnfsOperation
9
12
  };
10
13
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,3 @@
1
- export declare const WnfsPlugin: () => import("@dxos/app-framework").Plugin;
1
+ import { Plugin } from '@dxos/app-framework';
2
+ export declare const WnfsPlugin: Plugin.PluginFactory<void>;
2
3
  //# sourceMappingURL=WnfsPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WnfsPlugin.d.ts","sourceRoot":"","sources":["../../../src/WnfsPlugin.tsx"],"names":[],"mappings":"AAyBA,eAAO,MAAM,UAAU,4CAmEnB,CAAC"}
1
+ {"version":3,"file":"WnfsPlugin.d.ts","sourceRoot":"","sources":["../../../src/WnfsPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAYzD,eAAO,MAAM,UAAU,4BA8CtB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<import("interface-blockstore").Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>>, Error, Capability.Service>;
4
+ export default _default;
5
+ //# sourceMappingURL=blockstore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockstore.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/blockstore/blockstore.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAMjD,wBASE"}
@@ -0,0 +1,3 @@
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const Blockstore: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("interface-blockstore").Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>>, Error>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/blockstore/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,UAAU,mKAA8D,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capability } from '@dxos/app-framework';
3
+ import { AppCapabilities } from '@dxos/app-toolkit';
4
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<AppCapabilities.FileUploader>>, never, Capability.Service>;
5
+ export default _default;
6
+ //# sourceMappingURL=file-uploader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploader.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/file-uploader/file-uploader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;;AAMpD,wBAoBE"}
@@ -0,0 +1,3 @@
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const FileUploader: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-toolkit").AppCapabilities.FileUploader>>, Error>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/file-uploader/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,kJAAmE,CAAC"}
@@ -1,7 +1,6 @@
1
- export declare const Blockstore: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("interface-blockstore").Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>> | import("@dxos/app-framework").AnyCapability[]>>;
2
- export declare const FileUploader: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.FileUploader> | import("@dxos/app-framework").AnyCapability[]>>;
3
- export declare const IntentResolver: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.IntentResolver> | import("@dxos/app-framework").AnyCapability[]>>;
4
- export declare const Markdown: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/plugin-markdown/types").MarkdownExtensionProvider[]> | import("@dxos/app-framework").AnyCapability[]>>;
5
- export declare const ReactSurface: (props?: unknown) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").Capabilities.ReactSurface> | import("@dxos/app-framework").AnyCapability[]>>;
6
- export * from './capabilities';
1
+ export * from './blockstore';
2
+ export * from './file-uploader';
3
+ export * from './markdown';
4
+ export * from './operation-resolver';
5
+ export * from './react-surface';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,kQAAqC,CAAC;AAC7D,eAAO,MAAM,YAAY,gPAAwC,CAAC;AAClE,eAAO,MAAM,cAAc,kPAA0C,CAAC;AACtE,eAAO,MAAM,QAAQ,0PAAmC,CAAC;AACzD,eAAO,MAAM,YAAY,gMAAwC,CAAC;AAElE,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const Markdown: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/plugin-markdown").MarkdownExtensionProvider[]>>, Error>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/markdown/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,QAAQ,qJAA0D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<import("@dxos/plugin-markdown").MarkdownExtensionProvider[]>>, never, Capability.Service>;
4
+ export default _default;
5
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/markdown/markdown.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAOjD,wBAmBE"}
@@ -0,0 +1,3 @@
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const OperationResolver: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").OperationResolver[]>>, Error>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,wJAA6E,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capabilities, Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.OperationResolver[]>>, never, never>;
4
+ export default _default;
5
+ //# sourceMappingURL=operation-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/operation-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAQ/D,wBAoCE"}
@@ -0,0 +1,3 @@
1
+ import { Capability } from '@dxos/app-framework';
2
+ export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,iJAAmE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import { Capabilities, Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ReactSurface>>, never, never>;
4
+ export default _default;
5
+ //# sourceMappingURL=react-surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAW/D,wBA+BE"}
@@ -1,4 +1,4 @@
1
- import { type Schema } from 'effect';
1
+ import type * as Schema from 'effect/Schema';
2
2
  import React from 'react';
3
3
  export type FileInputProps = {
4
4
  schema: Schema.Schema.Any;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/FileInput/FileInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAsB,MAAM,OAAO,CAAC;AAU3C,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,sBAAsB,cAAc,sBA0B7D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FileInput';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FileInput/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilePreview.d.ts","sourceRoot":"","sources":["../../../../../src/components/FilePreview/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,GAAI,2BAA2B,gBAAgB,sBAQtE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FilePreview';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FilePreview/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
@@ -1,3 +1,3 @@
1
- export declare const FileContainer: import("react").LazyExoticComponent<({ file }: import("./FileContainer").FileContainerProps) => import("react").JSX.Element | null>;
2
1
  export * from './FileInput';
2
+ export * from './FilePreview';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,qIAAwC,CAAC;AAEnE,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
3
+ import { type WnfsFile } from '../../types';
4
+ export type FileContainerProps = SurfaceComponentProps<WnfsFile.File>;
5
+ export declare const FileContainer: ({ role, subject: file }: FileContainerProps) => React.JSX.Element | null;
6
+ export default FileContainer;
7
+ //# sourceMappingURL=FileContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileContainer.d.ts","sourceRoot":"","sources":["../../../../../src/containers/FileContainer/FileContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAOlE,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEtE,eAAO,MAAM,aAAa,GAAI,yBAAyB,kBAAkB,6BAmCxE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FileContainer } from './FileContainer';
2
+ export default FileContainer;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/FileContainer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAe,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type ComponentType } from 'react';
2
+ export declare const FileContainer: ComponentType<any>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,OAAO,CAAC;AAEjD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,GAAG,CAAyC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { type Extension } from '@codemirror/state';
2
2
  import type { Blockstore } from 'interface-blockstore';
3
3
  import { type Space } from '@dxos/react-client/echo';
4
- import { type WnfsCapabilities } from '../capabilities';
4
+ import { type WnfsCapabilities } from '../types';
5
5
  export type ImageOptions = {
6
6
  blockstore: Blockstore;
7
7
  instances: WnfsCapabilities.Instances;
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,SAAS,EAA0B,MAAM,mBAAmB,CAAC;AAE7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAMrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKxD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,YAAY,KAAG,SAAS,EAgDtD,CAAC"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,SAAS,EAA0B,MAAM,mBAAmB,CAAC;AAE7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAOrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,YAAY,KAAG,SAAS,EAgDtD,CAAC"}
@@ -1,10 +1,11 @@
1
- import '@dxos-theme';
1
+ import { type StoryObj } from '@storybook/react-vite';
2
2
  import React from 'react';
3
- declare const _default: {
3
+ declare const meta: {
4
4
  title: string;
5
5
  render: () => React.JSX.Element;
6
6
  decorators: import("@storybook/react").Decorator[];
7
7
  };
8
- export default _default;
9
- export declare const Default: {};
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Default: Story;
10
11
  //# sourceMappingURL=image.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.stories.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAgD,MAAM,OAAO,CAAC;;;;;;AAsFrE,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,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAgD,MAAM,OAAO,CAAC;AAuFrE,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Blockstore } from 'interface-blockstore';
2
- import { PrivateForest, PrivateDirectory } from 'wnfs';
2
+ import { PrivateDirectory, PrivateForest } from 'wnfs';
3
3
  import { type Space } from '@dxos/react-client/echo';
4
- import { type WnfsCapabilities } from '../capabilities';
4
+ import { type WnfsCapabilities } from '../types';
5
5
  export declare const loadWnfs: ({ space, blockstore, instances, }: {
6
6
  space: Space;
7
7
  blockstore: Blockstore;
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../src/helpers/load.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAa,aAAa,EAAE,gBAAgB,EAAe,MAAM,MAAM,CAAC;AAE/E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAMxD,eAAO,MAAM,QAAQ,GAAU,mCAI5B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;CACxC;;;EAoBA,CAAC"}
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../src/helpers/load.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAa,gBAAgB,EAAE,aAAa,EAAe,MAAM,MAAM,CAAC;AAG/E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQjD,eAAO,MAAM,QAAQ,GAAU,mCAI5B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;CACxC;;;EAsBA,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { Blockstore } from 'interface-blockstore';
2
2
  import type { Space } from '@dxos/client/echo';
3
- import { type WnfsCapabilities } from '../capabilities';
3
+ import { type WnfsCapabilities } from '../types';
4
4
  export declare const upload: ({ file, blockstore, instances, space, }: {
5
5
  file: File;
6
6
  blockstore: Blockstore;
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/helpers/upload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAM/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,eAAO,MAAM,MAAM,GAAU,yCAK1B;IACD,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC;CACd;;;;;EAgCA,CAAC"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/helpers/upload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAMjD,eAAO,MAAM,MAAM,GAAU,yCAK1B;IACD,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC;CACd;;;;;EAkCA,CAAC"}
@@ -1,4 +1,4 @@
1
- export { WnfsCapabilities } from './capabilities';
1
+ export { WnfsCapabilities } from './types';
2
2
  export * from './meta';
3
3
  export * from './WnfsPlugin';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
@@ -1,4 +1,3 @@
1
- import { type PluginMeta } from '@dxos/app-framework';
2
- export declare const WNFS_PLUGIN = "dxos.org/plugin/wnfs";
3
- export declare const meta: PluginMeta;
1
+ import { type Plugin } from '@dxos/app-framework';
2
+ export declare const meta: Plugin.Meta;
4
3
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,IAUzB,CAAC"}
@@ -1,16 +1,20 @@
1
1
  import { meta } from './meta';
2
- import { FileType } from './types';
2
+ import { WnfsFile } from './types';
3
3
  export declare const translations: [{
4
4
  readonly 'en-US': {
5
- readonly [FileType.typename]: {
5
+ readonly [WnfsFile.File.typename]: {
6
6
  readonly 'typename label': "File";
7
+ readonly 'typename label_zero': "Files";
8
+ readonly 'typename label_one': "File";
9
+ readonly 'typename label_other': "Files";
7
10
  readonly 'object name placeholder': "New file";
11
+ readonly 'add object label': "Add file";
8
12
  readonly 'rename object label': "Rename file";
9
13
  readonly 'delete object label': "Delete file";
14
+ readonly 'object deleted label': "File deleted";
10
15
  };
11
16
  readonly [meta.id]: {
12
17
  readonly 'plugin name': "Files";
13
- readonly 'delete object label': "Delete";
14
18
  readonly 'file input placeholder': "Drop a file here, or click to select a file";
15
19
  };
16
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC;;;;;UAKlB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;UAIR;;EAGwB,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;;UAUvB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;UAGR;;EAGwB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as Schema from 'effect/Schema';
2
+ import { Obj, Type } from '@dxos/echo';
3
+ export declare const File: Type.Obj<{
4
+ readonly name?: string | undefined;
5
+ readonly type: string;
6
+ readonly cid: string;
7
+ readonly timestamp?: string | undefined;
8
+ }, Schema.Struct.Fields>;
9
+ export type File = Schema.Schema.Type<typeof File>;
10
+ export declare const make: (props: Obj.MakeProps<typeof File>) => Obj.OfShape<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
11
+ readonly name?: string | undefined;
12
+ readonly type: string;
13
+ readonly cid: string;
14
+ readonly timestamp?: string | undefined;
15
+ }>;
16
+ //# sourceMappingURL=File.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/types/File.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,eAAO,MAAM,IAAI;;;;;wBAUhB,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnD,eAAO,MAAM,IAAI,GAAI,OAAO,GAAG,CAAC,SAAS,CAAC,OAAO,IAAI,CAAC;;;;;EAA0B,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { type Blockstore } from 'interface-blockstore';
2
2
  import { type PrivateDirectory, type PrivateForest } from 'wnfs';
3
+ import { Capability } from '@dxos/app-framework';
3
4
  import { type SpaceId } from '@dxos/keys';
4
5
  export declare namespace WnfsCapabilities {
5
- const Blockstore: import("@dxos/app-framework").InterfaceDef<Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>;
6
+ const Blockstore: Capability.InterfaceDef<Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>;
6
7
  type Instances = Record<SpaceId, {
7
8
  directory: PrivateDirectory;
8
9
  forest: PrivateForest;
9
10
  }>;
10
- const Instances: import("@dxos/app-framework").InterfaceDef<Instances>;
11
+ const Instances: Capability.InterfaceDef<Instances>;
11
12
  }
12
13
  //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,UAAU,qEAAkE,CAAC;IAE1F,KAAY,SAAS,GAAG,MAAM,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,gBAAgB,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IACzF,MAAM,SAAS,oCAAgE,CAAC;CACxF"}
@@ -1,3 +1,4 @@
1
- export * from './file';
1
+ export * from './capabilities';
2
+ export * as WnfsFile from './File';
2
3
  export * from './types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,QAAQ,CAAC;AACnC,cAAc,SAAS,CAAC"}