@dxos/plugin-stack 0.8.2 → 0.8.3-main.7f5a14c
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-RIX67KLY.mjs → StackMain-D3THNRPH.mjs} +11 -10
- package/dist/lib/browser/StackMain-D3THNRPH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XOUJQIK6.mjs → chunk-UF4CMZKP.mjs} +1 -1
- package/dist/lib/browser/{chunk-XOUJQIK6.mjs.map → chunk-UF4CMZKP.mjs.map} +2 -2
- 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/{react-surface-ED2DI7B5.mjs → react-surface-RNCSU2G3.mjs} +4 -4
- package/dist/lib/browser/react-surface-RNCSU2G3.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{StackMain-4DMJWHZ3.cjs → StackMain-O7NNLFBY.cjs} +13 -12
- package/dist/lib/node/StackMain-O7NNLFBY.cjs.map +7 -0
- package/dist/lib/node/{chunk-5QWZH22T.cjs → chunk-ZWMKCTSL.cjs} +4 -4
- package/dist/lib/node/{chunk-5QWZH22T.cjs.map → chunk-ZWMKCTSL.cjs.map} +2 -2
- 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/{react-surface-L52YERMX.cjs → react-surface-6M7BZ4T5.cjs} +9 -9
- package/dist/lib/node/react-surface-6M7BZ4T5.cjs.map +7 -0
- 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-7FHYHLK6.mjs → StackMain-A5NH7S4S.mjs} +11 -10
- package/dist/lib/node-esm/StackMain-A5NH7S4S.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-3R62SZZT.mjs → chunk-7PFDCQG4.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-3R62SZZT.mjs.map → chunk-7PFDCQG4.mjs.map} +2 -2
- 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/{react-surface-6WUOGQY6.mjs → react-surface-LFDJS446.mjs} +4 -4
- package/dist/lib/node-esm/react-surface-LFDJS446.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/StackPlugin.d.ts.map +1 -1
- package/dist/types/src/components/StackMain.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- 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 +23 -23
- package/src/StackPlugin.ts +3 -4
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/components/StackMain.tsx +6 -5
- package/src/components/StackSection.tsx +3 -3
- package/src/types/stack.ts +4 -2
- package/src/types/types.ts +2 -2
- package/dist/lib/browser/StackMain-RIX67KLY.mjs.map +0 -7
- package/dist/lib/browser/react-surface-ED2DI7B5.mjs.map +0 -7
- package/dist/lib/node/StackMain-4DMJWHZ3.cjs.map +0 -7
- package/dist/lib/node/react-surface-L52YERMX.cjs.map +0 -7
- package/dist/lib/node-esm/StackMain-7FHYHLK6.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6WUOGQY6.mjs.map +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StackViewType
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UF4CMZKP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
STACK_PLUGIN
|
|
6
6
|
} from "./chunk-XHZTILS3.mjs";
|
|
@@ -10,8 +10,9 @@ import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking"
|
|
|
10
10
|
import { Plus } from "@phosphor-icons/react";
|
|
11
11
|
import { Option } from "effect";
|
|
12
12
|
import React3, { useCallback, useEffect, useMemo, useState as useState2 } from "react";
|
|
13
|
-
import { Capabilities,
|
|
14
|
-
import { fullyQualifiedId,
|
|
13
|
+
import { Capabilities, LayoutAction, createIntent, useAppGraph, useCapabilities, useIntentDispatcher } from "@dxos/app-framework";
|
|
14
|
+
import { fullyQualifiedId, isLiveObject } from "@dxos/client/echo";
|
|
15
|
+
import { Obj, Ref } from "@dxos/echo";
|
|
15
16
|
import { SpaceAction } from "@dxos/plugin-space/types";
|
|
16
17
|
import { Button, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
17
18
|
import { AttentionProvider } from "@dxos/react-ui-attention";
|
|
@@ -38,7 +39,7 @@ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
|
38
39
|
import React2, { useState } from "react";
|
|
39
40
|
import { Surface } from "@dxos/app-framework";
|
|
40
41
|
import { DropdownMenu, Icon, useTranslation, IconButton } from "@dxos/react-ui";
|
|
41
|
-
import {
|
|
42
|
+
import { useAttentionAttributes } from "@dxos/react-ui-attention";
|
|
42
43
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
43
44
|
import { mx, getSize, textBlockWidth } from "@dxos/react-ui-theme";
|
|
44
45
|
|
|
@@ -84,7 +85,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
84
85
|
const { t } = useTranslation(STACK_PLUGIN);
|
|
85
86
|
const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
|
|
86
87
|
const [optionsMenuOpen, setOptionsMenuOpen] = useState(false);
|
|
87
|
-
const
|
|
88
|
+
const attentionAttrs = useAttentionAttributes(id);
|
|
88
89
|
return /* @__PURE__ */ React2.createElement(CollapsiblePrimitive.Root, {
|
|
89
90
|
asChild: true,
|
|
90
91
|
open: !view.collapsed,
|
|
@@ -94,7 +95,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
94
95
|
id
|
|
95
96
|
},
|
|
96
97
|
role: "section",
|
|
97
|
-
...
|
|
98
|
+
...attentionAttrs,
|
|
98
99
|
classNames: "border-be border-separator"
|
|
99
100
|
}, /* @__PURE__ */ React2.createElement(StackItem.Heading, {
|
|
100
101
|
classNames: "attention-surface border-ie !border-separator"
|
|
@@ -191,7 +192,7 @@ var StackMain = ({ id, collection }) => {
|
|
|
191
192
|
const { graph } = useAppGraph();
|
|
192
193
|
const { t } = useTranslation2(STACK_PLUGIN);
|
|
193
194
|
const allMetadata = useCapabilities(Capabilities.Metadata);
|
|
194
|
-
const defaultStack = useMemo(() =>
|
|
195
|
+
const defaultStack = useMemo(() => Obj.make(StackViewType, {
|
|
195
196
|
sections: {}
|
|
196
197
|
}), [
|
|
197
198
|
collection
|
|
@@ -200,14 +201,14 @@ var StackMain = ({ id, collection }) => {
|
|
|
200
201
|
const [collapsedSections, setCollapsedSections] = useState2({});
|
|
201
202
|
useEffect(() => {
|
|
202
203
|
if (!collection.views[StackViewType.typename]) {
|
|
203
|
-
collection.views[StackViewType.typename] =
|
|
204
|
+
collection.views[StackViewType.typename] = Ref.make(stack);
|
|
204
205
|
}
|
|
205
206
|
}, [
|
|
206
207
|
collection,
|
|
207
208
|
stack
|
|
208
209
|
]);
|
|
209
210
|
const items = collection.objects.map((object) => object.target).filter(isNonNullable).map((object) => {
|
|
210
|
-
const metadata = allMetadata.find((m) => m.id === (getTypename(object) ?? "never"))?.metadata;
|
|
211
|
+
const metadata = allMetadata.find((m) => m.id === (Obj.getTypename(object) ?? "never"))?.metadata;
|
|
211
212
|
const view = {
|
|
212
213
|
...stack.sections[object.id],
|
|
213
214
|
collapsed: collapsedSections[fullyQualifiedId(object)],
|
|
@@ -312,4 +313,4 @@ var StackMain_default = StackMain;
|
|
|
312
313
|
export {
|
|
313
314
|
StackMain_default as default
|
|
314
315
|
};
|
|
315
|
-
//# sourceMappingURL=StackMain-
|
|
316
|
+
//# sourceMappingURL=StackMain-D3THNRPH.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 { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, 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, Ref } from '@dxos/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(() => Obj.make(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] = 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, { 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\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attentionAttrs} 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": ";;;;;;;;;A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AAA;;;;AAMzC;AAEA,IAAA,oBAAeR;",
|
|
6
|
+
"names": ["Plus", "Option", "React", "useCallback", "useEffect", "useMemo", "useState", "Capabilities", "LayoutAction", "createIntent", "useAppGraph", "useCapabilities", "useIntentDispatcher", "fullyQualifiedId", "isLiveObject", "Obj", "Ref", "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", "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", "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", "Obj", "make", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useState", "useEffect", "Ref", "items", "objects", "map", "object", "filter", "isNonNullable", "metadata", "find", "m", "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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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\
|
|
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;
|
|
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\nexport class StackViewType extends TypedObject({\n typename: 'dxos.org/type/StackView',\n version: '0.1.0',\n})({\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;AAEO,IAAMC,gBAAN,cAA4BC,YAAY;EAC7CC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;EACDC,UAAUf,OAAOgB,QAAQhB,OAAOM,OAAO;IAAEC,KAAKP,OAAOQ;IAAQC,OAAOV;EAAc,CAAA,CAAA;AACpF,CAAA,EAAA;AAAI;",
|
|
6
6
|
"names": ["Schema", "TypedObject", "SectionSchema", "Schema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StackViewType
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UF4CMZKP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
SECTION_IDENTIFIER,
|
|
6
6
|
STACK_PLUGIN,
|
|
@@ -13,7 +13,7 @@ import { ClientCapabilities, ClientEvents } from "@dxos/plugin-client";
|
|
|
13
13
|
|
|
14
14
|
// packages/plugins/plugin-stack/src/capabilities/index.ts
|
|
15
15
|
import { lazy } from "@dxos/app-framework";
|
|
16
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
16
|
+
var ReactSurface = lazy(() => import("./react-surface-RNCSU2G3.mjs"));
|
|
17
17
|
|
|
18
18
|
// packages/plugins/plugin-stack/src/translations.ts
|
|
19
19
|
import { translations as stackTranslations } from "@dxos/react-ui-stack";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/StackPlugin.ts", "../../../src/capabilities/index.ts", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { type
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAc;AAE9E,SAASC,oBAAoBC,oBAAoB;;;ACFjD,SAASC,YAAY;AAEd,IAAMC,eAAeC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACF9C,SAASC,gBAAgBC,yBAAyB;AAIlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,6BAA6B;QAC7B,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,0BAA0B;QAC1B,qBAAqB;MACvB;IACF;EACF;KACGC;;;;AFrBE,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MAAM;MACdC,YAAYC,aAAaI,UAAU;QACjCV,IAAIW;QACJC,UAAU;UACRC,OAAO,CAACC,
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { type Obj } from '@dxos/echo';\nimport { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';\n\nimport { ReactSurface } from './capabilities';\nimport { meta, SECTION_IDENTIFIER } 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: Obj.Any }, type: string) => {\n switch (type) {\n case 'node':\n return { id: section.object.id, label: (section.object as any).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: ReactSurface,\n }),\n ]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ReactSurface = lazy(() => import('./react-surface'));\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,SAASA,cAAcC,aAAaC,cAAcC,cAAcC,cAAc;AAE9E,SAASC,oBAAoBC,oBAAoB;;;ACFjD,SAASC,YAAY;AAEd,IAAMC,eAAeC,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACF9C,SAASC,gBAAgBC,yBAAyB;AAIlD,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,6BAA6B;QAC7B,sCAAsC;QACtC,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;QAClC,iCAAiC;QACjC,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,wBAAwB;QACxB,6BAA6B;QAC7B,0BAA0B;QAC1B,4BAA4B;QAC5B,2BAA2B;QAC3B,gBAAgB;QAChB,kBAAkB;QAClB,0BAA0B;QAC1B,qBAAqB;MACvB;IACF;EACF;KACGC;;;;AFrBE,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MAAM;MACdC,YAAYC,aAAaI,UAAU;QACjCV,IAAIW;QACJC,UAAU;UACRC,OAAO,CAACC,SAA8BC,SAAAA;AACpC,oBAAQA,MAAAA;cACN,KAAK;AACH,uBAAO;kBAAEf,IAAIc,QAAQE,OAAOhB;kBAAIiB,OAAQH,QAAQE,OAAeE;kBAAOC,MAAML,QAAQE;gBAAO;cAC7F,KAAK;AACH,uBAAOF,QAAQE;cACjB,KAAK;AACH,uBAAOF;YACX;UACF;QACF;MACF,CAAA;;EAEJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAamB,aAAaC;IAC1BjB,UAAU,MAAMC,YAAYiB,mBAAmBC,QAAQ;MAACC;KAAc;EACxE,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;CACD;",
|
|
6
6
|
"names": ["Capabilities", "contributes", "defineModule", "definePlugin", "Events", "ClientCapabilities", "ClientEvents", "lazy", "ReactSurface", "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"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17900,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3567,"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":2067,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19550,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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":837,"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/capabilities/react-surface.tsx":{"bytes":4565,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6972,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5354},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.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.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3215},"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-RIX67KLY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21913},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-RIX67KLY.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XOUJQIK6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4888},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5487},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12203},"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},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3556},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-ED2DI7B5.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-RIX67KLY.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":888},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1705},"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}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-stack/src/meta.ts":{"bytes":2218,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytes":2968,"imports":[{"path":"@preact-signals/safe-react/tracking","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/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytes":1847,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytes":3241,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytes":17888,"imports":[{"path":"@preact-signals/safe-react/tracking","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":"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":3455,"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":2023,"imports":[],"format":"esm"},"packages/plugins/plugin-stack/src/types/index.ts":{"bytes":549,"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":19654,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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/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":837,"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/capabilities/react-surface.tsx":{"bytes":4551,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","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"}],"format":"esm"},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytes":791,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-stack/src/translations.ts":{"bytes":4167,"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.ts":{"bytes":6790,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"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":560,"imports":[{"path":"packages/plugins/plugin-stack/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-stack/src/StackPlugin.ts","kind":"import-statement","original":"./StackPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-stack/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5282},"packages/plugins/plugin-stack/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-UF4CMZKP.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-stack/dist/lib/browser/react-surface-RNCSU2G3.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.ts":{"bytesInOutput":1402},"packages/plugins/plugin-stack/src/capabilities/index.ts":{"bytesInOutput":115},"packages/plugins/plugin-stack/src/translations.ts":{"bytesInOutput":1230}},"bytes":3215},"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-UF4CMZKP.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-D3THNRPH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21936},"packages/plugins/plugin-stack/dist/lib/browser/StackMain-D3THNRPH.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-UF4CMZKP.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"effect","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/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":"@preact-signals/safe-react/tracking","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":"@preact-signals/safe-react/tracking","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":4908},"packages/plugins/plugin-stack/src/components/StackContext.tsx":{"bytesInOutput":265},"packages/plugins/plugin-stack/src/components/StackSection.tsx":{"bytesInOutput":5483},"packages/plugins/plugin-stack/src/components/CaretDownUp.tsx":{"bytesInOutput":972}},"bytes":12219},"packages/plugins/plugin-stack/dist/lib/browser/chunk-UF4CMZKP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1680},"packages/plugins/plugin-stack/dist/lib/browser/chunk-UF4CMZKP.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},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-RNCSU2G3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3543},"packages/plugins/plugin-stack/dist/lib/browser/react-surface-RNCSU2G3.mjs":{"imports":[{"path":"packages/plugins/plugin-stack/dist/lib/browser/chunk-XHZTILS3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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-D3THNRPH.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-stack/src/capabilities/react-surface.tsx":{"bytesInOutput":874},"packages/plugins/plugin-stack/src/components/index.ts":{"bytesInOutput":94},"packages/plugins/plugin-stack/src/components/StackSettings.tsx":{"bytesInOutput":248}},"bytes":1691},"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}}}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
// packages/plugins/plugin-stack/src/capabilities/react-surface.tsx
|
|
6
6
|
import React2 from "react";
|
|
7
7
|
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
8
|
-
import {
|
|
8
|
+
import { Obj } from "@dxos/echo";
|
|
9
9
|
import { CollectionType } from "@dxos/plugin-space/types";
|
|
10
10
|
import { fullyQualifiedId } from "@dxos/react-client/echo";
|
|
11
11
|
|
|
@@ -19,13 +19,13 @@ import { Input, useTranslation } from "@dxos/react-ui";
|
|
|
19
19
|
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
20
20
|
|
|
21
21
|
// packages/plugins/plugin-stack/src/components/index.ts
|
|
22
|
-
var StackMain = lazy(() => import("./StackMain-
|
|
22
|
+
var StackMain = lazy(() => import("./StackMain-D3THNRPH.mjs"));
|
|
23
23
|
|
|
24
24
|
// packages/plugins/plugin-stack/src/capabilities/react-surface.tsx
|
|
25
25
|
var react_surface_default = () => contributes(Capabilities.ReactSurface, createSurface({
|
|
26
26
|
id: `${STACK_PLUGIN}/article`,
|
|
27
27
|
role: "article",
|
|
28
|
-
filter: (data) =>
|
|
28
|
+
filter: (data) => Obj.instanceOf(CollectionType, data.subject),
|
|
29
29
|
component: ({ data }) => {
|
|
30
30
|
const id = typeof data.id === "string" ? data.id : void 0;
|
|
31
31
|
return /* @__PURE__ */ React2.createElement("div", {
|
|
@@ -43,4 +43,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, createS
|
|
|
43
43
|
export {
|
|
44
44
|
react_surface_default as default
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=react-surface-
|
|
46
|
+
//# sourceMappingURL=react-surface-RNCSU2G3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx", "../../../src/components/index.ts", "../../../src/components/StackSettings.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { Obj } from '@dxos/echo';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { fullyQualifiedId } from '@dxos/react-client/echo';\n\nimport { StackMain } from '../components';\nimport { STACK_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: `${STACK_PLUGIN}/article`,\n role: 'article',\n filter: (data): data is { id?: string; subject: CollectionType } => Obj.instanceOf(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// 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"],
|
|
5
|
+
"mappings": ";;;;;AAIA,OAAOA,YAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,WAAW;AACpB,SAASC,sBAAsB;AAC/B,SAASC,wBAAwB;;;ACLjC,SAASC,YAAY;;;;ACArB,OAAOC,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,yBAAyBC,2BAA2B;;;ADDtD,IAAMC,YAAYC,KAAK,MAAM,OAAO,0BAAA,CAAA;;;ADQ3C,IAAA,wBAAe,MACbC,YACEC,aAAaC,cACbC,cAAc;EACZC,IAAI,GAAGC,YAAAA;EACPC,MAAM;EACNC,QAAQ,CAACC,SAA2DC,IAAIC,WAAWC,gBAAgBH,KAAKI,OAAO;EAC/GC,WAAW,CAAC,EAAEL,KAAI,MAAE;AAGlB,UAAMJ,KAAK,OAAOI,KAAKJ,OAAO,WAAWI,KAAKJ,KAAKU;AACnD,WACE,gBAAAC,OAAA,cAACC,OAAAA;MAAIV,MAAK;MAAOW,WAAU;MAAgBC,OAAO;QAAEC,SAAS;MAAS;OACpE,gBAAAJ,OAAA,cAACK,WAAAA;MAAUhB,IAAIA,MAAMiB,iBAAiBb,KAAKI,OAAO;MAAGU,YAAYd,KAAKI;;EAG5E;AACF,CAAA,CAAA;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "createSurface", "Obj", "CollectionType", "fullyQualifiedId", "lazy", "React", "Input", "useTranslation", "DeprecatedFormContainer", "DeprecatedFormInput", "StackMain", "lazy", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "STACK_PLUGIN", "role", "filter", "data", "Obj", "instanceOf", "CollectionType", "subject", "component", "undefined", "React", "div", "className", "style", "contain", "StackMain", "fullyQualifiedId", "collection"]
|
|
7
|
+
}
|
|
@@ -26,12 +26,12 @@ 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_O7NNLFBY_exports = {};
|
|
30
|
+
__export(StackMain_O7NNLFBY_exports, {
|
|
31
31
|
default: () => StackMain_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(StackMain_O7NNLFBY_exports);
|
|
34
|
+
var import_chunk_ZWMKCTSL = require("./chunk-ZWMKCTSL.cjs");
|
|
35
35
|
var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
|
|
36
36
|
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
37
37
|
var import_react = require("@phosphor-icons/react");
|
|
@@ -39,6 +39,7 @@ var import_effect = require("effect");
|
|
|
39
39
|
var import_react2 = __toESM(require("react"));
|
|
40
40
|
var import_app_framework = require("@dxos/app-framework");
|
|
41
41
|
var import_echo = require("@dxos/client/echo");
|
|
42
|
+
var import_echo2 = require("@dxos/echo");
|
|
42
43
|
var import_types = require("@dxos/plugin-space/types");
|
|
43
44
|
var import_react_ui = require("@dxos/react-ui");
|
|
44
45
|
var import_react_ui_attention = require("@dxos/react-ui-attention");
|
|
@@ -103,7 +104,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
103
104
|
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
|
|
104
105
|
const { onNavigate, onAdd, onCollapse, onDelete } = useStack();
|
|
105
106
|
const [optionsMenuOpen, setOptionsMenuOpen] = (0, import_react4.useState)(false);
|
|
106
|
-
const
|
|
107
|
+
const attentionAttrs = (0, import_react_ui_attention2.useAttentionAttributes)(id);
|
|
107
108
|
return /* @__PURE__ */ import_react4.default.createElement(CollapsiblePrimitive.Root, {
|
|
108
109
|
asChild: true,
|
|
109
110
|
open: !view.collapsed,
|
|
@@ -113,7 +114,7 @@ var StackSection = ({ id, view, object, metadata: { icon = "ph--placeholder--reg
|
|
|
113
114
|
id
|
|
114
115
|
},
|
|
115
116
|
role: "section",
|
|
116
|
-
...
|
|
117
|
+
...attentionAttrs,
|
|
117
118
|
classNames: "border-be border-separator"
|
|
118
119
|
}, /* @__PURE__ */ import_react4.default.createElement(import_react_ui_stack2.StackItem.Heading, {
|
|
119
120
|
classNames: "attention-surface border-ie !border-separator"
|
|
@@ -208,23 +209,23 @@ var StackMain = ({ id, collection }) => {
|
|
|
208
209
|
const { graph } = (0, import_app_framework.useAppGraph)();
|
|
209
210
|
const { t } = (0, import_react_ui.useTranslation)(import_chunk_F7ZNJ53O.STACK_PLUGIN);
|
|
210
211
|
const allMetadata = (0, import_app_framework.useCapabilities)(import_app_framework.Capabilities.Metadata);
|
|
211
|
-
const defaultStack = (0, import_react2.useMemo)(() =>
|
|
212
|
+
const defaultStack = (0, import_react2.useMemo)(() => import_echo2.Obj.make(import_chunk_ZWMKCTSL.StackViewType, {
|
|
212
213
|
sections: {}
|
|
213
214
|
}), [
|
|
214
215
|
collection
|
|
215
216
|
]);
|
|
216
|
-
const stack = collection.views[
|
|
217
|
+
const stack = collection.views[import_chunk_ZWMKCTSL.StackViewType.typename]?.target ?? defaultStack;
|
|
217
218
|
const [collapsedSections, setCollapsedSections] = (0, import_react2.useState)({});
|
|
218
219
|
(0, import_react2.useEffect)(() => {
|
|
219
|
-
if (!collection.views[
|
|
220
|
-
collection.views[
|
|
220
|
+
if (!collection.views[import_chunk_ZWMKCTSL.StackViewType.typename]) {
|
|
221
|
+
collection.views[import_chunk_ZWMKCTSL.StackViewType.typename] = import_echo2.Ref.make(stack);
|
|
221
222
|
}
|
|
222
223
|
}, [
|
|
223
224
|
collection,
|
|
224
225
|
stack
|
|
225
226
|
]);
|
|
226
227
|
const items = collection.objects.map((object) => object.target).filter(import_util.isNonNullable).map((object) => {
|
|
227
|
-
const metadata = allMetadata.find((m) => m.id === (
|
|
228
|
+
const metadata = allMetadata.find((m) => m.id === (import_echo2.Obj.getTypename(object) ?? "never"))?.metadata;
|
|
228
229
|
const view = {
|
|
229
230
|
...stack.sections[object.id],
|
|
230
231
|
collapsed: collapsedSections[(0, import_echo.fullyQualifiedId)(object)],
|
|
@@ -326,4 +327,4 @@ var StackMain = ({ id, collection }) => {
|
|
|
326
327
|
}
|
|
327
328
|
};
|
|
328
329
|
var StackMain_default = StackMain;
|
|
329
|
-
//# sourceMappingURL=StackMain-
|
|
330
|
+
//# sourceMappingURL=StackMain-O7NNLFBY.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 { Option } from 'effect';\nimport React, { useCallback, useEffect, useMemo, 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, Ref } from '@dxos/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(() => Obj.make(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] = 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, { 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\n return (\n <CollapsiblePrimitive.Root asChild open={!view.collapsed} onOpenChange={(nextOpen) => onCollapse?.(id, !nextOpen)}>\n <StackItem.Root item={{ id }} role='section' {...attentionAttrs} 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,oBAAuB;AACvB,IAAAA,gBAAiE;AAEjE,2BAOO;AACP,kBAA+C;AAC/C,IAAAC,eAAyB;AACzB,mBAAiD;AACjD,sBAA0D;AAC1D,gCAAkC;AAClC,4BAAsB;AACtB,kBAA8B;AClB9B,IAAAD,gBAA0C;;ACA1C,2BAAsC;AACtC,IAAAA,gBAAgC;AAEhC,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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U,EAAA,GAC/F,CAAA,CAAE;AAGJ,UAAMkG,uBAAmBpB,2BACvB,MAAMtC,eAAW2C,mCAAaC,yBAAYe,kBAAkB;MAAE1C,QAAQnB;MAAY8D,WAAW;IAAM,CAAA,CAAA,GACnG;MAAC9D;MAAYE;KAAS;AAGxB,WACExE,8BAAAA,QAAA,cAACqI,6CAAAA;MAAkBrH;OACjBhB,8BAAAA,QAAA,cAACX,aAAaiJ,UAAQ;MACpBC,OAAO;QACLhJ,YAAYyI;QACZxI,YAAYsI;QACZrI,UAAUoH;QACVnH,OAAO4H;MACT;OAEAtH,8BAAAA,QAAA,cAACwI,6BAAAA;MAAMC,aAAY;MAAWzF,MAAK;MAAYhC;MAAQsC,eAAY;OAChEwC,MAAME,IAAI,CAAC5D,SACVpC,8BAAAA,QAAA,cAACe,cAAAA;MAAa2H,KAAKtG,KAAKpB;MAAK,GAAGoB;UAIpCpC,8BAAAA,QAAA,cAAC2C,OAAAA;MAAIN,MAAK;MAAOI,WAAU;OACzBzC,8BAAAA,QAAA,cAAC2I,wBAAAA;MAAOrF,eAAY;MAAsBhB,YAAW;MAAQe,SAAS6E;OACpElI,8BAAAA,QAAA,cAAC4I,mBAAAA,IAAAA,GACD5I,8BAAAA,QAAA,cAACwC,QAAAA;MAAKC,WAAU;OAAWpB,EAAE,mBAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;AAMzC;AAEA,IAAA,oBAAegD;",
|
|
6
|
+
"names": ["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", "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", "Obj", "make", "StackViewType", "sections", "stack", "views", "typename", "target", "collapsedSections", "setCollapsedSections", "useEffect", "Ref", "items", "objects", "map", "filter", "isNonNullable", "find", "m", "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", "Button", "Plus"]
|
|
7
|
+
}
|
|
@@ -16,12 +16,12 @@ 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_ZWMKCTSL_exports = {};
|
|
20
|
+
__export(chunk_ZWMKCTSL_exports, {
|
|
21
21
|
SectionSchema: () => SectionSchema,
|
|
22
22
|
StackViewType: () => StackViewType
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_ZWMKCTSL_exports);
|
|
25
25
|
var import_effect = require("effect");
|
|
26
26
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
27
27
|
var SectionSchema = import_effect.Schema.Struct({
|
|
@@ -48,4 +48,4 @@ var StackViewType = class extends (0, import_echo_schema.TypedObject)({
|
|
|
48
48
|
SectionSchema,
|
|
49
49
|
StackViewType
|
|
50
50
|
});
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-ZWMKCTSL.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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\
|
|
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;
|
|
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\nexport class StackViewType extends TypedObject({\n typename: 'dxos.org/type/StackView',\n version: '0.1.0',\n})({\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;AAEO,IAAMC,gBAAN,kBAA4BC,gCAAY;EAC7CC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;EACDC,UAAUf,qBAAOgB,QAAQhB,qBAAOM,OAAO;IAAEC,KAAKP,qBAAOQ;IAAQC,OAAOV;EAAc,CAAA,CAAA;AACpF,CAAA,EAAA;AAAI;",
|
|
6
6
|
"names": ["SectionSchema", "Schema", "Struct", "height", "optional", "Number", "custom", "Record", "key", "String", "value", "Any", "StackViewType", "TypedObject", "typename", "version", "sections", "mutable"]
|
|
7
7
|
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -34,13 +34,13 @@ __export(node_exports, {
|
|
|
34
34
|
meta: () => import_chunk_F7ZNJ53O.meta
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(node_exports);
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_ZWMKCTSL = require("./chunk-ZWMKCTSL.cjs");
|
|
38
38
|
var import_chunk_F7ZNJ53O = require("./chunk-F7ZNJ53O.cjs");
|
|
39
39
|
var import_app_framework = require("@dxos/app-framework");
|
|
40
40
|
var import_plugin_client = require("@dxos/plugin-client");
|
|
41
41
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
42
42
|
var import_react_ui_stack = require("@dxos/react-ui-stack");
|
|
43
|
-
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-
|
|
43
|
+
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-6M7BZ4T5.cjs"));
|
|
44
44
|
var translations_default = [
|
|
45
45
|
{
|
|
46
46
|
"en-US": {
|
|
@@ -104,7 +104,7 @@ var StackPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_F7ZN
|
|
|
104
104
|
id: `${import_chunk_F7ZNJ53O.meta.id}/module/schema`,
|
|
105
105
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
106
106
|
activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
|
|
107
|
-
|
|
107
|
+
import_chunk_ZWMKCTSL.StackViewType
|
|
108
108
|
])
|
|
109
109
|
}),
|
|
110
110
|
(0, import_app_framework.defineModule)({
|