@dxos/plugin-masonry 0.8.4-staging.60fe92afc8 → 0.9.1-main.c7dcc2e112

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.
Files changed (32) hide show
  1. package/PLUGIN.mdl +5 -5
  2. package/dist/lib/neutral/{MasonryContainer-7CXOATRR.mjs → MasonryContainer-VPNOQ32X.mjs} +10 -8
  3. package/dist/lib/neutral/MasonryContainer-VPNOQ32X.mjs.map +7 -0
  4. package/dist/lib/neutral/MasonryPlugin.mjs +3 -3
  5. package/dist/lib/neutral/MasonryPlugin.mjs.map +4 -4
  6. package/dist/lib/neutral/{chunk-IJ2FIXSI.mjs → chunk-U6BPS6LO.mjs} +21 -12
  7. package/dist/lib/neutral/chunk-U6BPS6LO.mjs.map +7 -0
  8. package/dist/lib/neutral/containers/index.mjs +1 -1
  9. package/dist/lib/neutral/index.mjs +1 -1
  10. package/dist/lib/neutral/meta.json +1 -1
  11. package/dist/lib/neutral/meta.mjs +1 -1
  12. package/dist/lib/neutral/plugin.mjs +1 -1
  13. package/dist/lib/neutral/translations.mjs +1 -1
  14. package/dist/lib/neutral/translations.mjs.map +3 -3
  15. package/dist/types/dx.config.d.ts +28 -0
  16. package/dist/types/dx.config.d.ts.map +1 -0
  17. package/dist/types/src/capabilities/index.d.ts +2 -7
  18. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  19. package/dist/types/src/capabilities/react-surface.d.ts +2 -2
  20. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  21. package/dist/types/src/meta.d.ts +28 -2
  22. package/dist/types/src/meta.d.ts.map +1 -1
  23. package/dist/types/tsconfig.tsbuildinfo +1 -1
  24. package/dx.config.ts +31 -0
  25. package/package.json +26 -25
  26. package/src/MasonryPlugin.test.ts +1 -1
  27. package/src/MasonryPlugin.tsx +1 -1
  28. package/src/containers/MasonryContainer/MasonryContainer.tsx +11 -7
  29. package/src/meta.ts +2 -24
  30. package/src/translations.ts +1 -1
  31. package/dist/lib/neutral/MasonryContainer-7CXOATRR.mjs.map +0 -7
  32. package/dist/lib/neutral/chunk-IJ2FIXSI.mjs.map +0 -7
package/PLUGIN.mdl CHANGED
@@ -62,7 +62,7 @@ component MasonryContainer
62
62
  objects: EchoObject[] # live query results
63
63
  results: EchoObject[] # search-filtered subset of objects
64
64
  slots:
65
- card?: ReactNode # injected via AppSurface.Card per object
65
+ card?: ReactNode # injected via AppSurface.CardContent per object
66
66
  actions:
67
67
  handleSearch(query: string) # filters results client-side
68
68
  layout: |
@@ -89,14 +89,14 @@ component Item
89
89
  icon: string # resolved from schema IconAnnotation
90
90
  objectMenuItems: MenuItem[] # contributed by other plugins
91
91
  slots:
92
- cardBody?: ReactNode # AppSurface.Card surface for the object
92
+ cardBody?: ReactNode # AppSurface.CardContent surface for the object
93
93
  actions:
94
94
  openMenu()
95
95
  layout: |
96
96
  ┌────────────────────────┐
97
97
  │ [icon] Label [⋮ menu] │ ← Card.Toolbar
98
98
  ├────────────────────────┤
99
- │ [cardBody slot] │ ← Surface.Surface(AppSurface.Card)
99
+ │ [cardBody slot] │ ← Surface.Surface(AppSurface.CardContent)
100
100
  └────────────────────────┘
101
101
  ```
102
102
 
@@ -174,7 +174,7 @@ feat F-4: Card Surface Delegation
174
174
 
175
175
  req F-4.1:
176
176
  when: an Item is rendered
177
- then: AppSurface.Card surface is opened for the object, allowing other
177
+ then: AppSurface.CardContent surface is opened for the object, allowing other
178
178
  plugins to supply rich card body content
179
179
 
180
180
  req F-4.2:
@@ -253,7 +253,7 @@ test T-6: Reactive update on peer write
253
253
 
254
254
  ```mdl
255
255
  test T-7: Card body delegated to Surface
256
- given: a plugin that provides AppSurface.Card for Note objects
256
+ given: a plugin that provides AppSurface.CardContent for Note objects
257
257
  when: a Note appears in the masonry grid
258
258
  then: the Note card renders the plugin-provided body below the Card.Toolbar
259
259
  ```
@@ -7,7 +7,7 @@ import { AppCapabilities } from "@dxos/app-toolkit";
7
7
  import { AppSurface, useObjectMenuItems, useSchemaFilter } from "@dxos/app-toolkit/ui";
8
8
  import { Filter, Obj, Query, Type } from "@dxos/echo";
9
9
  import { useObject, useQuery } from "@dxos/react-client/echo";
10
- import { Card, Panel, Toolbar } from "@dxos/react-ui";
10
+ import { Card, Icon, IconButton, Panel, Toolbar } from "@dxos/react-ui";
11
11
  import { Masonry as MasonryComponent } from "@dxos/react-ui-masonry";
12
12
  import { Menu } from "@dxos/react-ui-menu";
13
13
  import { SearchList, useSearchListResults } from "@dxos/react-ui-search";
@@ -68,22 +68,24 @@ var MasonryContainer = ({ view: viewOrRef, role: _role }) => {
68
68
  var Item = ({ data }) => {
69
69
  const objectMenuItems = useObjectMenuItems(data);
70
70
  const icon = Obj.getIcon(data)?.icon ?? "ph--circle-dashed--regular";
71
- return /* @__PURE__ */ React.createElement(Menu.Root, null, /* @__PURE__ */ React.createElement(Card.Root, null, /* @__PURE__ */ React.createElement(Card.Header, null, /* @__PURE__ */ React.createElement(Card.Icon, {
71
+ return /* @__PURE__ */ React.createElement(Menu.Root, null, /* @__PURE__ */ React.createElement(Card.Root, null, /* @__PURE__ */ React.createElement(Card.Header, null, /* @__PURE__ */ React.createElement(Card.Block, null, /* @__PURE__ */ React.createElement(Icon, {
72
72
  icon
73
- }), /* @__PURE__ */ React.createElement(Card.Title, null, Obj.getLabel(data, {
73
+ })), /* @__PURE__ */ React.createElement(Card.Title, null, Obj.getLabel(data, {
74
74
  fallback: "typename"
75
- })), /* @__PURE__ */ React.createElement(Menu.Trigger, {
75
+ })), /* @__PURE__ */ React.createElement(Card.Block, {
76
+ end: true
77
+ }, /* @__PURE__ */ React.createElement(Menu.Trigger, {
76
78
  asChild: true,
77
79
  disabled: !objectMenuItems?.length
78
- }, /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
80
+ }, /* @__PURE__ */ React.createElement(IconButton, {
79
81
  iconOnly: true,
80
82
  variant: "ghost",
81
83
  icon: "ph--dots-three-vertical--regular",
82
84
  label: "Actions"
83
85
  })), /* @__PURE__ */ React.createElement(Menu.Content, {
84
86
  items: objectMenuItems
85
- })), /* @__PURE__ */ React.createElement(Surface.Surface, {
86
- type: AppSurface.Card,
87
+ }))), /* @__PURE__ */ React.createElement(Surface.Surface, {
88
+ type: AppSurface.CardContent,
87
89
  limit: 1,
88
90
  data: {
89
91
  subject: data
@@ -93,4 +95,4 @@ var Item = ({ data }) => {
93
95
  export {
94
96
  MasonryContainer as default
95
97
  };
96
- //# sourceMappingURL=MasonryContainer-7CXOATRR.mjs.map
98
+ //# sourceMappingURL=MasonryContainer-VPNOQ32X.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/containers/MasonryContainer/MasonryContainer.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useEffect, useMemo, useState } from 'react';\n\nimport { Surface, useCapabilities } from '@dxos/app-framework/ui';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { AppSurface, useObjectMenuItems, useSchemaFilter } from '@dxos/app-toolkit/ui';\nimport { Filter, Obj, Query, type Ref, Type, type View } from '@dxos/echo';\nimport { useObject, useQuery } from '@dxos/react-client/echo';\nimport { Card, Icon, IconButton, Panel, Toolbar } from '@dxos/react-ui';\nimport { Masonry as MasonryComponent } from '@dxos/react-ui-masonry';\nimport { Menu } from '@dxos/react-ui-menu';\nimport { SearchList, useSearchListResults } from '@dxos/react-ui-search';\nimport { getTagFromQuery, getTypeURIFromQuery } from '@dxos/schema';\nimport { isNonNullable } from '@dxos/util';\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 typeUri = view?.query ? getTypeURIFromQuery(view.query.ast) : undefined;\n const tag = view?.query ? getTagFromQuery(view.query.ast) : undefined;\n\n const [cardSchema, setCardSchema] = useState<Type.AnyEntity>();\n\n useEffect(() => {\n const staticSchema = schemas.flat().find((schema) => Type.getURI(schema) === typeUri);\n if (staticSchema) {\n setCardSchema(() => staticSchema);\n return;\n }\n if (typeUri && db) {\n const findInRegistry = () =>\n db.graph.registry\n .list()\n .filter(Type.isType)\n .find((t) => Type.getURI(t) === typeUri);\n setCardSchema(() => findInRegistry());\n return db.graph.registry.changed.on(() => {\n setCardSchema(() => findInRegistry());\n });\n }\n setCardSchema(undefined);\n }, [schemas, typeUri, db]);\n\n const baseFilter = useSchemaFilter(cardSchema);\n const query = useMemo(\n () => (tag ? Query.select(baseFilter).select(Filter.tag(tag)) : Query.select(baseFilter)),\n [baseFilter, tag],\n );\n const objects = useQuery(db, query);\n\n const sortedObjects = useMemo(\n () =>\n objects.filter(isNonNullable).toSorted((a, b) => (Obj.getLabel(a) ?? '').localeCompare(Obj.getLabel(b) ?? '')),\n [objects],\n );\n\n const { results, handleSearch } = useSearchListResults({\n items: sortedObjects,\n extract: (obj) => Obj.getLabel(obj) ?? '',\n });\n\n return (\n <MasonryComponent.Root Tile={Item}>\n <SearchList.Root onSearch={handleSearch}>\n <Panel.Root>\n <Panel.Toolbar asChild>\n <Toolbar.Root>\n <SearchList.Input placeholder='Search...' />\n </Toolbar.Root>\n </Panel.Toolbar>\n <Panel.Content>\n <MasonryComponent.Content>\n <MasonryComponent.Viewport items={results} getId={(data: any) => data?.id} />\n </MasonryComponent.Content>\n </Panel.Content>\n </Panel.Root>\n </SearchList.Root>\n </MasonryComponent.Root>\n );\n};\n\nconst Item = ({ data }: { data: any }) => {\n const objectMenuItems = useObjectMenuItems(data);\n const icon = Obj.getIcon(data)?.icon ?? 'ph--circle-dashed--regular';\n\n return (\n <Menu.Root>\n <Card.Root>\n <Card.Header>\n <Card.Block>\n <Icon icon={icon} />\n </Card.Block>\n <Card.Title>{Obj.getLabel(data, { fallback: 'typename' })}</Card.Title>\n {/* TODO(wittjosiah): Reconcile with Card.Menu. */}\n <Card.Block end>\n <Menu.Trigger asChild disabled={!objectMenuItems?.length}>\n <IconButton iconOnly variant='ghost' icon='ph--dots-three-vertical--regular' label='Actions' />\n </Menu.Trigger>\n <Menu.Content items={objectMenuItems} />\n </Card.Block>\n </Card.Header>\n <Surface.Surface\n type={AppSurface.CardContent}\n limit={1}\n data={{ subject: data } satisfies AppSurface.ObjectCardData}\n />\n </Card.Root>\n </Menu.Root>\n );\n};\n"],
5
+ "mappings": ";;;AAIA,OAAOA,SAASC,WAAWC,SAASC,gBAAgB;AAEpD,SAASC,SAASC,uBAAuB;AACzC,SAASC,uBAAuB;AAChC,SAASC,YAAYC,oBAAoBC,uBAAuB;AAChE,SAASC,QAAQC,KAAKC,OAAiBC,YAAuB;AAC9D,SAASC,WAAWC,gBAAgB;AACpC,SAASC,MAAMC,MAAMC,YAAYC,OAAOC,eAAe;AACvD,SAASC,WAAWC,wBAAwB;AAC5C,SAASC,YAAY;AACrB,SAASC,YAAYC,4BAA4B;AACjD,SAASC,iBAAiBC,2BAA2B;AACrD,SAASC,qBAAqB;AAOvB,IAAMC,mBAAmB,CAAC,EAC/BC,MAAMC,WACNC,MAAMC,MAAK,MAIZ;AACC,QAAM,CAACH,IAAAA,IAAQhB,UAAUiB,SAAAA;AACzB,QAAMG,UAAU7B,gBAAgBC,gBAAgB6B,MAAM;AACtD,QAAMC,KAAKN,QAAQnB,IAAI0B,YAAYP,IAAAA;AACnC,QAAMQ,UAAUR,MAAMS,QAAQZ,oBAAoBG,KAAKS,MAAMC,GAAG,IAAIC;AACpE,QAAMC,MAAMZ,MAAMS,QAAQb,gBAAgBI,KAAKS,MAAMC,GAAG,IAAIC;AAE5D,QAAM,CAACE,YAAYC,aAAAA,IAAiBzC,SAAAA;AAEpCF,YAAU,MAAA;AACR,UAAM4C,eAAeX,QAAQY,KAAI,EAAGC,KAAK,CAACC,WAAWnC,KAAKoC,OAAOD,MAAAA,MAAYV,OAAAA;AAC7E,QAAIO,cAAc;AAChBD,oBAAc,MAAMC,YAAAA;AACpB;IACF;AACA,QAAIP,WAAWF,IAAI;AACjB,YAAMc,iBAAiB,MACrBd,GAAGe,MAAMC,SACNC,KAAI,EACJC,OAAOzC,KAAK0C,MAAM,EAClBR,KAAK,CAACS,MAAM3C,KAAKoC,OAAOO,CAAAA,MAAOlB,OAAAA;AACpCM,oBAAc,MAAMM,eAAAA,CAAAA;AACpB,aAAOd,GAAGe,MAAMC,SAASK,QAAQC,GAAG,MAAA;AAClCd,sBAAc,MAAMM,eAAAA,CAAAA;MACtB,CAAA;IACF;AACAN,kBAAcH,MAAAA;EAChB,GAAG;IAACP;IAASI;IAASF;GAAG;AAEzB,QAAMuB,aAAalD,gBAAgBkC,UAAAA;AACnC,QAAMJ,QAAQrC,QACZ,MAAOwC,MAAM9B,MAAMgD,OAAOD,UAAAA,EAAYC,OAAOlD,OAAOgC,IAAIA,GAAAA,CAAAA,IAAQ9B,MAAMgD,OAAOD,UAAAA,GAC7E;IAACA;IAAYjB;GAAI;AAEnB,QAAMmB,UAAU9C,SAASqB,IAAIG,KAAAA;AAE7B,QAAMuB,gBAAgB5D,QACpB,MACE2D,QAAQP,OAAO1B,aAAAA,EAAemC,SAAS,CAACC,GAAGC,OAAOtD,IAAIuD,SAASF,CAAAA,KAAM,IAAIG,cAAcxD,IAAIuD,SAASD,CAAAA,KAAM,EAAA,CAAA,GAC5G;IAACJ;GAAQ;AAGX,QAAM,EAAEO,SAASC,aAAY,IAAK5C,qBAAqB;IACrD6C,OAAOR;IACPS,SAAS,CAACC,QAAQ7D,IAAIuD,SAASM,GAAAA,KAAQ;EACzC,CAAA;AAEA,SACE,sBAAA,cAAClD,iBAAiBmD,MAAI;IAACC,MAAMC;KAC3B,sBAAA,cAACnD,WAAWiD,MAAI;IAACG,UAAUP;KACzB,sBAAA,cAAClD,MAAMsD,MAAI,MACT,sBAAA,cAACtD,MAAMC,SAAO;IAACyD,SAAAA;KACb,sBAAA,cAACzD,QAAQqD,MAAI,MACX,sBAAA,cAACjD,WAAWsD,OAAK;IAACC,aAAY;QAGlC,sBAAA,cAAC5D,MAAM6D,SAAO,MACZ,sBAAA,cAAC1D,iBAAiB0D,SAAO,MACvB,sBAAA,cAAC1D,iBAAiB2D,UAAQ;IAACX,OAAOF;IAASc,OAAO,CAACC,SAAcA,MAAMC;;AAOrF;AAEA,IAAMT,OAAO,CAAC,EAAEQ,KAAI,MAAiB;AACnC,QAAME,kBAAkB7E,mBAAmB2E,IAAAA;AAC3C,QAAMG,OAAO3E,IAAI4E,QAAQJ,IAAAA,GAAOG,QAAQ;AAExC,SACE,sBAAA,cAAC/D,KAAKkD,MAAI,MACR,sBAAA,cAACzD,KAAKyD,MAAI,MACR,sBAAA,cAACzD,KAAKwE,QAAM,MACV,sBAAA,cAACxE,KAAKyE,OAAK,MACT,sBAAA,cAACxE,MAAAA;IAAKqE;OAER,sBAAA,cAACtE,KAAK0E,OAAK,MAAE/E,IAAIuD,SAASiB,MAAM;IAAEQ,UAAU;EAAW,CAAA,CAAA,GAEvD,sBAAA,cAAC3E,KAAKyE,OAAK;IAACG,KAAAA;KACV,sBAAA,cAACrE,KAAKsE,SAAO;IAAChB,SAAAA;IAAQiB,UAAU,CAACT,iBAAiBU;KAChD,sBAAA,cAAC7E,YAAAA;IAAW8E,UAAAA;IAASC,SAAQ;IAAQX,MAAK;IAAmCY,OAAM;OAErF,sBAAA,cAAC3E,KAAKyD,SAAO;IAACV,OAAOe;QAGzB,sBAAA,cAACjF,QAAQA,SAAO;IACd+F,MAAM5F,WAAW6F;IACjBC,OAAO;IACPlB,MAAM;MAAEmB,SAASnB;IAAK;;AAKhC;",
6
+ "names": ["React", "useEffect", "useMemo", "useState", "Surface", "useCapabilities", "AppCapabilities", "AppSurface", "useObjectMenuItems", "useSchemaFilter", "Filter", "Obj", "Query", "Type", "useObject", "useQuery", "Card", "Icon", "IconButton", "Panel", "Toolbar", "Masonry", "MasonryComponent", "Menu", "SearchList", "useSearchListResults", "getTagFromQuery", "getTypeURIFromQuery", "isNonNullable", "MasonryContainer", "view", "viewOrRef", "role", "_role", "schemas", "Schema", "db", "getDatabase", "typeUri", "query", "ast", "undefined", "tag", "cardSchema", "setCardSchema", "staticSchema", "flat", "find", "schema", "getURI", "findInRegistry", "graph", "registry", "list", "filter", "isType", "t", "changed", "on", "baseFilter", "select", "objects", "sortedObjects", "toSorted", "a", "b", "getLabel", "localeCompare", "results", "handleSearch", "items", "extract", "obj", "Root", "Tile", "Item", "onSearch", "asChild", "Input", "placeholder", "Content", "Viewport", "getId", "data", "id", "objectMenuItems", "icon", "getIcon", "Header", "Block", "Title", "fallback", "end", "Trigger", "disabled", "length", "iconOnly", "variant", "label", "type", "CardContent", "limit", "subject"]
7
+ }
@@ -8,8 +8,8 @@ import { meta } from "#meta";
8
8
  import { translations } from "#translations";
9
9
  import { Masonry } from "#types";
10
10
 
11
- // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl?raw
12
- var PLUGIN_default = '---\nid: org.dxos.plugin.masonry\nname: MasonryPlugin\nversion: 0.1.0\n---\n\nA responsive masonry grid plugin for `DXOS` Composer.\n\nA `Masonry` is an ECHO object that wraps a `View` \u2014 a query-driven window onto\na typed collection \u2014 and renders the matching objects as a flowing, column-balanced\ncard grid.\nCards resize to fit their content; the grid reflows automatically as items are\nadded, removed, or the viewport changes.\nA search bar at the top filters cards client-side without altering the underlying\nquery.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype ColumnSlot\n fields:\n ids: string[] # ordered object IDs assigned to this column\n hidden?: boolean # column hidden from the viewport\n```\n\n```mdl\ntype Masonry\n typename: org.dxos.type.masonry\n fields:\n name?: string\n view: Ref<View> # ECHO View that drives the query\n arrangement?: ColumnSlot[] # persisted column assignments (optional)\n```\n\n## Components\n\n```mdl\ncomponent MasonryContainer\n desc: |\n Main surface rendered for the Article and Section roles.\n Resolves the View from the Masonry object, runs the ECHO query,\n filters results with the search bar, and delegates each card\n to a Surface slot so other plugins can supply card bodies.\n props:\n view: View | Ref<View>\n role?: string\n state:\n cardSchema?: Schema # resolved Effect Schema for the queried typename\n objects: EchoObject[] # live query results\n results: EchoObject[] # search-filtered subset of objects\n slots:\n card?: ReactNode # injected via AppSurface.Card per object\n actions:\n handleSearch(query: string) # filters results client-side\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [Search bar] \u2502 \u2190 SearchList.Input inside Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 Card \u2502 \u2502 Card \u2502 \u2026 \u2502 \u2190 MasonryComponent.Viewport (column-balanced)\n \u2502 \u2502[body]\u2502 \u2502[body]\u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent Item\n desc: |\n Individual tile rendered inside the masonry grid.\n Displays the object label and type icon in a Card.Toolbar, exposes a\n context menu for object-level actions, and delegates the card body to\n a Surface slot so other plugins can inject rich content.\n props:\n data: EchoObject\n state:\n icon: string # resolved from schema IconAnnotation\n objectMenuItems: MenuItem[] # contributed by other plugins\n slots:\n cardBody?: ReactNode # AppSurface.Card surface for the object\n actions:\n openMenu()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [icon] Label [\u22EE menu] \u2502 \u2190 Card.Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [cardBody slot] \u2502 \u2190 Surface.Surface(AppSurface.Card)\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop createMasonry\n desc: |\n Creates a new Masonry ECHO object backed by a ViewModel built from the\n selected typename, then adds it to the target space node.\n input:\n name?: string\n typename?: string # ECHO typename of card objects to query\n target: SpaceNode # space or folder to add the object into\n targetNodeId?: string\n output: Masonry\n effects: [echo:write]\n requires: [SpaceOperation.AddObject, ViewModel]\n note: |\n ViewModel.makeFromDatabase is called first to create the View;\n the resulting View reference is embedded in the Masonry before persisting.\n```\n\n## Features\n\n```mdl\nfeat F-1: Create Masonry\n\n req F-1.1:\n when: user invokes "Add masonry" from the space action menu\n then: creation dialog shown with optional name and typename inputs\n\n req F-1.2:\n when: user confirms creation\n then: op:createMasonry called; Masonry + View objects written to ECHO\n\n req F-1.3:\n when: op:createMasonry completes\n then: new Masonry is navigable in the space navigator\n```\n\n```mdl\nfeat F-2: View Masonry\n\n req F-2.1: MasonryContainer renders for both Article and Section surface roles.\n\n req F-2.2:\n when: MasonryContainer mounts\n then: ECHO query derived from view.query runs; matching objects populate the grid\n\n req F-2.3:\n when: new objects matching the query are added by any peer\n then: grid updates reactively without a full remount\n tags: [collaborative]\n\n req F-2.4: Objects are displayed alphabetically by label within the grid.\n```\n\n```mdl\nfeat F-3: Search\n\n req F-3.1:\n when: user types in the search bar\n then: visible cards filtered client-side to those whose label matches\n\n req F-3.2:\n when: search input is cleared\n then: all query results are shown again\n\n req F-3.3: Search does not modify the underlying ECHO query or View.\n```\n\n```mdl\nfeat F-4: Card Surface Delegation\n\n req F-4.1:\n when: an Item is rendered\n then: AppSurface.Card surface is opened for the object, allowing other\n plugins to supply rich card body content\n\n req F-4.2:\n when: no plugin provides a card body for an object type\n then: card renders with header only (no body content)\n\n req F-4.3:\n when: user opens the context menu (\u22EE) on a card\n then: object menu items contributed by other plugins are shown\n```\n\n```mdl\nfeat F-5: Schema Resolution\n\n req F-5.1:\n when: MasonryContainer resolves cardSchema\n then: static schemas (from AppCapabilities.Schema) are checked first\n\n req F-5.2:\n when: typename is not found in static schemas\n then: db.schemaRegistry is queried reactively until the schema appears\n\n req F-5.3:\n when: cardSchema changes\n then: ECHO query filter is updated and the grid re-renders\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Plugin modules activate\n given: MasonryPlugin added to a Composer test app\n then:\n - CreateObject module is active\n - schema module is active\n - ReactSurface module is active\n```\n\n```mdl\ntest T-2: Create masonry object\n given: a space with a typed schema (e.g. Note)\n when: op:createMasonry is invoked with typename = Note\'s typename\n then:\n - a Masonry object exists in the space\n - Masonry.view references a View whose query matches Note typename\n```\n\n```mdl\ntest T-3: Grid renders query results\n given: a Masonry backed by a View querying Note objects, 3 Notes in the space\n when: MasonryContainer mounts\n then: 3 Item tiles visible, each showing the Note\'s label\n```\n\n```mdl\ntest T-4: Search filters cards\n given: MasonryContainer showing ["Alpha", "Beta", "Gamma"]\n when: user types "al" in the search bar\n then: only "Alpha" is visible\n```\n\n```mdl\ntest T-5: Search clear restores all cards\n given: search bar contains "al", only "Alpha" visible\n when: user clears the search input\n then: all 3 cards are visible again\n```\n\n```mdl\ntest T-6: Reactive update on peer write\n given: MasonryContainer open, query returning 2 objects\n when: a peer writes a third matching object to ECHO\n then: grid shows 3 tiles without a page reload\n tags: [collaborative]\n```\n\n```mdl\ntest T-7: Card body delegated to Surface\n given: a plugin that provides AppSurface.Card for Note objects\n when: a Note appears in the masonry grid\n then: the Note card renders the plugin-provided body below the Card.Toolbar\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n';
11
+ // raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl
12
+ var PLUGIN_default = '---\nid: org.dxos.plugin.masonry\nname: MasonryPlugin\nversion: 0.1.0\n---\n\nA responsive masonry grid plugin for `DXOS` Composer.\n\nA `Masonry` is an ECHO object that wraps a `View` \u2014 a query-driven window onto\na typed collection \u2014 and renders the matching objects as a flowing, column-balanced\ncard grid.\nCards resize to fit their content; the grid reflows automatically as items are\nadded, removed, or the viewport changes.\nA search bar at the top filters cards client-side without altering the underlying\nquery.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype ColumnSlot\n fields:\n ids: string[] # ordered object IDs assigned to this column\n hidden?: boolean # column hidden from the viewport\n```\n\n```mdl\ntype Masonry\n typename: org.dxos.type.masonry\n fields:\n name?: string\n view: Ref<View> # ECHO View that drives the query\n arrangement?: ColumnSlot[] # persisted column assignments (optional)\n```\n\n## Components\n\n```mdl\ncomponent MasonryContainer\n desc: |\n Main surface rendered for the Article and Section roles.\n Resolves the View from the Masonry object, runs the ECHO query,\n filters results with the search bar, and delegates each card\n to a Surface slot so other plugins can supply card bodies.\n props:\n view: View | Ref<View>\n role?: string\n state:\n cardSchema?: Schema # resolved Effect Schema for the queried typename\n objects: EchoObject[] # live query results\n results: EchoObject[] # search-filtered subset of objects\n slots:\n card?: ReactNode # injected via AppSurface.CardContent per object\n actions:\n handleSearch(query: string) # filters results client-side\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [Search bar] \u2502 \u2190 SearchList.Input inside Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 Card \u2502 \u2502 Card \u2502 \u2026 \u2502 \u2190 MasonryComponent.Viewport (column-balanced)\n \u2502 \u2502[body]\u2502 \u2502[body]\u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent Item\n desc: |\n Individual tile rendered inside the masonry grid.\n Displays the object label and type icon in a Card.Toolbar, exposes a\n context menu for object-level actions, and delegates the card body to\n a Surface slot so other plugins can inject rich content.\n props:\n data: EchoObject\n state:\n icon: string # resolved from schema IconAnnotation\n objectMenuItems: MenuItem[] # contributed by other plugins\n slots:\n cardBody?: ReactNode # AppSurface.CardContent surface for the object\n actions:\n openMenu()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [icon] Label [\u22EE menu] \u2502 \u2190 Card.Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [cardBody slot] \u2502 \u2190 Surface.Surface(AppSurface.CardContent)\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop createMasonry\n desc: |\n Creates a new Masonry ECHO object backed by a ViewModel built from the\n selected typename, then adds it to the target space node.\n input:\n name?: string\n typename?: string # ECHO typename of card objects to query\n target: SpaceNode # space or folder to add the object into\n targetNodeId?: string\n output: Masonry\n effects: [echo:write]\n requires: [SpaceOperation.AddObject, ViewModel]\n note: |\n ViewModel.makeFromDatabase is called first to create the View;\n the resulting View reference is embedded in the Masonry before persisting.\n```\n\n## Features\n\n```mdl\nfeat F-1: Create Masonry\n\n req F-1.1:\n when: user invokes "Add masonry" from the space action menu\n then: creation dialog shown with optional name and typename inputs\n\n req F-1.2:\n when: user confirms creation\n then: op:createMasonry called; Masonry + View objects written to ECHO\n\n req F-1.3:\n when: op:createMasonry completes\n then: new Masonry is navigable in the space navigator\n```\n\n```mdl\nfeat F-2: View Masonry\n\n req F-2.1: MasonryContainer renders for both Article and Section surface roles.\n\n req F-2.2:\n when: MasonryContainer mounts\n then: ECHO query derived from view.query runs; matching objects populate the grid\n\n req F-2.3:\n when: new objects matching the query are added by any peer\n then: grid updates reactively without a full remount\n tags: [collaborative]\n\n req F-2.4: Objects are displayed alphabetically by label within the grid.\n```\n\n```mdl\nfeat F-3: Search\n\n req F-3.1:\n when: user types in the search bar\n then: visible cards filtered client-side to those whose label matches\n\n req F-3.2:\n when: search input is cleared\n then: all query results are shown again\n\n req F-3.3: Search does not modify the underlying ECHO query or View.\n```\n\n```mdl\nfeat F-4: Card Surface Delegation\n\n req F-4.1:\n when: an Item is rendered\n then: AppSurface.CardContent surface is opened for the object, allowing other\n plugins to supply rich card body content\n\n req F-4.2:\n when: no plugin provides a card body for an object type\n then: card renders with header only (no body content)\n\n req F-4.3:\n when: user opens the context menu (\u22EE) on a card\n then: object menu items contributed by other plugins are shown\n```\n\n```mdl\nfeat F-5: Schema Resolution\n\n req F-5.1:\n when: MasonryContainer resolves cardSchema\n then: static schemas (from AppCapabilities.Schema) are checked first\n\n req F-5.2:\n when: typename is not found in static schemas\n then: db.schemaRegistry is queried reactively until the schema appears\n\n req F-5.3:\n when: cardSchema changes\n then: ECHO query filter is updated and the grid re-renders\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Plugin modules activate\n given: MasonryPlugin added to a Composer test app\n then:\n - CreateObject module is active\n - schema module is active\n - ReactSurface module is active\n```\n\n```mdl\ntest T-2: Create masonry object\n given: a space with a typed schema (e.g. Note)\n when: op:createMasonry is invoked with typename = Note\'s typename\n then:\n - a Masonry object exists in the space\n - Masonry.view references a View whose query matches Note typename\n```\n\n```mdl\ntest T-3: Grid renders query results\n given: a Masonry backed by a View querying Note objects, 3 Notes in the space\n when: MasonryContainer mounts\n then: 3 Item tiles visible, each showing the Note\'s label\n```\n\n```mdl\ntest T-4: Search filters cards\n given: MasonryContainer showing ["Alpha", "Beta", "Gamma"]\n when: user types "al" in the search bar\n then: only "Alpha" is visible\n```\n\n```mdl\ntest T-5: Search clear restores all cards\n given: search bar contains "al", only "Alpha" visible\n when: user clears the search input\n then: all 3 cards are visible again\n```\n\n```mdl\ntest T-6: Reactive update on peer write\n given: MasonryContainer open, query returning 2 objects\n when: a peer writes a third matching object to ECHO\n then: grid shows 3 tiles without a page reload\n tags: [collaborative]\n```\n\n```mdl\ntest T-7: Card body delegated to Surface\n given: a plugin that provides AppSurface.CardContent for Note objects\n when: a Note appears in the masonry grid\n then: the Note card renders the plugin-provided body below the Card.Toolbar\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n';
13
13
 
14
14
  // src/MasonryPlugin.tsx
15
15
  var MasonryPlugin = Plugin.define(meta).pipe(AppPlugin.addCreateObjectModule({
@@ -24,7 +24,7 @@ var MasonryPlugin = Plugin.define(meta).pipe(AppPlugin.addCreateObjectModule({
24
24
  translations
25
25
  }), AppPlugin.addPluginAssetModule({
26
26
  asset: {
27
- pluginId: meta.id,
27
+ pluginId: meta.profile.key,
28
28
  path: "PLUGIN.mdl",
29
29
  content: PLUGIN_default,
30
30
  mimeType: "application/x-mdl"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/MasonryPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl?raw"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Masonry } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const MasonryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Masonry.Masonry] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default MasonryPlugin;\n", "---\nid: org.dxos.plugin.masonry\nname: MasonryPlugin\nversion: 0.1.0\n---\n\nA responsive masonry grid plugin for `DXOS` Composer.\n\nA `Masonry` is an ECHO object that wraps a `View` \u2014 a query-driven window onto\na typed collection \u2014 and renders the matching objects as a flowing, column-balanced\ncard grid.\nCards resize to fit their content; the grid reflows automatically as items are\nadded, removed, or the viewport changes.\nA search bar at the top filters cards client-side without altering the underlying\nquery.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype ColumnSlot\n fields:\n ids: string[] # ordered object IDs assigned to this column\n hidden?: boolean # column hidden from the viewport\n```\n\n```mdl\ntype Masonry\n typename: org.dxos.type.masonry\n fields:\n name?: string\n view: Ref<View> # ECHO View that drives the query\n arrangement?: ColumnSlot[] # persisted column assignments (optional)\n```\n\n## Components\n\n```mdl\ncomponent MasonryContainer\n desc: |\n Main surface rendered for the Article and Section roles.\n Resolves the View from the Masonry object, runs the ECHO query,\n filters results with the search bar, and delegates each card\n to a Surface slot so other plugins can supply card bodies.\n props:\n view: View | Ref<View>\n role?: string\n state:\n cardSchema?: Schema # resolved Effect Schema for the queried typename\n objects: EchoObject[] # live query results\n results: EchoObject[] # search-filtered subset of objects\n slots:\n card?: ReactNode # injected via AppSurface.Card per object\n actions:\n handleSearch(query: string) # filters results client-side\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [Search bar] \u2502 \u2190 SearchList.Input inside Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 Card \u2502 \u2502 Card \u2502 \u2026 \u2502 \u2190 MasonryComponent.Viewport (column-balanced)\n \u2502 \u2502[body]\u2502 \u2502[body]\u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent Item\n desc: |\n Individual tile rendered inside the masonry grid.\n Displays the object label and type icon in a Card.Toolbar, exposes a\n context menu for object-level actions, and delegates the card body to\n a Surface slot so other plugins can inject rich content.\n props:\n data: EchoObject\n state:\n icon: string # resolved from schema IconAnnotation\n objectMenuItems: MenuItem[] # contributed by other plugins\n slots:\n cardBody?: ReactNode # AppSurface.Card surface for the object\n actions:\n openMenu()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [icon] Label [\u22EE menu] \u2502 \u2190 Card.Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [cardBody slot] \u2502 \u2190 Surface.Surface(AppSurface.Card)\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop createMasonry\n desc: |\n Creates a new Masonry ECHO object backed by a ViewModel built from the\n selected typename, then adds it to the target space node.\n input:\n name?: string\n typename?: string # ECHO typename of card objects to query\n target: SpaceNode # space or folder to add the object into\n targetNodeId?: string\n output: Masonry\n effects: [echo:write]\n requires: [SpaceOperation.AddObject, ViewModel]\n note: |\n ViewModel.makeFromDatabase is called first to create the View;\n the resulting View reference is embedded in the Masonry before persisting.\n```\n\n## Features\n\n```mdl\nfeat F-1: Create Masonry\n\n req F-1.1:\n when: user invokes \"Add masonry\" from the space action menu\n then: creation dialog shown with optional name and typename inputs\n\n req F-1.2:\n when: user confirms creation\n then: op:createMasonry called; Masonry + View objects written to ECHO\n\n req F-1.3:\n when: op:createMasonry completes\n then: new Masonry is navigable in the space navigator\n```\n\n```mdl\nfeat F-2: View Masonry\n\n req F-2.1: MasonryContainer renders for both Article and Section surface roles.\n\n req F-2.2:\n when: MasonryContainer mounts\n then: ECHO query derived from view.query runs; matching objects populate the grid\n\n req F-2.3:\n when: new objects matching the query are added by any peer\n then: grid updates reactively without a full remount\n tags: [collaborative]\n\n req F-2.4: Objects are displayed alphabetically by label within the grid.\n```\n\n```mdl\nfeat F-3: Search\n\n req F-3.1:\n when: user types in the search bar\n then: visible cards filtered client-side to those whose label matches\n\n req F-3.2:\n when: search input is cleared\n then: all query results are shown again\n\n req F-3.3: Search does not modify the underlying ECHO query or View.\n```\n\n```mdl\nfeat F-4: Card Surface Delegation\n\n req F-4.1:\n when: an Item is rendered\n then: AppSurface.Card surface is opened for the object, allowing other\n plugins to supply rich card body content\n\n req F-4.2:\n when: no plugin provides a card body for an object type\n then: card renders with header only (no body content)\n\n req F-4.3:\n when: user opens the context menu (\u22EE) on a card\n then: object menu items contributed by other plugins are shown\n```\n\n```mdl\nfeat F-5: Schema Resolution\n\n req F-5.1:\n when: MasonryContainer resolves cardSchema\n then: static schemas (from AppCapabilities.Schema) are checked first\n\n req F-5.2:\n when: typename is not found in static schemas\n then: db.schemaRegistry is queried reactively until the schema appears\n\n req F-5.3:\n when: cardSchema changes\n then: ECHO query filter is updated and the grid re-renders\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Plugin modules activate\n given: MasonryPlugin added to a Composer test app\n then:\n - CreateObject module is active\n - schema module is active\n - ReactSurface module is active\n```\n\n```mdl\ntest T-2: Create masonry object\n given: a space with a typed schema (e.g. Note)\n when: op:createMasonry is invoked with typename = Note's typename\n then:\n - a Masonry object exists in the space\n - Masonry.view references a View whose query matches Note typename\n```\n\n```mdl\ntest T-3: Grid renders query results\n given: a Masonry backed by a View querying Note objects, 3 Notes in the space\n when: MasonryContainer mounts\n then: 3 Item tiles visible, each showing the Note's label\n```\n\n```mdl\ntest T-4: Search filters cards\n given: MasonryContainer showing [\"Alpha\", \"Beta\", \"Gamma\"]\n when: user types \"al\" in the search bar\n then: only \"Alpha\" is visible\n```\n\n```mdl\ntest T-5: Search clear restores all cards\n given: search bar contains \"al\", only \"Alpha\" visible\n when: user clears the search input\n then: all 3 cards are visible again\n```\n\n```mdl\ntest T-6: Reactive update on peer write\n given: MasonryContainer open, query returning 2 objects\n when: a peer writes a third matching object to ECHO\n then: grid shows 3 tiles without a page reload\n tags: [collaborative]\n```\n\n```mdl\ntest T-7: Card body delegated to Surface\n given: a plugin that provides AppSurface.Card for Note objects\n when: a Note appears in the masonry grid\n then: the Note card renders the plugin-provided body below the Card.Toolbar\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n"],
5
- "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,cAAcC,oBAAoB;AAC3C,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,eAAe;;;ACVxB;;;ADeO,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,sBAAsB;EAAEC,UAAUC;AAAa,CAAA,GACzDH,UAAUI,gBAAgB;EAAEC,QAAQ;IAACC,QAAQA;;AAAS,CAAA,GACtDN,UAAUO,iBAAiB;EAAEL,UAAUM;AAAa,CAAA,GACpDR,UAAUS,sBAAsB;EAAEC;AAAa,CAAA,GAC/CV,UAAUW,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUf,KAAKgB;IAAIC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACAtB,OAAOuB,IAAI;AAGb,IAAA,wBAAexB;",
6
- "names": ["Plugin", "AppPlugin", "CreateObject", "ReactSurface", "meta", "translations", "Masonry", "MasonryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCreateObjectModule", "activate", "CreateObject", "addSchemaModule", "schema", "Masonry", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addPluginAssetModule", "asset", "pluginId", "id", "path", "content", "pluginSpec", "mimeType", "make"]
3
+ "sources": ["../../../src/MasonryPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { CreateObject, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Masonry } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const MasonryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addSchemaModule({ schema: [Masonry.Masonry] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default MasonryPlugin;\n", "---\nid: org.dxos.plugin.masonry\nname: MasonryPlugin\nversion: 0.1.0\n---\n\nA responsive masonry grid plugin for `DXOS` Composer.\n\nA `Masonry` is an ECHO object that wraps a `View` \u2014 a query-driven window onto\na typed collection \u2014 and renders the matching objects as a flowing, column-balanced\ncard grid.\nCards resize to fit their content; the grid reflows automatically as items are\nadded, removed, or the viewport changes.\nA search bar at the top filters cards client-side without altering the underlying\nquery.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype ColumnSlot\n fields:\n ids: string[] # ordered object IDs assigned to this column\n hidden?: boolean # column hidden from the viewport\n```\n\n```mdl\ntype Masonry\n typename: org.dxos.type.masonry\n fields:\n name?: string\n view: Ref<View> # ECHO View that drives the query\n arrangement?: ColumnSlot[] # persisted column assignments (optional)\n```\n\n## Components\n\n```mdl\ncomponent MasonryContainer\n desc: |\n Main surface rendered for the Article and Section roles.\n Resolves the View from the Masonry object, runs the ECHO query,\n filters results with the search bar, and delegates each card\n to a Surface slot so other plugins can supply card bodies.\n props:\n view: View | Ref<View>\n role?: string\n state:\n cardSchema?: Schema # resolved Effect Schema for the queried typename\n objects: EchoObject[] # live query results\n results: EchoObject[] # search-filtered subset of objects\n slots:\n card?: ReactNode # injected via AppSurface.CardContent per object\n actions:\n handleSearch(query: string) # filters results client-side\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [Search bar] \u2502 \u2190 SearchList.Input inside Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 Card \u2502 \u2502 Card \u2502 \u2026 \u2502 \u2190 MasonryComponent.Viewport (column-balanced)\n \u2502 \u2502[body]\u2502 \u2502[body]\u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent Item\n desc: |\n Individual tile rendered inside the masonry grid.\n Displays the object label and type icon in a Card.Toolbar, exposes a\n context menu for object-level actions, and delegates the card body to\n a Surface slot so other plugins can inject rich content.\n props:\n data: EchoObject\n state:\n icon: string # resolved from schema IconAnnotation\n objectMenuItems: MenuItem[] # contributed by other plugins\n slots:\n cardBody?: ReactNode # AppSurface.CardContent surface for the object\n actions:\n openMenu()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [icon] Label [\u22EE menu] \u2502 \u2190 Card.Toolbar\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [cardBody slot] \u2502 \u2190 Surface.Surface(AppSurface.CardContent)\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\n```mdl\nop createMasonry\n desc: |\n Creates a new Masonry ECHO object backed by a ViewModel built from the\n selected typename, then adds it to the target space node.\n input:\n name?: string\n typename?: string # ECHO typename of card objects to query\n target: SpaceNode # space or folder to add the object into\n targetNodeId?: string\n output: Masonry\n effects: [echo:write]\n requires: [SpaceOperation.AddObject, ViewModel]\n note: |\n ViewModel.makeFromDatabase is called first to create the View;\n the resulting View reference is embedded in the Masonry before persisting.\n```\n\n## Features\n\n```mdl\nfeat F-1: Create Masonry\n\n req F-1.1:\n when: user invokes \"Add masonry\" from the space action menu\n then: creation dialog shown with optional name and typename inputs\n\n req F-1.2:\n when: user confirms creation\n then: op:createMasonry called; Masonry + View objects written to ECHO\n\n req F-1.3:\n when: op:createMasonry completes\n then: new Masonry is navigable in the space navigator\n```\n\n```mdl\nfeat F-2: View Masonry\n\n req F-2.1: MasonryContainer renders for both Article and Section surface roles.\n\n req F-2.2:\n when: MasonryContainer mounts\n then: ECHO query derived from view.query runs; matching objects populate the grid\n\n req F-2.3:\n when: new objects matching the query are added by any peer\n then: grid updates reactively without a full remount\n tags: [collaborative]\n\n req F-2.4: Objects are displayed alphabetically by label within the grid.\n```\n\n```mdl\nfeat F-3: Search\n\n req F-3.1:\n when: user types in the search bar\n then: visible cards filtered client-side to those whose label matches\n\n req F-3.2:\n when: search input is cleared\n then: all query results are shown again\n\n req F-3.3: Search does not modify the underlying ECHO query or View.\n```\n\n```mdl\nfeat F-4: Card Surface Delegation\n\n req F-4.1:\n when: an Item is rendered\n then: AppSurface.CardContent surface is opened for the object, allowing other\n plugins to supply rich card body content\n\n req F-4.2:\n when: no plugin provides a card body for an object type\n then: card renders with header only (no body content)\n\n req F-4.3:\n when: user opens the context menu (\u22EE) on a card\n then: object menu items contributed by other plugins are shown\n```\n\n```mdl\nfeat F-5: Schema Resolution\n\n req F-5.1:\n when: MasonryContainer resolves cardSchema\n then: static schemas (from AppCapabilities.Schema) are checked first\n\n req F-5.2:\n when: typename is not found in static schemas\n then: db.schemaRegistry is queried reactively until the schema appears\n\n req F-5.3:\n when: cardSchema changes\n then: ECHO query filter is updated and the grid re-renders\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Plugin modules activate\n given: MasonryPlugin added to a Composer test app\n then:\n - CreateObject module is active\n - schema module is active\n - ReactSurface module is active\n```\n\n```mdl\ntest T-2: Create masonry object\n given: a space with a typed schema (e.g. Note)\n when: op:createMasonry is invoked with typename = Note's typename\n then:\n - a Masonry object exists in the space\n - Masonry.view references a View whose query matches Note typename\n```\n\n```mdl\ntest T-3: Grid renders query results\n given: a Masonry backed by a View querying Note objects, 3 Notes in the space\n when: MasonryContainer mounts\n then: 3 Item tiles visible, each showing the Note's label\n```\n\n```mdl\ntest T-4: Search filters cards\n given: MasonryContainer showing [\"Alpha\", \"Beta\", \"Gamma\"]\n when: user types \"al\" in the search bar\n then: only \"Alpha\" is visible\n```\n\n```mdl\ntest T-5: Search clear restores all cards\n given: search bar contains \"al\", only \"Alpha\" visible\n when: user clears the search input\n then: all 3 cards are visible again\n```\n\n```mdl\ntest T-6: Reactive update on peer write\n given: MasonryContainer open, query returning 2 objects\n when: a peer writes a third matching object to ECHO\n then: grid shows 3 tiles without a page reload\n tags: [collaborative]\n```\n\n```mdl\ntest T-7: Card body delegated to Surface\n given: a plugin that provides AppSurface.CardContent for Note objects\n when: a Note appears in the masonry grid\n then: the Note card renders the plugin-provided body below the Card.Toolbar\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAE1B,SAASC,cAAcC,oBAAoB;AAC3C,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,eAAe;;;ACVxB;;;ADeO,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,sBAAsB;EAAEC,UAAUC;AAAa,CAAA,GACzDH,UAAUI,gBAAgB;EAAEC,QAAQ;IAACC,QAAQA;;AAAS,CAAA,GACtDN,UAAUO,iBAAiB;EAAEL,UAAUM;AAAa,CAAA,GACpDR,UAAUS,sBAAsB;EAAEC;AAAa,CAAA,GAC/CV,UAAUW,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUf,KAAKgB,QAAQC;IAAKC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AAC9G,CAAA,GACAvB,OAAOwB,IAAI;AAGb,IAAA,wBAAezB;",
6
+ "names": ["Plugin", "AppPlugin", "CreateObject", "ReactSurface", "meta", "translations", "Masonry", "MasonryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCreateObjectModule", "activate", "CreateObject", "addSchemaModule", "schema", "Masonry", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "make"]
7
7
  }
@@ -1,12 +1,15 @@
1
1
  // src/meta.ts
2
2
  import { Plugin } from "@dxos/app-framework";
3
- import { DXN } from "@dxos/keys";
3
+
4
+ // dx.config.ts
5
+ import { Config2 } from "@dxos/app-framework/config";
4
6
  import { trim } from "@dxos/util";
5
- var meta = Plugin.makeMeta({
6
- key: DXN.make("org.dxos.plugin.masonry"),
7
- name: "Masonry",
8
- author: "DXOS",
9
- description: trim`
7
+ var dx_config_default = Config2.make({
8
+ plugin: {
9
+ key: "org.dxos.plugin.masonry",
10
+ name: "Masonry",
11
+ author: "DXOS",
12
+ description: trim`
10
13
  Masonry renders a live, query-driven collection as a responsive column-balanced card grid.
11
14
 
12
15
  A Masonry object wraps an ECHO View that defines which objects to show and in what order.
@@ -19,14 +22,20 @@ var meta = Plugin.makeMeta({
19
22
  A built-in search bar filters cards client-side by label without modifying the underlying query,
20
23
  making it easy to explore large collections without leaving the view.
21
24
  `,
22
- icon: "ph--wall--regular",
23
- iconHue: "teal",
24
- source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-masonry",
25
- spec: "PLUGIN.mdl",
26
- screenshots: []
25
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-masonry",
26
+ icon: {
27
+ key: "ph--wall--regular",
28
+ hue: "teal"
29
+ },
30
+ spec: "PLUGIN.mdl",
31
+ screenshots: []
32
+ }
27
33
  });
28
34
 
35
+ // src/meta.ts
36
+ var meta = Plugin.getMetaFromConfig(dx_config_default);
37
+
29
38
  export {
30
39
  meta
31
40
  };
32
- //# sourceMappingURL=chunk-IJ2FIXSI.mjs.map
41
+ //# sourceMappingURL=chunk-U6BPS6LO.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.masonry',\n name: 'Masonry',\n author: 'DXOS',\n description: trim`\n Masonry renders a live, query-driven collection as a responsive column-balanced card grid.\n\n A Masonry object wraps an ECHO View that defines which objects to show and in what order.\n As objects are added or removed — by any peer — the grid reflows automatically, keeping cards\n balanced across columns without manual arrangement.\n\n Each card delegates its body to a Surface slot, so other plugins can supply rich, type-specific\n content while Masonry handles layout, search, and context menus.\n\n A built-in search bar filters cards client-side by label without modifying the underlying query,\n making it easy to explore large collections without leaving the view.\n `,\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-masonry',\n icon: { key: 'ph--wall--regular', hue: 'teal' },\n spec: 'PLUGIN.mdl',\n screenshots: [],\n },\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;;;;;;;;;;IAabO,QAAQ;IACRC,MAAM;MAAEL,KAAK;MAAqBM,KAAK;IAAO;IAC9CC,MAAM;IACNC,aAAa,CAAA;EACf;AACF,CAAA;;;ADtBO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
6
+ "names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "source", "icon", "hue", "spec", "screenshots", "meta", "Plugin", "getMetaFromConfig", "config"]
7
+ }
@@ -2,7 +2,7 @@ import "../chunk-J5LGTIGS.mjs";
2
2
 
3
3
  // src/containers/index.ts
4
4
  import { lazy } from "react";
5
- var MasonryContainer = lazy(() => import("../MasonryContainer-7CXOATRR.mjs"));
5
+ var MasonryContainer = lazy(() => import("../MasonryContainer-VPNOQ32X.mjs"));
6
6
  export {
7
7
  MasonryContainer
8
8
  };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-CNXGZZNQ.mjs";
5
5
  import {
6
6
  meta
7
- } from "./chunk-IJ2FIXSI.mjs";
7
+ } from "./chunk-U6BPS6LO.mjs";
8
8
  import "./chunk-J5LGTIGS.mjs";
9
9
  export {
10
10
  Masonry_exports as Masonry,
@@ -1 +1 @@
1
- {"inputs":{"src/meta.ts":{"bytes":3536,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/types/Masonry.ts":{"bytes":5691,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/Annotation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/MasonryAction.ts":{"bytes":2135,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","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"},"src/index.ts":{"bytes":449,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl?raw":{"bytes":10223,"imports":[]},"src/MasonryPlugin.tsx":{"bytes":3583,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl?raw","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/capabilities/create-object.ts":{"bytes":4883,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":4425,"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1130,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/create-object.ts","kind":"dynamic-import","original":"./create-object"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/components/index.ts":{"bytes":288,"imports":[],"format":"esm"},"src/containers/MasonryContainer/MasonryContainer.tsx":{"bytes":15088,"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-masonry","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-search","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/containers/MasonryContainer/index.ts":{"bytes":530,"imports":[{"path":"src/containers/MasonryContainer/MasonryContainer.tsx","kind":"import-statement","original":"./MasonryContainer"}],"format":"esm"},"src/containers/index.ts":{"bytes":726,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/MasonryContainer/index.ts","kind":"dynamic-import","original":"./MasonryContainer"}],"format":"esm"},"src/plugin.ts":{"bytes":860,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"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"}},"outputs":{"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-CNXGZZNQ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Masonry","MasonryAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":234},"dist/lib/neutral/create-object-WRCYV4HT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2476},"dist/lib/neutral/create-object-WRCYV4HT.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/create-object.ts","inputs":{"src/capabilities/create-object.ts":{"bytesInOutput":1166}},"bytes":1334},"dist/lib/neutral/react-surface-7CZHE3XA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2179},"dist/lib/neutral/react-surface-7CZHE3XA.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":1082}},"bytes":1251},"dist/lib/neutral/MasonryContainer-7CXOATRR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8143},"dist/lib/neutral/MasonryContainer-7CXOATRR.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-masonry","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-search","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/MasonryContainer/index.ts","inputs":{"src/containers/MasonryContainer/MasonryContainer.tsx":{"bytesInOutput":3982},"src/containers/MasonryContainer/index.ts":{"bytesInOutput":0}},"bytes":4167},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-CNXGZZNQ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-IJ2FIXSI.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Masonry","MasonryAction","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":287},"dist/lib/neutral/chunk-CNXGZZNQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3979},"dist/lib/neutral/chunk-CNXGZZNQ.mjs":{"imports":[{"path":"dist/lib/neutral/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/Annotation","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","kind":"import-statement","external":true}],"exports":["MasonryAction_exports","Masonry_exports"],"inputs":{"src/types/Masonry.ts":{"bytesInOutput":1051},"src/types/index.ts":{"bytesInOutput":0},"src/types/MasonryAction.ts":{"bytesInOutput":590}},"bytes":1848},"dist/lib/neutral/MasonryPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13265},"dist/lib/neutral/MasonryPlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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","default"],"entryPoint":"src/MasonryPlugin.tsx","inputs":{"src/MasonryPlugin.tsx":{"bytesInOutput":769},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl?raw":{"bytesInOutput":11247}},"bytes":12283},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":602},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/create-object-WRCYV4HT.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-7CZHE3XA.mjs","kind":"dynamic-import"}],"exports":["CreateObject","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":248}},"bytes":388},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/components/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/components/index.ts","inputs":{"src/components/index.ts":{"bytesInOutput":0}},"bytes":35},"dist/lib/neutral/containers/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":410},"dist/lib/neutral/containers/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/neutral/MasonryContainer-7CXOATRR.mjs","kind":"dynamic-import"}],"exports":["MasonryContainer"],"entryPoint":"src/containers/index.ts","inputs":{"src/containers/index.ts":{"bytesInOutput":109}},"bytes":235},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-IJ2FIXSI.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":131},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":444},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-IJ2FIXSI.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["MasonryPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":110}},"bytes":270},"dist/lib/neutral/chunk-IJ2FIXSI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1682},"dist/lib/neutral/chunk-IJ2FIXSI.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":1121}},"bytes":1200},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1326},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"dist/lib/neutral/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/neutral/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
1
+ {"inputs":{"dx.config.ts":{"bytes":3521,"imports":[{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/meta.ts":{"bytes":799,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dx.config.ts","kind":"import-statement","original":"../dx.config"}],"format":"esm"},"src/types/Masonry.ts":{"bytes":5691,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/echo/Annotation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"src/types/MasonryAction.ts":{"bytes":2135,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","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"},"src/index.ts":{"bytes":449,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl":{"bytes":10258,"imports":[]},"src/MasonryPlugin.tsx":{"bytes":3636,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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},{"path":"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl","kind":"import-statement","original":"../PLUGIN.mdl?raw"}],"format":"esm"},"src/capabilities/create-object.ts":{"bytes":4883,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/react-surface.tsx":{"bytes":4425,"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/index.ts":{"bytes":1130,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/create-object.ts","kind":"dynamic-import","original":"./create-object"},{"path":"src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/components/index.ts":{"bytes":288,"imports":[],"format":"esm"},"src/containers/MasonryContainer/MasonryContainer.tsx":{"bytes":15519,"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-masonry","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-search","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/containers/MasonryContainer/index.ts":{"bytes":530,"imports":[{"path":"src/containers/MasonryContainer/MasonryContainer.tsx","kind":"import-statement","original":"./MasonryContainer"}],"format":"esm"},"src/containers/index.ts":{"bytes":726,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/MasonryContainer/index.ts","kind":"dynamic-import","original":"./MasonryContainer"}],"format":"esm"},"src/plugin.ts":{"bytes":860,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"#plugin","kind":"dynamic-import","external":true}],"format":"esm"},"src/translations.ts":{"bytes":2776,"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"}},"outputs":{"dist/lib/neutral/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/types/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-CNXGZZNQ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Masonry","MasonryAction"],"entryPoint":"src/types/index.ts","inputs":{},"bytes":234},"dist/lib/neutral/create-object-WRCYV4HT.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2476},"dist/lib/neutral/create-object-WRCYV4HT.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","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","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/create-object.ts","inputs":{"src/capabilities/create-object.ts":{"bytesInOutput":1166}},"bytes":1334},"dist/lib/neutral/react-surface-7CZHE3XA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2179},"dist/lib/neutral/react-surface-7CZHE3XA.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"#containers","kind":"import-statement","external":true},{"path":"#types","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/react-surface.tsx","inputs":{"src/capabilities/react-surface.tsx":{"bytesInOutput":1082}},"bytes":1251},"dist/lib/neutral/MasonryContainer-VPNOQ32X.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8375},"dist/lib/neutral/MasonryContainer-VPNOQ32X.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"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/app-toolkit/ui","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-masonry","kind":"import-statement","external":true},{"path":"@dxos/react-ui-menu","kind":"import-statement","external":true},{"path":"@dxos/react-ui-search","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/MasonryContainer/index.ts","inputs":{"src/containers/MasonryContainer/MasonryContainer.tsx":{"bytesInOutput":4119},"src/containers/MasonryContainer/index.ts":{"bytesInOutput":0}},"bytes":4304},"dist/lib/neutral/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-CNXGZZNQ.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-U6BPS6LO.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["Masonry","MasonryAction","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":287},"dist/lib/neutral/chunk-CNXGZZNQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3979},"dist/lib/neutral/chunk-CNXGZZNQ.mjs":{"imports":[{"path":"dist/lib/neutral/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/Annotation","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","kind":"import-statement","external":true}],"exports":["MasonryAction_exports","Masonry_exports"],"inputs":{"src/types/Masonry.ts":{"bytesInOutput":1051},"src/types/index.ts":{"bytesInOutput":0},"src/types/MasonryAction.ts":{"bytesInOutput":590}},"bytes":1848},"dist/lib/neutral/MasonryPlugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13323},"dist/lib/neutral/MasonryPlugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","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","default"],"entryPoint":"src/MasonryPlugin.tsx","inputs":{"src/MasonryPlugin.tsx":{"bytesInOutput":778},"raw-loader:/__w/dxos/dxos/packages/plugins/plugin-masonry/PLUGIN.mdl":{"bytesInOutput":11282}},"bytes":12323},"dist/lib/neutral/capabilities/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":602},"dist/lib/neutral/capabilities/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/neutral/create-object-WRCYV4HT.mjs","kind":"dynamic-import"},{"path":"dist/lib/neutral/react-surface-7CZHE3XA.mjs","kind":"dynamic-import"}],"exports":["CreateObject","ReactSurface"],"entryPoint":"src/capabilities/index.ts","inputs":{"src/capabilities/index.ts":{"bytesInOutput":248}},"bytes":388},"dist/lib/neutral/components/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/components/index.mjs":{"imports":[],"exports":[],"entryPoint":"src/components/index.ts","inputs":{"src/components/index.ts":{"bytesInOutput":0}},"bytes":35},"dist/lib/neutral/containers/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":410},"dist/lib/neutral/containers/index.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/neutral/MasonryContainer-VPNOQ32X.mjs","kind":"dynamic-import"}],"exports":["MasonryContainer"],"entryPoint":"src/containers/index.ts","inputs":{"src/containers/index.ts":{"bytesInOutput":109}},"bytes":235},"dist/lib/neutral/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/meta.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-U6BPS6LO.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"}],"exports":["meta"],"entryPoint":"src/meta.ts","inputs":{},"bytes":131},"dist/lib/neutral/plugin.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":444},"dist/lib/neutral/plugin.mjs":{"imports":[{"path":"dist/lib/neutral/chunk-U6BPS6LO.mjs","kind":"import-statement"},{"path":"dist/lib/neutral/chunk-J5LGTIGS.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"#plugin","kind":"dynamic-import","external":true}],"exports":["MasonryPlugin"],"entryPoint":"src/plugin.ts","inputs":{"src/plugin.ts":{"bytesInOutput":110}},"bytes":270},"dist/lib/neutral/chunk-U6BPS6LO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1982},"dist/lib/neutral/chunk-U6BPS6LO.mjs":{"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/config","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":102},"dx.config.ts":{"bytesInOutput":1146}},"bytes":1360},"dist/lib/neutral/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1354},"dist/lib/neutral/translations.mjs":{"imports":[{"path":"dist/lib/neutral/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":683}},"bytes":807},"dist/lib/neutral/chunk-J5LGTIGS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/neutral/chunk-J5LGTIGS.mjs":{"imports":[],"exports":["__export"],"inputs":{},"bytes":235}}}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-IJ2FIXSI.mjs";
3
+ } from "./chunk-U6BPS6LO.mjs";
4
4
  import "./chunk-J5LGTIGS.mjs";
5
5
  export {
6
6
  meta
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  meta
3
- } from "./chunk-IJ2FIXSI.mjs";
3
+ } from "./chunk-U6BPS6LO.mjs";
4
4
  import "./chunk-J5LGTIGS.mjs";
5
5
 
6
6
  // src/plugin.ts
@@ -18,7 +18,7 @@ var translations = [
18
18
  "delete-object.label": "Delete masonry",
19
19
  "object-deleted.label": "Masonry deleted"
20
20
  },
21
- [meta.id]: {
21
+ [meta.profile.key]: {
22
22
  "plugin.name": "Masonry"
23
23
  }
24
24
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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"]
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.profile.key]: {\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,QAAQC,GAAG,GAAG;QAClB,eAAe;MACjB;IACF;EACF;;",
6
+ "names": ["Type", "meta", "Masonry", "translations", "getTypename", "profile", "key"]
7
7
  }
@@ -0,0 +1,28 @@
1
+ declare const _default: {
2
+ readonly plugin: {
3
+ readonly key: string;
4
+ readonly name: string;
5
+ readonly description?: string | undefined;
6
+ readonly author?: string | undefined;
7
+ readonly homePage?: string | undefined;
8
+ readonly source?: string | undefined;
9
+ readonly screenshots?: readonly {
10
+ readonly light?: string | undefined;
11
+ readonly dark?: string | undefined;
12
+ }[] | undefined;
13
+ readonly tags?: readonly string[] | undefined;
14
+ readonly icon?: {
15
+ readonly key: string;
16
+ readonly hue?: string | undefined;
17
+ } | undefined;
18
+ readonly spec?: string | undefined;
19
+ readonly dependsOn?: readonly string[] | undefined;
20
+ };
21
+ readonly publish?: {
22
+ readonly buildCommand?: string | undefined;
23
+ readonly outputDirectory?: string | undefined;
24
+ readonly assetBaseUrl?: string | undefined;
25
+ } | undefined;
26
+ };
27
+ export default _default;
28
+ //# sourceMappingURL=dx.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dx.config.d.ts","sourceRoot":"","sources":["../../dx.config.ts"],"names":[],"mappings":""}
@@ -1,9 +1,4 @@
1
1
  import { Capability } from '@dxos/app-framework';
2
- export declare const CreateObject: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<Readonly<{
3
- id: string;
4
- createObject: import("@dxos/plugin-space").CreateObject;
5
- inputSchema?: import("effect/Schema").Schema.AnyNoContext;
6
- customPanel?: import("react").ComponentType<import("@dxos/plugin-space").SpaceCapabilities.CreateObjectCustomPanelProps>;
7
- }>>>, Error>;
8
- export declare const ReactSurface: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Capabilities").ReactSurface>>, Error>;
2
+ export declare const CreateObject: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
3
+ export declare const ReactSurface: Capability.LazyCapability<void, Capability.ModuleReturn, Error>;
9
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY;;;;;YAAmE,CAAC;AAC7F,eAAO,MAAM,YAAY,iJAAmE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,iEAAmE,CAAC;AAC7F,eAAO,MAAM,YAAY,iEAAmE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as Effect from 'effect/Effect';
2
- import { Capabilities, Capability } from '@dxos/app-framework';
3
- declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Capabilities.ReactSurface>>, never, never>;
2
+ import { Capability } from '@dxos/app-framework';
3
+ declare const _default: (props: void) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<any>>, never, never>;
4
4
  export default _default;
5
5
  //# sourceMappingURL=react-surface.d.ts.map
@@ -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,EAAgB,UAAU,EAAE,MAAM,qBAAqB,CAAC"}