@dxos/plugin-masonry 0.8.4-main.1068cf700f
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/LICENSE +8 -0
- package/README.md +15 -0
- package/dist/lib/browser/chunk-S5JKAK4O.mjs +78 -0
- package/dist/lib/browser/chunk-S5JKAK4O.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 +75 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/react-surface-QKCNQ7HF.mjs +95 -0
- package/dist/lib/browser/react-surface-QKCNQ7HF.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-P6EZJITS.mjs +21 -0
- package/dist/lib/node-esm/chunk-P6EZJITS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YNA44I6R.mjs +79 -0
- package/dist/lib/node-esm/chunk-YNA44I6R.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +76 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/react-surface-XG56AMA7.mjs +96 -0
- package/dist/lib/node-esm/react-surface-XG56AMA7.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 +3 -0
- package/dist/types/src/MasonryPlugin.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +2 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- 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 +12 -0
- package/dist/types/src/components/MasonryContainer.d.ts.map +1 -0
- package/dist/types/src/components/MasonryContainer.stories.d.ts +15 -0
- package/dist/types/src/components/MasonryContainer.stories.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +3 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +26 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/Masonry.d.ts +28 -0
- package/dist/types/src/types/Masonry.d.ts.map +1 -0
- package/dist/types/src/types/MasonryAction.d.ts +6 -0
- package/dist/types/src/types/MasonryAction.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +84 -0
- package/src/MasonryPlugin.tsx +38 -0
- package/src/capabilities/index.ts +5 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +32 -0
- package/src/components/MasonryContainer.stories.tsx +78 -0
- package/src/components/MasonryContainer.tsx +79 -0
- package/src/index.ts +7 -0
- package/src/meta.ts +19 -0
- package/src/translations.ts +29 -0
- package/src/types/Masonry.ts +61 -0
- package/src/types/MasonryAction.ts +21 -0
- package/src/types/index.ts +6 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1966,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/components/MasonryContainer.tsx":{"bytes":8879,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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":5570,"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":4234,"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/app-framework/ui","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":5024,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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":4056},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-P6EZJITS.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-YNA44I6R.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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-XG56AMA7.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":985},"src/capabilities/react-surface/index.ts":{"bytesInOutput":148},"src/capabilities/index.ts":{"bytesInOutput":0},"src/translations.ts":{"bytesInOutput":575}},"bytes":2121},"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-YNA44I6R.mjs","kind":"import-statement"}],"exports":["Masonry","MasonryAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":294},"dist/lib/node-esm/react-surface-XG56AMA7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6944},"dist/lib/node-esm/react-surface-XG56AMA7.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-P6EZJITS.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-YNA44I6R.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/app-framework/ui","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/ui","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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":865},"src/components/MasonryContainer.tsx":{"bytesInOutput":2252}},"bytes":3559},"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-YNA44I6R.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4068},"dist/lib/node-esm/chunk-YNA44I6R.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":1215},"src/types/index.ts":{"bytesInOutput":0},"src/types/MasonryAction.ts":{"bytesInOutput":640}},"bytes":2270}}}
|
|
@@ -0,0 +1,96 @@
|
|
|
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-YNA44I6R.mjs";
|
|
8
|
+
|
|
9
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import React2 from "react";
|
|
12
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
13
|
+
import { Surface as Surface2 } from "@dxos/app-framework/ui";
|
|
14
|
+
import { Obj as Obj2 } from "@dxos/echo";
|
|
15
|
+
import { View } from "@dxos/schema";
|
|
16
|
+
|
|
17
|
+
// src/components/MasonryContainer.tsx
|
|
18
|
+
import React, { useEffect, useState } from "react";
|
|
19
|
+
import { Surface, useCapabilities } from "@dxos/app-framework/ui";
|
|
20
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
21
|
+
import { Filter, Obj, Type } from "@dxos/echo";
|
|
22
|
+
import { useGlobalFilteredObjects } from "@dxos/plugin-search";
|
|
23
|
+
import { useObject, useQuery } from "@dxos/react-client/echo";
|
|
24
|
+
import { Masonry as MasonryComponent } from "@dxos/react-ui-masonry";
|
|
25
|
+
import { Card } from "@dxos/react-ui-mosaic";
|
|
26
|
+
import { getTypenameFromQuery } from "@dxos/schema";
|
|
27
|
+
var MasonryContainer = ({ view: viewOrRef, role: _role }) => {
|
|
28
|
+
const [view] = useObject(viewOrRef);
|
|
29
|
+
const schemas = useCapabilities(AppCapabilities.Schema);
|
|
30
|
+
const db = view && Obj.getDatabase(view);
|
|
31
|
+
const typename = view?.query ? getTypenameFromQuery(view.query.ast) : void 0;
|
|
32
|
+
const [cardSchema, setCardSchema] = useState();
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const staticSchema = schemas.flat().find((schema) => Type.getTypename(schema) === typename);
|
|
35
|
+
if (staticSchema) {
|
|
36
|
+
setCardSchema(() => staticSchema);
|
|
37
|
+
}
|
|
38
|
+
if (!staticSchema && typename && db) {
|
|
39
|
+
const query = db.schemaRegistry.query({
|
|
40
|
+
typename
|
|
41
|
+
});
|
|
42
|
+
const unsubscribe = query.subscribe(() => {
|
|
43
|
+
const [schema] = query.results;
|
|
44
|
+
if (schema) {
|
|
45
|
+
setCardSchema(schema);
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
fire: true
|
|
49
|
+
});
|
|
50
|
+
return unsubscribe;
|
|
51
|
+
}
|
|
52
|
+
}, [
|
|
53
|
+
schemas,
|
|
54
|
+
typename,
|
|
55
|
+
db
|
|
56
|
+
]);
|
|
57
|
+
const objects = useQuery(db, cardSchema ? Filter.type(cardSchema) : Filter.nothing());
|
|
58
|
+
const filteredObjects = useGlobalFilteredObjects(objects);
|
|
59
|
+
return /* @__PURE__ */ React.createElement(MasonryComponent.Root, {
|
|
60
|
+
items: filteredObjects,
|
|
61
|
+
render: Item,
|
|
62
|
+
classNames: "is-full max-is-full bs-full max-bs-full overflow-y-auto p-4"
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var Item = ({ data }) => {
|
|
66
|
+
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.Surface, {
|
|
67
|
+
role: "card--content",
|
|
68
|
+
limit: 1,
|
|
69
|
+
data: {
|
|
70
|
+
subject: data
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
76
|
+
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactSurface, [
|
|
77
|
+
Surface2.create({
|
|
78
|
+
id: meta.id,
|
|
79
|
+
role: [
|
|
80
|
+
"article",
|
|
81
|
+
"section"
|
|
82
|
+
],
|
|
83
|
+
filter: (data) => Obj2.instanceOf(Masonry_exports.Masonry, data.subject) || Obj2.instanceOf(View.View, data.subject),
|
|
84
|
+
component: ({ data, role }) => {
|
|
85
|
+
const view = Obj2.instanceOf(View.View, data.subject) ? data.subject : data.subject.view;
|
|
86
|
+
return /* @__PURE__ */ React2.createElement(MasonryContainer, {
|
|
87
|
+
view,
|
|
88
|
+
role
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
])));
|
|
93
|
+
export {
|
|
94
|
+
react_surface_default as default
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=react-surface-XG56AMA7.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 { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\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(Capabilities.ReactSurface, [\n Surface.create({\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 { Surface, useCapabilities } from '@dxos/app-framework/ui';\nimport { AppCapabilities } from '@dxos/app-toolkit';\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: _role,\n}: {\n view: View.View | Ref.Ref<View.View>;\n role?: string;\n}) => {\n const [view] = useObject(viewOrRef);\n const schemas = useCapabilities(AppCapabilities.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.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,cAAcC,kBAAkB;AACzC,SAASC,WAAAA,gBAAe;AACxB,SAASC,OAAAA,YAAW;AACpB,SAASC,YAAY;;;ACLrB,OAAOC,SAASC,WAAWC,gBAAgB;AAE3C,SAASC,SAASC,uBAAuB;AACzC,SAASC,uBAAuB;AAChC,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,MAAMC,MAAK,MAIZ;AACC,QAAM,CAACH,IAAAA,IAAQI,UAAUH,SAAAA;AACzB,QAAMI,UAAUC,gBAAgBC,gBAAgBC,MAAM;AACtD,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,eAAehB,QAAQiB,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;IAACvB;IAASO;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,QAAQA,SAAO;IAAClD,MAAK;IAAgBmD,OAAO;IAAGR,MAAM;MAAES,SAAST;IAAK;;AAG5E;;;AD9DA,IAAA,wBAAeU,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,aAAaC,cAAc;EAChDC,SAAQC,OAAO;IACbC,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", "Capabilities", "Capability", "Surface", "Obj", "View", "React", "useEffect", "useState", "Surface", "useCapabilities", "AppCapabilities", "Filter", "Obj", "Type", "useGlobalFilteredObjects", "useObject", "useQuery", "Masonry", "MasonryComponent", "Card", "getTypenameFromQuery", "MasonryContainer", "view", "viewOrRef", "role", "_role", "useObject", "schemas", "useCapabilities", "AppCapabilities", "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", "Capabilities", "ReactSurface", "Surface", "create", "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-YNA44I6R.mjs";
|
|
6
|
+
export {
|
|
7
|
+
Masonry_exports as Masonry,
|
|
8
|
+
MasonryAction_exports as MasonryAction
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasonryPlugin.d.ts","sourceRoot":"","sources":["../../../src/MasonryPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAW7C,eAAO,MAAM,aAAa,4BAoBzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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,iJAAmE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ReactSurface>>, never, never>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;;AAS/D,wBAeE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Ref } from '@dxos/echo';
|
|
3
|
+
import { type View } from '@dxos/schema';
|
|
4
|
+
export type MasonryContainerProps = {
|
|
5
|
+
view: View.View;
|
|
6
|
+
role?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const MasonryContainer: ({ view: viewOrRef, role: _role, }: {
|
|
9
|
+
view: View.View | Ref.Ref<View.View>;
|
|
10
|
+
role?: string;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=MasonryContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,mCAG9B;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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: () => React.JSX.Element | null;
|
|
6
|
+
render: () => React.JSX.Element;
|
|
7
|
+
decorators: import("@storybook/react").Decorator[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
//# sourceMappingURL=MasonryContainer.stories.d.ts.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AAEvB,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const translations: [{
|
|
2
|
+
readonly 'en-US': {
|
|
3
|
+
readonly [x: string]: {
|
|
4
|
+
readonly 'typename label': "Masonry";
|
|
5
|
+
readonly 'typename label_zero': "Masonries";
|
|
6
|
+
readonly 'typename label_one': "Masonry";
|
|
7
|
+
readonly 'typename label_other': "Masonries";
|
|
8
|
+
readonly 'object name placeholder': "New masonry";
|
|
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
|
+
} | {
|
|
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;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}];
|
|
26
|
+
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;EAkBM,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Obj, Type } from '@dxos/echo';
|
|
3
|
+
import { View } from '@dxos/schema';
|
|
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?: readonly {
|
|
8
|
+
readonly hidden?: boolean | undefined;
|
|
9
|
+
readonly 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
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Make a masonry as a view of a data set.
|
|
19
|
+
*/
|
|
20
|
+
export declare const make: ({ name, arrangement, view }: MakeProps) => Masonry;
|
|
21
|
+
export declare const MasonryV1: Type.Obj<{
|
|
22
|
+
readonly arrangement?: readonly {
|
|
23
|
+
readonly hidden?: boolean | undefined;
|
|
24
|
+
readonly ids: readonly string[];
|
|
25
|
+
}[] | undefined;
|
|
26
|
+
}, Schema.Struct.Fields>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Masonry.d.ts.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC"}
|