@dxos/plugin-stack 0.8.3-staging.0fa589b → 0.8.4-main.3f58842

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 (53) hide show
  1. package/dist/lib/browser/{StackMain-VQUBQKYP.mjs → StackMain-ET24BQFZ.mjs} +12 -11
  2. package/dist/lib/browser/StackMain-ET24BQFZ.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-XHZTILS3.mjs → chunk-FVB7LGW7.mjs} +2 -2
  4. package/dist/lib/browser/{chunk-KBJKTX5V.mjs → chunk-IRTROCUQ.mjs} +2 -2
  5. package/dist/lib/browser/index.mjs +10 -10
  6. package/dist/lib/browser/index.mjs.map +3 -3
  7. package/dist/lib/browser/meta.json +1 -1
  8. package/dist/lib/browser/{react-surface-7NC5QPP4.mjs → react-surface-KODSQDIY.mjs} +8 -8
  9. package/dist/lib/browser/types/index.mjs +1 -1
  10. package/dist/lib/node-esm/{StackMain-7L5JME2D.mjs → StackMain-LCMLZ4MS.mjs} +12 -11
  11. package/dist/lib/node-esm/StackMain-LCMLZ4MS.mjs.map +7 -0
  12. package/dist/lib/node-esm/{chunk-KEWNJDTP.mjs → chunk-LRAZXJ65.mjs} +2 -2
  13. package/dist/lib/node-esm/{chunk-YW7WYA4H.mjs → chunk-UN5PA7TK.mjs} +2 -2
  14. package/dist/lib/node-esm/index.mjs +10 -10
  15. package/dist/lib/node-esm/index.mjs.map +3 -3
  16. package/dist/lib/node-esm/meta.json +1 -1
  17. package/dist/lib/node-esm/{react-surface-2ODZHHA7.mjs → react-surface-SWMUVIYU.mjs} +8 -8
  18. package/dist/lib/node-esm/types/index.mjs +1 -1
  19. package/dist/types/src/components/StackMain.d.ts.map +1 -1
  20. package/dist/types/src/translations.d.ts +35 -35
  21. package/dist/types/src/translations.d.ts.map +1 -1
  22. package/dist/types/src/types/index.d.ts +1 -1
  23. package/dist/types/src/types/index.d.ts.map +1 -1
  24. package/dist/types/src/types/types.d.ts +4 -2
  25. package/dist/types/src/types/types.d.ts.map +1 -1
  26. package/dist/types/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +25 -27
  28. package/src/StackPlugin.ts +1 -1
  29. package/src/components/StackMain.tsx +2 -3
  30. package/src/translations.ts +5 -4
  31. package/src/types/index.ts +1 -1
  32. package/src/types/types.ts +1 -2
  33. package/dist/lib/browser/StackMain-VQUBQKYP.mjs.map +0 -7
  34. package/dist/lib/node/StackMain-33HO2PMZ.cjs +0 -314
  35. package/dist/lib/node/StackMain-33HO2PMZ.cjs.map +0 -7
  36. package/dist/lib/node/chunk-F7ZNJ53O.cjs +0 -43
  37. package/dist/lib/node/chunk-F7ZNJ53O.cjs.map +0 -7
  38. package/dist/lib/node/chunk-R6Q5AF3V.cjs +0 -51
  39. package/dist/lib/node/chunk-R6Q5AF3V.cjs.map +0 -7
  40. package/dist/lib/node/index.cjs +0 -123
  41. package/dist/lib/node/index.cjs.map +0 -7
  42. package/dist/lib/node/meta.json +0 -1
  43. package/dist/lib/node/react-surface-BUYFGQTR.cjs +0 -64
  44. package/dist/lib/node/react-surface-BUYFGQTR.cjs.map +0 -7
  45. package/dist/lib/node/types/index.cjs +0 -31
  46. package/dist/lib/node/types/index.cjs.map +0 -7
  47. package/dist/lib/node-esm/StackMain-7L5JME2D.mjs.map +0 -7
  48. /package/dist/lib/browser/{chunk-XHZTILS3.mjs.map → chunk-FVB7LGW7.mjs.map} +0 -0
  49. /package/dist/lib/browser/{chunk-KBJKTX5V.mjs.map → chunk-IRTROCUQ.mjs.map} +0 -0
  50. /package/dist/lib/browser/{react-surface-7NC5QPP4.mjs.map → react-surface-KODSQDIY.mjs.map} +0 -0
  51. /package/dist/lib/node-esm/{chunk-KEWNJDTP.mjs.map → chunk-LRAZXJ65.mjs.map} +0 -0
  52. /package/dist/lib/node-esm/{chunk-YW7WYA4H.mjs.map → chunk-UN5PA7TK.mjs.map} +0 -0
  53. /package/dist/lib/node-esm/{react-surface-2ODZHHA7.mjs.map → react-surface-SWMUVIYU.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-stack",
3
- "version": "0.8.3-staging.0fa589b",
3
+ "version": "0.8.4-main.3f58842",
4
4
  "description": "DXOS Surface plugin for Stack entities",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -37,47 +37,45 @@
37
37
  "@preact-signals/safe-react": "^0.9.0",
38
38
  "@preact/signals-core": "^1.9.0",
39
39
  "@radix-ui/react-collapsible": "1.1.3",
40
- "effect": "3.14.21",
40
+ "effect": "3.17.0",
41
41
  "node-fetch": "^2.6.0",
42
42
  "react-is": "~18.2.0",
43
- "@dxos/app-framework": "0.8.3-staging.0fa589b",
44
- "@dxos/async": "0.8.3-staging.0fa589b",
45
- "@dxos/echo": "0.8.3-staging.0fa589b",
46
- "@dxos/client": "0.8.3-staging.0fa589b",
47
- "@dxos/echo-schema": "0.8.3-staging.0fa589b",
48
- "@dxos/invariant": "0.8.3-staging.0fa589b",
49
- "@dxos/local-storage": "0.8.3-staging.0fa589b",
50
- "@dxos/plugin-client": "0.8.3-staging.0fa589b",
51
- "@dxos/plugin-graph": "0.8.3-staging.0fa589b",
52
- "@dxos/plugin-deck": "0.8.3-staging.0fa589b",
53
- "@dxos/plugin-space": "0.8.3-staging.0fa589b",
54
- "@dxos/react-client": "0.8.3-staging.0fa589b",
55
- "@dxos/react-ui-attention": "0.8.3-staging.0fa589b",
56
- "@dxos/react-ui-searchlist": "0.8.3-staging.0fa589b",
57
- "@dxos/react-ui-form": "0.8.3-staging.0fa589b",
58
- "@dxos/react-ui-stack": "0.8.3-staging.0fa589b",
59
- "@dxos/schema": "0.8.3-staging.0fa589b",
60
- "@dxos/util": "0.8.3-staging.0fa589b"
43
+ "@dxos/app-framework": "0.8.4-main.3f58842",
44
+ "@dxos/async": "0.8.4-main.3f58842",
45
+ "@dxos/client": "0.8.4-main.3f58842",
46
+ "@dxos/echo": "0.8.4-main.3f58842",
47
+ "@dxos/echo-schema": "0.8.4-main.3f58842",
48
+ "@dxos/invariant": "0.8.4-main.3f58842",
49
+ "@dxos/local-storage": "0.8.4-main.3f58842",
50
+ "@dxos/plugin-client": "0.8.4-main.3f58842",
51
+ "@dxos/plugin-deck": "0.8.4-main.3f58842",
52
+ "@dxos/plugin-graph": "0.8.4-main.3f58842",
53
+ "@dxos/react-ui-attention": "0.8.4-main.3f58842",
54
+ "@dxos/plugin-space": "0.8.4-main.3f58842",
55
+ "@dxos/react-client": "0.8.4-main.3f58842",
56
+ "@dxos/react-ui-form": "0.8.4-main.3f58842",
57
+ "@dxos/react-ui-searchlist": "0.8.4-main.3f58842",
58
+ "@dxos/schema": "0.8.4-main.3f58842",
59
+ "@dxos/react-ui-stack": "0.8.4-main.3f58842",
60
+ "@dxos/util": "0.8.4-main.3f58842"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@babel/core": "^7.18.13",
64
- "@phosphor-icons/react": "^2.1.5",
65
64
  "@types/react": "~18.2.0",
66
65
  "@types/react-dom": "~18.2.0",
67
66
  "react": "~18.2.0",
68
67
  "react-dom": "~18.2.0",
69
68
  "vite": "5.4.7",
70
- "@dxos/react-ui": "0.8.3-staging.0fa589b",
71
- "@dxos/storybook-utils": "0.8.3-staging.0fa589b",
72
- "@dxos/react-ui-theme": "0.8.3-staging.0fa589b"
69
+ "@dxos/react-ui": "0.8.4-main.3f58842",
70
+ "@dxos/react-ui-theme": "0.8.4-main.3f58842",
71
+ "@dxos/storybook-utils": "0.8.4-main.3f58842"
73
72
  },
74
73
  "peerDependencies": {
75
- "@phosphor-icons/react": "^2.1.5",
76
74
  "effect": "^3.13.3",
77
75
  "react": "~18.2.0",
78
76
  "react-dom": "~18.2.0",
79
- "@dxos/react-ui": "0.8.3-staging.0fa589b",
80
- "@dxos/react-ui-theme": "0.8.3-staging.0fa589b"
77
+ "@dxos/react-ui": "0.8.4-main.3f58842",
78
+ "@dxos/react-ui-theme": "0.8.4-main.3f58842"
81
79
  },
82
80
  "publishConfig": {
83
81
  "access": "public"
@@ -8,7 +8,7 @@ import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
8
8
 
9
9
  import { ReactSurface } from './capabilities';
10
10
  import { meta, SECTION_IDENTIFIER } from './meta';
11
- import translations from './translations';
11
+ import { translations } from './translations';
12
12
  import { StackViewType } from './types';
13
13
 
14
14
  export const StackPlugin = () =>
@@ -2,7 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Plus } from '@phosphor-icons/react';
6
5
  import { Option } from 'effect';
7
6
  import React, { useCallback, useState } from 'react';
8
7
 
@@ -17,7 +16,7 @@ import {
17
16
  import { fullyQualifiedId, isLiveObject } from '@dxos/client/echo';
18
17
  import { Obj } from '@dxos/echo';
19
18
  import { SpaceAction } from '@dxos/plugin-space/types';
20
- import { Button, toLocalizedString, useTranslation } from '@dxos/react-ui';
19
+ import { Icon, Button, toLocalizedString, useTranslation } from '@dxos/react-ui';
21
20
  import { AttentionProvider } from '@dxos/react-ui-attention';
22
21
  import { Stack } from '@dxos/react-ui-stack';
23
22
  import { type DataType } from '@dxos/schema';
@@ -148,7 +147,7 @@ const StackMain = ({ id, collection }: StackMainProps) => {
148
147
 
149
148
  <div role='none' className='flex mlb-2 pli-2 justify-center'>
150
149
  <Button data-testid='stack.createSection' classNames='gap-2' onClick={handleAddSection}>
151
- <Plus />
150
+ <Icon icon='ph--plus' />
152
151
  <span className='sr-only'>{t('add section label')}</span>
153
152
  </Button>
154
153
  </div>
@@ -2,14 +2,15 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
+ import { type Resource } from '@dxos/react-ui';
5
6
  import { translations as stackTranslations } from '@dxos/react-ui-stack';
6
7
 
7
- import { STACK_PLUGIN } from './meta';
8
+ import { meta } from './meta';
8
9
 
9
- export default [
10
+ export const translations = [
10
11
  {
11
12
  'en-US': {
12
- [STACK_PLUGIN]: {
13
+ [meta.id]: {
13
14
  'plugin name': 'Stacks',
14
15
  'settings separation label': 'Separate sections',
15
16
  'add section beforeAll dialog title': 'Add a section to the start',
@@ -33,4 +34,4 @@ export default [
33
34
  },
34
35
  },
35
36
  ...stackTranslations,
36
- ];
37
+ ] as const satisfies Resource[];
@@ -3,4 +3,4 @@
3
3
  //
4
4
 
5
5
  export * from './stack';
6
- export * from './types';
6
+ export type * from './types';
@@ -2,7 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type IconProps } from '@phosphor-icons/react';
6
5
  import { type FC } from 'react';
7
6
 
8
7
  import { type Obj } from '@dxos/echo';
@@ -29,7 +28,7 @@ type StackSectionAction = {
29
28
  testId: string;
30
29
  type: string | [string, { ns: string }];
31
30
  label: string | [string, { ns: string }];
32
- icon: FC<IconProps>;
31
+ icon: FC<{ className?: string; size?: number }>;
33
32
  };
34
33
 
35
34
  export type StackSectionMetadata = {
@@ -1,7 +0,0 @@
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 { Option } from 'effect';\nimport React, { useCallback, useState } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n createIntent,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, isLiveObject } from '@dxos/client/echo';\nimport { Obj } from '@dxos/echo';\nimport { SpaceAction } 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 { type DataType } from '@dxos/schema';\nimport { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\n} from '../types';\n\ntype StackMainProps = {\n id: string;\n collection: DataType.Collection;\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 [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n // TODO(wittjosiah): Re-implement stack views with relations.\n // const defaultStack = useMemo(() => Obj.make(StackViewType, { sections: {} }), [collection]);\n // const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n // useEffect(() => {\n // if (!collection.views[StackViewType.typename]) {\n // collection.views[StackViewType.typename] = Ref.make(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 === (Obj.getTypename(object) ?? '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 ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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 (isLiveObject(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, { useMemo, useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';\nimport { useAttentionAttributes } 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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attentionAttrs = useAttentionAttributes(id);\n const stackItem = useMemo(() => ({ id }), [id]);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={stackItem} role='section' {...attentionAttrs}>\n <StackItem.Heading classNames='attention-surface'>\n <span className='sr-only'>{view.title}</span>\n <StackItem.HeadingStickyContent>\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-right--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-right--regular'\n data-testid='section.navigate-to'\n classNames={sectionActionDimensions}\n />\n )}\n </StackItem.HeadingStickyContent>\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 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,SAASC,cAAc;AACvB,OAAOC,UAASC,aAAaC,YAAAA,iBAAgB;AAE7C,SACEC,cACAC,cACAC,cACAC,aACAC,iBACAC,2BACK;AACP,SAASC,kBAAkBC,oBAAoB;AAC/C,SAASC,WAAW;AACpB,SAASC,mBAAmB;AAC5B,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,aAAa;AAEtB,SAASC,qBAAqB;;;ACnB9B,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,SAASC,gBAAgB;AAEzC,SAASC,eAAe;AACxB,SAASC,cAAcC,MAAMC,gBAAgBC,kBAAkB;AAC/D,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,IAAIC,SAASC,sBA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BAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;MAAKL,WAAU;OAAW7E,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAeR;",
6
- "names": ["Plus", "Option", "React", "useCallback", "useState", "Capabilities", "LayoutAction", "createIntent", "useAppGraph", "useCapabilities", "useIntentDispatcher", "fullyQualifiedId", "isLiveObject", "Obj", "SpaceAction", "Button", "toLocalizedString", "useTranslation", "AttentionProvider", "Stack", "isNonNullable", "createContext", "useContext", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CollapsiblePrimitive", "React", "useMemo", "useState", "Surface", "DropdownMenu", "Icon", "useTranslation", "IconButton", "useAttentionAttributes", "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", "attentionAttrs", "useAttentionAttributes", "stackItem", "useMemo", "React", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "Heading", "classNames", "span", "className", "title", "HeadingStickyContent", "DropdownMenu", "Trigger", "SigilButton", "Icon", "size", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "CaretDownUp", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "collapsedSections", "setCollapsedSections", "useState", "items", "objects", "map", "object", "target", "filter", "isNonNullable", "metadata", "find", "m", "Obj", "getTypename", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "label", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "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,314 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var StackMain_33HO2PMZ_exports = {};
30
- __export(StackMain_33HO2PMZ_exports, {
31
- default: () => StackMain_default
32
- });
33
- module.exports = __toCommonJS(StackMain_33HO2PMZ_exports);
34
- var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
35
- var import_tracking = require("@preact-signals/safe-react/tracking");
36
- var import_react = require("@phosphor-icons/react");
37
- var import_effect = require("effect");
38
- var import_react2 = __toESM(require("react"));
39
- var import_app_framework = require("@dxos/app-framework");
40
- var import_echo = require("@dxos/client/echo");
41
- var import_echo2 = require("@dxos/echo");
42
- var import_types = require("@dxos/plugin-space/types");
43
- var import_react_ui = require("@dxos/react-ui");
44
- var import_react_ui_attention = require("@dxos/react-ui-attention");
45
- var import_react_ui_stack = require("@dxos/react-ui-stack");
46
- var import_util = require("@dxos/util");
47
- var import_react3 = require("react");
48
- var import_tracking2 = require("@preact-signals/safe-react/tracking");
49
- var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
50
- var import_react4 = __toESM(require("react"));
51
- var import_app_framework2 = require("@dxos/app-framework");
52
- var import_react_ui2 = require("@dxos/react-ui");
53
- var import_react_ui_attention2 = require("@dxos/react-ui-attention");
54
- var import_react_ui_stack2 = require("@dxos/react-ui-stack");
55
- var import_react_ui_theme = require("@dxos/react-ui-theme");
56
- var import_tracking3 = require("@preact-signals/safe-react/tracking");
57
- var import_react5 = __toESM(require("react"));
58
- var StackContext = /* @__PURE__ */ (0, import_react3.createContext)({
59
- onCollapse: () => {
60
- },
61
- onNavigate: async () => {
62
- },
63
- onDelete: async () => {
64
- },
65
- onAdd: () => {
66
- }
67
- });
68
- var useStack = () => (0, import_react3.useContext)(StackContext);
69
- var CaretDownUp = ({ children, ...props }) => {
70
- var _effect = (0, import_tracking3.useSignals)();
71
- try {
72
- return /* @__PURE__ */ import_react5.default.createElement("svg", {
73
- xmlns: "http://www.w3.org/2000/svg",
74
- viewBox: "0 0 256 256",
75
- ...props
76
- }, /* @__PURE__ */ import_react5.default.createElement("rect", {
77
- width: "256",
78
- height: "256",
79
- fill: "none"
80
- }), /* @__PURE__ */ import_react5.default.createElement("polyline", {
81
- points: "80 224 128 176 176 224",
82
- fill: "none",
83
- stroke: "currentColor",
84
- strokeLinecap: "round",
85
- strokeLinejoin: "round",
86
- strokeWidth: "16"
87
- }), /* @__PURE__ */ import_react5.default.createElement("polyline", {
88
- points: "80 32 128 80 176 32",
89
- fill: "none",
90
- stroke: "currentColor",
91
- strokeLinecap: "round",
92
- strokeLinejoin: "round",
93
- strokeWidth: "16"
94
- }), children);
95
- } finally {
96
- _effect.f();
97
- }
98
- };
99
- var sectionActionDimensions = "p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min";
100
- var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--regular" } }) => {
101
- var _effect = (0, import_tracking2.useSignals)();
102
- try {
103
- const { t } = (0, import_react_ui2.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
104
- const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
105
- const [optionsMenuOpen, setOptionsMenuOpen] = (0, import_react4.useState)(false);
106
- const attentionAttrs = (0, import_react_ui_attention2.useAttentionAttributes)(id);
107
- const stackItem = (0, import_react4.useMemo)(() => ({
108
- id
109
- }), [
110
- id
111
- ]);
112
- return /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Root, {
113
- asChild: true,
114
- open: !view.collapsed,
115
- onOpenChange: (nextOpen) => onCollapse?.(id, !nextOpen)
116
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Root, {
117
- item: stackItem,
118
- role: "section",
119
- ...attentionAttrs
120
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Heading, {
121
- classNames: "attention-surface"
122
- }, /* @__PURE__ */ import_react4.default.createElement("span", {
123
- className: "sr-only"
124
- }, view.title), /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.HeadingStickyContent, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Root, {
125
- open: optionsMenuOpen,
126
- onOpenChange: setOptionsMenuOpen
127
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Trigger, {
128
- asChild: true
129
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.SigilButton, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
130
- icon,
131
- size: 5,
132
- classNames: "transition-opacity"
133
- }))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Portal, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Viewport, null, view.collapsed ? /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
134
- onClick: () => onNavigate(id),
135
- "data-testid": "section.navigate-to"
136
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
137
- icon: "ph--arrow-right--regular",
138
- size: 5
139
- }), /* @__PURE__ */ import_react4.default.createElement("span", {
140
- className: "mis-2 grow"
141
- }, t("navigate to section label"))) : /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Trigger, {
142
- asChild: true
143
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, null, /* @__PURE__ */ import_react4.default.createElement(CaretDownUp, {
144
- className: (0, import_react_ui_theme.getSize)(5)
145
- }), /* @__PURE__ */ import_react4.default.createElement("span", {
146
- className: "mis-2 grow"
147
- }, t("collapse label")))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
148
- onClick: () => onAdd(id, "before"),
149
- "data-testid": "section.add-before"
150
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
151
- icon: "ph--arrow-line-up--regular",
152
- size: 5
153
- }), /* @__PURE__ */ import_react4.default.createElement("span", {
154
- className: "mis-2 grow"
155
- }, t("add section before label"))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
156
- onClick: () => onAdd(id, "after"),
157
- "data-testid": "section.add-after"
158
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
159
- icon: "ph--arrow-line-down--regular",
160
- size: 5
161
- }), /* @__PURE__ */ import_react4.default.createElement("span", {
162
- className: "mis-2 grow"
163
- }, t("add section after label"))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Item, {
164
- onClick: () => onDelete(id),
165
- "data-testid": "section.remove"
166
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
167
- icon: "ph--trash--regular",
168
- size: 5
169
- }), /* @__PURE__ */ import_react4.default.createElement("span", {
170
- className: "mis-2 grow"
171
- }, t("remove section label")))), /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.DropdownMenu.Arrow, null)))), view.collapsed ? /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Trigger, {
172
- asChild: true
173
- }, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.IconButton, {
174
- iconOnly: true,
175
- variant: "ghost",
176
- label: t("expand label"),
177
- icon: "ph--caret-up-down--regular",
178
- classNames: sectionActionDimensions
179
- })) : /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.IconButton, {
180
- iconOnly: true,
181
- variant: "ghost",
182
- onClick: () => onNavigate(id),
183
- label: t("navigate to section label"),
184
- icon: "ph--arrow-right--regular",
185
- "data-testid": "section.navigate-to",
186
- classNames: sectionActionDimensions
187
- }))), /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_app_framework2.Surface, {
188
- role: "section",
189
- data: {
190
- subject: object
191
- },
192
- limit: 1,
193
- placeholder: /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null)
194
- })), view.collapsed && /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Content, {
195
- classNames: "attention-surface"
196
- }, /* @__PURE__ */ import_react4.default.createElement("h2", {
197
- className: (0, import_react_ui_theme.mx)("flex items-center p-4 font-medium", import_react_ui_theme.textBlockWidth)
198
- }, view.title))));
199
- } finally {
200
- _effect.f();
201
- }
202
- };
203
- var StackMain = ({ id, collection }) => {
204
- var _effect = (0, import_tracking.useSignals)();
205
- try {
206
- const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
207
- const { graph } = (0, import_app_framework.useAppGraph)();
208
- const { t } = (0, import_react_ui.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
209
- const allMetadata = (0, import_app_framework.useCapabilities)(import_app_framework.Capabilities.Metadata);
210
- const [collapsedSections, setCollapsedSections] = (0, import_react2.useState)({});
211
- const items = collection.objects.map((object) => object.target).filter(import_util.isNonNullable).map((object) => {
212
- const metadata = allMetadata.find((m) => m.id === (import_echo2.Obj.getTypename(object) ?? "never"))?.metadata;
213
- const view = {
214
- // ...stack.sections[object.id],
215
- collapsed: collapsedSections[(0, import_echo.fullyQualifiedId)(object)],
216
- title: object?.title ?? // TODO(wittjosiah): `getNode` is not reactive.
217
- (0, import_react_ui.toLocalizedString)(graph.getNode((0, import_echo.fullyQualifiedId)(object)).pipe(import_effect.Option.getOrNull)?.properties.label, t)
218
- };
219
- return {
220
- id: (0, import_echo.fullyQualifiedId)(object),
221
- object,
222
- metadata,
223
- view
224
- };
225
- }) ?? [];
226
- const handleDelete = (0, import_react2.useCallback)(async (id2) => {
227
- const index = collection.objects.map((object2) => object2.target).filter(import_util.isNonNullable).findIndex((section) => (0, import_echo.fullyQualifiedId)(section) === id2);
228
- const object = collection.objects[index].target;
229
- if ((0, import_echo.isLiveObject)(object)) {
230
- await dispatch((0, import_app_framework.createIntent)(import_types.SpaceAction.RemoveObjects, {
231
- objects: [
232
- object
233
- ],
234
- target: collection
235
- }));
236
- }
237
- }, [
238
- collection,
239
- dispatch
240
- ]);
241
- const handleAdd = (0, import_react2.useCallback)(async (id2, position) => {
242
- await dispatch?.(
243
- // TODO(wittjosiah): Use object creation dialog.
244
- (0, import_app_framework.createIntent)(import_app_framework.LayoutAction.UpdateDialog, {
245
- part: "dialog",
246
- subject: `${import_chunk_F7ZNJ53O.STACK_PLUGIN}/AddSectionDialog`,
247
- options: {
248
- blockAlign: "start",
249
- props: {
250
- path: id2,
251
- position,
252
- collection
253
- }
254
- }
255
- })
256
- );
257
- }, [
258
- collection,
259
- dispatch
260
- ]);
261
- const handleNavigate = (0, import_react2.useCallback)(async (id2) => {
262
- await dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.Open, {
263
- part: "main",
264
- subject: [
265
- id2
266
- ]
267
- }));
268
- }, [
269
- dispatch
270
- ]);
271
- const handleCollapse = (0, import_react2.useCallback)((id2, collapsed) => setCollapsedSections((prev) => ({
272
- ...prev,
273
- [id2]: collapsed
274
- })), []);
275
- const handleAddSection = (0, import_react2.useCallback)(() => dispatch?.((0, import_app_framework.createIntent)(import_types.SpaceAction.OpenCreateObject, {
276
- target: collection,
277
- navigable: false
278
- })), [
279
- collection,
280
- dispatch
281
- ]);
282
- return /* @__PURE__ */ import_react2.default.createElement(import_react_ui_attention.AttentionProvider, {
283
- id
284
- }, /* @__PURE__ */ import_react2.default.createElement(StackContext.Provider, {
285
- value: {
286
- onCollapse: handleCollapse,
287
- onNavigate: handleNavigate,
288
- onDelete: handleDelete,
289
- onAdd: handleAdd
290
- }
291
- }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_stack.Stack, {
292
- orientation: "vertical",
293
- size: "intrinsic",
294
- id,
295
- "data-testid": "main.stack"
296
- }, items.map((item) => /* @__PURE__ */ import_react2.default.createElement(StackSection, {
297
- key: item.id,
298
- ...item
299
- }))), /* @__PURE__ */ import_react2.default.createElement("div", {
300
- role: "none",
301
- className: "flex mlb-2 pli-2 justify-center"
302
- }, /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Button, {
303
- "data-testid": "stack.createSection",
304
- classNames: "gap-2",
305
- onClick: handleAddSection
306
- }, /* @__PURE__ */ import_react2.default.createElement(import_react.Plus, null), /* @__PURE__ */ import_react2.default.createElement("span", {
307
- className: "sr-only"
308
- }, t("add section label"))))));
309
- } finally {
310
- _effect.f();
311
- }
312
- };
313
- var StackMain_default = StackMain;
314
- //# sourceMappingURL=StackMain-33HO2PMZ.cjs.map
@@ -1,7 +0,0 @@
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 { Option } from 'effect';\nimport React, { useCallback, useState } from 'react';\n\nimport {\n Capabilities,\n LayoutAction,\n createIntent,\n useAppGraph,\n useCapabilities,\n useIntentDispatcher,\n} from '@dxos/app-framework';\nimport { fullyQualifiedId, isLiveObject } from '@dxos/client/echo';\nimport { Obj } from '@dxos/echo';\nimport { SpaceAction } 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 { type DataType } from '@dxos/schema';\nimport { isNonNullable } from '@dxos/util';\n\nimport { StackContext } from './StackContext';\nimport { StackSection } from './StackSection';\nimport { STACK_PLUGIN } from '../meta';\nimport {\n type AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\n} from '../types';\n\ntype StackMainProps = {\n id: string;\n collection: DataType.Collection;\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 [collapsedSections, setCollapsedSections] = useState<CollapsedSections>({});\n\n // TODO(wittjosiah): Re-implement stack views with relations.\n // const defaultStack = useMemo(() => Obj.make(StackViewType, { sections: {} }), [collection]);\n // const stack = (collection.views[StackViewType.typename]?.target as StackViewType | undefined) ?? defaultStack;\n // useEffect(() => {\n // if (!collection.views[StackViewType.typename]) {\n // collection.views[StackViewType.typename] = Ref.make(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 === (Obj.getTypename(object) ?? '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 ??\n // TODO(wittjosiah): `getNode` is not reactive.\n toLocalizedString(graph.getNode(fullyQualifiedId(object)).pipe(Option.getOrNull)?.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 (isLiveObject(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, { useMemo, useState } from 'react';\n\nimport { Surface } from '@dxos/app-framework';\nimport { DropdownMenu, Icon, useTranslation, IconButton } from '@dxos/react-ui';\nimport { useAttentionAttributes } 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 = 'p-1 mlb-1 shrink-0 min-bs-0 is-[--rail-action] bs-min';\n\nexport type StackSectionProps = StackSectionItem;\n\nexport const StackSection = ({\n id,\n view,\n object,\n metadata: { icon = 'ph--placeholder--regular' },\n}: StackSectionProps) => {\n const { t } = useTranslation(STACK_PLUGIN);\n const { onNavigate, onAdd, onCollapse, onDelete } = useStack();\n const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);\n const attentionAttrs = useAttentionAttributes(id);\n const stackItem = useMemo(() => ({ id }), [id]);\n\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={stackItem} role='section' {...attentionAttrs}>\n <StackItem.Heading classNames='attention-surface'>\n <span className='sr-only'>{view.title}</span>\n <StackItem.HeadingStickyContent>\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-right--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-right--regular'\n data-testid='section.navigate-to'\n classNames={sectionActionDimensions}\n />\n )}\n </StackItem.HeadingStickyContent>\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 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,mBAAqB;AACrB,oBAAuB;AACvB,IAAAA,gBAA6C;AAE7C,2BAOO;AACP,kBAA+C;AAC/C,IAAAC,eAAoB;AACpB,mBAA4B;AAC5B,sBAA0D;AAC1D,gCAAkC;AAClC,4BAAsB;AAEtB,kBAA8B;ACnB9B,IAAAD,gBAA0C;;ACA1C,2BAAsC;AACtC,IAAAA,gBAAyC;AAEzC,IAAAE,wBAAwB;AACxB,IAAAC,mBAA+D;AAC/D,IAAAC,6BAAuC;AACvC,IAAAC,yBAA0B;AAC1B,4BAA4C;;ACP5C,IAAAL,gBAAqD;AFW9C,IAAMM,eAAeC,iDAAiC;EAC3DC,YAAY,MAAA;EAAO;EACnBC,YAAY,YAAA;EAAa;EACzBC,UAAU,YAAA;EAAa;EACvBC,OAAO,MAAA;EAAO;AAChB,CAAA;AAEO,IAAMC,WAAW,UAAMC,0BAAWP,YAAAA;AEhBlC,IAAMQ,cAAc,CAAC,EAAEC,UAAU,GAAGC,MAAAA,MAAwC;;;AACjF,WACE,8BAAAC,QAAA,cAACC,OAAAA;MAAIC,OAAM;MAA6BC,SAAQ;MAAe,GAAGJ;OAChE,8BAAAC,QAAA,cAACI,QAAAA;MAAKC,OAAM;MAAMC,QAAO;MAAMC,MAAK;QACpC,8BAAAP,QAAA,cAACQ,YAAAA;MACCC,QAAO;MACPF,MAAK;MACLG,QAAO;MACPC,eAAc;MACdC,gBAAe;MACfC,aAAY;QAEd,8BAAAb,QAAA,cAACQ,YAAAA;MACCC,QAAO;MACPF,MAAK;MACLG,QAAO;MACPC,eAAc;MACdC,gBAAe;MACfC,aAAY;QA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["import_react", "import_echo", "import_app_framework", "import_react_ui", "import_react_ui_attention", "import_react_ui_stack", "StackContext", "createContext", "onCollapse", "onNavigate", "onDelete", "onAdd", "useStack", "useContext", "CaretDownUp", "children", "props", "React", "svg", "xmlns", "viewBox", "rect", "width", "height", "fill", "polyline", "points", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "sectionActionDimensions", "StackSection", "id", "view", "object", "metadata", "icon", "t", "useTranslation", "STACK_PLUGIN", "optionsMenuOpen", "setOptionsMenuOpen", "useState", "attentionAttrs", "useAttentionAttributes", "stackItem", "useMemo", "Root", "asChild", "open", "collapsed", "onOpenChange", "nextOpen", "StackItem", "item", "role", "Heading", "classNames", "span", "className", "title", "HeadingStickyContent", "DropdownMenu", "Trigger", "SigilButton", "Icon", "size", "Portal", "Content", "Viewport", "Item", "onClick", "data-testid", "getSize", "Arrow", "IconButton", "iconOnly", "variant", "label", "Surface", "data", "subject", "limit", "placeholder", "h2", "mx", "textBlockWidth", "StackMain", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "collapsedSections", "setCollapsedSections", "items", "objects", "map", "target", "filter", "isNonNullable", "find", "m", "Obj", "getTypename", "fullyQualifiedId", "toLocalizedString", "getNode", "pipe", "Option", "getOrNull", "properties", "handleDelete", "useCallback", "index", "findIndex", "section", "isLiveObject", "createIntent", "SpaceAction", "RemoveObjects", "handleAdd", "position", "LayoutAction", "UpdateDialog", "part", "options", "blockAlign", "path", "handleNavigate", "Open", "handleCollapse", "prev", "handleAddSection", "OpenCreateObject", "navigable", "AttentionProvider", "Provider", "value", "Stack", "orientation", "key", "div", "Button", "Plus"]
7
- }