@dxos/plugin-wnfs 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33

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 (185) hide show
  1. package/README.md +1 -1
  2. package/dist/lib/browser/chunk-4D4K5JCC.mjs +66 -0
  3. package/dist/lib/browser/chunk-4D4K5JCC.mjs.map +7 -0
  4. package/dist/lib/{node-esm/chunk-CGW32EZB.mjs → browser/chunk-7KFJ6LYH.mjs} +44 -21
  5. package/dist/lib/browser/chunk-7KFJ6LYH.mjs.map +7 -0
  6. package/dist/lib/browser/chunk-DK62NQ5T.mjs +71 -0
  7. package/dist/lib/browser/chunk-DK62NQ5T.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  9. package/dist/lib/browser/create-QRLX4IMZ.mjs +25 -0
  10. package/dist/lib/browser/create-QRLX4IMZ.mjs.map +7 -0
  11. package/dist/lib/browser/create-file-INAT56PX.mjs +42 -0
  12. package/dist/lib/browser/create-file-INAT56PX.mjs.map +7 -0
  13. package/dist/lib/browser/helpers/index.mjs +26 -0
  14. package/dist/lib/browser/helpers/index.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +79 -103
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/operations/index.mjs +14 -0
  19. package/dist/lib/browser/operations/index.mjs.map +7 -0
  20. package/dist/lib/browser/translations.mjs +30 -0
  21. package/dist/lib/browser/translations.mjs.map +7 -0
  22. package/dist/lib/browser/types/index.mjs +8 -6
  23. package/dist/lib/browser/upload-ZQI66T4Y.mjs +35 -0
  24. package/dist/lib/browser/upload-ZQI66T4Y.mjs.map +7 -0
  25. package/dist/types/src/WnfsPlugin.d.ts +2 -1
  26. package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
  27. package/dist/types/src/blockstore.d.ts.map +1 -1
  28. package/dist/types/src/capabilities/blockstore.d.ts +3 -2
  29. package/dist/types/src/capabilities/blockstore.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/file-uploader.d.ts +4 -2
  31. package/dist/types/src/capabilities/file-uploader.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/index.d.ts +7 -6
  33. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  34. package/dist/types/src/capabilities/markdown.d.ts +4 -2
  35. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  37. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  38. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  39. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  40. package/dist/types/src/components/{FileInput.d.ts → FileInput/FileInput.d.ts} +1 -1
  41. package/dist/types/src/components/FileInput/FileInput.d.ts.map +1 -0
  42. package/dist/types/src/components/FileInput/index.d.ts +2 -0
  43. package/dist/types/src/components/FileInput/index.d.ts.map +1 -0
  44. package/dist/types/src/components/FilePreview/FilePreview.d.ts +12 -0
  45. package/dist/types/src/components/FilePreview/FilePreview.d.ts.map +1 -0
  46. package/dist/types/src/components/FilePreview/index.d.ts +2 -0
  47. package/dist/types/src/components/FilePreview/index.d.ts.map +1 -0
  48. package/dist/types/src/components/index.d.ts +1 -1
  49. package/dist/types/src/components/index.d.ts.map +1 -1
  50. package/dist/types/src/containers/FileContainer/FileContainer.d.ts +7 -0
  51. package/dist/types/src/containers/FileContainer/FileContainer.d.ts.map +1 -0
  52. package/dist/types/src/containers/FileContainer/index.d.ts +2 -0
  53. package/dist/types/src/containers/FileContainer/index.d.ts.map +1 -0
  54. package/dist/types/src/containers/index.d.ts +3 -0
  55. package/dist/types/src/containers/index.d.ts.map +1 -0
  56. package/dist/types/src/extensions/image.d.ts +1 -1
  57. package/dist/types/src/extensions/image.d.ts.map +1 -1
  58. package/dist/types/src/extensions/image.stories.d.ts +5 -4
  59. package/dist/types/src/extensions/image.stories.d.ts.map +1 -1
  60. package/dist/types/src/helpers/common.d.ts.map +1 -1
  61. package/dist/types/src/helpers/load.d.ts +2 -2
  62. package/dist/types/src/helpers/load.d.ts.map +1 -1
  63. package/dist/types/src/helpers/upload.d.ts +1 -1
  64. package/dist/types/src/helpers/upload.d.ts.map +1 -1
  65. package/dist/types/src/helpers/wnfs-url.d.ts.map +1 -1
  66. package/dist/types/src/index.d.ts +1 -1
  67. package/dist/types/src/index.d.ts.map +1 -1
  68. package/dist/types/src/meta.d.ts +2 -3
  69. package/dist/types/src/meta.d.ts.map +1 -1
  70. package/dist/types/src/operations/create-file.d.ts +5 -0
  71. package/dist/types/src/operations/create-file.d.ts.map +1 -0
  72. package/dist/types/src/operations/create.d.ts +5 -0
  73. package/dist/types/src/operations/create.d.ts.map +1 -0
  74. package/dist/types/src/operations/definitions.d.ts +38 -0
  75. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  76. package/dist/types/src/operations/index.d.ts +4 -0
  77. package/dist/types/src/operations/index.d.ts.map +1 -0
  78. package/dist/types/src/operations/upload.d.ts +5 -0
  79. package/dist/types/src/operations/upload.d.ts.map +1 -0
  80. package/dist/types/src/translations.d.ts +24 -10
  81. package/dist/types/src/translations.d.ts.map +1 -1
  82. package/dist/types/src/types/File.d.ts +16 -0
  83. package/dist/types/src/types/File.d.ts.map +1 -0
  84. package/dist/types/src/{capabilities → types}/capabilities.d.ts +3 -2
  85. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  86. package/dist/types/src/types/index.d.ts +2 -1
  87. package/dist/types/src/types/index.d.ts.map +1 -1
  88. package/dist/types/src/types/types.d.ts +4 -46
  89. package/dist/types/src/types/types.d.ts.map +1 -1
  90. package/dist/types/tsconfig.tsbuildinfo +1 -1
  91. package/package.json +73 -47
  92. package/src/WnfsPlugin.tsx +66 -85
  93. package/src/blockstore.ts +3 -3
  94. package/src/capabilities/blockstore.ts +15 -10
  95. package/src/capabilities/file-uploader.ts +25 -15
  96. package/src/capabilities/index.ts +10 -8
  97. package/src/capabilities/markdown.ts +25 -12
  98. package/src/capabilities/operation-handler.ts +16 -0
  99. package/src/capabilities/react-surface.tsx +50 -35
  100. package/src/components/{FileInput.tsx → FileInput/FileInput.tsx} +8 -8
  101. package/src/components/FileInput/index.ts +5 -0
  102. package/src/components/FilePreview/FilePreview.tsx +43 -0
  103. package/src/components/FilePreview/index.ts +5 -0
  104. package/src/components/index.ts +1 -4
  105. package/src/containers/FileContainer/FileContainer.tsx +57 -0
  106. package/src/containers/FileContainer/index.ts +5 -0
  107. package/src/containers/index.ts +7 -0
  108. package/src/extensions/image.stories.tsx +22 -19
  109. package/src/extensions/image.tsx +10 -9
  110. package/src/helpers/load.ts +14 -8
  111. package/src/helpers/upload.ts +6 -2
  112. package/src/index.ts +1 -1
  113. package/src/meta.ts +9 -6
  114. package/src/operations/create-file.ts +31 -0
  115. package/src/operations/create.ts +22 -0
  116. package/src/operations/definitions.ts +41 -0
  117. package/src/operations/index.ts +13 -0
  118. package/src/operations/upload.ts +29 -0
  119. package/src/translations.ts +14 -8
  120. package/src/types/File.ts +28 -0
  121. package/src/{capabilities → types}/capabilities.ts +4 -4
  122. package/src/types/index.ts +2 -1
  123. package/src/types/types.ts +3 -19
  124. package/dist/lib/browser/FileContainer-Q4GUPBVD.mjs +0 -107
  125. package/dist/lib/browser/FileContainer-Q4GUPBVD.mjs.map +0 -7
  126. package/dist/lib/browser/blockstore-KQO2NTVM.mjs +0 -191
  127. package/dist/lib/browser/blockstore-KQO2NTVM.mjs.map +0 -7
  128. package/dist/lib/browser/chunk-BANMVVJV.mjs +0 -16
  129. package/dist/lib/browser/chunk-BANMVVJV.mjs.map +0 -7
  130. package/dist/lib/browser/chunk-GVBV2QWA.mjs +0 -64
  131. package/dist/lib/browser/chunk-GVBV2QWA.mjs.map +0 -7
  132. package/dist/lib/browser/chunk-KZANQHJY.mjs +0 -16
  133. package/dist/lib/browser/chunk-KZANQHJY.mjs.map +0 -7
  134. package/dist/lib/browser/chunk-VDDGZWAY.mjs +0 -15
  135. package/dist/lib/browser/chunk-VDDGZWAY.mjs.map +0 -7
  136. package/dist/lib/browser/chunk-VRRXG6IB.mjs +0 -159
  137. package/dist/lib/browser/chunk-VRRXG6IB.mjs.map +0 -7
  138. package/dist/lib/browser/file-uploader-JA55DPMW.mjs +0 -29
  139. package/dist/lib/browser/file-uploader-JA55DPMW.mjs.map +0 -7
  140. package/dist/lib/browser/intent-resolver-YM6QRFIH.mjs +0 -49
  141. package/dist/lib/browser/intent-resolver-YM6QRFIH.mjs.map +0 -7
  142. package/dist/lib/browser/markdown-6VH477GB.mjs +0 -196
  143. package/dist/lib/browser/markdown-6VH477GB.mjs.map +0 -7
  144. package/dist/lib/browser/react-surface-XAHVMWIH.mjs +0 -88
  145. package/dist/lib/browser/react-surface-XAHVMWIH.mjs.map +0 -7
  146. package/dist/lib/node-esm/FileContainer-22IPNDDA.mjs +0 -108
  147. package/dist/lib/node-esm/FileContainer-22IPNDDA.mjs.map +0 -7
  148. package/dist/lib/node-esm/blockstore-7KQTFHK5.mjs +0 -192
  149. package/dist/lib/node-esm/blockstore-7KQTFHK5.mjs.map +0 -7
  150. package/dist/lib/node-esm/chunk-47QYKNA6.mjs +0 -17
  151. package/dist/lib/node-esm/chunk-47QYKNA6.mjs.map +0 -7
  152. package/dist/lib/node-esm/chunk-BM37ZAHF.mjs +0 -65
  153. package/dist/lib/node-esm/chunk-BM37ZAHF.mjs.map +0 -7
  154. package/dist/lib/node-esm/chunk-CGW32EZB.mjs.map +0 -7
  155. package/dist/lib/node-esm/chunk-DWYM7FD7.mjs +0 -18
  156. package/dist/lib/node-esm/chunk-DWYM7FD7.mjs.map +0 -7
  157. package/dist/lib/node-esm/chunk-YTWL64Z6.mjs +0 -17
  158. package/dist/lib/node-esm/chunk-YTWL64Z6.mjs.map +0 -7
  159. package/dist/lib/node-esm/file-uploader-WGDG2YV5.mjs +0 -30
  160. package/dist/lib/node-esm/file-uploader-WGDG2YV5.mjs.map +0 -7
  161. package/dist/lib/node-esm/index.mjs +0 -117
  162. package/dist/lib/node-esm/index.mjs.map +0 -7
  163. package/dist/lib/node-esm/intent-resolver-5QOT2SLD.mjs +0 -50
  164. package/dist/lib/node-esm/intent-resolver-5QOT2SLD.mjs.map +0 -7
  165. package/dist/lib/node-esm/markdown-R4PBXDJO.mjs +0 -197
  166. package/dist/lib/node-esm/markdown-R4PBXDJO.mjs.map +0 -7
  167. package/dist/lib/node-esm/meta.json +0 -1
  168. package/dist/lib/node-esm/react-surface-HAOUJUXJ.mjs +0 -89
  169. package/dist/lib/node-esm/react-surface-HAOUJUXJ.mjs.map +0 -7
  170. package/dist/lib/node-esm/types/index.mjs +0 -11
  171. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  172. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  173. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  174. package/dist/types/src/components/FileContainer.d.ts +0 -9
  175. package/dist/types/src/components/FileContainer.d.ts.map +0 -1
  176. package/dist/types/src/components/FileInput.d.ts.map +0 -1
  177. package/dist/types/src/components/FilePreview.d.ts +0 -11
  178. package/dist/types/src/components/FilePreview.d.ts.map +0 -1
  179. package/dist/types/src/types/file.d.ts +0 -16
  180. package/dist/types/src/types/file.d.ts.map +0 -1
  181. package/src/capabilities/intent-resolver.ts +0 -32
  182. package/src/components/FileContainer.tsx +0 -51
  183. package/src/components/FilePreview.tsx +0 -23
  184. package/src/types/file.ts +0 -17
  185. /package/dist/lib/{node-esm/types/index.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/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;AAGjE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,UAAU,wFAAuE,CAAC;IAE/F,KAAY,SAAS,GAAG,MAAM,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,gBAAgB,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IACzF,MAAM,SAAS,uDAAqE,CAAC;CAC7F"}
@@ -1,4 +0,0 @@
1
- import { Capabilities, type PluginContext } from '@dxos/app-framework';
2
- declare const _default: (context: PluginContext) => import("@dxos/app-framework").Capability<Capabilities.IntentResolver>;
3
- export default _default;
4
- //# sourceMappingURL=intent-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,YAAY,EAAkB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;yBAOpF,SAAS,aAAa;AAAtC,wBAoBK"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { type FileType } from '../types';
3
- export type FileContainerProps = {
4
- role: string;
5
- file: FileType;
6
- };
7
- export declare const FileContainer: ({ role, file }: FileContainerProps) => React.JSX.Element | null;
8
- export default FileContainer;
9
- //# sourceMappingURL=FileContainer.d.ts.map
@@ -1 +0,0 @@
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,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,gBAAgB,kBAAkB,6BA2B/D,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,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"}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { type ThemedClassName } from '@dxos/react-ui';
3
- export type FilePreviewProps = ThemedClassName<{
4
- type: string;
5
- url: string;
6
- }>;
7
- /**
8
- * File/content preview iframe.
9
- */
10
- export declare const FilePreview: ({ type, url, classNames }: FilePreviewProps) => React.JSX.Element;
11
- //# sourceMappingURL=FilePreview.d.ts.map
@@ -1 +0,0 @@
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,GAAI,2BAA2B,gBAAgB,sBAQtE,CAAC"}
@@ -1,16 +0,0 @@
1
- import { Schema } from 'effect';
2
- declare const FileType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
3
- name: Schema.optional<typeof Schema.String>;
4
- type: typeof Schema.String;
5
- cid: typeof Schema.String;
6
- timestamp: Schema.optional<typeof Schema.String>;
7
- }, import("@dxos/echo-schema").TypedObjectOptions>, Schema.Struct.Encoded<{
8
- name: Schema.optional<typeof Schema.String>;
9
- type: typeof Schema.String;
10
- cid: typeof Schema.String;
11
- timestamp: Schema.optional<typeof Schema.String>;
12
- }>>;
13
- export declare class FileType extends FileType_base {
14
- }
15
- export {};
16
- //# sourceMappingURL=file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/types/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;AAIhC,qBAAa,QAAS,SAAQ,aAQ5B;CAAG"}
@@ -1,32 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { contributes, Capabilities, createResolver, type PluginContext } from '@dxos/app-framework';
6
- import { Obj } from '@dxos/echo';
7
-
8
- import { WnfsCapabilities } from './capabilities';
9
- import { upload } from '../helpers';
10
- import { FileType, WnfsAction } from '../types';
11
-
12
- export default (context: PluginContext) =>
13
- contributes(Capabilities.IntentResolver, [
14
- // TODO(wittjosiah): Deleting the object doesn't delete the wnfs blob.
15
- // Consider ways to trigger blob deletion based on object deletion and/or adding file system manager.
16
- createResolver({
17
- intent: WnfsAction.Create,
18
- resolve: ({ name, type, cid }) => ({
19
- data: {
20
- object: Obj.make(FileType, { name, type, cid }),
21
- },
22
- }),
23
- }),
24
- createResolver({
25
- intent: WnfsAction.Upload,
26
- resolve: async ({ file, space }) => {
27
- const blockstore = context.getCapability(WnfsCapabilities.Blockstore);
28
- const info = await upload({ file, blockstore, space });
29
- return { data: info };
30
- },
31
- }),
32
- ]);
@@ -1,51 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import React, { useEffect, useState } from 'react';
6
-
7
- import { useCapability } from '@dxos/app-framework';
8
- import { invariant } from '@dxos/invariant';
9
- import { getSpace } from '@dxos/react-client/echo';
10
- import { StackItem } from '@dxos/react-ui-stack';
11
-
12
- import { FilePreview } from './FilePreview';
13
- import { WnfsCapabilities } from '../capabilities';
14
- import { filePath, getBlobUrl, loadWnfs, wnfsUrl } from '../helpers';
15
- import { type FileType } from '../types';
16
-
17
- export type FileContainerProps = {
18
- role: string;
19
- file: FileType;
20
- };
21
-
22
- export const FileContainer = ({ role, file }: FileContainerProps) => {
23
- const blockstore = useCapability(WnfsCapabilities.Blockstore);
24
- const instances = useCapability(WnfsCapabilities.Instances);
25
- const [blobUrl, setBlobUrl] = useState<string>();
26
-
27
- useEffect(() => {
28
- const timeout = setTimeout(async () => {
29
- const space = getSpace(file);
30
- invariant(space);
31
- const { directory, forest } = await loadWnfs({ blockstore, instances, space });
32
- const path = filePath(file.cid.toString(), space);
33
- const url = await getBlobUrl({ wnfsUrl: wnfsUrl(path), blockstore, directory, forest, type: file.type });
34
- setBlobUrl(url);
35
- });
36
-
37
- return () => clearTimeout(timeout);
38
- }, [file]);
39
-
40
- if (!blobUrl) {
41
- return null;
42
- }
43
-
44
- return (
45
- <StackItem.Content role={role}>
46
- <FilePreview type={file.type} url={blobUrl} />
47
- </StackItem.Content>
48
- );
49
- };
50
-
51
- export default FileContainer;
@@ -1,23 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { type ThemedClassName } from '@dxos/react-ui';
8
- import { mx } from '@dxos/react-ui-theme';
9
-
10
- export type FilePreviewProps = ThemedClassName<{ type: string; url: string }>;
11
-
12
- /**
13
- * File/content preview iframe.
14
- */
15
- export const FilePreview = ({ type, url, classNames }: FilePreviewProps) => {
16
- if (type.startsWith('image/')) {
17
- return <img className={mx('w-full h-full object-contain', classNames)} src={url} />;
18
- } else if (type.startsWith('video/')) {
19
- return <video className={mx('w-full h-full object-contain', classNames)} src={url} controls />;
20
- } else {
21
- return <iframe className={mx('w-full h-full overflow-auto', classNames)} src={url} />;
22
- }
23
- };
package/src/types/file.ts DELETED
@@ -1,17 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import { Schema } from 'effect';
6
-
7
- import { TypedObject } from '@dxos/echo-schema';
8
-
9
- export class FileType extends TypedObject({
10
- typename: 'dxos.org/type/File',
11
- version: '0.1.0',
12
- })({
13
- name: Schema.optional(Schema.String),
14
- type: Schema.String,
15
- cid: Schema.String,
16
- timestamp: Schema.optional(Schema.String),
17
- }) {}