@dxos/plugin-stack 0.7.5-main.499c70c → 0.7.5-main.5ae2ba8

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 (61) hide show
  1. package/dist/lib/browser/{StackMain-HSYQ5B3Y.mjs → StackMain-YP2Z5NZ2.mjs} +31 -30
  2. package/dist/lib/browser/StackMain-YP2Z5NZ2.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-DS5KGEJG.mjs → chunk-WTGFKPPQ.mjs} +3 -3
  4. package/dist/lib/browser/chunk-WTGFKPPQ.mjs.map +7 -0
  5. package/dist/lib/browser/index.mjs +78 -100
  6. package/dist/lib/browser/index.mjs.map +4 -4
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/node/{StackMain-AWN5MFZK.cjs → StackMain-YQ2JF6QE.cjs} +36 -35
  9. package/dist/lib/node/StackMain-YQ2JF6QE.cjs.map +7 -0
  10. package/dist/lib/node/{chunk-PA5PRDM6.cjs → chunk-CZCFFT2J.cjs} +7 -7
  11. package/dist/lib/node/chunk-CZCFFT2J.cjs.map +7 -0
  12. package/dist/lib/node/index.cjs +79 -97
  13. package/dist/lib/node/index.cjs.map +4 -4
  14. package/dist/lib/node/meta.json +1 -1
  15. package/dist/lib/node-esm/{StackMain-EFCZCMIJ.mjs → StackMain-43BFBESK.mjs} +31 -30
  16. package/dist/lib/node-esm/StackMain-43BFBESK.mjs.map +7 -0
  17. package/dist/lib/node-esm/{chunk-JEQMG2E2.mjs → chunk-SJU6TPRI.mjs} +3 -3
  18. package/dist/lib/node-esm/chunk-SJU6TPRI.mjs.map +7 -0
  19. package/dist/lib/node-esm/index.mjs +78 -100
  20. package/dist/lib/node-esm/index.mjs.map +4 -4
  21. package/dist/lib/node-esm/meta.json +1 -1
  22. package/dist/types/src/StackPlugin.d.ts +1 -3
  23. package/dist/types/src/StackPlugin.d.ts.map +1 -1
  24. package/dist/types/src/components/CaretDownUp.d.ts +2 -2
  25. package/dist/types/src/components/CaretDownUp.d.ts.map +1 -1
  26. package/dist/types/src/components/StackMain.d.ts +1 -2
  27. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  28. package/dist/types/src/components/StackSection.d.ts +1 -2
  29. package/dist/types/src/components/StackSection.d.ts.map +1 -1
  30. package/dist/types/src/components/StackSettings.d.ts +1 -2
  31. package/dist/types/src/components/StackSettings.d.ts.map +1 -1
  32. package/dist/types/src/components/index.d.ts +2 -2
  33. package/dist/types/src/components/index.d.ts.map +1 -1
  34. package/dist/types/src/index.d.ts +1 -3
  35. package/dist/types/src/index.d.ts.map +1 -1
  36. package/dist/types/src/meta.d.ts +1 -2
  37. package/dist/types/src/meta.d.ts.map +1 -1
  38. package/dist/types/src/types/stack.d.ts +2 -2
  39. package/dist/types/src/types/types.d.ts +0 -3
  40. package/dist/types/src/types/types.d.ts.map +1 -1
  41. package/dist/types/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +24 -33
  43. package/src/StackPlugin.tsx +39 -38
  44. package/src/components/StackMain.tsx +24 -19
  45. package/src/components/StackSection.tsx +1 -1
  46. package/src/components/StackSettings.tsx +3 -3
  47. package/src/index.ts +1 -6
  48. package/src/meta.ts +1 -1
  49. package/src/types/types.ts +0 -13
  50. package/dist/lib/browser/StackMain-HSYQ5B3Y.mjs.map +0 -7
  51. package/dist/lib/browser/chunk-DS5KGEJG.mjs.map +0 -7
  52. package/dist/lib/browser/meta.mjs +0 -11
  53. package/dist/lib/browser/meta.mjs.map +0 -7
  54. package/dist/lib/node/StackMain-AWN5MFZK.cjs.map +0 -7
  55. package/dist/lib/node/chunk-PA5PRDM6.cjs.map +0 -7
  56. package/dist/lib/node/meta.cjs +0 -32
  57. package/dist/lib/node/meta.cjs.map +0 -7
  58. package/dist/lib/node-esm/StackMain-EFCZCMIJ.mjs.map +0 -7
  59. package/dist/lib/node-esm/chunk-JEQMG2E2.mjs.map +0 -7
  60. package/dist/lib/node-esm/meta.mjs +0 -12
  61. package/dist/lib/node-esm/meta.mjs.map +0 -7
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  STACK_PLUGIN
3
- } from "./chunk-DS5KGEJG.mjs";
3
+ } from "./chunk-WTGFKPPQ.mjs";
4
4
  import {
5
5
  StackViewType
6
6
  } from "./chunk-L34RFJ2L.mjs";
@@ -8,14 +8,13 @@ import {
8
8
  // packages/plugins/plugin-stack/src/components/StackMain.tsx
9
9
  import { Plus } from "@phosphor-icons/react";
10
10
  import React3, { useCallback, useEffect, useMemo, useState as useState2 } from "react";
11
- import { createIntent, LayoutAction, NavigationAction, parseMetadataResolverPlugin, useIntentDispatcher, useResolvePlugin } from "@dxos/app-framework";
11
+ import { Capabilities, createIntent, LayoutAction, useAppGraph, useCapabilities, useIntentDispatcher } from "@dxos/app-framework";
12
12
  import { create, getType, fullyQualifiedId, isReactiveObject, makeRef } from "@dxos/client/echo";
13
- import { useGraph } from "@dxos/plugin-graph";
14
- import { SpaceAction } from "@dxos/plugin-space";
13
+ import { SpaceAction } from "@dxos/plugin-space/types";
15
14
  import { Button, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
16
15
  import { AttentionProvider } from "@dxos/react-ui-attention";
17
16
  import { Stack } from "@dxos/react-ui-stack";
18
- import { nonNullable } from "@dxos/util";
17
+ import { isNonNullable } from "@dxos/util";
19
18
 
20
19
  // packages/plugins/plugin-stack/src/components/StackContext.tsx
21
20
  import { createContext, useContext } from "react";
@@ -167,16 +166,16 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
167
166
  toolbar: false,
168
167
  classNames: "attention-surface"
169
168
  }, /* @__PURE__ */ React2.createElement("h2", {
170
- className: mx("flex items-center p-4 font-medium is-full", textBlockWidth)
169
+ className: mx("flex items-center p-4 font-medium", textBlockWidth)
171
170
  }, view.title))));
172
171
  };
173
172
 
174
173
  // packages/plugins/plugin-stack/src/components/StackMain.tsx
175
174
  var StackMain = ({ id, collection }) => {
176
175
  const { dispatchPromise: dispatch } = useIntentDispatcher();
177
- const { graph } = useGraph();
176
+ const { graph } = useAppGraph();
178
177
  const { t } = useTranslation2(STACK_PLUGIN);
179
- const metadataPlugin = useResolvePlugin(parseMetadataResolverPlugin);
178
+ const allMetadata = useCapabilities(Capabilities.Metadata);
180
179
  const defaultStack = useMemo(() => create(StackViewType, {
181
180
  sections: {}
182
181
  }), [
@@ -192,8 +191,8 @@ var StackMain = ({ id, collection }) => {
192
191
  collection,
193
192
  stack
194
193
  ]);
195
- const items = collection.objects.map((object) => object.target).filter(nonNullable).map((object) => {
196
- const metadata = metadataPlugin?.provides.metadata.resolver(getType(object)?.objectId ?? "never");
194
+ const items = collection.objects.map((object) => object.target).filter(isNonNullable).map((object) => {
195
+ const metadata = allMetadata.find((m) => m.id === (getType(object)?.objectId ?? "never"))?.metadata;
197
196
  const view = {
198
197
  ...stack.sections[object.id],
199
198
  collapsed: collapsedSections[fullyQualifiedId(object)],
@@ -207,7 +206,7 @@ var StackMain = ({ id, collection }) => {
207
206
  };
208
207
  }) ?? [];
209
208
  const handleDelete = useCallback(async (id2) => {
210
- const index = collection.objects.map((object2) => object2.target).filter(nonNullable).findIndex((section) => fullyQualifiedId(section) === id2);
209
+ const index = collection.objects.map((object2) => object2.target).filter(isNonNullable).findIndex((section) => fullyQualifiedId(section) === id2);
211
210
  const object = collection.objects[index].target;
212
211
  if (isReactiveObject(object)) {
213
212
  await dispatch(createIntent(SpaceAction.RemoveObjects, {
@@ -222,29 +221,31 @@ var StackMain = ({ id, collection }) => {
222
221
  dispatch
223
222
  ]);
224
223
  const handleAdd = useCallback(async (id2, position) => {
225
- await dispatch?.(createIntent(LayoutAction.SetLayout, {
226
- element: "dialog",
227
- component: `${STACK_PLUGIN}/AddSectionDialog`,
228
- subject: {
229
- path: id2,
230
- position,
231
- collection
232
- }
233
- }));
224
+ await dispatch?.(
225
+ // TODO(wittjosiah): Use object creation dialog.
226
+ createIntent(LayoutAction.UpdateDialog, {
227
+ part: "dialog",
228
+ subject: `${STACK_PLUGIN}/AddSectionDialog`,
229
+ options: {
230
+ blockAlign: "start",
231
+ props: {
232
+ path: id2,
233
+ position,
234
+ collection
235
+ }
236
+ }
237
+ })
238
+ );
234
239
  }, [
235
240
  collection,
236
241
  dispatch
237
242
  ]);
238
243
  const handleNavigate = useCallback(async (id2) => {
239
- await dispatch(createIntent(NavigationAction.Open, {
240
- activeParts: {
241
- main: [
242
- id2
243
- ]
244
- }
245
- }));
246
- await dispatch(createIntent(LayoutAction.ScrollIntoView, {
247
- id: id2
244
+ await dispatch(createIntent(LayoutAction.Open, {
245
+ part: "main",
246
+ subject: [
247
+ id2
248
+ ]
248
249
  }));
249
250
  }, [
250
251
  dispatch
@@ -292,4 +293,4 @@ var StackMain_default = StackMain;
292
293
  export {
293
294
  StackMain_default as default
294
295
  };
295
- //# sourceMappingURL=StackMain-HSYQ5B3Y.mjs.map
296
+ //# sourceMappingURL=StackMain-YP2Z5NZ2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/StackMain.tsx", "../../../src/components/StackContext.tsx", "../../../src/components/StackSection.tsx", "../../../src/components/CaretDownUp.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plus } from '@phosphor-icons/react';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport {\n Capabilities,\n createIntent,\n LayoutAction,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { create, getType, fullyQualifiedId, isReactiveObject, makeRef } from '@dxos/client/echo';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { type CollectionType } from '@dxos/plugin-space/types';\nimport { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { AttentionProvider } from '@dxos/react-ui-attention';\nimport { Stack } from '@dxos/react-ui-stack';\nimport { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n StackViewType,\n type CollapsedSections,\n type StackSectionMetadata,\n type StackSectionView,\n type StackSectionItem,\n type AddSectionPosition,\n} from '../types';\n\ntype StackMainProps = {\n id: string;\n collection: CollectionType;\n};\n\nconst StackMain = ({ id, collection }: StackMainProps) => {\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n const { graph } = useAppGraph();\n const { t } = useTranslation(STACK_PLUGIN);\n const allMetadata = useCapabilities(Capabilities.Metadata);\n const defaultStack = useMemo(() => create(StackViewType, { sections: {} }), [collection]);\n const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n const [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n useEffect(() => {\n if (!collection.views[StackViewType.typename]) {\n collection.views[StackViewType.typename] = makeRef(stack);\n }\n }, [collection, stack]);\n\n const items =\n collection.objects\n // TODO(wittjosiah): Should the database handle this differently?\n // TODO(wittjosiah): Render placeholders for missing objects so they can be removed from the stack?\n .map((object) => object.target)\n .filter(isNonNullable)\n .map((object) => {\n const metadata = allMetadata.find((m) => m.id === (getType(object)?.objectId ?? 'never'))\n ?.metadata as StackSectionMetadata;\n const view = {\n ...stack.sections[object.id],\n collapsed: collapsedSections[fullyQualifiedId(object)],\n title:\n (object as any)?.title ?? toLocalizedString(graph.findNode(fullyQualifiedId(object))?.properties.label, t),\n } as StackSectionView;\n return { id: fullyQualifiedId(object), object, metadata, view } satisfies StackSectionItem;\n }) ?? [];\n\n const handleDelete = useCallback(\n async (id: string) => {\n const index = collection.objects\n .map((object) => object.target)\n .filter(isNonNullable)\n .findIndex((section) => fullyQualifiedId(section) === id);\n const object = collection.objects[index].target;\n if (isReactiveObject(object)) {\n await dispatch(createIntent(SpaceAction.RemoveObjects, { objects: [object], target: collection }));\n\n // TODO(wittjosiah): The section should also be removed, but needs to be restored if the action is undone.\n // delete stack.sections[Path.last(path)];\n }\n },\n [collection, dispatch],\n );\n\n const handleAdd = useCallback(\n async (id: string, position: AddSectionPosition) => {\n await dispatch?.(\n // TODO(wittjosiah): Use object creation dialog.\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: `${STACK_PLUGIN}/AddSectionDialog`,\n options: {\n blockAlign: 'start',\n props: {\n path: id,\n position,\n collection,\n },\n },\n }),\n );\n },\n [collection, dispatch],\n );\n\n const handleNavigate = useCallback(\n async (id: string) => {\n await dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [id] }));\n },\n [dispatch],\n );\n\n const handleCollapse = useCallback(\n (id: string, collapsed: boolean) => setCollapsedSections((prev) => ({ ...prev, [id]: collapsed })),\n [],\n );\n\n const handleAddSection = useCallback(\n () => dispatch?.(createIntent(SpaceAction.OpenCreateObject, { target: collection, navigable: false })),\n [collection, dispatch],\n );\n\n return (\n <AttentionProvider id={id}>\n <StackContext.Provider\n value={{\n onCollapse: handleCollapse,\n onNavigate: handleNavigate,\n onDelete: handleDelete,\n onAdd: handleAdd,\n }}\n >\n <Stack orientation='vertical' size='intrinsic' id={id} data-testid='main.stack'>\n {items.map((item) => (\n <StackSection key={item.id} {...item} />\n ))}\n </Stack>\n\n <div role='none' className='flex mlb-2 pli-2 justify-center'>\n <Button data-testid='stack.createSection' classNames='gap-2' onClick={handleAddSection}>\n <Plus />\n <span className='sr-only'>{t('add section label')}</span>\n </Button>\n </div>\n </StackContext.Provider>\n </AttentionProvider>\n );\n};\n\nexport default StackMain;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { createContext, useContext } from 'react';\n\nimport { type AddSectionPosition } from '../types';\n\nexport type StackContextValue = {\n onCollapse: (id: string, collapsed: boolean) => void;\n onNavigate: (id: string) => Promise<void>;\n onDelete: (id: string) => Promise<void>;\n onAdd: (id: string, position: AddSectionPosition) => void;\n};\n\nexport const StackContext = createContext<StackContextValue>({\n onCollapse: () => {},\n onNavigate: async () => {},\n onDelete: async () => {},\n onAdd: () => {},\n});\n\nexport const useStack = () => useContext(StackContext);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport React, { useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';\nimport { useAttendableAttributes } from '@dxos/react-ui-attention';\nimport { StackItem } from '@dxos/react-ui-stack';\nimport { mx, getSize, textBlockWidth } from '@dxos/react-ui-theme';\n\nimport { CaretDownUp } from './CaretDownUp';\nimport { useStack } from './StackContext';\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSectionItem } from '../types';\n\nconst sectionActionDimensions = 'm-1 p-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionItem) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attendableAttrs = useAttendableAttributes(id);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attendableAttrs} classNames='border-be border-separator'>\n <StackItem.Heading classNames='attention-surface border-ie !border-separator'>\n <span className='sr-only'>{view.title}</span>\n <div role='none' className='sticky -block-start-px bg-[--sticky-bg]'>\n <DropdownMenu.Root\n {...{\n open: optionsMenuOpen,\n onOpenChange: setOptionsMenuOpen,\n }}\n >\n <DropdownMenu.Trigger asChild>\n <StackItem.SigilButton>\n <Icon icon={icon} size={5} classNames='transition-opacity' />\n </StackItem.SigilButton>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content>\n <DropdownMenu.Viewport>\n {view.collapsed ? (\n <DropdownMenu.Item onClick={() => onNavigate(id)} data-testid='section.navigate-to'>\n <Icon icon='ph--arrow-square-out--regular' size={5} />\n <span className='mis-2 grow'>{t('navigate to section label')}</span>\n </DropdownMenu.Item>\n ) : (\n <CollapsiblePrimitive.Trigger asChild>\n <DropdownMenu.Item>\n <CaretDownUp className={getSize(5)} />\n <span className='mis-2 grow'>{t('collapse label')}</span>\n </DropdownMenu.Item>\n </CollapsiblePrimitive.Trigger>\n )}\n <DropdownMenu.Item onClick={() => onAdd(id, 'before')} data-testid='section.add-before'>\n <Icon icon='ph--arrow-line-up--regular' size={5} />\n <span className='mis-2 grow'>{t('add section before label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onAdd(id, 'after')} data-testid='section.add-after'>\n <Icon icon='ph--arrow-line-down--regular' size={5} />\n <span className='mis-2 grow'>{t('add section after label')}</span>\n </DropdownMenu.Item>\n <DropdownMenu.Item onClick={() => onDelete(id)} data-testid='section.remove'>\n <Icon icon='ph--trash--regular' size={5} />\n <span className='mis-2 grow'>{t('remove section label')}</span>\n </DropdownMenu.Item>\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n {view.collapsed ? (\n <CollapsiblePrimitive.Trigger asChild>\n <IconButton\n iconOnly\n variant='ghost'\n label={t('expand label')}\n icon='ph--caret-up-down--regular'\n classNames={sectionActionDimensions}\n />\n </CollapsiblePrimitive.Trigger>\n ) : (\n <IconButton\n iconOnly\n variant='ghost'\n onClick={() => onNavigate(id)}\n label={t('navigate to section label')}\n icon='ph--arrow-square-out--regular'\n data-testid='section.navigate-to'\n classNames={sectionActionDimensions}\n />\n )}\n </div>\n </StackItem.Heading>\n <CollapsiblePrimitive.Content>\n <Surface role='section' data={{ subject: object }} limit={1} placeholder={<></>} />\n </CollapsiblePrimitive.Content>\n {view.collapsed && (\n <StackItem.Content toolbar={false} classNames='attention-surface'>\n <h2 className={mx('flex items-center p-4 font-medium', textBlockWidth)}>{view.title}</h2>\n </StackItem.Content>\n )}\n </StackItem.Root>\n </CollapsiblePrimitive.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef } from 'react';\n\nexport const CaretDownUp = ({ children, ...props }: ComponentPropsWithoutRef<'svg'>) => {\n return (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' {...props}>\n <rect width='256' height='256' fill='none' />\n <polyline\n points='80 224 128 176 176 224'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n <polyline\n points='80 32 128 80 176 32'\n fill='none'\n stroke='currentColor'\n strokeLinecap='round'\n strokeLinejoin='round'\n strokeWidth='16'\n />\n {children}\n </svg>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;AAIA,SAASA,YAAY;AACrB,OAAOC,UAASC,aAAaC,WAAWC,SAASC,YAAAA,iBAAgB;AAEjE,SACEC,cACAC,cACAC,cACAC,aACAC,iBACAC,2BACK;AACP,SAASC,QAAQC,SAASC,kBAAkBC,kBAAkBC,eAAe;AAC7E,SAASC,mBAAmB;AAE5B,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,qBAAqB;;;ACjB9B,SAASC,eAAeC,kBAAkB;AAWnC,IAAMC,eAAeC,8BAAiC;EAC3DC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,MAAMC,WAAWP,YAAAA;;;AClBzC,YAAYQ,0BAA0B;AACtC,OAAOC,UAASC,gBAAgB;AAEhC,SAASC,eAAe;AACxB,SAASC,cAAcC,MAAMC,gBAAgBC,kBAAkB;AAC/D,SAASC,+BAA+B;AACxC,SAASC,iBAAiB;AAC1B,SAASC,IAAIC,SAASC,sBAAsB;;;ACP5C,OAAOC,WAA8C;AAE9C,IAAMC,cAAc,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;AACjF,SACE,sBAAA,cAACC,OAAAA;I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,OAAA,cAACc,cAAAA;IAAaC,KAAKF,KAAKtF;IAAK,GAAGsF;QAIpC,gBAAAb,OAAA,cAACgB,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,gBAAAlB,OAAA,cAACmB,QAAAA;IAAOP,eAAY;IAAsBQ,YAAW;IAAQC,SAASxB;KACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;IAAKL,WAAU;KAAWpF,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAMzC;AAEA,IAAA,oBAAeR;",
6
+ "names": ["Plus", "React", "useCallback", "useEffect", "useMemo", "useState", "Capabilities", "createIntent", "LayoutAction", "useAppGraph", "useCapabilities", "useIntentDispatcher", "create", "getType", "fullyQualifiedId", "isReactiveObject", "makeRef", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttendableAttributes", "StackItem", "mx", "getSize", "textBlockWidth", "React", "CaretDownUp", "children", "props", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "onNavigate", "onAdd", "onCollapse", "onDelete", "useStack", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attendableAttrs", "useAttendableAttributes", "React", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "classNames", "Heading", "span", "className", "title", "div", "DropdownMenu", "Trigger", "SigilButton", "Icon", "size", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "toolbar", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "create", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "getType", "objectId", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "findNode", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isReactiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "subject", "options", "blockAlign", "props", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "React", "AttentionProvider", "StackContext", "Provider", "value", "onCollapse", "onNavigate", "onDelete", "onAdd", "Stack", "orientation", "size", "data-testid", "item", "StackSection", "key", "div", "role", "className", "Button", "classNames", "onClick", "Plus", "span"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  // packages/plugins/plugin-stack/src/meta.ts
2
2
  var STACK_PLUGIN = "dxos.org/plugin/stack";
3
3
  var SECTION_IDENTIFIER = "dxos.org/type/StackSection";
4
- var meta_default = {
4
+ var meta = {
5
5
  id: STACK_PLUGIN,
6
6
  // TODO(wittjosiah): Prevents "stacks" language from being exposed to users in settings panel.
7
7
  // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.
@@ -14,6 +14,6 @@ var meta_default = {
14
14
  export {
15
15
  STACK_PLUGIN,
16
16
  SECTION_IDENTIFIER,
17
- meta_default
17
+ meta
18
18
  };
19
- //# sourceMappingURL=chunk-DS5KGEJG.mjs.map
19
+ //# sourceMappingURL=chunk-WTGFKPPQ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const STACK_PLUGIN = 'dxos.org/plugin/stack';\nexport const SECTION_IDENTIFIER = 'dxos.org/type/StackSection';\n\nexport const meta = {\n id: STACK_PLUGIN,\n // TODO(wittjosiah): Prevents \"stacks\" language from being exposed to users in settings panel.\n // Conside renaming this to the collection plugin and trying to factor more collections logic from the space plugin.\n name: 'Collections',\n description: 'View collections of objects within the deck.',\n icon: 'ph--stack-simple--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-stack',\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";AAMO,IAAMA,eAAe;AACrB,IAAMC,qBAAqB;AAE3B,IAAMC,OAAO;EAClBC,IAAIH;;;EAGJI,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;AACV;",
6
+ "names": ["STACK_PLUGIN", "SECTION_IDENTIFIER", "meta", "id", "name", "description", "icon", "source"]
7
+ }
@@ -1,18 +1,17 @@
1
1
  import {
2
2
  SECTION_IDENTIFIER,
3
3
  STACK_PLUGIN,
4
- meta_default
5
- } from "./chunk-DS5KGEJG.mjs";
4
+ meta
5
+ } from "./chunk-WTGFKPPQ.mjs";
6
6
  import {
7
- SectionSchema,
8
7
  StackViewType
9
8
  } from "./chunk-L34RFJ2L.mjs";
10
9
 
11
10
  // packages/plugins/plugin-stack/src/StackPlugin.tsx
12
11
  import React2 from "react";
13
- import { createSurface } from "@dxos/app-framework";
12
+ import { Capabilities, contributes, createSurface, defineModule, definePlugin, Events } from "@dxos/app-framework";
14
13
  import { fullyQualifiedId } from "@dxos/client/echo";
15
- import { LocalStorageStore } from "@dxos/local-storage";
14
+ import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
16
15
  import { CollectionType } from "@dxos/plugin-space/types";
17
16
 
18
17
  // packages/plugins/plugin-stack/src/components/index.ts
@@ -21,19 +20,10 @@ import { lazy } from "react";
21
20
  // packages/plugins/plugin-stack/src/components/StackSettings.tsx
22
21
  import React from "react";
23
22
  import { Input, useTranslation } from "@dxos/react-ui";
24
- import { DeprecatedFormInput } from "@dxos/react-ui-form";
25
- var StackSettings = ({ settings }) => {
26
- const { t } = useTranslation(STACK_PLUGIN);
27
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DeprecatedFormInput, {
28
- label: t("settings separation label")
29
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
30
- checked: settings.separation,
31
- onCheckedChange: (checked) => settings.separation = !!checked
32
- })));
33
- };
23
+ import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
34
24
 
35
25
  // packages/plugins/plugin-stack/src/components/index.ts
36
- var StackMain = lazy(() => import("./StackMain-HSYQ5B3Y.mjs"));
26
+ var StackMain = lazy(() => import("./StackMain-YP2Z5NZ2.mjs"));
37
27
 
38
28
  // packages/plugins/plugin-stack/src/translations.ts
39
29
  import { translations as stackTranslations } from "@dxos/react-ui-stack";
@@ -66,95 +56,83 @@ var translations_default = [
66
56
  ];
67
57
 
68
58
  // packages/plugins/plugin-stack/src/StackPlugin.tsx
69
- var StackPlugin = () => {
70
- const settings = new LocalStorageStore(STACK_PLUGIN, {
71
- separation: true
72
- });
73
- return {
74
- meta: meta_default,
75
- ready: async () => {
76
- settings.prop({
77
- key: "separation",
78
- type: LocalStorageStore.bool()
79
- });
80
- },
81
- provides: {
82
- settings: settings.values,
83
- metadata: {
84
- records: {
85
- [StackViewType.typename]: {
86
- placeholder: [
87
- "stack title placeholder",
88
- {
89
- ns: STACK_PLUGIN
90
- }
91
- ],
92
- icon: "ph--stack-simple--regular"
93
- },
94
- [SECTION_IDENTIFIER]: {
95
- parse: (section, type) => {
96
- switch (type) {
97
- case "node":
98
- return {
99
- id: section.object.id,
100
- label: section.object.title,
101
- data: section.object
102
- };
103
- case "object":
104
- return section.object;
105
- case "view-object":
106
- return section;
107
- }
59
+ var StackPlugin = () => definePlugin(meta, [
60
+ defineModule({
61
+ id: `${meta.id}/module/translations`,
62
+ activatesOn: Events.SetupTranslations,
63
+ activate: () => contributes(Capabilities.Translations, translations_default)
64
+ }),
65
+ defineModule({
66
+ id: `${meta.id}/module/metadata`,
67
+ activatesOn: Events.SetupMetadata,
68
+ activate: () => [
69
+ contributes(Capabilities.Metadata, {
70
+ id: StackViewType.typename,
71
+ metadata: {
72
+ placeholder: [
73
+ "stack title placeholder",
74
+ {
75
+ ns: STACK_PLUGIN
108
76
  }
109
- }
77
+ ],
78
+ icon: "ph--stack-simple--regular"
110
79
  }
111
- },
112
- translations: translations_default,
113
- echo: {
114
- system: [
115
- StackViewType
116
- ]
117
- },
118
- surface: {
119
- definitions: () => [
120
- createSurface({
121
- id: `${STACK_PLUGIN}/article`,
122
- role: "article",
123
- filter: (data) => data.subject instanceof CollectionType,
124
- component: ({ data }) => {
125
- const id = typeof data.id === "string" ? data.id : void 0;
126
- return /* @__PURE__ */ React2.createElement("div", {
127
- role: "none",
128
- className: "overflow-auto",
129
- style: {
130
- contain: "layout"
131
- }
132
- }, /* @__PURE__ */ React2.createElement(StackMain, {
133
- id: id ?? fullyQualifiedId(data.subject),
134
- collection: data.subject
135
- }));
80
+ }),
81
+ contributes(Capabilities.Metadata, {
82
+ id: SECTION_IDENTIFIER,
83
+ metadata: {
84
+ parse: (section, type) => {
85
+ switch (type) {
86
+ case "node":
87
+ return {
88
+ id: section.object.id,
89
+ label: section.object.title,
90
+ data: section.object
91
+ };
92
+ case "object":
93
+ return section.object;
94
+ case "view-object":
95
+ return section;
136
96
  }
137
- }),
138
- createSurface({
139
- id: `${STACK_PLUGIN}/settings`,
140
- role: "settings",
141
- filter: (data) => data.plugin === meta_default.id,
142
- component: () => /* @__PURE__ */ React2.createElement(StackSettings, {
143
- settings: settings.values
144
- })
145
- })
146
- ]
97
+ }
98
+ }
99
+ })
100
+ ]
101
+ }),
102
+ defineModule({
103
+ id: `${meta.id}/module/schema`,
104
+ activatesOn: ClientEvents.SetupSchema,
105
+ activate: () => contributes(ClientCapabilities.Schema, [
106
+ StackViewType
107
+ ])
108
+ }),
109
+ defineModule({
110
+ id: `${meta.id}/module/react-surface`,
111
+ activatesOn: Events.SetupReactSurface,
112
+ activate: () => contributes(Capabilities.ReactSurface, createSurface({
113
+ id: `${STACK_PLUGIN}/article`,
114
+ role: "article",
115
+ filter: (data) => data.subject instanceof CollectionType,
116
+ component: ({ data }) => {
117
+ const id = typeof data.id === "string" ? data.id : void 0;
118
+ return /* @__PURE__ */ React2.createElement("div", {
119
+ role: "none",
120
+ className: "overflow-auto",
121
+ style: {
122
+ contain: "layout"
123
+ }
124
+ }, /* @__PURE__ */ React2.createElement(StackMain, {
125
+ id: id ?? fullyQualifiedId(data.subject),
126
+ collection: data.subject
127
+ }));
147
128
  }
148
- }
149
- };
150
- };
151
-
152
- // packages/plugins/plugin-stack/src/index.ts
153
- var src_default = StackPlugin;
129
+ }))
130
+ })
131
+ ]);
154
132
  export {
155
- SectionSchema,
133
+ SECTION_IDENTIFIER,
134
+ STACK_PLUGIN,
156
135
  StackPlugin,
157
- StackViewType,
158
- src_default as default
136
+ meta
159
137
  };
160
138
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { createSurface, type PluginDefinition } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { LocalStorageStore } from '@dxos/local-storage';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain, StackSettings } from './components';\nimport meta, { SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\nimport { type StackPluginProvides, type StackSettingsProps } from './types';\n\nexport const StackPlugin = (): PluginDefinition<StackPluginProvides> => {\n const settings = new LocalStorageStore<StackSettingsProps>(STACK_PLUGIN, { separation: true });\n\n return {\n meta,\n ready: async () => {\n settings.prop({ key: 'separation', type: LocalStorageStore.bool() });\n },\n provides: {\n settings: settings.values,\n metadata: {\n records: {\n [StackViewType.typename]: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n [SECTION_IDENTIFIER]: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n },\n },\n translations,\n echo: {\n system: [StackViewType],\n },\n surface: {\n definitions: () => [\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n createSurface({\n id: `${STACK_PLUGIN}/settings`,\n role: 'settings',\n filter: (data): data is any => data.plugin === meta.id,\n component: () => <StackSettings settings={settings.values} />,\n }),\n ],\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { StackPlugin } from './StackPlugin';\n\nexport default StackPlugin;\n\nexport * from './types';\n\nexport * from './StackPlugin';\n"],
5
- "mappings": ";;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,qBAA4C;AACrD,SAAkCC,wBAAwB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,sBAAsB;;;ACL/B,SAASC,YAAY;;;ACArB,OAAOC,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,2BAA2B;AAK7B,IAAMC,gBAAgB,CAAC,EAAEC,SAAQ,MAAoC;AAC1E,QAAM,EAAEC,EAAC,IAAKC,eAAeC,YAAAA;AAE7B,SACE,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAACC,qBA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F;MACAM;MACAC,MAAM;QACJC,QAAQ;UAACf;;MACX;MACAgB,SAAS;QACPC,aAAa,MAAM;UACjBC,cAAc;YACZV,IAAI,GAAGpB,YAAAA;YACP+B,MAAM;YACNC,QAAQ,CAACR,SAA2DA,KAAKS,mBAAmBC;YAC5FC,WAAW,CAAC,EAAEX,KAAI,MAAE;AAGlB,oBAAMJ,KAAK,OAAOI,KAAKJ,OAAO,WAAWI,KAAKJ,KAAKgB;AACnD,qBACE,gBAAAC,OAAA,cAACC,OAAAA;gBAAIP,MAAK;gBAAOQ,WAAU;gBAAgBC,OAAO;kBAAEC,SAAS;gBAAS;iBACpE,gBAAAJ,OAAA,cAACK,WAAAA;gBAAUtB,IAAIA,MAAMuB,iBAAiBnB,KAAKS,OAAO;gBAAGW,YAAYpB,KAAKS;;YAG5E;UACF,CAAA;UACAH,cAAc;YACZV,IAAI,GAAGpB,YAAAA;YACP+B,MAAM;YACNC,QAAQ,CAACR,SAAsBA,KAAKqB,WAAW3C,aAAKkB;YACpDe,WAAW,MAAM,gBAAAE,OAAA,cAACS,eAAAA;cAAchD,UAAUA,SAASW;;UACrD,CAAA;;MAEJ;IACF;EACF;AACF;;;AIzEA,IAAA,cAAesC;",
6
- "names": ["React", "createSurface", "fullyQualifiedId", "LocalStorageStore", "CollectionType", "lazy", "React", "Input", "useTranslation", "DeprecatedFormInput", "StackSettings", "settings", "t", "useTranslation", "STACK_PLUGIN", "DeprecatedFormInput", "label", "Input", "Switch", "checked", "separation", "onCheckedChange", "StackMain", "lazy", "translations", "stackTranslations", "STACK_PLUGIN", "stackTranslations", "StackPlugin", "settings", "LocalStorageStore", "STACK_PLUGIN", "separation", "meta", "ready", "prop", "key", "type", "bool", "provides", "values", "metadata", "records", "StackViewType", "typename", "placeholder", "ns", "icon", "SECTION_IDENTIFIER", "parse", "section", "id", "object", "label", "title", "data", "translations", "echo", "system", "surface", "definitions", "createSurface", "role", "filter", "subject", "CollectionType", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection", "plugin", "StackSettings", "StackPlugin"]
3
+ "sources": ["../../../src/StackPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx", "../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { type ReactiveEchoObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\nimport { CollectionType } from '@dxos/plugin-space/types';\n\nimport { StackMain } from './components';\nimport { meta, SECTION_IDENTIFIER, STACK_PLUGIN } from './meta';\nimport translations from './translations';\nimport { StackViewType } from './types';\n\nexport const StackPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () => [\n contributes(Capabilities.Metadata, {\n id: StackViewType.typename,\n metadata: {\n placeholder: ['stack title placeholder', { ns: STACK_PLUGIN }],\n icon: 'ph--stack-simple--regular',\n },\n }),\n contributes(Capabilities.Metadata, {\n id: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: ReactiveEchoObject<any> }, type: string) => {\n switch (type) {\n case 'node':\n // TODO(wittjosiah): Remove cast.\n return { id: section.object.id, label: section.object.title, data: section.object };\n case 'object':\n return section.object;\n case 'view-object':\n return section;\n }\n },\n },\n }),\n ],\n }),\n defineModule({\n id: `${meta.id}/module/schema`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () => contributes(ClientCapabilities.Schema, [StackViewType]),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => data.subject instanceof CollectionType,\n component: ({ data }) => {\n // This allows the id to be overridden by the surface for situations where the id of the collection\n // is not the same as the id of what is being represented (e.g., a space with a root collection).\n const id = typeof data.id === 'string' ? data.id : undefined;\n return (\n <div role='none' className='overflow-auto' style={{ contain: 'layout' }}>\n <StackMain id={id ?? fullyQualifiedId(data.subject)} collection={data.subject} />\n </div>\n );\n },\n }),\n ),\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const StackMain = lazy(() => import('./StackMain'));\n\nexport * from './StackSettings';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { STACK_PLUGIN } from '../meta';\nimport { type StackSettingsProps } from '../types';\n\nexport const StackSettings = ({ settings }: { settings: StackSettingsProps }) => {\n const { t } = useTranslation(STACK_PLUGIN);\n\n return (\n <DeprecatedFormContainer>\n <DeprecatedFormInput label={t('settings separation label')}>\n <Input.Switch checked={settings.separation} onCheckedChange={(checked) => (settings.separation = !!checked)} />\n </DeprecatedFormInput>\n </DeprecatedFormContainer>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { translations as stackTranslations } from '@dxos/react-ui-stack';\n\nimport { STACK_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [STACK_PLUGIN]: {\n 'plugin name': 'Stacks',\n 'settings separation label': 'Separate sections',\n 'add section beforeAll dialog title': 'Add a section to the start',\n 'add section afterAll dialog title': 'Add a section to the end',\n 'add section before dialog title': 'Add a section',\n 'add section after dialog title': 'Add a section',\n 'add section input placeholder': 'Find the type of section to add',\n 'upload file label': 'Add file',\n 'add section label': 'Add section',\n 'empty stack message': 'Drag items into the stack.',\n 'remove section label': 'Delete',\n 'navigate to section label': 'Navigate to item',\n 'untitled section title': 'Untitled section',\n 'add section before label': 'Add before',\n 'add section after label': 'Add after',\n 'expand label': 'Expand',\n 'collapse label': 'Collapse',\n 'drag handle label': 'Press space or enter to begin dragging this item.',\n },\n },\n },\n ...stackTranslations,\n];\n"],
5
+ "mappings": ";;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,aAAaC,eAAeC,cAAcC,cAAcC,cAAc;AAC7F,SAAkCC,wBAAwB;AAC1D,SAASC,oBAAoBC,oBAAoB;AACjD,SAASC,sBAAsB;;;ACL/B,SAASC,YAAY;;;ACArB,OAAOC,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,yBAAyBC,2BAA2B;;;ADDtD,IAAMC,YAAYC,KAAK,MAAM,OAAO,0BAAA,CAAA;;;AEF3C,SAASC,gBAAgBC,yBAAyB;AAIlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,6BAA6B;QAC7B,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,qBAAqB;MACvB;IACF;EACF;KACGC;;;;AHjBE,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MAAM;MACdC,YAAYC,aAAaI,UAAU;QACjCV,IAAIW,cAAcC;QAClBC,UAAU;UACRC,aAAa;YAAC;YAA2B;cAAEC,IAAIC;YAAa;;UAC5DC,MAAM;QACR;MACF,CAAA;MACAZ,YAAYC,aAAaI,UAAU;QACjCV,IAAIkB;QACJL,UAAU;UACRM,OAAO,CAACC,SAA8CC,SAAAA;AACpD,oBAAQA,MAAAA;cACN,KAAK;AAEH,uBAAO;kBAAErB,IAAIoB,QAAQE,OAAOtB;kBAAIuB,OAAOH,QAAQE,OAAOE;kBAAOC,MAAML,QAAQE;gBAAO;cACpF,KAAK;AACH,uBAAOF,QAAQE;cACjB,KAAK;AACH,uBAAOF;YACX;UACF;QACF;MACF,CAAA;;EAEJ,CAAA;EACArB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAayB,aAAaC;IAC1BvB,UAAU,MAAMC,YAAYuB,mBAAmBC,QAAQ;MAAClB;KAAc;EACxE,CAAA;EACAZ,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO4B;IACpB1B,UAAU,MACRC,YACEC,aAAayB,cACbC,cAAc;MACZhC,IAAI,GAAGgB,YAAAA;MACPiB,MAAM;MACNC,QAAQ,CAACT,SAA2DA,KAAKU,mBAAmBC;MAC5FC,WAAW,CAAC,EAAEZ,KAAI,MAAE;AAGlB,cAAMzB,KAAK,OAAOyB,KAAKzB,OAAO,WAAWyB,KAAKzB,KAAKsC;AACnD,eACE,gBAAAC,OAAA,cAACC,OAAAA;UAAIP,MAAK;UAAOQ,WAAU;UAAgBC,OAAO;YAAEC,SAAS;UAAS;WACpE,gBAAAJ,OAAA,cAACK,WAAAA;UAAU5C,IAAIA,MAAM6C,iBAAiBpB,KAAKU,OAAO;UAAGW,YAAYrB,KAAKU;;MAG5E;IACF,CAAA,CAAA;EAEN,CAAA;CACD;",
6
+ "names": ["React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "fullyQualifiedId", "ClientCapabilities", "ClientEvents", "CollectionType", "lazy", "React", "Input", "useTranslation", "DeprecatedFormContainer", "DeprecatedFormInput", "StackMain", "lazy", "translations", "stackTranslations", "STACK_PLUGIN", "stackTranslations", "StackPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "StackViewType", "typename", "metadata", "placeholder", "ns", "STACK_PLUGIN", "icon", "SECTION_IDENTIFIER", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "SetupReactSurface", "ReactSurface", "createSurface", "role", "filter", "subject", "CollectionType", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2237,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2624,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17526,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2607,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18858,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":873,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":11494,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":854,"imports":[{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8687},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/StackMain-HSYQ5B3Y.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SectionSchema","StackPlugin","StackViewType","default"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":2596},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":564},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176},"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":31}},"bytes":5140},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-stack/src/meta.ts","inputs":{},"bytes":203},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-HSYQ5B3Y.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21860},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-HSYQ5B3Y.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4416},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5160},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11203},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1027},"packages/plugins/plugin-stack/dist/lib/browser/chunk-DS5KGEJG.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":565}},"bytes":720},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":657}}}
1
+ {"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2274,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2814,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1887,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3039,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17506,"imports":[{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx","kind":"import-statement","original":"./CaretDownUp"},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/types/stack.ts":{"bytes":3411,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2111,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":581,"imports":[{"path":"packages/plugins/plugin-stack/src/types/stack.ts","kind":"import-statement","original":"./stack"},{"path":"packages/plugins/plugin-stack/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytes":18779,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackContext.tsx","kind":"import-statement","original":"./StackContext"},{"path":"packages/plugins/plugin-stack/src/components/StackSection.tsx","kind":"import-statement","original":"./StackSection"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/index.ts":{"bytes":873,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/StackSettings.tsx","kind":"import-statement","original":"./StackSettings"},{"path":"packages/plugins/plugin-stack/src/components/StackMain.tsx","kind":"dynamic-import","original":"./StackMain"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4081,"imports":[{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytes":11936,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-stack/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-stack/src/index.ts":{"bytes":592,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.tsx","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8457},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/StackMain-YP2Z5NZ2.mjs","kind":"dynamic-import"},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true}],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","StackPlugin","meta"],"entryPoint":"packages/plugins/plugin-stack/src/index.ts","inputs":{"packages/plugins/plugin-stack/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-stack/src/StackPlugin.tsx":{"bytesInOutput":2490},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":167},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1176}},"bytes":4520},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-stack/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"}],"exports":["SectionSchema","StackViewType"],"entryPoint":"packages/plugins/plugin-stack/src/types/index.ts","inputs":{},"bytes":154},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-YP2Z5NZ2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21751},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-YP2Z5NZ2.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs","kind":"import-statement"},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@radix-ui/react-collapsible","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/components/StackMain.tsx","inputs":{"packages/plugins/plugin-stack/src/components/StackMain.tsx":{"bytesInOutput":4402},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5152},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11181},"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1042},"packages/plugins/plugin-stack/dist/lib/browser/chunk-WTGFKPPQ.mjs":{"imports":[],"exports":["SECTION_IDENTIFIER","STACK_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytesInOutput":557}},"bytes":704},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1614},"packages/plugins/plugin-stack/dist/lib/browser/chunk-L34RFJ2L.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":515},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":657}}}