@dxos/plugin-stack 0.8.1 → 0.8.2-main.2f9c567
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{StackMain-E42SHTS6.mjs → StackMain-BEYRRXDP.mjs} +8 -8
- package/dist/lib/browser/StackMain-BEYRRXDP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-L34RFJ2L.mjs → chunk-XOUJQIK6.mjs} +10 -9
- package/dist/lib/browser/chunk-XOUJQIK6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2 -2
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{StackMain-4N6IFLMF.cjs → StackMain-CON4K2KG.cjs} +13 -13
- package/dist/lib/node/StackMain-CON4K2KG.cjs.map +7 -0
- package/dist/lib/node/{chunk-6IPBX635.cjs → chunk-5QWZH22T.cjs} +12 -11
- package/dist/lib/node/chunk-5QWZH22T.cjs.map +7 -0
- package/dist/lib/node/index.cjs +3 -3
- package/dist/lib/node/index.cjs.map +2 -2
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +3 -3
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{StackMain-QFKYWI2J.mjs → StackMain-ATWBHC6U.mjs} +8 -8
- package/dist/lib/node-esm/StackMain-ATWBHC6U.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3ZYHKSIS.mjs → chunk-3R62SZZT.mjs} +10 -9
- package/dist/lib/node-esm/chunk-3R62SZZT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2 -2
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/components/StackMain.d.ts.map +1 -1
- package/dist/types/src/types/stack.d.ts +11 -11
- package/dist/types/src/types/stack.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +2 -2
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +24 -22
- package/src/StackPlugin.tsx +2 -2
- package/src/components/StackMain.tsx +7 -8
- package/src/components/StackSection.tsx +2 -2
- package/src/types/stack.ts +7 -5
- package/src/types/types.ts +2 -2
- package/dist/lib/browser/StackMain-E42SHTS6.mjs.map +0 -7
- package/dist/lib/browser/chunk-L34RFJ2L.mjs.map +0 -7
- package/dist/lib/node/StackMain-4N6IFLMF.cjs.map +0 -7
- package/dist/lib/node/chunk-6IPBX635.cjs.map +0 -7
- package/dist/lib/node-esm/StackMain-QFKYWI2J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3ZYHKSIS.mjs.map +0 -7
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-XHZTILS3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
StackViewType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XOUJQIK6.mjs";
|
|
7
7
|
|
|
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
11
|
import { Capabilities, createIntent, LayoutAction, useAppGraph, useCapabilities, useIntentDispatcher } from "@dxos/app-framework";
|
|
12
|
-
import {
|
|
12
|
+
import { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from "@dxos/client/echo";
|
|
13
13
|
import { SpaceAction } from "@dxos/plugin-space/types";
|
|
14
14
|
import { Button, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
15
15
|
import { AttentionProvider } from "@dxos/react-ui-attention";
|
|
@@ -105,7 +105,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
105
105
|
onClick: () => onNavigate(id),
|
|
106
106
|
"data-testid": "section.navigate-to"
|
|
107
107
|
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
108
|
-
icon: "ph--arrow-
|
|
108
|
+
icon: "ph--arrow-right--regular",
|
|
109
109
|
size: 5
|
|
110
110
|
}), /* @__PURE__ */ React2.createElement("span", {
|
|
111
111
|
className: "mis-2 grow"
|
|
@@ -152,7 +152,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
152
152
|
variant: "ghost",
|
|
153
153
|
onClick: () => onNavigate(id),
|
|
154
154
|
label: t("navigate to section label"),
|
|
155
|
-
icon: "ph--arrow-
|
|
155
|
+
icon: "ph--arrow-right--regular",
|
|
156
156
|
"data-testid": "section.navigate-to",
|
|
157
157
|
classNames: sectionActionDimensions
|
|
158
158
|
}))), /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ React2.createElement(Surface, {
|
|
@@ -175,7 +175,7 @@ var StackMain = ({ id, collection }) => {
|
|
|
175
175
|
const { graph } = useAppGraph();
|
|
176
176
|
const { t } = useTranslation2(STACK_PLUGIN);
|
|
177
177
|
const allMetadata = useCapabilities(Capabilities.Metadata);
|
|
178
|
-
const defaultStack = useMemo(() =>
|
|
178
|
+
const defaultStack = useMemo(() => live(StackViewType, {
|
|
179
179
|
sections: {}
|
|
180
180
|
}), [
|
|
181
181
|
collection
|
|
@@ -191,7 +191,7 @@ var StackMain = ({ id, collection }) => {
|
|
|
191
191
|
stack
|
|
192
192
|
]);
|
|
193
193
|
const items = collection.objects.map((object) => object.target).filter(isNonNullable).map((object) => {
|
|
194
|
-
const metadata = allMetadata.find((m) => m.id === (
|
|
194
|
+
const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? "never"))?.metadata;
|
|
195
195
|
const view = {
|
|
196
196
|
...stack.sections[object.id],
|
|
197
197
|
collapsed: collapsedSections[fullyQualifiedId(object)],
|
|
@@ -207,7 +207,7 @@ var StackMain = ({ id, collection }) => {
|
|
|
207
207
|
const handleDelete = useCallback(async (id2) => {
|
|
208
208
|
const index = collection.objects.map((object2) => object2.target).filter(isNonNullable).findIndex((section) => fullyQualifiedId(section) === id2);
|
|
209
209
|
const object = collection.objects[index].target;
|
|
210
|
-
if (
|
|
210
|
+
if (isLiveObject(object)) {
|
|
211
211
|
await dispatch(createIntent(SpaceAction.RemoveObjects, {
|
|
212
212
|
objects: [
|
|
213
213
|
object
|
|
@@ -292,4 +292,4 @@ var StackMain_default = StackMain;
|
|
|
292
292
|
export {
|
|
293
293
|
StackMain_default as default
|
|
294
294
|
};
|
|
295
|
-
//# sourceMappingURL=StackMain-
|
|
295
|
+
//# sourceMappingURL=StackMain-BEYRRXDP.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 { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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(() => live(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 === (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 ?? 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 (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, { 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 = 'p-1 mlb-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] p-1 is-full'>\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 </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 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,kBAAkBC,aAAaC,cAAcC,MAAMC,eAAe;AAC3E,SAASC,mBAAwC;AACjD,SAASC,QAAQC,mBAAmBC,kBAAAA,uBAAsB;AAC1D,SAASC,yBAAyB;AAClC,SAASC,aAAa;AACtB,SAASC,qBAAqB;;;AChB9B,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;IAAIC,OAAM;IAA6BC,SAAQ;IAAe,GAAGH;KAChE,sBAAA,cAACI,QAAAA;IAAKC,OAAM;IAAMC,QAAO;IAAMC,MAAK;MACpC,sBAAA,cAACC,YAAAA;IACCC,QAAO;IACPF,MAAK;IACLG,QAAO;IACP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B;KACpE,gBAAAG,OAAA,cAACsB,MAAAA,IAAAA,GACD,gBAAAtB,OAAA,cAACuB,QAAAA;IAAKL,WAAU;KAAWnF,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", "fullyQualifiedId", "getTypename", "isLiveObject", "live", "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", "h2", "mx", "textBlockWidth", "StackMain", "id", "collection", "dispatchPromise", "dispatch", "useIntentDispatcher", "graph", "useAppGraph", "t", "useTranslation", "STACK_PLUGIN", "allMetadata", "useCapabilities", "Capabilities", "Metadata", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "makeRef", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "getTypename", "view", "collapsed", "fullyQualifiedId", "title", "toLocalizedString", "findNode", "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,20 +1,21 @@
|
|
|
1
1
|
// packages/plugins/plugin-stack/src/types/stack.ts
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { TypedObject } from "@dxos/echo-schema";
|
|
4
|
+
var SectionSchema = Schema.Struct({
|
|
5
|
+
height: Schema.optional(Schema.Number),
|
|
5
6
|
// Space for data that isn't stack-specific but is specific to this view instance.
|
|
6
7
|
// e.g. cover/fill for an image
|
|
7
|
-
custom:
|
|
8
|
-
key:
|
|
9
|
-
value:
|
|
8
|
+
custom: Schema.optional(Schema.Record({
|
|
9
|
+
key: Schema.String,
|
|
10
|
+
value: Schema.Any
|
|
10
11
|
}))
|
|
11
12
|
});
|
|
12
13
|
var StackViewType = class extends TypedObject({
|
|
13
14
|
typename: "dxos.org/type/StackView",
|
|
14
15
|
version: "0.1.0"
|
|
15
16
|
})({
|
|
16
|
-
sections:
|
|
17
|
-
key:
|
|
17
|
+
sections: Schema.mutable(Schema.Record({
|
|
18
|
+
key: Schema.String,
|
|
18
19
|
value: SectionSchema
|
|
19
20
|
}))
|
|
20
21
|
}) {
|
|
@@ -24,4 +25,4 @@ export {
|
|
|
24
25
|
SectionSchema,
|
|
25
26
|
StackViewType
|
|
26
27
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-XOUJQIK6.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/stack.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\n\n// All section metadata needs to be optional/have defaults.\n// Any objects added to the collection will start with the section defaults.\n// If an object is removed from the collection without removing the section metadata this is fine.\n// Stack components should clean-up the superfluous data on future edits.\n\nexport const SectionSchema = Schema.Struct({\n height: Schema.optional(Schema.Number),\n // Space for data that isn't stack-specific but is specific to this view instance.\n // e.g. cover/fill for an image\n custom: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n});\n\n// TODO(burdon): Should be just type/Stack?\nexport class StackViewType extends TypedObject({ typename: 'dxos.org/type/StackView', version: '0.1.0' })({\n sections: Schema.mutable(Schema.Record({ key: Schema.String, value: SectionSchema })),\n}) {}\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAOrB,IAAMC,gBAAgBC,OAAOC,OAAO;EACzCC,QAAQF,OAAOG,SAASH,OAAOI,MAAM;;;EAGrCC,QAAQL,OAAOG,SAASH,OAAOM,OAAO;IAAEC,KAAKP,OAAOQ;IAAQC,OAAOT,OAAOU;EAAI,CAAA,CAAA;AAChF,CAAA;AAGO,IAAMC,gBAAN,cAA4BC,YAAY;EAAEC,UAAU;EAA2BC,SAAS;AAAQ,CAAA,EAAG;EACxGC,UAAUf,OAAOgB,QAAQhB,OAAOM,OAAO;IAAEC,KAAKP,OAAOQ;IAAQC,OAAOV;EAAc,CAAA,CAAA;AACpF,CAAA,EAAA;AAAI;",
|
|
6
|
+
"names": ["Schema", "TypedObject", "SectionSchema", "Schema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
|
|
7
|
+
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-XHZTILS3.mjs";
|
|
6
6
|
import {
|
|
7
7
|
StackViewType
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XOUJQIK6.mjs";
|
|
9
9
|
|
|
10
10
|
// packages/plugins/plugin-stack/src/StackPlugin.tsx
|
|
11
11
|
import React2 from "react";
|
|
@@ -24,7 +24,7 @@ import { Input, useTranslation } from "@dxos/react-ui";
|
|
|
24
24
|
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
25
25
|
|
|
26
26
|
// packages/plugins/plugin-stack/src/components/index.ts
|
|
27
|
-
var StackMain = lazy(() => import("./StackMain-
|
|
27
|
+
var StackMain = lazy(() => import("./StackMain-BEYRRXDP.mjs"));
|
|
28
28
|
|
|
29
29
|
// packages/plugins/plugin-stack/src/translations.ts
|
|
30
30
|
import { translations as stackTranslations } from "@dxos/react-ui-stack";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
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
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,aAAaC,eAAeC,cAAcC,cAAcC,cAAc;AAC7F,
|
|
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 AnyLiveObject, fullyQualifiedId } from '@dxos/client/echo';\nimport { isInstanceOf } from '@dxos/echo-schema';\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: SECTION_IDENTIFIER,\n metadata: {\n parse: (section: { object: AnyLiveObject<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 } =>\n isInstanceOf(CollectionType, data.subject),\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 'open chat thread label': 'Open chat thread',\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,SAA6BC,wBAAwB;AACrD,SAASC,oBAAoB;AAC7B,S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AaC;IAC1BjB,UAAU,MAAMC,YAAYiB,mBAAmBC,QAAQ;MAACC;KAAc;EACxE,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAU,MACRC,YACEC,aAAaoB,cACbC,cAAc;MACZ3B,IAAI,GAAG4B,YAAAA;MACPC,MAAM;MACNC,QAAQ,CAACX,SACPY,aAAaC,gBAAgBb,KAAKc,OAAO;MAC3CC,WAAW,CAAC,EAAEf,KAAI,MAAE;AAGlB,cAAMnB,KAAK,OAAOmB,KAAKnB,OAAO,WAAWmB,KAAKnB,KAAKmC;AACnD,eACE,gBAAAC,OAAA,cAACC,OAAAA;UAAIR,MAAK;UAAOS,WAAU;UAAgBC,OAAO;YAAEC,SAAS;UAAS;WACpE,gBAAAJ,OAAA,cAACK,WAAAA;UAAUzC,IAAIA,MAAM0C,iBAAiBvB,KAAKc,OAAO;UAAGU,YAAYxB,KAAKc;;MAG5E;IACF,CAAA,CAAA;EAEN,CAAA;CACD;",
|
|
6
6
|
"names": ["React", "Capabilities", "contributes", "createSurface", "defineModule", "definePlugin", "Events", "fullyQualifiedId", "isInstanceOf", "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", "SECTION_IDENTIFIER", "metadata", "parse", "section", "type", "object", "label", "title", "data", "ClientEvents", "SetupSchema", "ClientCapabilities", "Schema", "StackViewType", "SetupReactSurface", "ReactSurface", "createSurface", "STACK_PLUGIN", "role", "filter", "isInstanceOf", "CollectionType", "subject", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2262,"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":17464,"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":4239,"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":11027,"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/echo-schema","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":8229},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.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/echo-schema","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-E42SHTS6.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":2245},"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":1230}},"bytes":4329},"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-E42SHTS6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21725},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-E42SHTS6.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.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":5146},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11175},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.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}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2262,"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":17442,"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":3631,"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/types/types.ts":{"bytes":2099,"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":18657,"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":4239,"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":11015,"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/echo-schema","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":8219},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.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/echo-schema","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-BEYRRXDP.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":2245},"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":1230}},"bytes":4329},"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-XOUJQIK6.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-BEYRRXDP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21630},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-BEYRRXDP.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.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":4388},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5136},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":771}},"bytes":11151},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1034},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.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-XOUJQIK6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs":{"imports":[{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["SectionSchema","StackViewType"],"inputs":{"packages/plugins/plugin-stack/src/types/stack.ts":{"bytesInOutput":595},"packages/plugins/plugin-stack/src/types/index.ts":{"bytesInOutput":0}},"bytes":737}}}
|
|
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var StackMain_CON4K2KG_exports = {};
|
|
30
|
+
__export(StackMain_CON4K2KG_exports, {
|
|
31
31
|
default: () => StackMain_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(StackMain_CON4K2KG_exports);
|
|
34
34
|
var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_5QWZH22T = require("./chunk-5QWZH22T.cjs");
|
|
36
36
|
var import_react = require("@phosphor-icons/react");
|
|
37
37
|
var import_react2 = __toESM(require("react"));
|
|
38
38
|
var import_app_framework = require("@dxos/app-framework");
|
|
@@ -124,7 +124,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
124
124
|
onClick: () => onNavigate(id),
|
|
125
125
|
"data-testid": "section.navigate-to"
|
|
126
126
|
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui2.Icon, {
|
|
127
|
-
icon: "ph--arrow-
|
|
127
|
+
icon: "ph--arrow-right--regular",
|
|
128
128
|
size: 5
|
|
129
129
|
}), /* @__PURE__ */ import_react4.default.createElement("span", {
|
|
130
130
|
className: "mis-2 grow"
|
|
@@ -171,7 +171,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
171
171
|
variant: "ghost",
|
|
172
172
|
onClick: () => onNavigate(id),
|
|
173
173
|
label: t("navigate to section label"),
|
|
174
|
-
icon: "ph--arrow-
|
|
174
|
+
icon: "ph--arrow-right--regular",
|
|
175
175
|
"data-testid": "section.navigate-to",
|
|
176
176
|
classNames: sectionActionDimensions
|
|
177
177
|
}))), /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Content, null, /* @__PURE__ */ import_react4.default.createElement(import_app_framework2.Surface, {
|
|
@@ -192,23 +192,23 @@ var StackMain = ({ id, collection }) => {
|
|
|
192
192
|
const { graph } = (0, import_app_framework.useAppGraph)();
|
|
193
193
|
const { t } = (0, import_react_ui.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
|
|
194
194
|
const allMetadata = (0, import_app_framework.useCapabilities)(import_app_framework.Capabilities.Metadata);
|
|
195
|
-
const defaultStack = (0, import_react2.useMemo)(() => (0, import_echo.
|
|
195
|
+
const defaultStack = (0, import_react2.useMemo)(() => (0, import_echo.live)(import_chunk_5QWZH22T.StackViewType, {
|
|
196
196
|
sections: {}
|
|
197
197
|
}), [
|
|
198
198
|
collection
|
|
199
199
|
]);
|
|
200
|
-
const stack = collection.views[
|
|
200
|
+
const stack = collection.views[import_chunk_5QWZH22T.StackViewType.typename]?.target ?? defaultStack;
|
|
201
201
|
const [collapsedSections, setCollapsedSections] = (0, import_react2.useState)({});
|
|
202
202
|
(0, import_react2.useEffect)(() => {
|
|
203
|
-
if (!collection.views[
|
|
204
|
-
collection.views[
|
|
203
|
+
if (!collection.views[import_chunk_5QWZH22T.StackViewType.typename]) {
|
|
204
|
+
collection.views[import_chunk_5QWZH22T.StackViewType.typename] = (0, import_echo.makeRef)(stack);
|
|
205
205
|
}
|
|
206
206
|
}, [
|
|
207
207
|
collection,
|
|
208
208
|
stack
|
|
209
209
|
]);
|
|
210
210
|
const items = collection.objects.map((object) => object.target).filter(import_util.isNonNullable).map((object) => {
|
|
211
|
-
const metadata = allMetadata.find((m) => m.id === ((0, import_echo.
|
|
211
|
+
const metadata = allMetadata.find((m) => m.id === ((0, import_echo.getTypename)(object) ?? "never"))?.metadata;
|
|
212
212
|
const view = {
|
|
213
213
|
...stack.sections[object.id],
|
|
214
214
|
collapsed: collapsedSections[(0, import_echo.fullyQualifiedId)(object)],
|
|
@@ -224,7 +224,7 @@ var StackMain = ({ id, collection }) => {
|
|
|
224
224
|
const handleDelete = (0, import_react2.useCallback)(async (id2) => {
|
|
225
225
|
const index = collection.objects.map((object2) => object2.target).filter(import_util.isNonNullable).findIndex((section) => (0, import_echo.fullyQualifiedId)(section) === id2);
|
|
226
226
|
const object = collection.objects[index].target;
|
|
227
|
-
if ((0, import_echo.
|
|
227
|
+
if ((0, import_echo.isLiveObject)(object)) {
|
|
228
228
|
await dispatch((0, import_app_framework.createIntent)(import_types.SpaceAction.RemoveObjects, {
|
|
229
229
|
objects: [
|
|
230
230
|
object
|
|
@@ -306,4 +306,4 @@ var StackMain = ({ id, collection }) => {
|
|
|
306
306
|
}, t("add section label"))))));
|
|
307
307
|
};
|
|
308
308
|
var StackMain_default = StackMain;
|
|
309
|
-
//# sourceMappingURL=StackMain-
|
|
309
|
+
//# sourceMappingURL=StackMain-CON4K2KG.cjs.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 { fullyQualifiedId, getTypename, isLiveObject, live, makeRef } from '@dxos/client/echo';\nimport { SpaceAction, 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 AddSectionPosition,\n type CollapsedSections,\n type StackSectionItem,\n type StackSectionMetadata,\n type StackSectionView,\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(() => live(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 === (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 ?? 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 (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, { 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 = 'p-1 mlb-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] p-1 is-full'>\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 </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 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,IAAAA,gBAAiE;AAEjE,2BAOO;AACP,kBAA2E;AAC3E,mBAAiD;AACjD,sBAA0D;AAC1D,gCAAkC;AAClC,4BAAsB;AACtB,kBAA8B;AChB9B,IAAAA,gBAA0C;ACA1C,2BAAsC;AACtC,IAAAA,gBAAgC;AAEhC,IAAAC,wBAAwB;AACxB,IAAAC,m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I,CAAA,CAAA;EAC/E,GACA;IAACwD;GAAS;AAGZ,QAAMoD,qBAAiBlB,2BACrB,CAAC1F,KAAYgB,cAAuB0D,qBAAqB,CAACmC,UAAU;IAAE,GAAGA;IAAM,CAAC7G,GAAAA,GAAKgB;EAAU,EAAA,GAC/F,CAAA,CAAE;AAGJ,QAAM8F,uBAAmBpB,2BACvB,MAAMlC,eAAWuC,mCAAaC,yBAAYe,kBAAkB;IAAEvC,QAAQlB;IAAY0D,WAAW;EAAM,CAAA,CAAA,GACnG;IAAC1D;IAAYE;GAAS;AAGxB,SACExE,8BAAAA,QAAA,cAACiI,6CAAAA;IAAkBjH;KACjBhB,8BAAAA,QAAA,cAACX,aAAa6I,UAAQ;IACpBC,OAAO;MACL5I,YAAYqI;MACZpI,YAAYkI;MACZjI,UAAUgH;MACV/G,OAAOwH;IACT;KAEAlH,8BAAAA,QAAA,cAACoI,6BAAAA;IAAMC,aAAY;IAAWrF,MAAK;IAAYhC;IAAQsC,eAAY;KAChEuC,MAAME,IAAI,CAAC3D,SACVpC,8BAAAA,QAAA,cAACe,cAAAA;IAAauH,KAAKlG,KAAKpB;IAAK,GAAGoB;QAIpCpC,8BAAAA,QAAA,cAAC2C,OAAAA;IAAIN,MAAK;IAAOI,WAAU;KACzBzC,8BAAAA,QAAA,cAACuI,wBAAAA;IAAOjF,eAAY;IAAsBhB,YAAW;IAAQe,SAASyE;KACpE9H,8BAAAA,QAAA,cAACwI,mBAAAA,IAAAA,GACDxI,8BAAAA,QAAA,cAACwC,QAAAA;IAAKC,WAAU;KAAWpB,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAMzC;AAEA,IAAA,oBAAegD;",
|
|
6
|
+
"names": ["import_react", "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", "attendableAttrs", "useAttendableAttributes", "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", "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", "defaultStack", "useMemo", "live", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useEffect", "makeRef", "items", "objects", "map", "filter", "isNonNullable", "find", "m", "getTypename", "fullyQualifiedId", "toLocalizedString", "findNode", "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", "Button", "Plus"]
|
|
7
|
+
}
|
|
@@ -16,28 +16,29 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_5QWZH22T_exports = {};
|
|
20
|
+
__export(chunk_5QWZH22T_exports, {
|
|
21
21
|
SectionSchema: () => SectionSchema,
|
|
22
22
|
StackViewType: () => StackViewType
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_5QWZH22T_exports);
|
|
25
|
+
var import_effect = require("effect");
|
|
25
26
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
26
|
-
var SectionSchema =
|
|
27
|
-
height:
|
|
27
|
+
var SectionSchema = import_effect.Schema.Struct({
|
|
28
|
+
height: import_effect.Schema.optional(import_effect.Schema.Number),
|
|
28
29
|
// Space for data that isn't stack-specific but is specific to this view instance.
|
|
29
30
|
// e.g. cover/fill for an image
|
|
30
|
-
custom:
|
|
31
|
-
key:
|
|
32
|
-
value:
|
|
31
|
+
custom: import_effect.Schema.optional(import_effect.Schema.Record({
|
|
32
|
+
key: import_effect.Schema.String,
|
|
33
|
+
value: import_effect.Schema.Any
|
|
33
34
|
}))
|
|
34
35
|
});
|
|
35
36
|
var StackViewType = class extends (0, import_echo_schema.TypedObject)({
|
|
36
37
|
typename: "dxos.org/type/StackView",
|
|
37
38
|
version: "0.1.0"
|
|
38
39
|
})({
|
|
39
|
-
sections:
|
|
40
|
-
key:
|
|
40
|
+
sections: import_effect.Schema.mutable(import_effect.Schema.Record({
|
|
41
|
+
key: import_effect.Schema.String,
|
|
41
42
|
value: SectionSchema
|
|
42
43
|
}))
|
|
43
44
|
}) {
|
|
@@ -47,4 +48,4 @@ var StackViewType = class extends (0, import_echo_schema.TypedObject)({
|
|
|
47
48
|
SectionSchema,
|
|
48
49
|
StackViewType
|
|
49
50
|
});
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-5QWZH22T.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/stack.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { TypedObject } from '@dxos/echo-schema';\n\n// All section metadata needs to be optional/have defaults.\n// Any objects added to the collection will start with the section defaults.\n// If an object is removed from the collection without removing the section metadata this is fine.\n// Stack components should clean-up the superfluous data on future edits.\n\nexport const SectionSchema = Schema.Struct({\n height: Schema.optional(Schema.Number),\n // Space for data that isn't stack-specific but is specific to this view instance.\n // e.g. cover/fill for an image\n custom: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n});\n\n// TODO(burdon): Should be just type/Stack?\nexport class StackViewType extends TypedObject({ typename: 'dxos.org/type/StackView', version: '0.1.0' })({\n sections: Schema.mutable(Schema.Record({ key: Schema.String, value: SectionSchema })),\n}) {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAuB;AAEvB,yBAA4B;AAOrB,IAAMA,gBAAgBC,qBAAOC,OAAO;EACzCC,QAAQF,qBAAOG,SAASH,qBAAOI,MAAM;;;EAGrCC,QAAQL,qBAAOG,SAASH,qBAAOM,OAAO;IAAEC,KAAKP,qBAAOQ;IAAQC,OAAOT,qBAAOU;EAAI,CAAA,CAAA;AAChF,CAAA;AAGO,IAAMC,gBAAN,kBAA4BC,gCAAY;EAAEC,UAAU;EAA2BC,SAAS;AAAQ,CAAA,EAAG;EACxGC,UAAUf,qBAAOgB,QAAQhB,qBAAOM,OAAO;IAAEC,KAAKP,qBAAOQ;IAAQC,OAAOV;EAAc,CAAA,CAAA;AACpF,CAAA,EAAA;AAAI;",
|
|
6
|
+
"names": ["SectionSchema", "Schema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
|
|
7
|
+
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ __export(node_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(node_exports);
|
|
37
37
|
var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_5QWZH22T = require("./chunk-5QWZH22T.cjs");
|
|
39
39
|
var import_react = __toESM(require("react"));
|
|
40
40
|
var import_app_framework = require("@dxos/app-framework");
|
|
41
41
|
var import_echo = require("@dxos/client/echo");
|
|
@@ -47,7 +47,7 @@ var import_react3 = __toESM(require("react"));
|
|
|
47
47
|
var import_react_ui = require("@dxos/react-ui");
|
|
48
48
|
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
49
49
|
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
50
|
-
var StackMain = (0, import_react2.lazy)(() => import("./StackMain-
|
|
50
|
+
var StackMain = (0, import_react2.lazy)(() => import("./StackMain-CON4K2KG.cjs"));
|
|
51
51
|
var translations_default = [
|
|
52
52
|
{
|
|
53
53
|
"en-US": {
|
|
@@ -111,7 +111,7 @@ var StackPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_F7ZN
|
|
|
111
111
|
id: `${import_chunk_F7ZNJ53O.meta.id}/module/schema`,
|
|
112
112
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
113
113
|
activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
|
|
114
|
-
|
|
114
|
+
import_chunk_5QWZH22T.StackViewType
|
|
115
115
|
])
|
|
116
116
|
}),
|
|
117
117
|
(0, import_app_framework.defineModule)({
|