@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
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
Copyright (c) 2022 DXOS
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @dxos/plugin-masonry
|
|
2
|
+
|
|
3
|
+
A masonry plugin.
|
|
4
|
+
|
|
5
|
+
## DXOS Resources
|
|
6
|
+
|
|
7
|
+
- [Website](https://dxos.org)
|
|
8
|
+
- [Developer Documentation](https://docs.dxos.org)
|
|
9
|
+
- Talk to us on [Discord](https://dxos.org/discord)
|
|
10
|
+
|
|
11
|
+
## Contributions
|
|
12
|
+
|
|
13
|
+
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
14
|
+
|
|
15
|
+
License: [MIT](./LICENSE) Copyright 2023 © DXOS
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// src/types/Masonry.ts
|
|
8
|
+
var Masonry_exports = {};
|
|
9
|
+
__export(Masonry_exports, {
|
|
10
|
+
Masonry: () => Masonry,
|
|
11
|
+
MasonryV1: () => MasonryV1,
|
|
12
|
+
make: () => make
|
|
13
|
+
});
|
|
14
|
+
import * as Schema from "effect/Schema";
|
|
15
|
+
import { Obj, Ref, Type } from "@dxos/echo";
|
|
16
|
+
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
|
|
17
|
+
import { View, ViewAnnotation } from "@dxos/schema";
|
|
18
|
+
var Masonry = Schema.Struct({
|
|
19
|
+
name: Schema.String.pipe(Schema.optional),
|
|
20
|
+
view: Type.Ref(View.View).pipe(FormInputAnnotation.set(false)),
|
|
21
|
+
arrangement: Schema.Array(Schema.Struct({
|
|
22
|
+
ids: Schema.Array(Obj.ID),
|
|
23
|
+
hidden: Schema.optional(Schema.Boolean)
|
|
24
|
+
})).pipe(FormInputAnnotation.set(false), Schema.optional)
|
|
25
|
+
}).pipe(Type.object({
|
|
26
|
+
typename: "dxos.org/type/Masonry",
|
|
27
|
+
version: "0.2.0"
|
|
28
|
+
}), LabelAnnotation.set([
|
|
29
|
+
"name"
|
|
30
|
+
]), ViewAnnotation.set(true));
|
|
31
|
+
var make = ({ name, arrangement = [], view }) => {
|
|
32
|
+
return Obj.make(Masonry, {
|
|
33
|
+
name,
|
|
34
|
+
view: Ref.make(view),
|
|
35
|
+
arrangement
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var MasonryV1 = Schema.Struct({
|
|
39
|
+
arrangement: Schema.Array(Schema.Struct({
|
|
40
|
+
ids: Schema.Array(Obj.ID),
|
|
41
|
+
hidden: Schema.optional(Schema.Boolean)
|
|
42
|
+
})).pipe(Schema.optional)
|
|
43
|
+
}).pipe(Type.object({
|
|
44
|
+
typename: "dxos.org/type/Masonry",
|
|
45
|
+
version: "0.1.0"
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
// src/types/MasonryAction.ts
|
|
49
|
+
var MasonryAction_exports = {};
|
|
50
|
+
__export(MasonryAction_exports, {
|
|
51
|
+
MasonryProps: () => MasonryProps
|
|
52
|
+
});
|
|
53
|
+
import * as Schema2 from "effect/Schema";
|
|
54
|
+
import { TypeInputOptionsAnnotation } from "@dxos/plugin-space/types";
|
|
55
|
+
var MasonryProps = Schema2.Struct({
|
|
56
|
+
name: Schema2.optional(Schema2.String),
|
|
57
|
+
// TODO(wittjosiah): This should be a query input instead.
|
|
58
|
+
typename: Schema2.String.pipe(Schema2.annotations({
|
|
59
|
+
title: "Select card type"
|
|
60
|
+
}), TypeInputOptionsAnnotation.set({
|
|
61
|
+
location: [
|
|
62
|
+
"database",
|
|
63
|
+
"runtime"
|
|
64
|
+
],
|
|
65
|
+
kind: [
|
|
66
|
+
"user"
|
|
67
|
+
],
|
|
68
|
+
registered: [
|
|
69
|
+
"registered"
|
|
70
|
+
]
|
|
71
|
+
}), Schema2.optional)
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
Masonry_exports,
|
|
76
|
+
MasonryAction_exports
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=chunk-S5JKAK4O.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/Masonry.ts", "../../../src/types/MasonryAction.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { View, ViewAnnotation } from '@dxos/schema';\n\nexport const Masonry = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Type.Ref(View.View).pipe(FormInputAnnotation.set(false)),\n\n arrangement: Schema.Array(\n Schema.Struct({\n ids: Schema.Array(Obj.ID),\n hidden: Schema.optional(Schema.Boolean),\n }),\n ).pipe(FormInputAnnotation.set(false), Schema.optional),\n // TODO(wittjosiah): Consider Masonry supporting not being just a view but referencing arbitrary data directly.\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Masonry',\n version: '0.2.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(true),\n);\n\nexport interface Masonry extends Schema.Schema.Type<typeof Masonry> {}\n\ntype MakeProps = Omit<Partial<Obj.MakeProps<typeof Masonry>>, 'view'> & {\n view: View.View;\n};\n\n/**\n * Make a masonry as a view of a data set.\n */\nexport const make = ({ name, arrangement = [], view }: MakeProps): Masonry => {\n return Obj.make(Masonry, { name, view: Ref.make(view), arrangement });\n};\n\n//\n// V1\n//\n\nexport const MasonryV1 = Schema.Struct({\n arrangement: Schema.Array(\n Schema.Struct({\n ids: Schema.Array(Obj.ID),\n hidden: Schema.optional(Schema.Boolean),\n }),\n ).pipe(Schema.optional),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Masonry',\n version: '0.1.0',\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { TypeInputOptionsAnnotation } from '@dxos/plugin-space/types';\n\nexport const MasonryProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): This should be a query input instead.\n typename: Schema.String.pipe(\n Schema.annotations({ title: 'Select card type' }),\n TypeInputOptionsAnnotation.set({\n location: ['database', 'runtime'],\n kind: ['user'],\n registered: ['registered'],\n }),\n Schema.optional,\n ),\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAAA;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,KAAKC,YAAY;AAC/B,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,MAAMC,sBAAsB;AAE9B,IAAMC,UAAiBC,cAAO;EACnCC,MAAaC,cAAOC,KAAYC,eAAQ;EAExCC,MAAMC,KAAKC,IAAIC,KAAKA,IAAI,EAAEL,KAAKM,oBAAoBC,IAAI,KAAA,CAAA;EAEvDC,aAAoBC,aACXZ,cAAO;IACZa,KAAYD,aAAME,IAAIC,EAAE;IACxBC,QAAeZ,gBAAgBa,cAAO;EACxC,CAAA,CAAA,EACAd,KAAKM,oBAAoBC,IAAI,KAAA,GAAeN,eAAQ;AAExD,CAAA,EAAGD,KACDG,KAAKY,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBX,IAAI;EAAC;CAAO,GAC5BY,eAAeZ,IAAI,IAAA,CAAA;AAYd,IAAMa,OAAO,CAAC,EAAEtB,MAAMU,cAAc,CAAA,GAAIN,KAAI,MAAa;AAC9D,SAAOS,IAAIS,KAAKxB,SAAS;IAAEE;IAAMI,MAAME,IAAIgB,KAAKlB,IAAAA;IAAOM;EAAY,CAAA;AACrE;AAMO,IAAMa,YAAmBxB,cAAO;EACrCW,aAAoBC,aACXZ,cAAO;IACZa,KAAYD,aAAME,IAAIC,EAAE;IACxBC,QAAeZ,gBAAgBa,cAAO;EACxC,CAAA,CAAA,EACAd,KAAYC,eAAQ;AACxB,CAAA,EAAGD,KACDG,KAAKY,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;;;AC3DF;;;;AAIA,YAAYK,aAAY;AAExB,SAASC,kCAAkC;AAEpC,IAAMC,eAAsBC,eAAO;EACxCC,MAAaC,iBAAgBC,cAAM;;EAEnCC,UAAiBD,eAAOE,KACfC,oBAAY;IAAEC,OAAO;EAAmB,CAAA,GAC/CC,2BAA2BC,IAAI;IAC7BC,UAAU;MAAC;MAAY;;IACvBC,MAAM;MAAC;;IACPC,YAAY;MAAC;;EACf,CAAA,GACOV,gBAAQ;AAEnB,CAAA;",
|
|
6
|
+
"names": ["Schema", "Obj", "Ref", "Type", "FormInputAnnotation", "LabelAnnotation", "View", "ViewAnnotation", "Masonry", "Struct", "name", "String", "pipe", "optional", "view", "Type", "Ref", "View", "FormInputAnnotation", "set", "arrangement", "Array", "ids", "Obj", "ID", "hidden", "Boolean", "object", "typename", "version", "LabelAnnotation", "ViewAnnotation", "make", "MasonryV1", "Schema", "TypeInputOptionsAnnotation", "MasonryProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "TypeInputOptionsAnnotation", "set", "location", "kind", "registered"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "dxos.org/plugin/masonry",
|
|
5
|
+
name: "Masonry",
|
|
6
|
+
description: trim`
|
|
7
|
+
Responsive grid layout that displays query results in an adaptive masonry pattern.
|
|
8
|
+
Visualize collections of cards, images, or mixed content that automatically adjusts to available screen space.
|
|
9
|
+
`,
|
|
10
|
+
icon: "ph--wall--regular",
|
|
11
|
+
iconHue: "green",
|
|
12
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-masonry",
|
|
13
|
+
screenshots: []
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
meta
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chunk-U46AGJ2D.mjs.map
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-U46AGJ2D.mjs";
|
|
4
|
+
import {
|
|
5
|
+
MasonryAction_exports,
|
|
6
|
+
Masonry_exports
|
|
7
|
+
} from "./chunk-S5JKAK4O.mjs";
|
|
8
|
+
|
|
9
|
+
// src/MasonryPlugin.tsx
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import { Plugin } from "@dxos/app-framework";
|
|
12
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
13
|
+
import { Type as Type2 } from "@dxos/echo";
|
|
14
|
+
import { View } from "@dxos/schema";
|
|
15
|
+
|
|
16
|
+
// src/capabilities/react-surface/index.ts
|
|
17
|
+
import { Capability } from "@dxos/app-framework";
|
|
18
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-QKCNQ7HF.mjs"));
|
|
19
|
+
|
|
20
|
+
// src/translations.ts
|
|
21
|
+
import { Type } from "@dxos/echo";
|
|
22
|
+
var translations = [
|
|
23
|
+
{
|
|
24
|
+
"en-US": {
|
|
25
|
+
[Type.getTypename(Masonry_exports.Masonry)]: {
|
|
26
|
+
"typename label": "Masonry",
|
|
27
|
+
"typename label_zero": "Masonries",
|
|
28
|
+
"typename label_one": "Masonry",
|
|
29
|
+
"typename label_other": "Masonries",
|
|
30
|
+
"object name placeholder": "New masonry",
|
|
31
|
+
"rename object label": "Rename masonry",
|
|
32
|
+
"delete object label": "Delete masonry",
|
|
33
|
+
"object deleted label": "Masonry deleted"
|
|
34
|
+
},
|
|
35
|
+
[meta.id]: {
|
|
36
|
+
"plugin name": "Masonry"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
// src/MasonryPlugin.tsx
|
|
43
|
+
var MasonryPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
|
|
44
|
+
metadata: {
|
|
45
|
+
id: Type2.getTypename(Masonry_exports.Masonry),
|
|
46
|
+
metadata: {
|
|
47
|
+
icon: "ph--wall--regular",
|
|
48
|
+
iconHue: "green",
|
|
49
|
+
inputSchema: MasonryAction_exports.MasonryProps,
|
|
50
|
+
createObject: (props, { db }) => Effect.promise(async () => {
|
|
51
|
+
const { view } = await View.makeFromDatabase({
|
|
52
|
+
db,
|
|
53
|
+
typename: props.typename
|
|
54
|
+
});
|
|
55
|
+
return Masonry_exports.make({
|
|
56
|
+
name: props.name,
|
|
57
|
+
view
|
|
58
|
+
});
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}), AppPlugin.addSchemaModule({
|
|
63
|
+
schema: [
|
|
64
|
+
Masonry_exports.Masonry
|
|
65
|
+
]
|
|
66
|
+
}), AppPlugin.addSurfaceModule({
|
|
67
|
+
activate: ReactSurface
|
|
68
|
+
}), AppPlugin.addTranslationsModule({
|
|
69
|
+
translations
|
|
70
|
+
}), Plugin.make);
|
|
71
|
+
export {
|
|
72
|
+
MasonryPlugin,
|
|
73
|
+
meta
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
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 { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\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 AppPlugin.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 AppPlugin.addSchemaModule({ schema: [Masonry.Masonry] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\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,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,QAAAA,aAAY;AAErB,SAASC,YAAY;;;ACNrB,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;;;;AFVK,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,kBAAkB;EAC1BC,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,GACAhB,UAAUsB,gBAAgB;EAAEC,QAAQ;IAACjB,gBAAQA;;AAAS,CAAA,GACtDN,UAAUwB,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpD1B,UAAU2B,sBAAsB;EAAEC;AAAa,CAAA,GAC/ChC,OAAOwB,IAAI;",
|
|
6
|
+
"names": ["Effect", "Plugin", "AppPlugin", "Type", "View", "Capability", "ReactSurface", "Capability", "lazy", "Type", "translations", "Type", "getTypename", "Masonry", "meta", "id", "MasonryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "Type", "getTypename", "Masonry", "icon", "iconHue", "inputSchema", "MasonryAction", "MasonryProps", "createObject", "props", "db", "promise", "view", "View", "makeFromDatabase", "typename", "make", "name", "addSchemaModule", "schema", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations"]
|
|
7
|
+
}
|
|
@@ -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/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4055},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-U46AGJ2D.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-S5JKAK4O.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/browser/react-surface-QKCNQ7HF.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":2029},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-S5JKAK4O.mjs","kind":"import-statement"}],"exports":["Masonry","MasonryAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":202},"dist/lib/browser/react-surface-QKCNQ7HF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6943},"dist/lib/browser/react-surface-QKCNQ7HF.mjs":{"imports":[{"path":"dist/lib/browser/chunk-U46AGJ2D.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-S5JKAK4O.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":3467},"dist/lib/browser/chunk-U46AGJ2D.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":948},"dist/lib/browser/chunk-U46AGJ2D.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":482}},"bytes":561},"dist/lib/browser/chunk-S5JKAK4O.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4067},"dist/lib/browser/chunk-S5JKAK4O.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":2178}}}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-U46AGJ2D.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Masonry_exports
|
|
6
|
+
} from "./chunk-S5JKAK4O.mjs";
|
|
7
|
+
|
|
8
|
+
// src/capabilities/react-surface/react-surface.tsx
|
|
9
|
+
import * as Effect from "effect/Effect";
|
|
10
|
+
import React2 from "react";
|
|
11
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
12
|
+
import { Surface as Surface2 } from "@dxos/app-framework/ui";
|
|
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 { Surface, useCapabilities } from "@dxos/app-framework/ui";
|
|
19
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
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: _role }) => {
|
|
27
|
+
const [view] = useObject(viewOrRef);
|
|
28
|
+
const schemas = useCapabilities(AppCapabilities.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.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(Capabilities.ReactSurface, [
|
|
76
|
+
Surface2.create({
|
|
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-QKCNQ7HF.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,21 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/meta.ts
|
|
4
|
+
import { trim } from "@dxos/util";
|
|
5
|
+
var meta = {
|
|
6
|
+
id: "dxos.org/plugin/masonry",
|
|
7
|
+
name: "Masonry",
|
|
8
|
+
description: trim`
|
|
9
|
+
Responsive grid layout that displays query results in an adaptive masonry pattern.
|
|
10
|
+
Visualize collections of cards, images, or mixed content that automatically adjusts to available screen space.
|
|
11
|
+
`,
|
|
12
|
+
icon: "ph--wall--regular",
|
|
13
|
+
iconHue: "green",
|
|
14
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-masonry",
|
|
15
|
+
screenshots: []
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
meta
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-P6EZJITS.mjs.map
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __export = (target, all) => {
|
|
4
|
+
for (var name in all)
|
|
5
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
// src/types/Masonry.ts
|
|
9
|
+
var Masonry_exports = {};
|
|
10
|
+
__export(Masonry_exports, {
|
|
11
|
+
Masonry: () => Masonry,
|
|
12
|
+
MasonryV1: () => MasonryV1,
|
|
13
|
+
make: () => make
|
|
14
|
+
});
|
|
15
|
+
import * as Schema from "effect/Schema";
|
|
16
|
+
import { Obj, Ref, Type } from "@dxos/echo";
|
|
17
|
+
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/internal";
|
|
18
|
+
import { View, ViewAnnotation } from "@dxos/schema";
|
|
19
|
+
var Masonry = Schema.Struct({
|
|
20
|
+
name: Schema.String.pipe(Schema.optional),
|
|
21
|
+
view: Type.Ref(View.View).pipe(FormInputAnnotation.set(false)),
|
|
22
|
+
arrangement: Schema.Array(Schema.Struct({
|
|
23
|
+
ids: Schema.Array(Obj.ID),
|
|
24
|
+
hidden: Schema.optional(Schema.Boolean)
|
|
25
|
+
})).pipe(FormInputAnnotation.set(false), Schema.optional)
|
|
26
|
+
}).pipe(Type.object({
|
|
27
|
+
typename: "dxos.org/type/Masonry",
|
|
28
|
+
version: "0.2.0"
|
|
29
|
+
}), LabelAnnotation.set([
|
|
30
|
+
"name"
|
|
31
|
+
]), ViewAnnotation.set(true));
|
|
32
|
+
var make = ({ name, arrangement = [], view }) => {
|
|
33
|
+
return Obj.make(Masonry, {
|
|
34
|
+
name,
|
|
35
|
+
view: Ref.make(view),
|
|
36
|
+
arrangement
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var MasonryV1 = Schema.Struct({
|
|
40
|
+
arrangement: Schema.Array(Schema.Struct({
|
|
41
|
+
ids: Schema.Array(Obj.ID),
|
|
42
|
+
hidden: Schema.optional(Schema.Boolean)
|
|
43
|
+
})).pipe(Schema.optional)
|
|
44
|
+
}).pipe(Type.object({
|
|
45
|
+
typename: "dxos.org/type/Masonry",
|
|
46
|
+
version: "0.1.0"
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
// src/types/MasonryAction.ts
|
|
50
|
+
var MasonryAction_exports = {};
|
|
51
|
+
__export(MasonryAction_exports, {
|
|
52
|
+
MasonryProps: () => MasonryProps
|
|
53
|
+
});
|
|
54
|
+
import * as Schema2 from "effect/Schema";
|
|
55
|
+
import { TypeInputOptionsAnnotation } from "@dxos/plugin-space/types";
|
|
56
|
+
var MasonryProps = Schema2.Struct({
|
|
57
|
+
name: Schema2.optional(Schema2.String),
|
|
58
|
+
// TODO(wittjosiah): This should be a query input instead.
|
|
59
|
+
typename: Schema2.String.pipe(Schema2.annotations({
|
|
60
|
+
title: "Select card type"
|
|
61
|
+
}), TypeInputOptionsAnnotation.set({
|
|
62
|
+
location: [
|
|
63
|
+
"database",
|
|
64
|
+
"runtime"
|
|
65
|
+
],
|
|
66
|
+
kind: [
|
|
67
|
+
"user"
|
|
68
|
+
],
|
|
69
|
+
registered: [
|
|
70
|
+
"registered"
|
|
71
|
+
]
|
|
72
|
+
}), Schema2.optional)
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
Masonry_exports,
|
|
77
|
+
MasonryAction_exports
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=chunk-YNA44I6R.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/Masonry.ts", "../../../src/types/MasonryAction.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { View, ViewAnnotation } from '@dxos/schema';\n\nexport const Masonry = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Type.Ref(View.View).pipe(FormInputAnnotation.set(false)),\n\n arrangement: Schema.Array(\n Schema.Struct({\n ids: Schema.Array(Obj.ID),\n hidden: Schema.optional(Schema.Boolean),\n }),\n ).pipe(FormInputAnnotation.set(false), Schema.optional),\n // TODO(wittjosiah): Consider Masonry supporting not being just a view but referencing arbitrary data directly.\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Masonry',\n version: '0.2.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(true),\n);\n\nexport interface Masonry extends Schema.Schema.Type<typeof Masonry> {}\n\ntype MakeProps = Omit<Partial<Obj.MakeProps<typeof Masonry>>, 'view'> & {\n view: View.View;\n};\n\n/**\n * Make a masonry as a view of a data set.\n */\nexport const make = ({ name, arrangement = [], view }: MakeProps): Masonry => {\n return Obj.make(Masonry, { name, view: Ref.make(view), arrangement });\n};\n\n//\n// V1\n//\n\nexport const MasonryV1 = Schema.Struct({\n arrangement: Schema.Array(\n Schema.Struct({\n ids: Schema.Array(Obj.ID),\n hidden: Schema.optional(Schema.Boolean),\n }),\n ).pipe(Schema.optional),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Masonry',\n version: '0.1.0',\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { TypeInputOptionsAnnotation } from '@dxos/plugin-space/types';\n\nexport const MasonryProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): This should be a query input instead.\n typename: Schema.String.pipe(\n Schema.annotations({ title: 'Select card type' }),\n TypeInputOptionsAnnotation.set({\n location: ['database', 'runtime'],\n kind: ['user'],\n registered: ['registered'],\n }),\n Schema.optional,\n ),\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAAA;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,KAAKC,KAAKC,YAAY;AAC/B,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,MAAMC,sBAAsB;AAE9B,IAAMC,UAAiBC,cAAO;EACnCC,MAAaC,cAAOC,KAAYC,eAAQ;EAExCC,MAAMC,KAAKC,IAAIC,KAAKA,IAAI,EAAEL,KAAKM,oBAAoBC,IAAI,KAAA,CAAA;EAEvDC,aAAoBC,aACXZ,cAAO;IACZa,KAAYD,aAAME,IAAIC,EAAE;IACxBC,QAAeZ,gBAAgBa,cAAO;EACxC,CAAA,CAAA,EACAd,KAAKM,oBAAoBC,IAAI,KAAA,GAAeN,eAAQ;AAExD,CAAA,EAAGD,KACDG,KAAKY,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,gBAAgBX,IAAI;EAAC;CAAO,GAC5BY,eAAeZ,IAAI,IAAA,CAAA;AAYd,IAAMa,OAAO,CAAC,EAAEtB,MAAMU,cAAc,CAAA,GAAIN,KAAI,MAAa;AAC9D,SAAOS,IAAIS,KAAKxB,SAAS;IAAEE;IAAMI,MAAME,IAAIgB,KAAKlB,IAAAA;IAAOM;EAAY,CAAA;AACrE;AAMO,IAAMa,YAAmBxB,cAAO;EACrCW,aAAoBC,aACXZ,cAAO;IACZa,KAAYD,aAAME,IAAIC,EAAE;IACxBC,QAAeZ,gBAAgBa,cAAO;EACxC,CAAA,CAAA,EACAd,KAAYC,eAAQ;AACxB,CAAA,EAAGD,KACDG,KAAKY,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,CAAA;;;AC3DF;;;;AAIA,YAAYK,aAAY;AAExB,SAASC,kCAAkC;AAEpC,IAAMC,eAAsBC,eAAO;EACxCC,MAAaC,iBAAgBC,cAAM;;EAEnCC,UAAiBD,eAAOE,KACfC,oBAAY;IAAEC,OAAO;EAAmB,CAAA,GAC/CC,2BAA2BC,IAAI;IAC7BC,UAAU;MAAC;MAAY;;IACvBC,MAAM;MAAC;;IACPC,YAAY;MAAC;;EACf,CAAA,GACOV,gBAAQ;AAEnB,CAAA;",
|
|
6
|
+
"names": ["Schema", "Obj", "Ref", "Type", "FormInputAnnotation", "LabelAnnotation", "View", "ViewAnnotation", "Masonry", "Struct", "name", "String", "pipe", "optional", "view", "Type", "Ref", "View", "FormInputAnnotation", "set", "arrangement", "Array", "ids", "Obj", "ID", "hidden", "Boolean", "object", "typename", "version", "LabelAnnotation", "ViewAnnotation", "make", "MasonryV1", "Schema", "TypeInputOptionsAnnotation", "MasonryProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "TypeInputOptionsAnnotation", "set", "location", "kind", "registered"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
meta
|
|
4
|
+
} from "./chunk-P6EZJITS.mjs";
|
|
5
|
+
import {
|
|
6
|
+
MasonryAction_exports,
|
|
7
|
+
Masonry_exports
|
|
8
|
+
} from "./chunk-YNA44I6R.mjs";
|
|
9
|
+
|
|
10
|
+
// src/MasonryPlugin.tsx
|
|
11
|
+
import * as Effect from "effect/Effect";
|
|
12
|
+
import { Plugin } from "@dxos/app-framework";
|
|
13
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
14
|
+
import { Type as Type2 } from "@dxos/echo";
|
|
15
|
+
import { View } from "@dxos/schema";
|
|
16
|
+
|
|
17
|
+
// src/capabilities/react-surface/index.ts
|
|
18
|
+
import { Capability } from "@dxos/app-framework";
|
|
19
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("./react-surface-XG56AMA7.mjs"));
|
|
20
|
+
|
|
21
|
+
// src/translations.ts
|
|
22
|
+
import { Type } from "@dxos/echo";
|
|
23
|
+
var translations = [
|
|
24
|
+
{
|
|
25
|
+
"en-US": {
|
|
26
|
+
[Type.getTypename(Masonry_exports.Masonry)]: {
|
|
27
|
+
"typename label": "Masonry",
|
|
28
|
+
"typename label_zero": "Masonries",
|
|
29
|
+
"typename label_one": "Masonry",
|
|
30
|
+
"typename label_other": "Masonries",
|
|
31
|
+
"object name placeholder": "New masonry",
|
|
32
|
+
"rename object label": "Rename masonry",
|
|
33
|
+
"delete object label": "Delete masonry",
|
|
34
|
+
"object deleted label": "Masonry deleted"
|
|
35
|
+
},
|
|
36
|
+
[meta.id]: {
|
|
37
|
+
"plugin name": "Masonry"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
// src/MasonryPlugin.tsx
|
|
44
|
+
var MasonryPlugin = Plugin.define(meta).pipe(AppPlugin.addMetadataModule({
|
|
45
|
+
metadata: {
|
|
46
|
+
id: Type2.getTypename(Masonry_exports.Masonry),
|
|
47
|
+
metadata: {
|
|
48
|
+
icon: "ph--wall--regular",
|
|
49
|
+
iconHue: "green",
|
|
50
|
+
inputSchema: MasonryAction_exports.MasonryProps,
|
|
51
|
+
createObject: (props, { db }) => Effect.promise(async () => {
|
|
52
|
+
const { view } = await View.makeFromDatabase({
|
|
53
|
+
db,
|
|
54
|
+
typename: props.typename
|
|
55
|
+
});
|
|
56
|
+
return Masonry_exports.make({
|
|
57
|
+
name: props.name,
|
|
58
|
+
view
|
|
59
|
+
});
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}), AppPlugin.addSchemaModule({
|
|
64
|
+
schema: [
|
|
65
|
+
Masonry_exports.Masonry
|
|
66
|
+
]
|
|
67
|
+
}), AppPlugin.addSurfaceModule({
|
|
68
|
+
activate: ReactSurface
|
|
69
|
+
}), AppPlugin.addTranslationsModule({
|
|
70
|
+
translations
|
|
71
|
+
}), Plugin.make);
|
|
72
|
+
export {
|
|
73
|
+
MasonryPlugin,
|
|
74
|
+
meta
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
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 { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\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 AppPlugin.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 AppPlugin.addSchemaModule({ schema: [Masonry.Masonry] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\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,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,QAAAA,aAAY;AAErB,SAASC,YAAY;;;ACNrB,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;;;;AFVK,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,kBAAkB;EAC1BC,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,GACAhB,UAAUsB,gBAAgB;EAAEC,QAAQ;IAACjB,gBAAQA;;AAAS,CAAA,GACtDN,UAAUwB,iBAAiB;EAAEC,UAAUC;AAAa,CAAA,GACpD1B,UAAU2B,sBAAsB;EAAEC;AAAa,CAAA,GAC/ChC,OAAOwB,IAAI;",
|
|
6
|
+
"names": ["Effect", "Plugin", "AppPlugin", "Type", "View", "Capability", "ReactSurface", "Capability", "lazy", "Type", "translations", "Type", "getTypename", "Masonry", "meta", "id", "MasonryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "Type", "getTypename", "Masonry", "icon", "iconHue", "inputSchema", "MasonryAction", "MasonryProps", "createObject", "props", "db", "promise", "view", "View", "makeFromDatabase", "typename", "make", "name", "addSchemaModule", "schema", "addSurfaceModule", "activate", "ReactSurface", "addTranslationsModule", "translations"]
|
|
7
|
+
}
|