@dxos/plugin-masonry 0.8.4-main.72ec0f3 → 0.8.4-main.937b3ca
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/chunk-2QCFP5QL.mjs +78 -0
- package/dist/lib/browser/chunk-2QCFP5QL.mjs.map +7 -0
- package/dist/lib/browser/chunk-U46AGJ2D.mjs +19 -0
- package/dist/lib/browser/chunk-U46AGJ2D.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +45 -58
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-BNMIVM2K.mjs +94 -0
- package/dist/lib/browser/react-surface-BNMIVM2K.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +9 -0
- package/dist/lib/browser/types/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6SGZVU7G.mjs +79 -0
- package/dist/lib/node-esm/chunk-6SGZVU7G.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-P6EZJITS.mjs +21 -0
- package/dist/lib/node-esm/chunk-P6EZJITS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +45 -58
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-OK33CG7H.mjs +95 -0
- package/dist/lib/node-esm/react-surface-OK33CG7H.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/MasonryPlugin.d.ts +2 -1
- package/dist/types/src/MasonryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/MasonryContainer.d.ts +7 -2
- package/dist/types/src/components/MasonryContainer.d.ts.map +1 -1
- package/dist/types/src/components/MasonryContainer.stories.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +14 -5
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Masonry.d.ts +19 -18
- package/dist/types/src/types/Masonry.d.ts.map +1 -1
- package/dist/types/src/types/MasonryAction.d.ts +0 -17
- package/dist/types/src/types/MasonryAction.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +50 -33
- package/src/MasonryPlugin.tsx +27 -52
- package/src/capabilities/index.ts +1 -4
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +31 -0
- package/src/components/MasonryContainer.stories.tsx +26 -36
- package/src/components/MasonryContainer.tsx +44 -34
- package/src/meta.ts +2 -2
- package/src/translations.ts +5 -1
- package/src/types/Masonry.ts +37 -26
- package/src/types/MasonryAction.ts +8 -17
- package/dist/lib/browser/chunk-Z4ORTGID.mjs +0 -93
- package/dist/lib/browser/chunk-Z4ORTGID.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-TCILFRP3.mjs +0 -31
- package/dist/lib/browser/intent-resolver-TCILFRP3.mjs.map +0 -7
- package/dist/lib/browser/react-surface-EUN65F5S.mjs +0 -112
- package/dist/lib/browser/react-surface-EUN65F5S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K7UZDCYX.mjs +0 -94
- package/dist/lib/node-esm/chunk-K7UZDCYX.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-ABCXBMFV.mjs +0 -32
- package/dist/lib/node-esm/intent-resolver-ABCXBMFV.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-OUXYIQWW.mjs +0 -113
- package/dist/lib/node-esm/react-surface-OUXYIQWW.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -25
- package/src/capabilities/react-surface.tsx +0 -24
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/masonry',\n name: 'Masonry',\n description: trim`\n Responsive grid layout that displays query results in an adaptive masonry pattern.\n Visualize collections of cards, images, or mixed content that automatically adjusts to available screen space.\n `,\n icon: 'ph--wall--regular',\n iconHue: 'green',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-masonry',\n screenshots: [],\n};\n"],
|
|
5
|
+
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa,CAAA;AACf;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "screenshots"]
|
|
7
|
+
}
|
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
MasonryAction_exports,
|
|
4
|
-
Masonry_exports,
|
|
5
3
|
meta
|
|
6
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-P6EZJITS.mjs";
|
|
5
|
+
import {
|
|
6
|
+
MasonryAction_exports,
|
|
7
|
+
Masonry_exports
|
|
8
|
+
} from "./chunk-6SGZVU7G.mjs";
|
|
7
9
|
|
|
8
10
|
// src/MasonryPlugin.tsx
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import * as Effect from "effect/Effect";
|
|
12
|
+
import { Common, Plugin } from "@dxos/app-framework";
|
|
13
|
+
import { Type as Type2 } from "@dxos/echo";
|
|
14
|
+
import { View } from "@dxos/schema";
|
|
13
15
|
|
|
14
|
-
// src/capabilities/index.ts
|
|
15
|
-
import {
|
|
16
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
17
|
-
var IntentResolver = lazy(() => import("./intent-resolver-ABCXBMFV.mjs"));
|
|
16
|
+
// src/capabilities/react-surface/index.ts
|
|
17
|
+
import { Capability } from "@dxos/app-framework";
|
|
18
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-OK33CG7H.mjs"));
|
|
18
19
|
|
|
19
20
|
// src/translations.ts
|
|
21
|
+
import { Type } from "@dxos/echo";
|
|
20
22
|
var translations = [
|
|
21
23
|
{
|
|
22
24
|
"en-US": {
|
|
23
|
-
[Masonry_exports.Masonry
|
|
25
|
+
[Type.getTypename(Masonry_exports.Masonry)]: {
|
|
24
26
|
"typename label": "Masonry",
|
|
25
27
|
"typename label_zero": "Masonries",
|
|
26
28
|
"typename label_one": "Masonry",
|
|
27
29
|
"typename label_other": "Masonries",
|
|
28
|
-
"object name placeholder": "New masonry"
|
|
30
|
+
"object name placeholder": "New masonry",
|
|
31
|
+
"rename object label": "Rename masonry",
|
|
32
|
+
"delete object label": "Delete masonry",
|
|
33
|
+
"object deleted label": "Masonry deleted"
|
|
29
34
|
},
|
|
30
35
|
[meta.id]: {
|
|
31
36
|
"plugin name": "Masonry"
|
|
@@ -35,52 +40,34 @@ var translations = [
|
|
|
35
40
|
];
|
|
36
41
|
|
|
37
42
|
// src/MasonryPlugin.tsx
|
|
38
|
-
var MasonryPlugin =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
})
|
|
59
|
-
}),
|
|
60
|
-
defineModule({
|
|
61
|
-
id: `${meta.id}/module/object-form`,
|
|
62
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
63
|
-
activate: () => contributes(SpaceCapabilities.ObjectForm, defineObjectForm({
|
|
64
|
-
objectSchema: Masonry_exports.Masonry,
|
|
65
|
-
formSchema: MasonryAction_exports.MasonryProps,
|
|
66
|
-
hidden: true,
|
|
67
|
-
getIntent: (props, options) => createIntent(MasonryAction_exports.CreateMasonry, {
|
|
68
|
-
...props,
|
|
69
|
-
space: options.space
|
|
43
|
+
var MasonryPlugin = Plugin.define(meta).pipe(Common.Plugin.addTranslationsModule({
|
|
44
|
+
translations
|
|
45
|
+
}), Common.Plugin.addSurfaceModule({
|
|
46
|
+
activate: ReactSurface
|
|
47
|
+
}), Common.Plugin.addMetadataModule({
|
|
48
|
+
metadata: {
|
|
49
|
+
id: Type2.getTypename(Masonry_exports.Masonry),
|
|
50
|
+
metadata: {
|
|
51
|
+
icon: "ph--wall--regular",
|
|
52
|
+
iconHue: "green",
|
|
53
|
+
inputSchema: MasonryAction_exports.MasonryProps,
|
|
54
|
+
createObject: (props, { db }) => Effect.promise(async () => {
|
|
55
|
+
const { view } = await View.makeFromDatabase({
|
|
56
|
+
db,
|
|
57
|
+
typename: props.typename
|
|
58
|
+
});
|
|
59
|
+
return Masonry_exports.make({
|
|
60
|
+
name: props.name,
|
|
61
|
+
view
|
|
62
|
+
});
|
|
70
63
|
})
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
defineModule({
|
|
79
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
80
|
-
activatesOn: Events.SetupIntentResolver,
|
|
81
|
-
activate: IntentResolver
|
|
82
|
-
})
|
|
83
|
-
]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}), Common.Plugin.addSchemaModule({
|
|
67
|
+
schema: [
|
|
68
|
+
Masonry_exports.Masonry
|
|
69
|
+
]
|
|
70
|
+
}), Plugin.make);
|
|
84
71
|
export {
|
|
85
72
|
MasonryPlugin,
|
|
86
73
|
meta
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/MasonryPlugin.tsx", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/MasonryPlugin.tsx", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Common, Plugin } from '@dxos/app-framework';\nimport { Type } from '@dxos/echo';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { View } from '@dxos/schema';\n\nimport { ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { Masonry, MasonryAction } from './types';\n\nexport const MasonryPlugin = Plugin.define(meta).pipe(\n Common.Plugin.addTranslationsModule({ translations }),\n Common.Plugin.addSurfaceModule({ activate: ReactSurface }),\n Common.Plugin.addMetadataModule({\n metadata: {\n id: Type.getTypename(Masonry.Masonry),\n metadata: {\n icon: 'ph--wall--regular',\n iconHue: 'green',\n inputSchema: MasonryAction.MasonryProps,\n createObject: ((props, { db }) =>\n Effect.promise(async () => {\n const { view } = await View.makeFromDatabase({ db, typename: props.typename });\n return Masonry.make({ name: props.name, view });\n })) satisfies CreateObject,\n },\n },\n }),\n Common.Plugin.addSchemaModule({ schema: [Masonry.Masonry] }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Type } from '@dxos/echo';\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\nimport { Masonry } from './types';\n\nexport const translations = [\n {\n 'en-US': {\n [Type.getTypename(Masonry.Masonry)]: {\n 'typename label': 'Masonry',\n 'typename label_zero': 'Masonries',\n 'typename label_one': 'Masonry',\n 'typename label_other': 'Masonries',\n 'object name placeholder': 'New masonry',\n 'rename object label': 'Rename masonry',\n 'delete object label': 'Delete masonry',\n 'object deleted label': 'Masonry deleted',\n },\n [meta.id]: {\n 'plugin name': 'Masonry',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,QAAQC,cAAc;AAC/B,SAASC,QAAAA,aAAY;AAErB,SAASC,YAAY;;;ACLrB,SAASC,kBAAkB;AAEpB,IAAMC,eAAeC,WAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACFzE,SAASC,YAAY;AAMd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,YAAYC,gBAAQA,OAAO,CAAA,GAAI;QACnC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;;;AFXK,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,OAAOJ,OAAOK,sBAAsB;EAAEC;AAAa,CAAA,GACnDF,OAAOJ,OAAOO,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACxDL,OAAOJ,OAAOU,kBAAkB;EAC9BC,UAAU;IACRC,IAAIC,MAAKC,YAAYC,gBAAQA,OAAO;IACpCJ,UAAU;MACRK,MAAM;MACNC,SAAS;MACTC,aAAaC,sBAAcC;MAC3BC,cAAe,CAACC,OAAO,EAAEC,GAAE,MAClBC,eAAQ,YAAA;AACb,cAAM,EAAEC,KAAI,IAAK,MAAMC,KAAKC,iBAAiB;UAAEJ;UAAIK,UAAUN,MAAMM;QAAS,CAAA;AAC5E,eAAOb,gBAAQc,KAAK;UAAEC,MAAMR,MAAMQ;UAAML;QAAK,CAAA;MAC/C,CAAA;IACJ;EACF;AACF,CAAA,GACArB,OAAOJ,OAAO+B,gBAAgB;EAAEC,QAAQ;IAACjB,gBAAQA;;AAAS,CAAA,GAC1Df,OAAO6B,IAAI;",
|
|
6
|
+
"names": ["Effect", "Common", "Plugin", "Type", "View", "Capability", "ReactSurface", "Capability", "lazy", "Type", "translations", "Type", "getTypename", "Masonry", "meta", "id", "MasonryPlugin", "Plugin", "define", "meta", "pipe", "Common", "addTranslationsModule", "translations", "addSurfaceModule", "activate", "ReactSurface", "addMetadataModule", "metadata", "id", "Type", "getTypename", "Masonry", "icon", "iconHue", "inputSchema", "MasonryAction", "MasonryProps", "createObject", "props", "db", "promise", "view", "View", "makeFromDatabase", "typename", "make", "name", "addSchemaModule", "schema"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1966,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/MasonryContainer.tsx":{"bytes":8818,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-search","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-masonry","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/Masonry.ts":{"bytes":5888,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/MasonryAction.ts":{"bytes":2399,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"format":"esm"},"src/types/index.ts":{"bytes":708,"imports":[{"path":"src/types/Masonry.ts","kind":"import-statement","original":"./Masonry"},{"path":"src/types/MasonryAction.ts","kind":"import-statement","original":"./MasonryAction"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":4093,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/components/MasonryContainer.tsx","kind":"import-statement","original":"../../components/MasonryContainer"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":911,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":488,"imports":[{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":2691,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/MasonryPlugin.tsx":{"bytes":4997,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/index.ts":{"bytes":555,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/MasonryPlugin.tsx","kind":"import-statement","original":"./MasonryPlugin"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4033},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-P6EZJITS.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-6SGZVU7G.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/node-esm/react-surface-OK33CG7H.mjs","kind":"dynamic-import"},{"path":"@dxos/echo","kind":"import-statement","external":true}],"exports":["MasonryPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/MasonryPlugin.tsx":{"bytesInOutput":962},"src/capabilities/react-surface/index.ts":{"bytesInOutput":148},"src/capabilities/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":575}},"bytes":2098},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-6SGZVU7G.mjs","kind":"import-statement"}],"exports":["Masonry","MasonryAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":294},"dist/lib/node-esm/react-surface-OK33CG7H.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6819},"dist/lib/node-esm/react-surface-OK33CG7H.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-P6EZJITS.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-6SGZVU7G.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-search","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-masonry","kind":"import-statement","external":true},{"path":"@dxos/react-ui-mosaic","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":820},"src/components/MasonryContainer.tsx":{"bytesInOutput":2235}},"bytes":3497},"dist/lib/node-esm/chunk-P6EZJITS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":950},"dist/lib/node-esm/chunk-P6EZJITS.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":482}},"bytes":654},"dist/lib/node-esm/chunk-6SGZVU7G.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4204},"dist/lib/node-esm/chunk-6SGZVU7G.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/internal","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["MasonryAction_exports","Masonry_exports"],"inputs":{"src/types/Masonry.ts":{"bytesInOutput":1289},"src/types/index.ts":{"bytesInOutput":0},"src/types/MasonryAction.ts":{"bytesInOutput":640}},"bytes":2344}}}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-P6EZJITS.mjs";
|
|
5
|
+
import {
|
|
6
|
+
Masonry_exports
|
|
7
|
+
} from "./chunk-6SGZVU7G.mjs";
|
|
8
|
+
|
|
9
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import React2 from "react";
|
|
12
|
+
import { Capability, Common as Common2 } from "@dxos/app-framework";
|
|
13
|
+
import { Obj as Obj2 } from "@dxos/echo";
|
|
14
|
+
import { View } from "@dxos/schema";
|
|
15
|
+
|
|
16
|
+
// src/components/MasonryContainer.tsx
|
|
17
|
+
import React, { useEffect, useState } from "react";
|
|
18
|
+
import { Common } from "@dxos/app-framework";
|
|
19
|
+
import { Surface, useCapabilities } from "@dxos/app-framework/react";
|
|
20
|
+
import { Filter, Obj, Type } from "@dxos/echo";
|
|
21
|
+
import { useGlobalFilteredObjects } from "@dxos/plugin-search";
|
|
22
|
+
import { useObject, useQuery } from "@dxos/react-client/echo";
|
|
23
|
+
import { Masonry as MasonryComponent } from "@dxos/react-ui-masonry";
|
|
24
|
+
import { Card } from "@dxos/react-ui-mosaic";
|
|
25
|
+
import { getTypenameFromQuery } from "@dxos/schema";
|
|
26
|
+
var MasonryContainer = ({ view: viewOrRef, role }) => {
|
|
27
|
+
const [view] = useObject(viewOrRef);
|
|
28
|
+
const schemas = useCapabilities(Common.Capability.Schema);
|
|
29
|
+
const db = view && Obj.getDatabase(view);
|
|
30
|
+
const typename = view?.query ? getTypenameFromQuery(view.query.ast) : void 0;
|
|
31
|
+
const [cardSchema, setCardSchema] = useState();
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const staticSchema = schemas.flat().find((schema) => Type.getTypename(schema) === typename);
|
|
34
|
+
if (staticSchema) {
|
|
35
|
+
setCardSchema(() => staticSchema);
|
|
36
|
+
}
|
|
37
|
+
if (!staticSchema && typename && db) {
|
|
38
|
+
const query = db.schemaRegistry.query({
|
|
39
|
+
typename
|
|
40
|
+
});
|
|
41
|
+
const unsubscribe = query.subscribe(() => {
|
|
42
|
+
const [schema] = query.results;
|
|
43
|
+
if (schema) {
|
|
44
|
+
setCardSchema(schema);
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
fire: true
|
|
48
|
+
});
|
|
49
|
+
return unsubscribe;
|
|
50
|
+
}
|
|
51
|
+
}, [
|
|
52
|
+
schemas,
|
|
53
|
+
typename,
|
|
54
|
+
db
|
|
55
|
+
]);
|
|
56
|
+
const objects = useQuery(db, cardSchema ? Filter.type(cardSchema) : Filter.nothing());
|
|
57
|
+
const filteredObjects = useGlobalFilteredObjects(objects);
|
|
58
|
+
return /* @__PURE__ */ React.createElement(MasonryComponent.Root, {
|
|
59
|
+
items: filteredObjects,
|
|
60
|
+
render: Item,
|
|
61
|
+
classNames: "is-full max-is-full bs-full max-bs-full overflow-y-auto p-4"
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var Item = ({ data }) => {
|
|
65
|
+
return /* @__PURE__ */ React.createElement(Card.Root, null, /* @__PURE__ */ React.createElement(Card.Toolbar, null, /* @__PURE__ */ React.createElement("span", null), /* @__PURE__ */ React.createElement(Card.Title, null, Obj.getLabel(data)), /* @__PURE__ */ React.createElement(Card.Menu, null)), /* @__PURE__ */ React.createElement(Surface, {
|
|
66
|
+
role: "card--content",
|
|
67
|
+
limit: 1,
|
|
68
|
+
data: {
|
|
69
|
+
subject: data
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
75
|
+
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common2.Capability.ReactSurface, [
|
|
76
|
+
Common2.createSurface({
|
|
77
|
+
id: meta.id,
|
|
78
|
+
role: [
|
|
79
|
+
"article",
|
|
80
|
+
"section"
|
|
81
|
+
],
|
|
82
|
+
filter: (data) => Obj2.instanceOf(Masonry_exports.Masonry, data.subject) || Obj2.instanceOf(View.View, data.subject),
|
|
83
|
+
component: ({ data, role }) => {
|
|
84
|
+
const view = Obj2.instanceOf(View.View, data.subject) ? data.subject : data.subject.view;
|
|
85
|
+
return /* @__PURE__ */ React2.createElement(MasonryContainer, {
|
|
86
|
+
view,
|
|
87
|
+
role
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
])));
|
|
92
|
+
export {
|
|
93
|
+
react_surface_default as default
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=react-surface-OK33CG7H.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/components/MasonryContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { View } from '@dxos/schema';\n\nimport { MasonryContainer } from '../../components/MasonryContainer';\nimport { meta } from '../../meta';\nimport { Masonry } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.createSurface({\n id: meta.id,\n role: ['article', 'section'],\n filter: (data): data is { subject: Masonry.Masonry | View.View } =>\n Obj.instanceOf(Masonry.Masonry, data.subject) || Obj.instanceOf(View.View, data.subject),\n component: ({ data, role }) => {\n const view = Obj.instanceOf(View.View, data.subject) ? data.subject : data.subject.view;\n return <MasonryContainer view={view} role={role} />;\n },\n }),\n ]),\n ),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Schema from 'effect/Schema';\nimport React, { useEffect, useState } from 'react';\n\nimport { Common } from '@dxos/app-framework';\nimport { Surface, useCapabilities } from '@dxos/app-framework/react';\nimport { Filter, Obj, type Ref, Type } from '@dxos/echo';\nimport { useGlobalFilteredObjects } from '@dxos/plugin-search';\nimport { useObject, useQuery } from '@dxos/react-client/echo';\nimport { Masonry as MasonryComponent } from '@dxos/react-ui-masonry';\nimport { Card } from '@dxos/react-ui-mosaic';\nimport { type View, getTypenameFromQuery } from '@dxos/schema';\n\nexport type MasonryContainerProps = {\n view: View.View;\n role?: string;\n};\n\nexport const MasonryContainer = ({\n view: viewOrRef,\n role,\n}: {\n view: View.View | Ref.Ref<View.View>;\n role?: string;\n}) => {\n const [view] = useObject(viewOrRef);\n const schemas = useCapabilities(Common.Capability.Schema);\n const db = view && Obj.getDatabase(view);\n const typename = view?.query ? getTypenameFromQuery(view.query.ast) : undefined;\n\n const [cardSchema, setCardSchema] = useState<Schema.Schema.AnyNoContext>();\n\n useEffect(() => {\n const staticSchema = schemas.flat().find((schema) => Type.getTypename(schema) === typename);\n if (staticSchema) {\n setCardSchema(() => staticSchema);\n }\n if (!staticSchema && typename && db) {\n const query = db.schemaRegistry.query({ typename });\n const unsubscribe = query.subscribe(\n () => {\n const [schema] = query.results;\n if (schema) {\n setCardSchema(schema);\n }\n },\n { fire: true },\n );\n return unsubscribe;\n }\n }, [schemas, typename, db]);\n\n const objects = useQuery(db, cardSchema ? Filter.type(cardSchema) : Filter.nothing());\n const filteredObjects = useGlobalFilteredObjects(objects);\n\n return (\n <MasonryComponent.Root\n items={filteredObjects}\n render={Item as any}\n classNames='is-full max-is-full bs-full max-bs-full overflow-y-auto p-4'\n />\n );\n};\n\nconst Item = ({ data }: { data: any }) => {\n return (\n <Card.Root>\n <Card.Toolbar>\n <span />\n <Card.Title>{Obj.getLabel(data)}</Card.Title>\n <Card.Menu />\n </Card.Toolbar>\n <Surface role='card--content' limit={1} data={{ subject: data }} />\n </Card.Root>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,YAAW;AAElB,SAASC,YAAYC,UAAAA,eAAc;AACnC,SAASC,OAAAA,YAAW;AACpB,SAASC,YAAY;;;ACJrB,OAAOC,SAASC,WAAWC,gBAAgB;AAE3C,SAASC,cAAc;AACvB,SAASC,SAASC,uBAAuB;AACzC,SAASC,QAAQC,KAAeC,YAAY;AAC5C,SAASC,gCAAgC;AACzC,SAASC,WAAWC,gBAAgB;AACpC,SAASC,WAAWC,wBAAwB;AAC5C,SAASC,YAAY;AACrB,SAAoBC,4BAA4B;AAOzC,IAAMC,mBAAmB,CAAC,EAC/BC,MAAMC,WACNC,KAAI,MAIL;AACC,QAAM,CAACF,IAAAA,IAAQG,UAAUF,SAAAA;AACzB,QAAMG,UAAUC,gBAAgBC,OAAOC,WAAWC,MAAM;AACxD,QAAMC,KAAKT,QAAQU,IAAIC,YAAYX,IAAAA;AACnC,QAAMY,WAAWZ,MAAMa,QAAQC,qBAAqBd,KAAKa,MAAME,GAAG,IAAIC;AAEtE,QAAM,CAACC,YAAYC,aAAAA,IAAiBC,SAAAA;AAEpCC,YAAU,MAAA;AACR,UAAMC,eAAejB,QAAQkB,KAAI,EAAGC,KAAK,CAACC,WAAWC,KAAKC,YAAYF,MAAAA,MAAYZ,QAAAA;AAClF,QAAIS,cAAc;AAChBH,oBAAc,MAAMG,YAAAA;IACtB;AACA,QAAI,CAACA,gBAAgBT,YAAYH,IAAI;AACnC,YAAMI,QAAQJ,GAAGkB,eAAed,MAAM;QAAED;MAAS,CAAA;AACjD,YAAMgB,cAAcf,MAAMgB,UACxB,MAAA;AACE,cAAM,CAACL,MAAAA,IAAUX,MAAMiB;AACvB,YAAIN,QAAQ;AACVN,wBAAcM,MAAAA;QAChB;MACF,GACA;QAAEO,MAAM;MAAK,CAAA;AAEf,aAAOH;IACT;EACF,GAAG;IAACxB;IAASQ;IAAUH;GAAG;AAE1B,QAAMuB,UAAUC,SAASxB,IAAIQ,aAAaiB,OAAOC,KAAKlB,UAAAA,IAAciB,OAAOE,QAAO,CAAA;AAClF,QAAMC,kBAAkBC,yBAAyBN,OAAAA;AAEjD,SACE,sBAAA,cAACO,iBAAiBC,MAAI;IACpBC,OAAOJ;IACPK,QAAQC;IACRC,YAAW;;AAGjB;AAEA,IAAMD,OAAO,CAAC,EAAEE,KAAI,MAAiB;AACnC,SACE,sBAAA,cAACC,KAAKN,MAAI,MACR,sBAAA,cAACM,KAAKC,SAAO,MACX,sBAAA,cAACC,QAAAA,IAAAA,GACD,sBAAA,cAACF,KAAKG,OAAK,MAAEvC,IAAIwC,SAASL,IAAAA,CAAAA,GAC1B,sBAAA,cAACC,KAAKK,MAAI,IAAA,CAAA,GAEZ,sBAAA,cAACC,SAAAA;IAAQlD,MAAK;IAAgBmD,OAAO;IAAGR,MAAM;MAAES,SAAST;IAAK;;AAGpE;;;AD/DA,IAAA,wBAAeU,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,QAAOJ,WAAWK,cAAc;EACrDD,QAAOE,cAAc;IACnBC,IAAIC,KAAKD;IACTE,MAAM;MAAC;MAAW;;IAClBC,QAAQ,CAACC,SACPC,KAAIC,WAAWC,gBAAQA,SAASH,KAAKI,OAAO,KAAKH,KAAIC,WAAWG,KAAKA,MAAML,KAAKI,OAAO;IACzFE,WAAW,CAAC,EAAEN,MAAMF,KAAI,MAAE;AACxB,YAAMS,OAAON,KAAIC,WAAWG,KAAKA,MAAML,KAAKI,OAAO,IAAIJ,KAAKI,UAAUJ,KAAKI,QAAQG;AACnF,aAAO,gBAAAC,OAAA,cAACC,kBAAAA;QAAiBF;QAAYT;;IACvC;EACF,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "React", "Capability", "Common", "Obj", "View", "React", "useEffect", "useState", "Common", "Surface", "useCapabilities", "Filter", "Obj", "Type", "useGlobalFilteredObjects", "useObject", "useQuery", "Masonry", "MasonryComponent", "Card", "getTypenameFromQuery", "MasonryContainer", "view", "viewOrRef", "role", "useObject", "schemas", "useCapabilities", "Common", "Capability", "Schema", "db", "Obj", "getDatabase", "typename", "query", "getTypenameFromQuery", "ast", "undefined", "cardSchema", "setCardSchema", "useState", "useEffect", "staticSchema", "flat", "find", "schema", "Type", "getTypename", "schemaRegistry", "unsubscribe", "subscribe", "results", "fire", "objects", "useQuery", "Filter", "type", "nothing", "filteredObjects", "useGlobalFilteredObjects", "MasonryComponent", "Root", "items", "render", "Item", "classNames", "data", "Card", "Toolbar", "span", "Title", "getLabel", "Menu", "Surface", "limit", "subject", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "filter", "data", "Obj", "instanceOf", "Masonry", "subject", "View", "component", "view", "React", "MasonryContainer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
MasonryAction_exports,
|
|
4
|
+
Masonry_exports
|
|
5
|
+
} from "../chunk-6SGZVU7G.mjs";
|
|
6
|
+
export {
|
|
7
|
+
Masonry_exports as Masonry,
|
|
8
|
+
MasonryAction_exports as MasonryAction
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryPlugin.d.ts","sourceRoot":"","sources":["../../../src/MasonryPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MasonryPlugin.d.ts","sourceRoot":"","sources":["../../../src/MasonryPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAU,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAUrD,eAAO,MAAM,aAAa,4BAoBzB,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const IntentResolver: (props?: import("@dxos/app-framework").PluginContext | undefined) => Promise<() => Promise<import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<import("@dxos/app-framework").Capabilities.IntentResolver>> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
1
|
+
export * from './react-surface';
|
|
3
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
|
|
@@ -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,sJAAmE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability, Common } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Common.Capability.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;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAQzD,wBAeE"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type Ref } from '@dxos/echo';
|
|
2
3
|
import { type View } from '@dxos/schema';
|
|
3
|
-
export
|
|
4
|
+
export type MasonryContainerProps = {
|
|
4
5
|
view: View.View;
|
|
5
|
-
role
|
|
6
|
+
role?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const MasonryContainer: ({ view: viewOrRef, role, }: {
|
|
9
|
+
view: View.View | Ref.Ref<View.View>;
|
|
10
|
+
role?: string;
|
|
6
11
|
}) => React.JSX.Element;
|
|
7
12
|
//# sourceMappingURL=MasonryContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/MasonryContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MasonryContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/MasonryContainer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAe,KAAK,GAAG,EAAQ,MAAM,YAAY,CAAC;AAKzD,OAAO,EAAE,KAAK,IAAI,EAAwB,MAAM,cAAc,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,4BAG9B;IACD,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,sBAsCA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryContainer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/MasonryContainer.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"MasonryContainer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/MasonryContainer.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4B1B,QAAA,MAAM,IAAI;;;;;;;;CAqCM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
package/dist/types/src/meta.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const meta:
|
|
1
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
2
|
+
export declare const meta: Plugin.Meta;
|
|
3
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,
|
|
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,IAWzB,CAAC"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import { meta } from './meta';
|
|
2
|
-
import { Masonry } from './types';
|
|
3
1
|
export declare const translations: [{
|
|
4
2
|
readonly 'en-US': {
|
|
5
|
-
readonly [
|
|
3
|
+
readonly [x: string]: {
|
|
6
4
|
readonly 'typename label': "Masonry";
|
|
7
5
|
readonly 'typename label_zero': "Masonries";
|
|
8
6
|
readonly 'typename label_one': "Masonry";
|
|
9
7
|
readonly 'typename label_other': "Masonries";
|
|
10
8
|
readonly 'object name placeholder': "New masonry";
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
readonly 'rename object label': "Rename masonry";
|
|
10
|
+
readonly 'delete object label': "Delete masonry";
|
|
11
|
+
readonly 'object deleted label': "Masonry deleted";
|
|
12
|
+
readonly 'plugin name'?: undefined;
|
|
13
|
+
} | {
|
|
13
14
|
readonly 'plugin name': "Masonry";
|
|
15
|
+
readonly 'typename label'?: undefined;
|
|
16
|
+
readonly 'typename label_zero'?: undefined;
|
|
17
|
+
readonly 'typename label_one'?: undefined;
|
|
18
|
+
readonly 'typename label_other'?: undefined;
|
|
19
|
+
readonly 'object name placeholder'?: undefined;
|
|
20
|
+
readonly 'rename object label'?: undefined;
|
|
21
|
+
readonly 'delete object label'?: undefined;
|
|
22
|
+
readonly 'object deleted label'?: undefined;
|
|
14
23
|
};
|
|
15
24
|
};
|
|
16
25
|
}];
|
|
@@ -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":"AAUA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;EAkBM,CAAC"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
2
|
import { Obj, Type } from '@dxos/echo';
|
|
3
|
-
import { type JsonSchemaType, toEffectSchema } from '@dxos/echo/internal';
|
|
4
3
|
import { View } from '@dxos/schema';
|
|
5
|
-
export declare const Masonry: Type.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
export declare const Masonry: Type.Obj<{
|
|
5
|
+
readonly view: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & View.View>;
|
|
6
|
+
readonly name?: string | undefined;
|
|
7
|
+
readonly arrangement?: {
|
|
8
|
+
hidden?: boolean | undefined;
|
|
9
|
+
ids: readonly string[];
|
|
10
|
+
}[] | undefined;
|
|
11
|
+
}, Schema.Struct.Fields>;
|
|
12
|
+
export interface Masonry extends Schema.Schema.Type<typeof Masonry> {
|
|
13
|
+
}
|
|
14
|
+
type MakeProps = Omit<Partial<Obj.MakeProps<typeof Masonry>>, 'view'> & {
|
|
15
|
+
view: View.View;
|
|
16
|
+
};
|
|
12
17
|
/**
|
|
13
|
-
* Make a masonry
|
|
18
|
+
* Make a masonry as a view of a data set.
|
|
14
19
|
*/
|
|
15
|
-
export declare const make: (
|
|
16
|
-
|
|
20
|
+
export declare const make: ({ name, arrangement, view }: MakeProps) => Masonry;
|
|
21
|
+
export declare const MasonryV1: Type.Obj<{
|
|
22
|
+
readonly arrangement?: {
|
|
17
23
|
hidden?: boolean | undefined;
|
|
18
24
|
ids: readonly string[];
|
|
19
25
|
}[] | undefined;
|
|
20
|
-
}>;
|
|
21
|
-
export
|
|
22
|
-
export declare const makeView: ({ ...props }: MakeViewProps) => Promise<{
|
|
23
|
-
jsonSchema: JsonSchemaType;
|
|
24
|
-
view: View.View;
|
|
25
|
-
schema: ReturnType<typeof toEffectSchema>;
|
|
26
|
-
}>;
|
|
26
|
+
}, Schema.Struct.Fields>;
|
|
27
|
+
export {};
|
|
27
28
|
//# sourceMappingURL=Masonry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Masonry.d.ts","sourceRoot":"","sources":["../../../../src/types/Masonry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"Masonry.d.ts","sourceRoot":"","sources":["../../../../src/types/Masonry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,OAAO;;;;;;;wBAmBnB,CAAC;AAEF,MAAM,WAAW,OAAQ,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC;CAAG;AAEtE,KAAK,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,6BAAkC,SAAS,KAAG,OAElE,CAAC;AAMF,eAAO,MAAM,SAAS;;;;;wBAYrB,CAAC"}
|
|
@@ -1,23 +1,6 @@
|
|
|
1
1
|
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { View } from '@dxos/schema';
|
|
3
2
|
export declare const MasonryProps: Schema.Struct<{
|
|
4
3
|
name: Schema.optional<typeof Schema.String>;
|
|
5
4
|
typename: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
6
5
|
}>;
|
|
7
|
-
declare const CreateMasonry_base: Schema.TaggedClass<CreateMasonry, `${string}/create`, {
|
|
8
|
-
readonly _tag: Schema.tag<`${string}/create`>;
|
|
9
|
-
} & {
|
|
10
|
-
input: Schema.extend<Schema.Struct<{
|
|
11
|
-
space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
|
|
12
|
-
}>, Schema.Struct<{
|
|
13
|
-
name: Schema.optional<typeof Schema.String>;
|
|
14
|
-
typename: Schema.optional<Schema.SchemaClass<string, string, never>>;
|
|
15
|
-
}>>;
|
|
16
|
-
output: Schema.Struct<{
|
|
17
|
-
object: Schema.Schema<View.View, View.ViewEncoded, never>;
|
|
18
|
-
}>;
|
|
19
|
-
}>;
|
|
20
|
-
export declare class CreateMasonry extends CreateMasonry_base {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
23
6
|
//# sourceMappingURL=MasonryAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryAction.d.ts","sourceRoot":"","sources":["../../../../src/types/MasonryAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"MasonryAction.d.ts","sourceRoot":"","sources":["../../../../src/types/MasonryAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,eAAO,MAAM,YAAY;;;EAYvB,CAAC"}
|