@dxos/react-ui-attention 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
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/{chunk-HJRZWOEX.mjs → chunk-Q5SLNQ4B.mjs} +114 -102
- package/dist/lib/browser/chunk-Q5SLNQ4B.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +12 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +16 -6
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{chunk-7TQWDE4M.mjs → chunk-LSWTWT3W.mjs} +114 -102
- package/dist/lib/node-esm/chunk-LSWTWT3W.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +12 -8
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +16 -6
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/attention.d.ts +29 -10
- package/dist/types/src/attention.d.ts.map +1 -1
- package/dist/types/src/components/AttentionGlyph.d.ts.map +1 -1
- package/dist/types/src/components/AttentionProvider.d.ts +9 -11
- package/dist/types/src/components/AttentionProvider.d.ts.map +1 -1
- package/dist/types/src/components/SelectionProvider.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withAttention.d.ts +5 -1
- package/dist/types/src/testing/decorators/withAttention.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/attention.test.ts +151 -22
- package/src/attention.ts +108 -53
- package/src/components/AttentionGlyph.stories.tsx +3 -3
- package/src/components/AttentionGlyph.tsx +12 -5
- package/src/components/AttentionProvider.stories.tsx +2 -2
- package/src/components/AttentionProvider.tsx +21 -48
- package/src/components/SelectionProvider.tsx +6 -4
- package/src/testing/decorators/withAttention.ts +18 -7
- package/dist/lib/browser/chunk-HJRZWOEX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7TQWDE4M.mjs.map +0 -7
|
@@ -5,23 +5,25 @@ import {
|
|
|
5
5
|
ATTENTION_SOURCE_ATTRIBUTE,
|
|
6
6
|
AttendableContainer,
|
|
7
7
|
AttentionManager,
|
|
8
|
-
AttentionProvider,
|
|
9
8
|
RootAttentionProvider,
|
|
10
9
|
SelectionManager,
|
|
11
10
|
SelectionProvider,
|
|
12
11
|
SelectionSchema,
|
|
13
12
|
defaultSelection,
|
|
13
|
+
expandAttendableId,
|
|
14
14
|
getAttendables,
|
|
15
|
+
getParentId,
|
|
16
|
+
getSegmentId,
|
|
15
17
|
getSelectionSet,
|
|
18
|
+
isSeparatorPrefixed,
|
|
16
19
|
useAttended,
|
|
17
20
|
useAttention,
|
|
18
21
|
useAttentionAttributes,
|
|
19
22
|
useAttentionContext,
|
|
20
|
-
useAttentionPath,
|
|
21
23
|
useSelected,
|
|
22
24
|
useSelectionActions,
|
|
23
25
|
useSelectionManager
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LSWTWT3W.mjs";
|
|
25
27
|
import {
|
|
26
28
|
ATTENDABLE_PATH_SEPARATOR
|
|
27
29
|
} from "./chunk-PMGNPL4M.mjs";
|
|
@@ -30,8 +32,8 @@ import {
|
|
|
30
32
|
import React, { forwardRef, useMemo } from "react";
|
|
31
33
|
import { Icon } from "@dxos/react-ui";
|
|
32
34
|
import { mx } from "@dxos/ui-theme";
|
|
33
|
-
var attentionGlyphStyles = "inline-block rounded-
|
|
34
|
-
var presenceIconStyles = "
|
|
35
|
+
var attentionGlyphStyles = mx("inline-block rounded-xs w-3 h-3 bg-transparent text-accent-text transition-colors", "[[data-contains-attended=true]_&]:bg-attention-contains", "[[data-attention=true]_&]:bg-accent-surface", "[[data-attention=true]_&]:text-accent-surface-text", "[[aria-current][data-attention=true]_&]:bg-accent-surface", "[[aria-current][data-attention=true]_&]:text-accent-surface-text", '[[aria-selected="true"][data-attention=true]_&]:bg-accent-surface', '[[aria-selected="true"][data-attention=true]_&]:text-accent-surface-text');
|
|
36
|
+
var presenceIconStyles = mx("w-3 h-3");
|
|
35
37
|
var PresenceOne = () => {
|
|
36
38
|
return /* @__PURE__ */ React.createElement("svg", {
|
|
37
39
|
width: "12",
|
|
@@ -84,7 +86,7 @@ var AttentionGlyph = /* @__PURE__ */ forwardRef(({ presence, attended, syncing,
|
|
|
84
86
|
const icon = syncing ? /* @__PURE__ */ React.createElement(Syncing, null) : presence === "many" ? /* @__PURE__ */ React.createElement(PresenceMany, null) : presence === "one" ? /* @__PURE__ */ React.createElement(PresenceOne, null) : null;
|
|
85
87
|
return /* @__PURE__ */ React.createElement("div", {
|
|
86
88
|
role: "none",
|
|
87
|
-
className: "flex",
|
|
89
|
+
className: "flex group",
|
|
88
90
|
"data-attention": attended,
|
|
89
91
|
"data-contains-attended": containsAttended
|
|
90
92
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
@@ -102,20 +104,22 @@ export {
|
|
|
102
104
|
AttendableContainer,
|
|
103
105
|
AttentionGlyph,
|
|
104
106
|
AttentionManager,
|
|
105
|
-
AttentionProvider,
|
|
106
107
|
RootAttentionProvider,
|
|
107
108
|
SelectionManager,
|
|
108
109
|
SelectionProvider,
|
|
109
110
|
SelectionSchema,
|
|
110
111
|
Syncing,
|
|
111
112
|
defaultSelection,
|
|
113
|
+
expandAttendableId,
|
|
112
114
|
getAttendables,
|
|
115
|
+
getParentId,
|
|
116
|
+
getSegmentId,
|
|
113
117
|
getSelectionSet,
|
|
118
|
+
isSeparatorPrefixed,
|
|
114
119
|
useAttended,
|
|
115
120
|
useAttention,
|
|
116
121
|
useAttentionAttributes,
|
|
117
122
|
useAttentionContext,
|
|
118
|
-
useAttentionPath,
|
|
119
123
|
useSelected,
|
|
120
124
|
useSelectionActions,
|
|
121
125
|
useSelectionManager
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/AttentionGlyph.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Primitive } from '@radix-ui/react-primitive';\nimport React, { type CSSProperties, type ComponentPropsWithRef, forwardRef, useMemo } from 'react';\n\nimport { Icon, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nconst attentionGlyphStyles
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["React", "forwardRef", "useMemo", "Icon", "mx", "attentionGlyphStyles", "presenceIconStyles", "PresenceOne", "svg", "width", "height", "viewBox", "className", "fill", "xmlns", "circle", "cx", "cy", "r", "PresenceMany", "path", "d", "Syncing", "animationProps", "useMemo", "animationDelay", "Date", "now", "div", "role", "Icon", "icon", "size", "style", "classNames", "AttentionGlyph", "forwardRef", "presence", "attended", "syncing", "containsAttended", "props", "forwardedRef", "data-attention", "data-contains-attended", "span", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Primitive } from '@radix-ui/react-primitive';\nimport React, { type CSSProperties, type ComponentPropsWithRef, forwardRef, useMemo } from 'react';\n\nimport { Icon, type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nconst attentionGlyphStyles = mx(\n 'inline-block rounded-xs w-3 h-3 bg-transparent text-accent-text transition-colors',\n '[[data-contains-attended=true]_&]:bg-attention-contains',\n '[[data-attention=true]_&]:bg-accent-surface',\n '[[data-attention=true]_&]:text-accent-surface-text',\n '[[aria-current][data-attention=true]_&]:bg-accent-surface',\n '[[aria-current][data-attention=true]_&]:text-accent-surface-text',\n '[[aria-selected=\"true\"][data-attention=true]_&]:bg-accent-surface',\n '[[aria-selected=\"true\"][data-attention=true]_&]:text-accent-surface-text',\n);\n\nconst presenceIconStyles = mx('w-3 h-3');\n\nconst PresenceOne = () => {\n return (\n <svg\n width='12'\n height='12'\n viewBox='0 0 12 12'\n className={presenceIconStyles}\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle cx='6' cy='6' r='2.5' fill='currentColor' />\n </svg>\n );\n};\n\nconst PresenceMany = () => {\n return (\n <svg\n width='12'\n height='12'\n viewBox='0 0 12 12'\n className={presenceIconStyles}\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M6.75 8.27311C7.38815 7.72296 7.79212 6.90866 7.79212 6C7.79212 5.09134 7.38815 4.27704 6.75 3.72689C7.06722 3.58122 7.42019 3.5 7.79212 3.5C9.17283 3.5 10.2921 4.61929 10.2921 6C10.2921 7.38071 9.17283 8.5 7.79212 8.5C7.42019 8.5 7.06723 8.41878 6.75 8.27311Z'\n fill='currentColor'\n />\n <circle cx='4.25' cy='6' r='2.5' fill='currentColor' />\n </svg>\n );\n};\n\nexport const Syncing = () => {\n const animationProps = useMemo<CSSProperties>(\n () => ({\n // Synchronize animations.\n animationDelay: `-${Date.now() % 2_000}ms`,\n }),\n [],\n );\n\n return (\n <div role='status' className='flex items-center'>\n <Icon\n icon='ph--circle-notch--bold'\n size={3}\n style={animationProps}\n classNames='text-subdued animate-[spin_2s_linear_infinite]'\n />\n </div>\n );\n};\n\nexport type AttentionGlyphProps = {\n attended?: boolean;\n containsAttended?: boolean;\n syncing?: boolean;\n presence?: 'none' | 'one' | 'many';\n} & ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.span>, 'children'>>;\n\nexport const AttentionGlyph = forwardRef<HTMLSpanElement, AttentionGlyphProps>(\n ({ presence, attended, syncing, containsAttended, classNames, ...props }, forwardedRef) => {\n const icon = syncing ? (\n <Syncing />\n ) : presence === 'many' ? (\n <PresenceMany />\n ) : presence === 'one' ? (\n <PresenceOne />\n ) : null;\n\n return (\n <div role='none' className='flex group' data-attention={attended} data-contains-attended={containsAttended}>\n <span role='none' {...props} className={mx(attentionGlyphStyles, classNames)} ref={forwardedRef}>\n {icon}\n </span>\n </div>\n );\n },\n);\n"],
|
|
5
|
+
"mapp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9B,aAAAA,IAAAA,IACC;AAEJ,SACE,sBAAA,cAACqB,OAAAA;IAAIC,MAAK;IAAOjB,WAAU;IAAa+B,kBAAgBL;IAAUM,0BAAwBJ;KACxF,sBAAA,cAACK,QAAAA;IAAKhB,MAAK;IAAQ,GAAGY;IAAO7B,WAAWP,GAAGD,sBAAsB8B,UAAAA;IAAaY,KAAKJ;KAChFX,IAAAA,CAAAA;AAIT,CAAA;",
|
|
6
|
+
"names": ["React", "forwardRef", "useMemo", "Icon", "mx", "attentionGlyphStyles", "mx", "presenceIconStyles", "PresenceOne", "svg", "width", "height", "viewBox", "className", "fill", "xmlns", "circle", "cx", "cy", "r", "PresenceMany", "path", "d", "Syncing", "animationProps", "useMemo", "animationDelay", "Date", "now", "div", "role", "Icon", "icon", "size", "style", "classNames", "AttentionGlyph", "forwardRef", "presence", "attended", "syncing", "containsAttended", "props", "forwardedRef", "data-attention", "data-contains-attended", "span", "ref"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/types.ts":{"bytes":1000,"imports":[],"format":"esm"},"src/attention.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/types.ts":{"bytes":1000,"imports":[],"format":"esm"},"src/attention.ts":{"bytes":23381,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/components/AttentionGlyph.tsx":{"bytes":10090,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/components/AttentionProvider.tsx":{"bytes":18018,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/attention.ts","kind":"import-statement","original":"../attention"}],"format":"esm"},"src/selection.ts":{"bytes":28228,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/components/SelectionProvider.tsx":{"bytes":15632,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"src/selection.ts","kind":"import-statement","original":"../selection"}],"format":"esm"},"src/components/index.ts":{"bytes":708,"imports":[{"path":"src/components/AttentionGlyph.tsx","kind":"import-statement","original":"./AttentionGlyph"},{"path":"src/components/AttentionProvider.tsx","kind":"import-statement","original":"./AttentionProvider"},{"path":"src/components/SelectionProvider.tsx","kind":"import-statement","original":"./SelectionProvider"}],"format":"esm"},"src/index.ts":{"bytes":726,"imports":[{"path":"src/attention.ts","kind":"import-statement","original":"./attention"},{"path":"src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"src/selection.ts","kind":"import-statement","original":"./selection"},{"path":"src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/testing/decorators/withAttention.ts":{"bytes":3609,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/attention.ts","kind":"import-statement","original":"../../attention"},{"path":"src/components/index.ts","kind":"import-statement","original":"../../components"}],"format":"esm"},"src/testing/decorators/index.ts":{"bytes":493,"imports":[{"path":"src/testing/decorators/withAttention.ts","kind":"import-statement","original":"./withAttention"}],"format":"esm"},"src/testing/index.ts":{"bytes":471,"imports":[{"path":"src/testing/decorators/index.ts","kind":"import-statement","original":"./decorators"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5235},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-LSWTWT3W.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-PMGNPL4M.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["ATTENDABLE_ATTRIBUTE","ATTENDABLE_PATH_SEPARATOR","ATTENTION_NAME","ATTENTION_SOURCE_ATTRIBUTE","AttendableContainer","AttentionGlyph","AttentionManager","RootAttentionProvider","SelectionManager","SelectionProvider","SelectionSchema","Syncing","defaultSelection","expandAttendableId","getAttendables","getParentId","getSegmentId","getSelectionSet","isSeparatorPrefixed","useAttended","useAttention","useAttentionAttributes","useAttentionContext","useSelected","useSelectionActions","useSelectionManager"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/components/AttentionGlyph.tsx":{"bytesInOutput":2992}},"bytes":4281},"dist/lib/node-esm/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/types.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-PMGNPL4M.mjs","kind":"import-statement"}],"exports":["ATTENDABLE_PATH_SEPARATOR"],"entryPoint":"src/types.ts","inputs":{},"bytes":235},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1873},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-LSWTWT3W.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-PMGNPL4M.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["withAttention"],"entryPoint":"src/testing/index.ts","inputs":{"src/testing/decorators/withAttention.ts":{"bytesInOutput":610},"src/testing/index.ts":{"bytesInOutput":0}},"bytes":947},"dist/lib/node-esm/chunk-LSWTWT3W.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":42439},"dist/lib/node-esm/chunk-LSWTWT3W.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-PMGNPL4M.mjs","kind":"import-statement"},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-primitive","kind":"import-statement","external":true},{"path":"@radix-ui/react-slot","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@effect-atom/atom-react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"effect/Match","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-hooks","kind":"import-statement","external":true}],"exports":["ATTENDABLE_ATTRIBUTE","ATTENTION_NAME","ATTENTION_SOURCE_ATTRIBUTE","AttendableContainer","AttentionManager","RootAttentionProvider","SelectionManager","SelectionProvider","SelectionSchema","defaultSelection","expandAttendableId","getAttendables","getParentId","getSegmentId","getSelectionSet","isSeparatorPrefixed","useAttended","useAttention","useAttentionAttributes","useAttentionContext","useSelected","useSelectionActions","useSelectionManager"],"inputs":{"src/attention.ts":{"bytesInOutput":5182},"src/components/AttentionProvider.tsx":{"bytesInOutput":3752},"src/selection.ts":{"bytesInOutput":7192},"src/components/SelectionProvider.tsx":{"bytesInOutput":3533}},"bytes":20473},"dist/lib/node-esm/chunk-PMGNPL4M.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":505},"dist/lib/node-esm/chunk-PMGNPL4M.mjs":{"imports":[],"exports":["ATTENDABLE_PATH_SEPARATOR"],"inputs":{"src/types.ts":{"bytesInOutput":37}},"bytes":231}}}
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
AttentionManager,
|
|
3
4
|
RootAttentionProvider,
|
|
4
5
|
SelectionProvider
|
|
5
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-LSWTWT3W.mjs";
|
|
6
7
|
import "../chunk-PMGNPL4M.mjs";
|
|
7
8
|
|
|
8
9
|
// src/testing/decorators/withAttention.ts
|
|
9
10
|
import { Registry, RegistryContext } from "@effect-atom/atom-react";
|
|
10
11
|
import { createElement, useMemo } from "react";
|
|
11
|
-
var withAttention = (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
var withAttention = (initialAttendedId) => {
|
|
13
|
+
return (Story) => {
|
|
14
|
+
const registry = useMemo(() => Registry.make(), []);
|
|
15
|
+
const attention = useMemo(() => initialAttendedId ? new AttentionManager(registry, [
|
|
16
|
+
initialAttendedId
|
|
17
|
+
]) : void 0, [
|
|
18
|
+
registry
|
|
19
|
+
]);
|
|
20
|
+
return createElement(RegistryContext.Provider, {
|
|
21
|
+
value: registry
|
|
22
|
+
}, createElement(RootAttentionProvider, {
|
|
23
|
+
attention
|
|
24
|
+
}, createElement(SelectionProvider, {}, createElement(Story))));
|
|
25
|
+
};
|
|
16
26
|
};
|
|
17
27
|
export {
|
|
18
28
|
withAttention
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/testing/decorators/withAttention.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Registry, RegistryContext } from '@effect-atom/atom-react';\nimport { type Decorator } from '@storybook/react';\nimport { createElement, useMemo } from 'react';\n\nimport { RootAttentionProvider, SelectionProvider } from '../../components';\n\nexport const withAttention: Decorator
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Registry", "RegistryContext", "createElement", "useMemo", "withAttention", "Story", "registry", "useMemo", "Registry", "make", "createElement", "RegistryContext", "Provider", "value", "RootAttentionProvider", "SelectionProvider"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Registry, RegistryContext } from '@effect-atom/atom-react';\nimport { type Decorator } from '@storybook/react';\nimport { createElement, useMemo } from 'react';\n\nimport { AttentionManager } from '../../attention';\nimport { RootAttentionProvider, SelectionProvider } from '../../components';\n\n/**\n * Storybook decorator that provides attention context.\n * @param initialAttendedId Optional ID to set as initially attended.\n */\nexport const withAttention = (initialAttendedId?: string): Decorator => {\n return (Story) => {\n const registry = useMemo(() => Registry.make(), []);\n const attention = useMemo(\n () => (initialAttendedId ? new AttentionManager(registry, [initialAttendedId]) : undefined),\n [registry],\n );\n return createElement(\n RegistryContext.Provider,\n { value: registry },\n createElement(RootAttentionProvider, { attention }, createElement(SelectionProvider, {}, createElement(Story))),\n );\n };\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,SAASA,UAAUC,uBAAuB;AAE1C,SAASC,eAAeC,eAAe;AAShC,IAAMC,gBAAgB,CAACC,sBAAAA;AAC5B,SAAO,CAACC,UAAAA;AACN,UAAMC,WAAWC,QAAQ,MAAMC,SAASC,KAAI,GAAI,CAAA,CAAE;AAClD,UAAMC,YAAYH,QAChB,MAAOH,oBAAoB,IAAIO,iBAAiBL,UAAU;MAACF;KAAkB,IAAIQ,QACjF;MAACN;KAAS;AAEZ,WAAOO,cACLC,gBAAgBC,UAChB;MAAEC,OAAOV;IAAS,GAClBO,cAAcI,uBAAuB;MAAEP;IAAU,GAAGG,cAAcK,mBAAmB,CAAC,GAAGL,cAAcR,KAAAA,CAAAA,CAAAA,CAAAA;EAE3G;AACF;",
|
|
6
|
+
"names": ["Registry", "RegistryContext", "createElement", "useMemo", "withAttention", "initialAttendedId", "Story", "registry", "useMemo", "Registry", "make", "attention", "AttentionManager", "undefined", "createElement", "RegistryContext", "Provider", "value", "RootAttentionProvider", "SelectionProvider"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,7 @@ import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
|
2
2
|
import { type Attention } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Manages attention state for an application.
|
|
5
|
+
* Attention keys are slash-qualified graph IDs; ancestry is derived from progressive prefixes.
|
|
5
6
|
*/
|
|
6
7
|
export declare class AttentionManager {
|
|
7
8
|
private readonly _registry;
|
|
@@ -9,34 +10,35 @@ export declare class AttentionManager {
|
|
|
9
10
|
private readonly _currentAtom;
|
|
10
11
|
constructor(_registry: Registry.Registry, initial?: string[]);
|
|
11
12
|
/**
|
|
12
|
-
* Atom for the currently attended element
|
|
13
|
+
* Atom for the currently attended element IDs.
|
|
13
14
|
*/
|
|
14
15
|
get current(): Atom.Atom<string[]>;
|
|
15
16
|
/**
|
|
16
|
-
* Gets the currently attended element
|
|
17
|
+
* Gets the currently attended element IDs.
|
|
17
18
|
*/
|
|
18
19
|
getCurrent(): readonly string[];
|
|
19
20
|
/**
|
|
20
|
-
* Subscribe to changes in the current attention
|
|
21
|
+
* Subscribe to changes in the current attention IDs.
|
|
21
22
|
*/
|
|
22
23
|
subscribeCurrent(cb: (current: readonly string[]) => void): () => void;
|
|
23
24
|
/**
|
|
24
|
-
* All
|
|
25
|
+
* All tracked qualified IDs.
|
|
25
26
|
*/
|
|
26
|
-
keys(): string[]
|
|
27
|
+
keys(): string[];
|
|
27
28
|
/**
|
|
28
|
-
* Get the attention state for a given
|
|
29
|
+
* Get the attention state for a given qualified ID.
|
|
29
30
|
*/
|
|
30
|
-
get(
|
|
31
|
+
get(id: string): Attention;
|
|
31
32
|
/**
|
|
32
|
-
* Subscribe to changes in the attention state for a given
|
|
33
|
+
* Subscribe to changes in the attention state for a given qualified ID.
|
|
33
34
|
*/
|
|
34
|
-
subscribe(
|
|
35
|
+
subscribe(id: string, cb: (attention: Attention) => void): () => void;
|
|
35
36
|
private _getAtom;
|
|
36
37
|
private _set;
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
|
-
* Accumulates all attendable
|
|
40
|
+
* Accumulates all attendable IDs between the element provided and the root, inclusive.
|
|
41
|
+
* Each `data-attendable-id` value is treated as a single qualified ID (no splitting).
|
|
40
42
|
*/
|
|
41
43
|
export declare const getAttendables: (selector: string, cursor: Element, acc?: string[]) => string[];
|
|
42
44
|
export type AttendableId = {
|
|
@@ -45,4 +47,21 @@ export type AttendableId = {
|
|
|
45
47
|
export type Related = {
|
|
46
48
|
related?: boolean;
|
|
47
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Decompose a qualified graph ID into progressive prefixes for ancestry tracking.
|
|
52
|
+
* e.g. `root/a/b/c` yields `['root', 'root/a', 'root/a/b', 'root/a/b/c']`.
|
|
53
|
+
*/
|
|
54
|
+
export declare const expandAttendableId: (qualifiedId: string) => string[];
|
|
55
|
+
/**
|
|
56
|
+
* Whether the last segment of a qualified ID starts with the attendable path separator.
|
|
57
|
+
*/
|
|
58
|
+
export declare const isSeparatorPrefixed: (qualifiedId: string) => boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Get the parent qualified ID (everything before the last `/` segment).
|
|
61
|
+
*/
|
|
62
|
+
export declare const getParentId: (qualifiedId: string | undefined) => string | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Extract the segment ID (last segment) of a qualified ID.
|
|
65
|
+
*/
|
|
66
|
+
export declare const getSegmentId: (qualifiedId: string) => string;
|
|
48
67
|
//# sourceMappingURL=attention.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["../../../src/attention.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAA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AM,MAAM,OAAO,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAAM,EAG9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,KAAG,OAGzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,aAAa,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAOtE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,KAAG,MAElD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttentionGlyph.d.ts","sourceRoot":"","sources":["../../../../src/components/AttentionGlyph.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAsB,KAAK,qBAAqB,EAAuB,MAAM,OAAO,CAAC;AAEnG,OAAO,EAAQ,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AttentionGlyph.d.ts","sourceRoot":"","sources":["../../../../src/components/AttentionGlyph.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAsB,KAAK,qBAAqB,EAAuB,MAAM,OAAO,CAAC;AAEnG,OAAO,EAAQ,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAkD5D,eAAO,MAAM,OAAO,yBAmBnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;CACpC,GAAG,eAAe,CAAC,IAAI,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;AAEpF,eAAO,MAAM,cAAc,0GAkB1B,CAAC"}
|
|
@@ -4,36 +4,34 @@ import { AttentionManager } from '../attention';
|
|
|
4
4
|
import { type Attention } from '../types';
|
|
5
5
|
declare const ATTENTION_NAME = "Attention";
|
|
6
6
|
declare const ATTENDABLE_ATTRIBUTE = "data-attendable-id";
|
|
7
|
-
declare const ATTENTION_SOURCE_ATTRIBUTE = "data-
|
|
7
|
+
declare const ATTENTION_SOURCE_ATTRIBUTE = "data-w-attention-source";
|
|
8
8
|
type AttentionContextValue = {
|
|
9
9
|
attention: AttentionManager;
|
|
10
|
-
path: string[];
|
|
11
10
|
};
|
|
12
11
|
declare const useAttentionContext: (consumerName: string) => AttentionContextValue;
|
|
12
|
+
/**
|
|
13
|
+
* Subscribe to the attention state for a qualified graph ID.
|
|
14
|
+
*/
|
|
13
15
|
declare const useAttention: (attendableId?: string) => Attention;
|
|
14
16
|
declare const useAttended: () => readonly string[];
|
|
15
17
|
/**
|
|
16
18
|
* Computes HTML element attributes to apply so the attention system can detect changes.
|
|
17
|
-
* @param attendableId
|
|
18
19
|
*/
|
|
19
20
|
declare const useAttentionAttributes: (attendableId?: string) => Record<string, string | undefined>;
|
|
20
|
-
declare const useAttentionPath: () => string[];
|
|
21
21
|
declare const RootAttentionProvider: ({ children, attention: propsAttention, onChange, }: PropsWithChildren<Partial<{
|
|
22
22
|
attention: AttentionManager;
|
|
23
23
|
onChange: (nextAttended: string[]) => void;
|
|
24
24
|
}>>) => React.JSX.Element;
|
|
25
|
-
declare const AttentionProvider: ({ id, children }: PropsWithChildren<{
|
|
26
|
-
id: string;
|
|
27
|
-
}>) => React.JSX.Element;
|
|
28
25
|
export type AttendableContainerProps = ThemedClassName<ComponentPropsWithRef<'div'> & {
|
|
29
26
|
id: string;
|
|
30
27
|
asChild?: boolean;
|
|
31
28
|
}>;
|
|
32
29
|
/**
|
|
33
|
-
* Note that DeckPlugin and StackPlugin both handle attention on their own,
|
|
34
|
-
* is not necessary to also render an `AttendableContainer`.
|
|
35
|
-
*
|
|
30
|
+
* Note that DeckPlugin and StackPlugin both handle attention on their own,
|
|
31
|
+
* and when rendering content in those cases it is not necessary to also render an `AttendableContainer`.
|
|
32
|
+
* This component is primarily for Storybook stories and other testing scenarios,
|
|
33
|
+
* or the rare cases where an attendable entity is rendered outside of either of those plugins.
|
|
36
34
|
*/
|
|
37
35
|
declare const AttendableContainer: React.ForwardRefExoticComponent<Omit<AttendableContainerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
-
export { RootAttentionProvider,
|
|
36
|
+
export { RootAttentionProvider, AttendableContainer, useAttentionContext, useAttention, useAttended, useAttentionAttributes, ATTENTION_NAME, ATTENDABLE_ATTRIBUTE, ATTENTION_SOURCE_ATTRIBUTE, };
|
|
39
37
|
//# sourceMappingURL=AttentionProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttentionProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/AttentionProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAE1B,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAkB,MAAM,cAAc,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"AttentionProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/AttentionProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAE1B,KAAK,iBAAiB,EAMvB,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,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AEF;;GAEG;AAEH,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,EAAE,EAAE,OAAM,aAAuB,KAAG,mBA8DzF,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { type Decorator } from '@storybook/react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Storybook decorator that provides attention context.
|
|
4
|
+
* @param initialAttendedId Optional ID to set as initially attended.
|
|
5
|
+
*/
|
|
6
|
+
export declare const withAttention: (initialAttendedId?: string) => Decorator;
|
|
3
7
|
//# sourceMappingURL=withAttention.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withAttention.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/withAttention.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"withAttention.d.ts","sourceRoot":"","sources":["../../../../../src/testing/decorators/withAttention.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMlD;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,oBAAoB,MAAM,KAAG,SAa1D,CAAC"}
|