@dxos/plugin-masonry 0.8.4-main.422d1c7879 → 0.8.4-main.51f1e5ca51
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/index.mjs +10 -36
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +30 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -1
- package/dist/lib/browser/types/index.mjs.map +3 -3
- package/dist/lib/node-esm/index.mjs +10 -36
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/translations.mjs +31 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +3 -1
- package/dist/lib/node-esm/types/index.mjs.map +3 -3
- package/dist/types/src/MasonryPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/containers/MasonryContainer/MasonryContainer.d.ts.map +1 -1
- package/dist/types/src/containers/MasonryContainer/MasonryContainer.stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +10 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Masonry.d.ts +2 -2
- package/dist/types/src/types/Masonry.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -29
- package/src/MasonryPlugin.tsx +2 -3
- package/src/types/Masonry.ts +1 -1
|
@@ -20,46 +20,20 @@ import * as Effect from "effect/Effect";
|
|
|
20
20
|
import * as Option from "effect/Option";
|
|
21
21
|
import { Plugin } from "@dxos/app-framework";
|
|
22
22
|
import { AppPlugin } from "@dxos/app-toolkit";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
23
|
+
import { Operation } from "@dxos/compute";
|
|
24
|
+
import { Annotation, Type } from "@dxos/echo";
|
|
25
25
|
import { SpaceOperation } from "@dxos/plugin-space/operations";
|
|
26
26
|
import { ViewModel } from "@dxos/schema";
|
|
27
27
|
import { ReactSurface } from "#capabilities";
|
|
28
|
-
import { meta as meta3 } from "#meta";
|
|
29
|
-
import { Masonry as Masonry2, MasonryAction } from "#types";
|
|
30
|
-
|
|
31
|
-
// src/translations.ts
|
|
32
|
-
import { Type } from "@dxos/echo";
|
|
33
28
|
import { meta as meta2 } from "#meta";
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"en-US": {
|
|
38
|
-
[Type.getTypename(Masonry.Masonry)]: {
|
|
39
|
-
"typename.label": "Masonry",
|
|
40
|
-
"typename.label_zero": "Masonries",
|
|
41
|
-
"typename.label_one": "Masonry",
|
|
42
|
-
"typename.label_other": "Masonries",
|
|
43
|
-
"object-name.placeholder": "New masonry",
|
|
44
|
-
"add-object.label": "Add masonry",
|
|
45
|
-
"rename-object.label": "Rename masonry",
|
|
46
|
-
"delete-object.label": "Delete masonry",
|
|
47
|
-
"object-deleted.label": "Masonry deleted"
|
|
48
|
-
},
|
|
49
|
-
[meta2.id]: {
|
|
50
|
-
"plugin.name": "Masonry"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
];
|
|
55
|
-
|
|
56
|
-
// src/MasonryPlugin.tsx
|
|
57
|
-
var MasonryPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
29
|
+
import { translations } from "#translations";
|
|
30
|
+
import { Masonry, MasonryAction } from "#types";
|
|
31
|
+
var MasonryPlugin = Plugin.define(meta2).pipe(AppPlugin.addMetadataModule({
|
|
58
32
|
metadata: {
|
|
59
|
-
id:
|
|
33
|
+
id: Type.getTypename(Masonry.Masonry),
|
|
60
34
|
metadata: {
|
|
61
|
-
icon: Annotation.IconAnnotation.get(
|
|
62
|
-
iconHue: Annotation.IconAnnotation.get(
|
|
35
|
+
icon: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).icon,
|
|
36
|
+
iconHue: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).hue ?? "white",
|
|
63
37
|
inputSchema: MasonryAction.MasonryProps,
|
|
64
38
|
createObject: (props, options) => Effect.gen(function* () {
|
|
65
39
|
const object = yield* Effect.promise(async () => {
|
|
@@ -67,7 +41,7 @@ var MasonryPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
|
67
41
|
db: options.db,
|
|
68
42
|
typename: props.typename
|
|
69
43
|
});
|
|
70
|
-
return
|
|
44
|
+
return Masonry.make({
|
|
71
45
|
name: props.name,
|
|
72
46
|
view
|
|
73
47
|
});
|
|
@@ -83,7 +57,7 @@ var MasonryPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
|
83
57
|
}
|
|
84
58
|
}), AppPlugin.addSchemaModule({
|
|
85
59
|
schema: [
|
|
86
|
-
|
|
60
|
+
Masonry.Masonry
|
|
87
61
|
]
|
|
88
62
|
}), AppPlugin.addSurfaceModule({
|
|
89
63
|
activate: ReactSurface
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts", "../../../src/MasonryPlugin.tsx"
|
|
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: 'org.dxos.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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport {
|
|
5
|
-
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/MasonryPlugin.tsx"],
|
|
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: 'org.dxos.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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Annotation, Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { ViewModel } 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: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).hue ?? 'white',\n inputSchema: MasonryAction.MasonryProps,\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = yield* Effect.promise(async () => {\n const { view } = await ViewModel.makeFromDatabase({ db: options.db, typename: props.typename });\n return Masonry.make({ name: props.name, view });\n });\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\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"],
|
|
5
|
+
"mappings": ";;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa,CAAA;AACf;;;ACdA,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,YAAY;AACjC,SAASC,sBAAsB;AAE/B,SAASC,iBAAiB;AAE1B,SAASC,oBAAoB;AAC7B,SAASC,QAAAA,aAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,SAASC,qBAAqB;AAEhC,IAAMC,gBAAgBZ,OAAOa,OAAOL,KAAAA,EAAMM,KAC/Cb,UAAUc,kBAAkB;EAC1BC,UAAU;IACRC,IAAIb,KAAKc,YAAYR,QAAQA,OAAO;IACpCM,UAAU;MACRG,MAAMhB,WAAWiB,eAAeC,IAAIX,QAAQA,OAAO,EAAEI,KAAYQ,iBAAU,EAAEH;MAC7EI,SAASpB,WAAWiB,eAAeC,IAAIX,QAAQA,OAAO,EAAEI,KAAYQ,iBAAU,EAAEE,OAAO;MACvFC,aAAad,cAAce;MAC3BC,cAAe,CAACC,OAAOC,YACdC,WAAI,aAAA;AACT,cAAMC,SAAS,OAAcC,eAAQ,YAAA;AACnC,gBAAM,EAAEC,KAAI,IAAK,MAAM3B,UAAU4B,iBAAiB;YAAEC,IAAIN,QAAQM;YAAIC,UAAUR,MAAMQ;UAAS,CAAA;AAC7F,iBAAO1B,QAAQ2B,KAAK;YAAEC,MAAMV,MAAMU;YAAML;UAAK,CAAA;QAC/C,CAAA;AACA,eAAO,OAAO/B,UAAUqC,OAAOlC,eAAemC,WAAW;UACvDT;UACAU,QAAQZ,QAAQY;UAChBC,QAAQ;UACRC,cAAcd,QAAQc;QACxB,CAAA;MACF,CAAA;IACJ;EACF;AACF,CAAA,GACA1C,UAAU2C,gBAAgB;EAAEC,QAAQ;IAACnC,QAAQA;;AAAS,CAAA,GACtDT,UAAU6C,iBAAiB;EAAEC,UAAUxC;AAAa,CAAA,GACpDN,UAAU+C,sBAAsB;EAAEvC;AAAa,CAAA,GAC/CT,OAAOqC,IAAI;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "icon", "iconHue", "source", "screenshots", "Effect", "Option", "Plugin", "AppPlugin", "Operation", "Annotation", "Type", "SpaceOperation", "ViewModel", "ReactSurface", "meta", "translations", "Masonry", "MasonryAction", "MasonryPlugin", "define", "pipe", "addMetadataModule", "metadata", "id", "getTypename", "icon", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "inputSchema", "MasonryProps", "createObject", "props", "options", "gen", "object", "promise", "view", "makeFromDatabase", "db", "typename", "make", "name", "invoke", "AddObject", "target", "hidden", "targetNodeId", "addSchemaModule", "schema", "addSurfaceModule", "activate", "addTranslationsModule"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1885,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/MasonryPlugin.tsx":{"bytes":7313,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","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/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":473,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/MasonryPlugin.tsx","kind":"import-statement","original":"./MasonryPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":2723,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Masonry.ts":{"bytes":4815,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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":2149,"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":616,"imports":[{"path":"src/types/Masonry.ts","kind":"import-statement","original":"./Masonry"},{"path":"src/types/MasonryAction.ts","kind":"import-statement","original":"./MasonryAction"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4572},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","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/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["MasonryPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":482},"src/index.ts":{"bytesInOutput":0},"src/MasonryPlugin.tsx":{"bytesInOutput":1725}},"bytes":2351},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1326},"dist/lib/browser/translations.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":674}},"bytes":798},"dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3600},"dist/lib/browser/types/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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":["Masonry","MasonryAction"],"entryPoint":"src/types/index.ts","inputs":{"src/types/Masonry.ts":{"bytesInOutput":1051},"src/types/index.ts":{"bytesInOutput":0},"src/types/MasonryAction.ts":{"bytesInOutput":596}},"bytes":1873},"dist/lib/browser/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/browser/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/translations.ts
|
|
4
|
+
import { Type } from "@dxos/echo";
|
|
5
|
+
import { meta } from "#meta";
|
|
6
|
+
import { Masonry } from "#types";
|
|
7
|
+
var translations = [
|
|
8
|
+
{
|
|
9
|
+
"en-US": {
|
|
10
|
+
[Type.getTypename(Masonry.Masonry)]: {
|
|
11
|
+
"typename.label": "Masonry",
|
|
12
|
+
"typename.label_zero": "Masonries",
|
|
13
|
+
"typename.label_one": "Masonry",
|
|
14
|
+
"typename.label_other": "Masonries",
|
|
15
|
+
"object-name.placeholder": "New masonry",
|
|
16
|
+
"add-object.label": "Add masonry",
|
|
17
|
+
"rename-object.label": "Rename masonry",
|
|
18
|
+
"delete-object.label": "Delete masonry",
|
|
19
|
+
"object-deleted.label": "Masonry deleted"
|
|
20
|
+
},
|
|
21
|
+
[meta.id]: {
|
|
22
|
+
"plugin.name": "Masonry"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
export {
|
|
28
|
+
translations
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\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 'add-object.label': 'Add 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,SAASA,YAAY;AAGrB,SAASC,YAAY;AACrB,SAASC,eAAe;AAEjB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACH,KAAKI,YAAYF,QAAQA,OAAO,CAAA,GAAI;QACnC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACD,KAAKI,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;",
|
|
6
|
+
"names": ["Type", "meta", "Masonry", "translations", "getTypename", "id"]
|
|
7
|
+
}
|
|
@@ -25,7 +25,9 @@ var Masonry = Schema.Struct({
|
|
|
25
25
|
version: "0.1.0"
|
|
26
26
|
}), LabelAnnotation.set([
|
|
27
27
|
"name"
|
|
28
|
-
]), ViewAnnotation.set(
|
|
28
|
+
]), ViewAnnotation.set([
|
|
29
|
+
"view"
|
|
30
|
+
]), Annotation.IconAnnotation.set({
|
|
29
31
|
icon: "ph--wall--regular",
|
|
30
32
|
hue: "green"
|
|
31
33
|
}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 { Annotation, Obj, Ref, Type } from '@dxos/echo';\nimport { View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { ViewAnnotation } from '@dxos/schema';\n\nexport const Masonry = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Ref.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: 'org.dxos.type.masonry',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(
|
|
5
|
-
"mappings": ";;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;AAC3C,SAASC,YAAY;AACrB,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,sBAAsB;AAExB,IAAMC,UAAiBC,cAAO;EACnCC,MAAaC,cAAOC,KAAYC,eAAQ;EAExCC,
|
|
6
|
-
"names": ["Schema", "Annotation", "Obj", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "Masonry", "Struct", "name", "String", "pipe", "optional", "view", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Obj, Ref, Type } from '@dxos/echo';\nimport { View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { ViewAnnotation } from '@dxos/schema';\n\nexport const Masonry = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Ref.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: 'org.dxos.type.masonry',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(['view']),\n Annotation.IconAnnotation.set({\n icon: 'ph--wall--regular',\n hue: 'green',\n }),\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// 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 }),\n Schema.optional,\n ),\n});\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;AAC3C,SAASC,YAAY;AACrB,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,sBAAsB;AAExB,IAAMC,UAAiBC,cAAO;EACnCC,MAAaC,cAAOC,KAAYC,eAAQ;EAExCC,MAAMZ,IAAIA,IAAIE,KAAKA,IAAI,EAAEQ,KAAKP,oBAAoBU,IAAI,KAAA,CAAA;EAEtDC,aAAoBC,aACXR,cAAO;IACZS,KAAYD,aAAMhB,IAAIkB,EAAE;IACxBC,QAAeP,gBAAgBQ,cAAO;EACxC,CAAA,CAAA,EACAT,KAAKP,oBAAoBU,IAAI,KAAA,GAAeF,eAAQ;AAExD,CAAA,EAAGD,KACDT,KAAKmB,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAlB,gBAAgBS,IAAI;EAAC;CAAO,GAC5BR,eAAeQ,IAAI;EAAC;CAAO,GAC3Bf,WAAWyB,eAAeV,IAAI;EAC5BW,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAYK,IAAMC,OAAO,CAAC,EAAElB,MAAMM,cAAc,CAAA,GAAIF,KAAI,MAAa;AAC9D,SAAOb,IAAI2B,KAAKpB,SAAS;IAAEE;IAAMI,MAAMZ,IAAI0B,KAAKd,IAAAA;IAAOE;EAAY,CAAA;AACrE;;;AC/CA;;;;AAIA,YAAYa,aAAY;AAExB,SAASC,kCAAkC;AAEpC,IAAMC,eAAsBC,eAAO;EACxCC,MAAaC,iBAAgBC,cAAM;;EAEnCC,UAAiBD,eAAOE,KACfC,oBAAY;IAAEC,OAAO;EAAmB,CAAA,GAC/CT,2BAA2BU,IAAI;IAC7BC,UAAU;MAAC;MAAY;;IACvBC,MAAM;MAAC;;EACT,CAAA,GACOR,gBAAQ;AAEnB,CAAA;",
|
|
6
|
+
"names": ["Schema", "Annotation", "Obj", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "Masonry", "Struct", "name", "String", "pipe", "optional", "view", "set", "arrangement", "Array", "ids", "ID", "hidden", "Boolean", "object", "typename", "version", "IconAnnotation", "icon", "hue", "make", "Schema", "TypeInputOptionsAnnotation", "MasonryProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "set", "location", "kind"]
|
|
7
7
|
}
|
|
@@ -21,46 +21,20 @@ import * as Effect from "effect/Effect";
|
|
|
21
21
|
import * as Option from "effect/Option";
|
|
22
22
|
import { Plugin } from "@dxos/app-framework";
|
|
23
23
|
import { AppPlugin } from "@dxos/app-toolkit";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
24
|
+
import { Operation } from "@dxos/compute";
|
|
25
|
+
import { Annotation, Type } from "@dxos/echo";
|
|
26
26
|
import { SpaceOperation } from "@dxos/plugin-space/operations";
|
|
27
27
|
import { ViewModel } from "@dxos/schema";
|
|
28
28
|
import { ReactSurface } from "#capabilities";
|
|
29
|
-
import { meta as meta3 } from "#meta";
|
|
30
|
-
import { Masonry as Masonry2, MasonryAction } from "#types";
|
|
31
|
-
|
|
32
|
-
// src/translations.ts
|
|
33
|
-
import { Type } from "@dxos/echo";
|
|
34
29
|
import { meta as meta2 } from "#meta";
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"en-US": {
|
|
39
|
-
[Type.getTypename(Masonry.Masonry)]: {
|
|
40
|
-
"typename.label": "Masonry",
|
|
41
|
-
"typename.label_zero": "Masonries",
|
|
42
|
-
"typename.label_one": "Masonry",
|
|
43
|
-
"typename.label_other": "Masonries",
|
|
44
|
-
"object-name.placeholder": "New masonry",
|
|
45
|
-
"add-object.label": "Add masonry",
|
|
46
|
-
"rename-object.label": "Rename masonry",
|
|
47
|
-
"delete-object.label": "Delete masonry",
|
|
48
|
-
"object-deleted.label": "Masonry deleted"
|
|
49
|
-
},
|
|
50
|
-
[meta2.id]: {
|
|
51
|
-
"plugin.name": "Masonry"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
// src/MasonryPlugin.tsx
|
|
58
|
-
var MasonryPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
30
|
+
import { translations } from "#translations";
|
|
31
|
+
import { Masonry, MasonryAction } from "#types";
|
|
32
|
+
var MasonryPlugin = Plugin.define(meta2).pipe(AppPlugin.addMetadataModule({
|
|
59
33
|
metadata: {
|
|
60
|
-
id:
|
|
34
|
+
id: Type.getTypename(Masonry.Masonry),
|
|
61
35
|
metadata: {
|
|
62
|
-
icon: Annotation.IconAnnotation.get(
|
|
63
|
-
iconHue: Annotation.IconAnnotation.get(
|
|
36
|
+
icon: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).icon,
|
|
37
|
+
iconHue: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).hue ?? "white",
|
|
64
38
|
inputSchema: MasonryAction.MasonryProps,
|
|
65
39
|
createObject: (props, options) => Effect.gen(function* () {
|
|
66
40
|
const object = yield* Effect.promise(async () => {
|
|
@@ -68,7 +42,7 @@ var MasonryPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
|
68
42
|
db: options.db,
|
|
69
43
|
typename: props.typename
|
|
70
44
|
});
|
|
71
|
-
return
|
|
45
|
+
return Masonry.make({
|
|
72
46
|
name: props.name,
|
|
73
47
|
view
|
|
74
48
|
});
|
|
@@ -84,7 +58,7 @@ var MasonryPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
|
|
|
84
58
|
}
|
|
85
59
|
}), AppPlugin.addSchemaModule({
|
|
86
60
|
schema: [
|
|
87
|
-
|
|
61
|
+
Masonry.Masonry
|
|
88
62
|
]
|
|
89
63
|
}), AppPlugin.addSurfaceModule({
|
|
90
64
|
activate: ReactSurface
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts", "../../../src/MasonryPlugin.tsx"
|
|
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: 'org.dxos.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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport {
|
|
5
|
-
"mappings": ";;;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../src/MasonryPlugin.tsx"],
|
|
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: 'org.dxos.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", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Annotation, Type } from '@dxos/echo';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\nimport { type CreateObject } from '@dxos/plugin-space/types';\nimport { ViewModel } 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: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(Masonry.Masonry).pipe(Option.getOrThrow).hue ?? 'white',\n inputSchema: MasonryAction.MasonryProps,\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const object = yield* Effect.promise(async () => {\n const { view } = await ViewModel.makeFromDatabase({ db: options.db, typename: props.typename });\n return Masonry.make({ name: props.name, view });\n });\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\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"],
|
|
5
|
+
"mappings": ";;;;AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,aAAa,CAAA;AACf;;;ACdA,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,YAAYC,YAAY;AACjC,SAASC,sBAAsB;AAE/B,SAASC,iBAAiB;AAE1B,SAASC,oBAAoB;AAC7B,SAASC,QAAAA,aAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,SAASC,qBAAqB;AAEhC,IAAMC,gBAAgBZ,OAAOa,OAAOL,KAAAA,EAAMM,KAC/Cb,UAAUc,kBAAkB;EAC1BC,UAAU;IACRC,IAAIb,KAAKc,YAAYR,QAAQA,OAAO;IACpCM,UAAU;MACRG,MAAMhB,WAAWiB,eAAeC,IAAIX,QAAQA,OAAO,EAAEI,KAAYQ,iBAAU,EAAEH;MAC7EI,SAASpB,WAAWiB,eAAeC,IAAIX,QAAQA,OAAO,EAAEI,KAAYQ,iBAAU,EAAEE,OAAO;MACvFC,aAAad,cAAce;MAC3BC,cAAe,CAACC,OAAOC,YACdC,WAAI,aAAA;AACT,cAAMC,SAAS,OAAcC,eAAQ,YAAA;AACnC,gBAAM,EAAEC,KAAI,IAAK,MAAM3B,UAAU4B,iBAAiB;YAAEC,IAAIN,QAAQM;YAAIC,UAAUR,MAAMQ;UAAS,CAAA;AAC7F,iBAAO1B,QAAQ2B,KAAK;YAAEC,MAAMV,MAAMU;YAAML;UAAK,CAAA;QAC/C,CAAA;AACA,eAAO,OAAO/B,UAAUqC,OAAOlC,eAAemC,WAAW;UACvDT;UACAU,QAAQZ,QAAQY;UAChBC,QAAQ;UACRC,cAAcd,QAAQc;QACxB,CAAA;MACF,CAAA;IACJ;EACF;AACF,CAAA,GACA1C,UAAU2C,gBAAgB;EAAEC,QAAQ;IAACnC,QAAQA;;AAAS,CAAA,GACtDT,UAAU6C,iBAAiB;EAAEC,UAAUxC;AAAa,CAAA,GACpDN,UAAU+C,sBAAsB;EAAEvC;AAAa,CAAA,GAC/CT,OAAOqC,IAAI;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "icon", "iconHue", "source", "screenshots", "Effect", "Option", "Plugin", "AppPlugin", "Operation", "Annotation", "Type", "SpaceOperation", "ViewModel", "ReactSurface", "meta", "translations", "Masonry", "MasonryAction", "MasonryPlugin", "define", "pipe", "addMetadataModule", "metadata", "id", "getTypename", "icon", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "inputSchema", "MasonryProps", "createObject", "props", "options", "gen", "object", "promise", "view", "makeFromDatabase", "db", "typename", "make", "name", "invoke", "AddObject", "target", "hidden", "targetNodeId", "addSchemaModule", "schema", "addSurfaceModule", "activate", "addTranslationsModule"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/meta.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1885,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/MasonryPlugin.tsx":{"bytes":7313,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","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/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":473,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/MasonryPlugin.tsx","kind":"import-statement","original":"./MasonryPlugin"}],"format":"esm"},"src/translations.ts":{"bytes":2723,"imports":[{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/types/Masonry.ts":{"bytes":4815,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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":2149,"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":616,"imports":[{"path":"src/types/Masonry.ts","kind":"import-statement","original":"./Masonry"},{"path":"src/types/MasonryAction.ts","kind":"import-statement","original":"./MasonryAction"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4573},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Option","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/compute","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/operations","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#capabilities","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#translations","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["MasonryPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/meta.ts":{"bytesInOutput":482},"src/index.ts":{"bytesInOutput":0},"src/MasonryPlugin.tsx":{"bytesInOutput":1725}},"bytes":2443},"dist/lib/node-esm/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1327},"dist/lib/node-esm/translations.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#meta","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":674}},"bytes":890},"dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3601},"dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-HSLMI22Q.mjs","kind":"import-statement"},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","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":["Masonry","MasonryAction"],"entryPoint":"src/types/index.ts","inputs":{"src/types/Masonry.ts":{"bytesInOutput":1051},"src/types/index.ts":{"bytesInOutput":0},"src/types/MasonryAction.ts":{"bytesInOutput":596}},"bytes":1965},"dist/lib/node-esm/chunk-HSLMI22Q.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/chunk-HSLMI22Q.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":327}}}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import "./chunk-HSLMI22Q.mjs";
|
|
3
|
+
|
|
4
|
+
// src/translations.ts
|
|
5
|
+
import { Type } from "@dxos/echo";
|
|
6
|
+
import { meta } from "#meta";
|
|
7
|
+
import { Masonry } from "#types";
|
|
8
|
+
var translations = [
|
|
9
|
+
{
|
|
10
|
+
"en-US": {
|
|
11
|
+
[Type.getTypename(Masonry.Masonry)]: {
|
|
12
|
+
"typename.label": "Masonry",
|
|
13
|
+
"typename.label_zero": "Masonries",
|
|
14
|
+
"typename.label_one": "Masonry",
|
|
15
|
+
"typename.label_other": "Masonries",
|
|
16
|
+
"object-name.placeholder": "New masonry",
|
|
17
|
+
"add-object.label": "Add masonry",
|
|
18
|
+
"rename-object.label": "Rename masonry",
|
|
19
|
+
"delete-object.label": "Delete masonry",
|
|
20
|
+
"object-deleted.label": "Masonry deleted"
|
|
21
|
+
},
|
|
22
|
+
[meta.id]: {
|
|
23
|
+
"plugin.name": "Masonry"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
export {
|
|
29
|
+
translations
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=translations.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\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 'add-object.label': 'Add 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,SAASA,YAAY;AAGrB,SAASC,YAAY;AACrB,SAASC,eAAe;AAEjB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACH,KAAKI,YAAYF,QAAQA,OAAO,CAAA,GAAI;QACnC,kBAAkB;QAClB,uBAAuB;QACvB,sBAAsB;QACtB,wBAAwB;QACxB,2BAA2B;QAC3B,oBAAoB;QACpB,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;MAC1B;MACA,CAACD,KAAKI,EAAE,GAAG;QACT,eAAe;MACjB;IACF;EACF;;",
|
|
6
|
+
"names": ["Type", "meta", "Masonry", "translations", "getTypename", "id"]
|
|
7
|
+
}
|
|
@@ -26,7 +26,9 @@ var Masonry = Schema.Struct({
|
|
|
26
26
|
version: "0.1.0"
|
|
27
27
|
}), LabelAnnotation.set([
|
|
28
28
|
"name"
|
|
29
|
-
]), ViewAnnotation.set(
|
|
29
|
+
]), ViewAnnotation.set([
|
|
30
|
+
"view"
|
|
31
|
+
]), Annotation.IconAnnotation.set({
|
|
30
32
|
icon: "ph--wall--regular",
|
|
31
33
|
hue: "green"
|
|
32
34
|
}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 { Annotation, Obj, Ref, Type } from '@dxos/echo';\nimport { View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { ViewAnnotation } from '@dxos/schema';\n\nexport const Masonry = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Ref.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: 'org.dxos.type.masonry',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(
|
|
5
|
-
"mappings": ";;;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;AAC3C,SAASC,YAAY;AACrB,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,sBAAsB;AAExB,IAAMC,UAAiBC,cAAO;EACnCC,MAAaC,cAAOC,KAAYC,eAAQ;EAExCC,
|
|
6
|
-
"names": ["Schema", "Annotation", "Obj", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "Masonry", "Struct", "name", "String", "pipe", "optional", "view", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Obj, Ref, Type } from '@dxos/echo';\nimport { View } from '@dxos/echo';\nimport { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';\nimport { ViewAnnotation } from '@dxos/schema';\n\nexport const Masonry = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n\n view: Ref.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: 'org.dxos.type.masonry',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n ViewAnnotation.set(['view']),\n Annotation.IconAnnotation.set({\n icon: 'ph--wall--regular',\n hue: 'green',\n }),\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// 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 }),\n Schema.optional,\n ),\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;AAAA;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,KAAKC,KAAKC,YAAY;AAC3C,SAASC,YAAY;AACrB,SAASC,qBAAqBC,uBAAuB;AACrD,SAASC,sBAAsB;AAExB,IAAMC,UAAiBC,cAAO;EACnCC,MAAaC,cAAOC,KAAYC,eAAQ;EAExCC,MAAMZ,IAAIA,IAAIE,KAAKA,IAAI,EAAEQ,KAAKP,oBAAoBU,IAAI,KAAA,CAAA;EAEtDC,aAAoBC,aACXR,cAAO;IACZS,KAAYD,aAAMhB,IAAIkB,EAAE;IACxBC,QAAeP,gBAAgBQ,cAAO;EACxC,CAAA,CAAA,EACAT,KAAKP,oBAAoBU,IAAI,KAAA,GAAeF,eAAQ;AAExD,CAAA,EAAGD,KACDT,KAAKmB,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAlB,gBAAgBS,IAAI;EAAC;CAAO,GAC5BR,eAAeQ,IAAI;EAAC;CAAO,GAC3Bf,WAAWyB,eAAeV,IAAI;EAC5BW,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAYK,IAAMC,OAAO,CAAC,EAAElB,MAAMM,cAAc,CAAA,GAAIF,KAAI,MAAa;AAC9D,SAAOb,IAAI2B,KAAKpB,SAAS;IAAEE;IAAMI,MAAMZ,IAAI0B,KAAKd,IAAAA;IAAOE;EAAY,CAAA;AACrE;;;AC/CA;;;;AAIA,YAAYa,aAAY;AAExB,SAASC,kCAAkC;AAEpC,IAAMC,eAAsBC,eAAO;EACxCC,MAAaC,iBAAgBC,cAAM;;EAEnCC,UAAiBD,eAAOE,KACfC,oBAAY;IAAEC,OAAO;EAAmB,CAAA,GAC/CT,2BAA2BU,IAAI;IAC7BC,UAAU;MAAC;MAAY;;IACvBC,MAAM;MAAC;;EACT,CAAA,GACOR,gBAAQ;AAEnB,CAAA;",
|
|
6
|
+
"names": ["Schema", "Annotation", "Obj", "Ref", "Type", "View", "FormInputAnnotation", "LabelAnnotation", "ViewAnnotation", "Masonry", "Struct", "name", "String", "pipe", "optional", "view", "set", "arrangement", "Array", "ids", "ID", "hidden", "Boolean", "object", "typename", "version", "IconAnnotation", "icon", "hue", "make", "Schema", "TypeInputOptionsAnnotation", "MasonryProps", "Struct", "name", "optional", "String", "typename", "pipe", "annotations", "title", "set", "location", "kind"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryPlugin.d.ts","sourceRoot":"","sources":["../../../src/MasonryPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"MasonryPlugin.d.ts","sourceRoot":"","sources":["../../../src/MasonryPlugin.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAa7C,eAAO,MAAM,aAAa,4BA4BzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryContainer.d.ts","sourceRoot":"","sources":["../../../../../src/containers/MasonryContainer/MasonryContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAkC,KAAK,GAAG,EAAQ,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AASvC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MasonryContainer.d.ts","sourceRoot":"","sources":["../../../../../src/containers/MasonryContainer/MasonryContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAkC,KAAK,GAAG,EAAQ,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AASvC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,gBAAgB,sCAG1B;IACD,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,sBAgEA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasonryContainer.stories.d.ts","sourceRoot":"","sources":["../../../../../src/containers/MasonryContainer/MasonryContainer.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA6B1B,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"MasonryContainer.stories.d.ts","sourceRoot":"","sources":["../../../../../src/containers/MasonryContainer/MasonryContainer.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAC;AA6B1B,QAAA,MAAM,IAAI;;;;;;QAkCN,MAAM;;CAEM,CAAC;eAEF,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
export declare const translations: [{
|
|
2
2
|
readonly 'en-US': {
|
|
3
3
|
readonly [x: string]: {
|
|
4
|
-
readonly 'typename.label':
|
|
5
|
-
readonly 'typename.label_zero':
|
|
6
|
-
readonly 'typename.label_one':
|
|
7
|
-
readonly 'typename.label_other':
|
|
8
|
-
readonly 'object-name.placeholder':
|
|
9
|
-
readonly 'add-object.label':
|
|
10
|
-
readonly 'rename-object.label':
|
|
11
|
-
readonly 'delete-object.label':
|
|
12
|
-
readonly 'object-deleted.label':
|
|
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 'add-object.label': 'Add masonry';
|
|
10
|
+
readonly 'rename-object.label': 'Rename masonry';
|
|
11
|
+
readonly 'delete-object.label': 'Delete masonry';
|
|
12
|
+
readonly 'object-deleted.label': 'Masonry deleted';
|
|
13
13
|
readonly 'plugin.name'?: undefined;
|
|
14
14
|
} | {
|
|
15
|
-
readonly 'plugin.name': "Masonry";
|
|
16
15
|
readonly 'typename.label'?: undefined;
|
|
17
16
|
readonly 'typename.label_zero'?: undefined;
|
|
18
17
|
readonly 'typename.label_one'?: undefined;
|
|
@@ -22,6 +21,7 @@ export declare const translations: [{
|
|
|
22
21
|
readonly 'rename-object.label'?: undefined;
|
|
23
22
|
readonly 'delete-object.label'?: undefined;
|
|
24
23
|
readonly 'object-deleted.label'?: undefined;
|
|
24
|
+
readonly 'plugin.name': 'Masonry';
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY;;;uCAIC,SAAS;4CACJ,WAAW;2CACZ,SAAS;6CACP,WAAW;gDACR,aAAa;yCACpB,aAAa;4CACV,gBAAgB;4CAChB,gBAAgB;6CACf,iBAAiB;;;;;;;;;;;;oCAG1B,SAAS;;;EAID,CAAC"}
|
|
@@ -2,11 +2,11 @@ import * as Schema from 'effect/Schema';
|
|
|
2
2
|
import { Obj, Type } from '@dxos/echo';
|
|
3
3
|
import { View } from '@dxos/echo';
|
|
4
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
5
|
readonly name?: string | undefined;
|
|
6
|
+
readonly view: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & View.View>;
|
|
7
7
|
readonly arrangement?: readonly {
|
|
8
|
-
readonly hidden?: boolean | undefined;
|
|
9
8
|
readonly ids: readonly string[];
|
|
9
|
+
readonly hidden?: boolean | undefined;
|
|
10
10
|
}[] | undefined;
|
|
11
11
|
}, Schema.Struct.Fields>;
|
|
12
12
|
export interface Masonry extends Schema.Schema.Type<typeof Masonry> {
|
|
@@ -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,EAAc,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,eAAO,MAAM,OAAO;;;;;;;wBAuBnB,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,
|
|
1
|
+
{"version":3,"file":"Masonry.d.ts","sourceRoot":"","sources":["../../../../src/types/Masonry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAc,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,eAAO,MAAM,OAAO;;;;;;;wBAuBnB,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,gCAAsC,SAAS,KAAG,OAElE,CAAC"}
|