@dxos/plugin-wnfs 0.7.4 → 0.7.5-labs.401163d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/FileContainer-6CC7F4KO.mjs +94 -0
- package/dist/lib/browser/FileContainer-6CC7F4KO.mjs.map +7 -0
- package/dist/lib/browser/blockstore-RFH5C42Z.mjs +192 -0
- package/dist/lib/browser/blockstore-RFH5C42Z.mjs.map +7 -0
- package/dist/lib/browser/chunk-EELFT4QP.mjs +15 -0
- package/dist/lib/browser/chunk-EELFT4QP.mjs.map +7 -0
- package/dist/lib/browser/chunk-KENG3KHT.mjs +16 -0
- package/dist/lib/browser/chunk-KENG3KHT.mjs.map +7 -0
- package/dist/lib/browser/chunk-KFKLBRAQ.mjs +16 -0
- package/dist/lib/browser/chunk-KFKLBRAQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-RYOWC7TX.mjs +60 -0
- package/dist/lib/browser/chunk-RYOWC7TX.mjs.map +7 -0
- package/dist/lib/browser/chunk-SCQWJNHD.mjs +157 -0
- package/dist/lib/browser/chunk-SCQWJNHD.mjs.map +7 -0
- package/dist/lib/browser/file-uploader-3DF5T3EZ.mjs +29 -0
- package/dist/lib/browser/file-uploader-3DF5T3EZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +96 -494
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-6IX7MROZ.mjs +49 -0
- package/dist/lib/browser/intent-resolver-6IX7MROZ.mjs.map +7 -0
- package/dist/lib/browser/markdown-MGMT4KWF.mjs +198 -0
- package/dist/lib/browser/markdown-MGMT4KWF.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-2UHNQPX4.mjs +81 -0
- package/dist/lib/browser/react-surface-2UHNQPX4.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/types/src/WnfsPlugin.d.ts +1 -3
- package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
- package/dist/types/src/blockstore.d.ts +4 -1
- package/dist/types/src/blockstore.d.ts.map +1 -1
- package/dist/types/src/capabilities/blockstore.d.ts +4 -0
- package/dist/types/src/capabilities/blockstore.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +12 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/file-uploader.d.ts +4 -0
- package/dist/types/src/capabilities/file-uploader.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown.d.ts +4 -0
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/FileContainer.d.ts +8 -0
- package/dist/types/src/components/FileContainer.d.ts.map +1 -0
- package/dist/types/src/components/FileInput.d.ts +8 -0
- package/dist/types/src/components/FileInput.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +4 -11
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions/image.d.ts +5 -0
- package/dist/types/src/extensions/image.d.ts.map +1 -1
- package/dist/types/src/extensions/image.stories.d.ts.map +1 -1
- package/dist/types/src/helpers/common.d.ts.map +1 -0
- package/dist/types/src/helpers/index.d.ts +5 -0
- package/dist/types/src/helpers/index.d.ts.map +1 -0
- package/dist/types/src/helpers/load.d.ts +13 -0
- package/dist/types/src/helpers/load.d.ts.map +1 -0
- package/dist/types/src/helpers/upload.d.ts +15 -0
- package/dist/types/src/helpers/upload.d.ts.map +1 -0
- package/dist/types/src/helpers/wnfs-url.d.ts +11 -0
- package/dist/types/src/helpers/wnfs-url.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +15 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/file.d.ts +7 -11
- package/dist/types/src/types/file.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +49 -6
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +28 -26
- package/src/WnfsPlugin.tsx +76 -92
- package/src/blockstore.ts +151 -21
- package/src/capabilities/blockstore.ts +18 -0
- package/src/capabilities/capabilities.ts +18 -0
- package/src/capabilities/file-uploader.ts +24 -0
- package/src/capabilities/index.ts +13 -0
- package/src/capabilities/intent-resolver.ts +32 -0
- package/src/capabilities/markdown.ts +25 -0
- package/src/capabilities/react-surface.tsx +41 -0
- package/src/components/FileContainer.tsx +46 -0
- package/src/components/FileInput.tsx +46 -0
- package/src/components/index.ts +3 -5
- package/src/extensions/image.stories.tsx +26 -68
- package/src/extensions/image.tsx +203 -0
- package/src/{common.ts → helpers/common.ts} +1 -1
- package/src/helpers/index.ts +8 -0
- package/src/{load.ts → helpers/load.ts} +38 -9
- package/src/{upload.ts → helpers/upload.ts} +18 -4
- package/src/helpers/wnfs-url.ts +36 -0
- package/src/index.ts +2 -4
- package/src/meta.ts +2 -3
- package/src/translations.ts +5 -0
- package/src/types/file.ts +2 -3
- package/src/types/types.ts +30 -19
- package/dist/lib/browser/FileCard-HJIZDWJF.mjs +0 -39
- package/dist/lib/browser/FileCard-HJIZDWJF.mjs.map +0 -7
- package/dist/lib/browser/FileMain-WEWTX7QB.mjs +0 -27
- package/dist/lib/browser/FileMain-WEWTX7QB.mjs.map +0 -7
- package/dist/lib/browser/FileSection-BEUGJ7EI.mjs +0 -24
- package/dist/lib/browser/FileSection-BEUGJ7EI.mjs.map +0 -7
- package/dist/lib/browser/FileSlide-NYBGZEZS.mjs +0 -21
- package/dist/lib/browser/FileSlide-NYBGZEZS.mjs.map +0 -7
- package/dist/lib/browser/chunk-2I63TM7M.mjs +0 -27
- package/dist/lib/browser/chunk-2I63TM7M.mjs.map +0 -7
- package/dist/lib/browser/chunk-JDSKIDDR.mjs +0 -30
- package/dist/lib/browser/chunk-JDSKIDDR.mjs.map +0 -7
- package/dist/lib/browser/chunk-VL3H7P4F.mjs +0 -18
- package/dist/lib/browser/chunk-VL3H7P4F.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -9
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/types/src/common.d.ts.map +0 -1
- package/dist/types/src/components/FileCard.d.ts +0 -9
- package/dist/types/src/components/FileCard.d.ts.map +0 -1
- package/dist/types/src/components/FileMain.d.ts +0 -7
- package/dist/types/src/components/FileMain.d.ts.map +0 -1
- package/dist/types/src/components/FileSection.d.ts +0 -8
- package/dist/types/src/components/FileSection.d.ts.map +0 -1
- package/dist/types/src/components/FileSlide.d.ts +0 -8
- package/dist/types/src/components/FileSlide.d.ts.map +0 -1
- package/dist/types/src/load.d.ts +0 -8
- package/dist/types/src/load.d.ts.map +0 -1
- package/dist/types/src/upload.d.ts +0 -10
- package/dist/types/src/upload.d.ts.map +0 -1
- package/dist/types/src/wnfs-url.d.ts +0 -2
- package/dist/types/src/wnfs-url.d.ts.map +0 -1
- package/src/components/FileCard.tsx +0 -45
- package/src/components/FileMain.tsx +0 -28
- package/src/components/FileSection.tsx +0 -20
- package/src/components/FileSlide.tsx +0 -20
- package/src/extensions/image.ts +0 -244
- package/src/wnfs-url.ts +0 -7
- /package/dist/types/src/{common.d.ts → helpers/common.d.ts} +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FileType,
|
|
3
|
+
WnfsAction
|
|
4
|
+
} from "./chunk-RYOWC7TX.mjs";
|
|
5
|
+
import {
|
|
6
|
+
WNFS_PLUGIN
|
|
7
|
+
} from "./chunk-EELFT4QP.mjs";
|
|
8
|
+
|
|
9
|
+
// packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx
|
|
10
|
+
import React3, { useCallback as useCallback2 } from "react";
|
|
11
|
+
import { contributes, Capabilities, createSurface } from "@dxos/app-framework";
|
|
12
|
+
import { findAnnotation as findAnnotation2 } from "@dxos/effect";
|
|
13
|
+
|
|
14
|
+
// packages/plugins/plugin-wnfs/src/components/index.ts
|
|
15
|
+
import React2 from "react";
|
|
16
|
+
|
|
17
|
+
// packages/plugins/plugin-wnfs/src/components/FileInput.tsx
|
|
18
|
+
import React, { useCallback } from "react";
|
|
19
|
+
import { useDropzone } from "react-dropzone";
|
|
20
|
+
import { findAnnotation } from "@dxos/effect";
|
|
21
|
+
import { useTranslation } from "@dxos/react-ui";
|
|
22
|
+
import { mx } from "@dxos/react-ui-theme";
|
|
23
|
+
var FileInput = ({ schema, onChange }) => {
|
|
24
|
+
const { t } = useTranslation(WNFS_PLUGIN);
|
|
25
|
+
const accept = findAnnotation(schema.ast, WnfsAction.UploadAnnotationId);
|
|
26
|
+
const onDropAccepted = useCallback((files) => onChange?.(files[0]), [
|
|
27
|
+
onChange
|
|
28
|
+
]);
|
|
29
|
+
const { acceptedFiles, getRootProps, getInputProps, isFocused, isDragAccept, isDragReject } = useDropzone({
|
|
30
|
+
multiple: false,
|
|
31
|
+
accept,
|
|
32
|
+
onDropAccepted
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
35
|
+
...getRootProps(),
|
|
36
|
+
className: mx("flex flex-col items-center p-8 border border-separator", isFocused && "focus-ring", isDragAccept && "bg-attention", isDragReject && "border-error")
|
|
37
|
+
}, /* @__PURE__ */ React.createElement("input", getInputProps()), acceptedFiles[0] ? /* @__PURE__ */ React.createElement("p", null, acceptedFiles[0].name) : /* @__PURE__ */ React.createElement("p", null, t("file input placeholder")));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// packages/plugins/plugin-wnfs/src/components/index.ts
|
|
41
|
+
var FileContainer = React2.lazy(() => import("./FileContainer-6CC7F4KO.mjs"));
|
|
42
|
+
|
|
43
|
+
// packages/plugins/plugin-wnfs/src/capabilities/react-surface.tsx
|
|
44
|
+
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
45
|
+
createSurface({
|
|
46
|
+
id: `${WNFS_PLUGIN}/article`,
|
|
47
|
+
role: [
|
|
48
|
+
"article",
|
|
49
|
+
"section",
|
|
50
|
+
"slide"
|
|
51
|
+
],
|
|
52
|
+
filter: (data) => data.subject instanceof FileType,
|
|
53
|
+
component: ({ data, role }) => /* @__PURE__ */ React3.createElement(FileContainer, {
|
|
54
|
+
role,
|
|
55
|
+
file: data.subject
|
|
56
|
+
})
|
|
57
|
+
}),
|
|
58
|
+
createSurface({
|
|
59
|
+
id: `${WNFS_PLUGIN}/create-form`,
|
|
60
|
+
role: "form-input",
|
|
61
|
+
filter: (data) => {
|
|
62
|
+
const annotation = findAnnotation2(data.schema.ast, WnfsAction.UploadAnnotationId);
|
|
63
|
+
return !!annotation;
|
|
64
|
+
},
|
|
65
|
+
component: ({ data: { prop, schema }, ...props }) => {
|
|
66
|
+
const inputProps = props;
|
|
67
|
+
const handleChange = useCallback2((file) => inputProps.onValueChange?.("object", file), [
|
|
68
|
+
prop,
|
|
69
|
+
inputProps.onValueChange
|
|
70
|
+
]);
|
|
71
|
+
return /* @__PURE__ */ React3.createElement(FileInput, {
|
|
72
|
+
schema,
|
|
73
|
+
onChange: handleChange
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
]);
|
|
78
|
+
export {
|
|
79
|
+
react_surface_default as default
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=react-surface-2UHNQPX4.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 { 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
|
+
}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { type WnfsPluginProvides } from './types';
|
|
3
|
-
export declare const WnfsPlugin: () => PluginDefinition<WnfsPluginProvides>;
|
|
1
|
+
export declare const WnfsPlugin: () => import("@dxos/app-framework").Plugin;
|
|
4
2
|
//# sourceMappingURL=WnfsPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WnfsPlugin.d.ts","sourceRoot":"","sources":["../../../src/WnfsPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WnfsPlugin.d.ts","sourceRoot":"","sources":["../../../src/WnfsPlugin.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,UAAU,4CA8DnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseBlockstore } from 'blockstore-core';
|
|
2
|
-
import
|
|
2
|
+
import { CID } from 'multiformats';
|
|
3
3
|
export declare const create: (apiHost?: string) => MixedBlockstore;
|
|
4
4
|
/**
|
|
5
5
|
* A blockstore that communicates with the DXOS blob service,
|
|
@@ -15,5 +15,8 @@ export declare class MixedBlockstore extends BaseBlockstore {
|
|
|
15
15
|
has(key: CID): Promise<boolean>;
|
|
16
16
|
put(key: CID, val: Uint8Array): Promise<CID>;
|
|
17
17
|
destroy(): Promise<void>;
|
|
18
|
+
putRemote(key: CID, val: Uint8Array): Promise<void>;
|
|
19
|
+
putCarRemote(car: Uint8Array): Promise<void>;
|
|
20
|
+
readonly queueCacheName: string;
|
|
18
21
|
}
|
|
19
22
|
//# sourceMappingURL=blockstore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockstore.d.ts","sourceRoot":"","sources":["../../../src/blockstore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blockstore.d.ts","sourceRoot":"","sources":["../../../src/blockstore.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKjD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAKnC,eAAO,MAAM,MAAM,aAAc,MAAM,oBAEtC,CAAC;AAEF;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,cAAc;;gBAQrC,OAAO,CAAC,EAAE,MAAM;IAWtB,IAAI;IAcV,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG;IAOf,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAU/B,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC;IAqBlC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAc/B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC;IASrD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAMxB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU;IASnC,YAAY,CAAC,GAAG,EAAE,UAAU;IAclC,QAAQ,CAAC,cAAc,SAAgC;CA8ExD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type PluginsContext } from '@dxos/app-framework';
|
|
2
|
+
declare const _default: (context: PluginsContext) => Promise<import("@dxos/app-framework").Capability<import("interface-blockstore").Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>>;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=blockstore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockstore.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/blockstore.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAMxC,cAAc;AAA7C,wBAOE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Blockstore } from 'interface-blockstore';
|
|
2
|
+
import { type PrivateDirectory, type PrivateForest } from 'wnfs';
|
|
3
|
+
import { type SpaceId } from '@dxos/keys';
|
|
4
|
+
export declare namespace WnfsCapabilities {
|
|
5
|
+
const Blockstore: import("@dxos/app-framework").InterfaceDef<Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>;
|
|
6
|
+
type Instances = Record<SpaceId, {
|
|
7
|
+
directory: PrivateDirectory;
|
|
8
|
+
forest: PrivateForest;
|
|
9
|
+
}>;
|
|
10
|
+
const Instances: import("@dxos/app-framework").InterfaceDef<Instances>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-uploader.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/file-uploader.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAoC,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAKjF,cAAc;AAAvC,wBAYE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const Blockstore: (props?: import("@dxos/app-framework").PluginsContext | 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").PluginsContext | 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").PluginsContext | 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").PluginsContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("packages/plugins/plugin-markdown/dist/types/src/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';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,mQAAqC,CAAC;AAC7D,eAAO,MAAM,YAAY,iPAAwC,CAAC;AAClE,eAAO,MAAM,cAAc,mPAA0C,CAAC;AACtE,eAAO,MAAM,QAAQ,qRAAmC,CAAC;AACzD,eAAO,MAAM,YAAY,gMAAwC,CAAC;AAElE,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,YAAY,EAAkB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAO5E,cAAc;AAAvC,wBAoBK"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type PluginsContext } from '@dxos/app-framework';
|
|
2
|
+
declare const _default: (context: PluginsContext) => import("@dxos/app-framework").Capability<import("packages/plugins/plugin-markdown/dist/types/src/types").MarkdownExtensionProvider[]>;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/markdown.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;kCAO9C,cAAc;AAAvC,wBAaK"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FileType } from '../types';
|
|
3
|
+
declare const FileContainer: ({ file, role }: {
|
|
4
|
+
file: FileType;
|
|
5
|
+
role: string;
|
|
6
|
+
}) => React.JSX.Element | null;
|
|
7
|
+
export default FileContainer;
|
|
8
|
+
//# sourceMappingURL=FileContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type S } from '@dxos/effect';
|
|
3
|
+
export type FileInputProps = {
|
|
4
|
+
schema: S.Schema.Any;
|
|
5
|
+
onChange: (file: File) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const FileInput: ({ schema, onChange }: FileInputProps) => React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=FileInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,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,sBA0B7D,CAAC"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const FileMain: React.LazyExoticComponent<React.FC<{
|
|
2
|
+
export declare const FileContainer: React.LazyExoticComponent<({ file, role }: {
|
|
4
3
|
file: import("../types").FileType;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
height?: number;
|
|
9
|
-
}>>;
|
|
10
|
-
export declare const FileSlide: React.LazyExoticComponent<React.FC<{
|
|
11
|
-
file: import("../types").FileType;
|
|
12
|
-
cover?: boolean;
|
|
13
|
-
}>>;
|
|
4
|
+
role: string;
|
|
5
|
+
}) => React.JSX.Element | null>;
|
|
6
|
+
export * from './FileInput';
|
|
14
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;
|
|
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,9 +1,14 @@
|
|
|
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
5
|
export type ImageOptions = {
|
|
5
6
|
blockstore: Blockstore;
|
|
7
|
+
instances: WnfsCapabilities.Instances;
|
|
6
8
|
space: Space;
|
|
7
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Create WNFS image decorations.
|
|
12
|
+
*/
|
|
8
13
|
export declare const image: (options: ImageOptions) => Extension[];
|
|
9
14
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.
|
|
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,YAAa,YAAY,KAAG,SAAS,EAgDtD,CAAC"}
|
|
@@ -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,KAA8B,MAAM,OAAO,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/helpers/common.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAE,KAAK,UAAU,IAAI,cAAc,EAAE,MAAM,MAAM,CAAC;AAGzD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAMrD,eAAO,MAAM,QAAQ,aAAc,MAAM,SAAS,KAAK,aAEtD,CAAC;AAMF,qBAAa,GAAG;IACd,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;CAGvC;AAMD,eAAO,MAAM,KAAK,eAAgB,UAAU,KAAG,cAyB9C,CAAC;AAEF,eAAO,MAAM,SAAS,cAAoB,CAAC;AAM3C,eAAO,MAAM,QAAQ,SAAU,IAAI,KAAG,OAAO,CAAC,UAAU,CAgBvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Blockstore } from 'interface-blockstore';
|
|
2
|
+
import { PrivateForest, PrivateDirectory } from 'wnfs';
|
|
3
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
4
|
+
import { type WnfsCapabilities } from '../capabilities';
|
|
5
|
+
export declare const loadWnfs: ({ space, blockstore, instances, }: {
|
|
6
|
+
space: Space;
|
|
7
|
+
blockstore: Blockstore;
|
|
8
|
+
instances?: WnfsCapabilities.Instances;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
directory: PrivateDirectory;
|
|
11
|
+
forest: PrivateForest;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=load.d.ts.map
|
|
@@ -0,0 +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,sCAIlB;IACD,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;CACxC;;;EAoBA,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Blockstore } from 'interface-blockstore';
|
|
2
|
+
import type { Space } from '@dxos/client/echo';
|
|
3
|
+
import { type WnfsCapabilities } from '../capabilities';
|
|
4
|
+
export declare const upload: ({ file, blockstore, instances, space, }: {
|
|
5
|
+
file: File;
|
|
6
|
+
blockstore: Blockstore;
|
|
7
|
+
instances?: WnfsCapabilities.Instances;
|
|
8
|
+
space: Space;
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
url: string;
|
|
13
|
+
cid: string;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +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,4CAKhB;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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Blockstore } from 'interface-blockstore';
|
|
2
|
+
import { type PrivateDirectory, type PrivateForest } from 'wnfs';
|
|
3
|
+
export declare const wnfsUrl: (filePath: string[]) => string;
|
|
4
|
+
export declare const getPathFromUrl: (wnfsUrl: string) => string[];
|
|
5
|
+
export declare const getBlobUrl: ({ wnfsUrl, blockstore, directory, forest, }: {
|
|
6
|
+
wnfsUrl: string;
|
|
7
|
+
blockstore: Blockstore;
|
|
8
|
+
directory: PrivateDirectory;
|
|
9
|
+
forest: PrivateForest;
|
|
10
|
+
}) => Promise<string>;
|
|
11
|
+
//# sourceMappingURL=wnfs-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wnfs-url.d.ts","sourceRoot":"","sources":["../../../../src/helpers/wnfs-url.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAIjE,eAAO,MAAM,OAAO,aAAc,MAAM,EAAE,WAEzC,CAAC;AAEF,eAAO,MAAM,cAAc,YAAa,MAAM,aAIR,CAAC;AAEvC,eAAO,MAAM,UAAU,gDAKpB;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;CACvB,oBAMA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
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"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
export declare const WNFS_PLUGIN = "dxos.org/plugin/
|
|
2
|
-
declare const
|
|
1
|
+
export declare const WNFS_PLUGIN = "dxos.org/plugin/wnfs";
|
|
2
|
+
export declare const meta: {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
6
|
icon: string;
|
|
7
7
|
source: string;
|
|
8
|
-
tags: string[];
|
|
9
8
|
};
|
|
10
|
-
export default _default;
|
|
11
9
|
//# 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
|
|
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,9 +1,23 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
'en-US': {
|
|
3
|
-
|
|
3
|
+
[x: string]: {
|
|
4
|
+
'typename label': string;
|
|
5
|
+
'plugin name'?: undefined;
|
|
6
|
+
'file title placeholder'?: undefined;
|
|
7
|
+
'delete object label'?: undefined;
|
|
8
|
+
'file input placeholder'?: undefined;
|
|
9
|
+
} | {
|
|
4
10
|
'plugin name': string;
|
|
5
11
|
'file title placeholder': string;
|
|
6
12
|
'delete object label': string;
|
|
13
|
+
'file input placeholder': string;
|
|
14
|
+
'typename label'?: undefined;
|
|
15
|
+
};
|
|
16
|
+
"dxos.org/plugin/wnfs": {
|
|
17
|
+
'plugin name': string;
|
|
18
|
+
'file title placeholder': string;
|
|
19
|
+
'delete object label': string;
|
|
20
|
+
'file input placeholder': string;
|
|
7
21
|
};
|
|
8
22
|
};
|
|
9
23
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAcE"}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
-
declare const FileType_base: import("@dxos/echo-schema").
|
|
3
|
-
name
|
|
4
|
-
filename: string;
|
|
5
|
-
type: string;
|
|
6
|
-
timestamp?: string | undefined;
|
|
7
|
-
cid?: string | undefined;
|
|
8
|
-
} & {
|
|
9
|
-
id: string;
|
|
10
|
-
}, S.Struct.Encoded<{
|
|
11
|
-
filename: typeof S.String;
|
|
2
|
+
declare const FileType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectFields<{
|
|
3
|
+
name: S.optional<typeof S.String>;
|
|
12
4
|
type: typeof S.String;
|
|
5
|
+
cid: typeof S.String;
|
|
13
6
|
timestamp: S.optional<typeof S.String>;
|
|
7
|
+
}, import("packages/core/echo/echo-schema/dist/types/src/object/common").TypedObjectOptions>, S.Struct.Encoded<{
|
|
14
8
|
name: S.optional<typeof S.String>;
|
|
15
|
-
|
|
9
|
+
type: typeof S.String;
|
|
10
|
+
cid: typeof S.String;
|
|
11
|
+
timestamp: S.optional<typeof S.String>;
|
|
16
12
|
}>>;
|
|
17
13
|
export declare class FileType extends FileType_base {
|
|
18
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/types/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/types/file.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;;;;;;;AAEnD,qBAAa,QAAS,SAAQ,aAK5B;CAAG"}
|
|
@@ -1,8 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
import { FileType } from './file';
|
|
3
|
+
export declare namespace WnfsAction {
|
|
4
|
+
const Create_base: S.TaggedClass<Create, "dxos.org/plugin/wnfs/action/create", {
|
|
5
|
+
readonly _tag: S.tag<"dxos.org/plugin/wnfs/action/create">;
|
|
6
|
+
} & {
|
|
7
|
+
input: S.SchemaClass<{
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly type: string;
|
|
10
|
+
readonly cid: string;
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly type: string;
|
|
14
|
+
readonly cid: string;
|
|
15
|
+
}, never>;
|
|
16
|
+
output: S.Struct<{
|
|
17
|
+
object: typeof FileType;
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
20
|
+
export class Create extends Create_base {
|
|
21
|
+
}
|
|
22
|
+
export const UploadAnnotationId: unique symbol;
|
|
23
|
+
export const UploadFileSchema: S.Struct<{
|
|
24
|
+
file: S.instanceOf<File>;
|
|
25
|
+
}>;
|
|
26
|
+
export type UploadFileForm = S.Schema.Type<typeof UploadFileSchema>;
|
|
27
|
+
const Upload_base: S.TaggedClass<Upload, "dxos.org/plugin/wnfs/action/upload", {
|
|
28
|
+
readonly _tag: S.tag<"dxos.org/plugin/wnfs/action/upload">;
|
|
29
|
+
} & {
|
|
30
|
+
input: S.extend<S.Struct<{
|
|
31
|
+
file: S.instanceOf<File>;
|
|
32
|
+
}>, S.Struct<{
|
|
33
|
+
space: S.Schema<import("@dxos/react-client/echo").Space, import("@dxos/react-client/echo").Space, never>;
|
|
34
|
+
}>>;
|
|
35
|
+
output: S.SchemaClass<{
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly type: string;
|
|
38
|
+
readonly cid: string;
|
|
39
|
+
readonly url: string;
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly type: string;
|
|
43
|
+
readonly cid: string;
|
|
44
|
+
readonly url: string;
|
|
45
|
+
}, never>;
|
|
46
|
+
}>;
|
|
47
|
+
export class Upload extends Upload_base {
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
6
50
|
}
|
|
7
|
-
export type WnfsPluginProvides = FileManagerProvides & SurfaceProvides & MetadataRecordsProvides & TranslationsProvides & SchemaProvides & MarkdownExtensionProvides;
|
|
8
51
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGtC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC,yBAAiB,UAAU,CAAC;;;;;;;;;;;;;;;;;IAC1B,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;IAEL,MAAM,CAAC,MAAM,kBAAkB,eAAiD,CAAC;IAEjF,MAAM,CAAC,MAAM,gBAAgB;;MAQ3B,CAAC;IAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;IAEpE,MAAM,OAAO,MAAO,SAAQ,WAG1B;KAAG;;CACN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"5.7.3"}
|