@dxos/react-ui-attention 0.8.4-main.9735255 → 0.8.4-main.9be5663bfe
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-4SEURHOL.mjs} +122 -106
- package/dist/lib/browser/chunk-4SEURHOL.mjs.map +7 -0
- package/dist/lib/browser/chunk-GMKHOVJ5.mjs +1 -0
- package/dist/lib/browser/chunk-GMKHOVJ5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +17 -12
- 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 -7
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/browser/types.mjs +1 -6
- package/dist/lib/node-esm/{chunk-7TQWDE4M.mjs → chunk-6PQ4P7AL.mjs} +122 -105
- package/dist/lib/node-esm/chunk-6PQ4P7AL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UHVMYYIB.mjs +2 -0
- package/dist/lib/node-esm/chunk-UHVMYYIB.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +17 -12
- 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 -7
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/types.mjs +1 -6
- package/dist/types/src/attention.d.ts +41 -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/AttentionProvider.stories.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/src/types.d.ts +0 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -16
- package/src/attention.test.ts +179 -23
- package/src/attention.ts +132 -54
- package/src/components/AttentionGlyph.stories.tsx +3 -3
- package/src/components/AttentionGlyph.tsx +12 -5
- package/src/components/AttentionProvider.stories.tsx +2 -3
- package/src/components/AttentionProvider.tsx +21 -48
- package/src/components/SelectionProvider.tsx +6 -4
- package/src/testing/decorators/withAttention.ts +18 -7
- package/src/types.ts +0 -3
- package/dist/lib/browser/chunk-HJRZWOEX.mjs.map +0 -7
- package/dist/lib/browser/chunk-PAZBZOO2.mjs +0 -7
- package/dist/lib/browser/chunk-PAZBZOO2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7TQWDE4M.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PMGNPL4M.mjs +0 -9
- package/dist/lib/node-esm/chunk-PMGNPL4M.mjs.map +0 -7
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import "./chunk-UHVMYYIB.mjs";
|
|
2
3
|
import {
|
|
3
4
|
ATTENDABLE_ATTRIBUTE,
|
|
4
5
|
ATTENTION_NAME,
|
|
5
6
|
ATTENTION_SOURCE_ATTRIBUTE,
|
|
6
7
|
AttendableContainer,
|
|
7
8
|
AttentionManager,
|
|
8
|
-
AttentionProvider,
|
|
9
9
|
RootAttentionProvider,
|
|
10
10
|
SelectionManager,
|
|
11
11
|
SelectionProvider,
|
|
12
12
|
SelectionSchema,
|
|
13
13
|
defaultSelection,
|
|
14
|
+
expandAttendableId,
|
|
14
15
|
getAttendables,
|
|
16
|
+
getLinkedVariant,
|
|
17
|
+
getParentId,
|
|
18
|
+
getSegmentId,
|
|
15
19
|
getSelectionSet,
|
|
20
|
+
isLinkedSegment,
|
|
21
|
+
linkedSegment,
|
|
16
22
|
useAttended,
|
|
17
23
|
useAttention,
|
|
18
24
|
useAttentionAttributes,
|
|
19
25
|
useAttentionContext,
|
|
20
|
-
useAttentionPath,
|
|
21
26
|
useSelected,
|
|
22
27
|
useSelectionActions,
|
|
23
28
|
useSelectionManager
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
ATTENDABLE_PATH_SEPARATOR
|
|
27
|
-
} from "./chunk-PMGNPL4M.mjs";
|
|
29
|
+
} from "./chunk-6PQ4P7AL.mjs";
|
|
28
30
|
|
|
29
31
|
// src/components/AttentionGlyph.tsx
|
|
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", {
|
|
@@ -96,26 +98,29 @@ var AttentionGlyph = /* @__PURE__ */ forwardRef(({ presence, attended, syncing,
|
|
|
96
98
|
});
|
|
97
99
|
export {
|
|
98
100
|
ATTENDABLE_ATTRIBUTE,
|
|
99
|
-
ATTENDABLE_PATH_SEPARATOR,
|
|
100
101
|
ATTENTION_NAME,
|
|
101
102
|
ATTENTION_SOURCE_ATTRIBUTE,
|
|
102
103
|
AttendableContainer,
|
|
103
104
|
AttentionGlyph,
|
|
104
105
|
AttentionManager,
|
|
105
|
-
AttentionProvider,
|
|
106
106
|
RootAttentionProvider,
|
|
107
107
|
SelectionManager,
|
|
108
108
|
SelectionProvider,
|
|
109
109
|
SelectionSchema,
|
|
110
110
|
Syncing,
|
|
111
111
|
defaultSelection,
|
|
112
|
+
expandAttendableId,
|
|
112
113
|
getAttendables,
|
|
114
|
+
getLinkedVariant,
|
|
115
|
+
getParentId,
|
|
116
|
+
getSegmentId,
|
|
113
117
|
getSelectionSet,
|
|
118
|
+
isLinkedSegment,
|
|
119
|
+
linkedSegment,
|
|
114
120
|
useAttended,
|
|
115
121
|
useAttention,
|
|
116
122
|
useAttentionAttributes,
|
|
117
123
|
useAttentionContext,
|
|
118
|
-
useAttentionPath,
|
|
119
124
|
useSelected,
|
|
120
125
|
useSelectionActions,
|
|
121
126
|
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
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAOA,SAAyDC,YAAYC,eAAe;AAE3F,SAASC,YAAkC;AAC3C,SAASC,UAAU;AAEnB,IAAMC,uBAAuBC,GAC3B,qFACA,2DACA,+CACA,sDACA,6DACA,oEACA,qEACA,0EAAA;AAGF,IAAMC,qBAAqBD,GAAG,SAAA;AAE9B,I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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/
|
|
1
|
+
{"inputs":{"src/attention.ts":{"bytes":25938,"imports":[{"path":"@effect-atom/atom-react","kind":"import-statement","external":true}],"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/types.ts":{"bytes":613,"imports":[],"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-UHVMYYIB.mjs","kind":"import-statement"},{"path":"dist/lib/node-esm/chunk-6PQ4P7AL.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","ATTENTION_NAME","ATTENTION_SOURCE_ATTRIBUTE","AttendableContainer","AttentionGlyph","AttentionManager","RootAttentionProvider","SelectionManager","SelectionProvider","SelectionSchema","Syncing","defaultSelection","expandAttendableId","getAttendables","getLinkedVariant","getParentId","getSegmentId","getSelectionSet","isLinkedSegment","linkedSegment","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-UHVMYYIB.mjs","kind":"import-statement"}],"exports":[],"entryPoint":"src/types.ts","inputs":{},"bytes":158},"dist/lib/node-esm/chunk-UHVMYYIB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/lib/node-esm/chunk-UHVMYYIB.mjs":{"imports":[],"exports":[],"inputs":{"src/types.ts":{"bytesInOutput":0}},"bytes":136},"dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1872},"dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"dist/lib/node-esm/chunk-6PQ4P7AL.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":915},"dist/lib/node-esm/chunk-6PQ4P7AL.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":43667},"dist/lib/node-esm/chunk-6PQ4P7AL.mjs":{"imports":[{"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","getLinkedVariant","getParentId","getSegmentId","getSelectionSet","isLinkedSegment","linkedSegment","useAttended","useAttention","useAttentionAttributes","useAttentionContext","useSelected","useSelectionActions","useSelectionManager"],"inputs":{"src/attention.ts":{"bytesInOutput":5433},"src/components/AttentionProvider.tsx":{"bytesInOutput":3752},"src/selection.ts":{"bytesInOutput":7192},"src/components/SelectionProvider.tsx":{"bytesInOutput":3533}},"bytes":20689}}}
|
|
@@ -1,18 +1,27 @@
|
|
|
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
|
-
import "../chunk-PMGNPL4M.mjs";
|
|
6
|
+
} from "../chunk-6PQ4P7AL.mjs";
|
|
7
7
|
|
|
8
8
|
// src/testing/decorators/withAttention.ts
|
|
9
9
|
import { Registry, RegistryContext } from "@effect-atom/atom-react";
|
|
10
10
|
import { createElement, useMemo } from "react";
|
|
11
|
-
var withAttention = (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
var withAttention = (initialAttendedId) => {
|
|
12
|
+
return (Story) => {
|
|
13
|
+
const registry = useMemo(() => Registry.make(), []);
|
|
14
|
+
const attention = useMemo(() => initialAttendedId ? new AttentionManager(registry, [
|
|
15
|
+
initialAttendedId
|
|
16
|
+
]) : void 0, [
|
|
17
|
+
registry
|
|
18
|
+
]);
|
|
19
|
+
return createElement(RegistryContext.Provider, {
|
|
20
|
+
value: registry
|
|
21
|
+
}, createElement(RootAttentionProvider, {
|
|
22
|
+
attention
|
|
23
|
+
}, createElement(SelectionProvider, {}, createElement(Story))));
|
|
24
|
+
};
|
|
16
25
|
};
|
|
17
26
|
export {
|
|
18
27
|
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": ";;;;;;;;AAIA,SAASA,UAAUC,uBAAuB;AAE1C,SAASC,eAAeC,eAAe;
|
|
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
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import
|
|
3
|
-
ATTENDABLE_PATH_SEPARATOR
|
|
4
|
-
} from "./chunk-PMGNPL4M.mjs";
|
|
5
|
-
export {
|
|
6
|
-
ATTENDABLE_PATH_SEPARATOR
|
|
7
|
-
};
|
|
2
|
+
import "./chunk-UHVMYYIB.mjs";
|
|
8
3
|
//# sourceMappingURL=types.mjs.map
|
|
@@ -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,33 @@ 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 is a linked segment (starts with `~`).
|
|
57
|
+
* Linked segments share their attention state with the parent node.
|
|
58
|
+
*/
|
|
59
|
+
export declare const isLinkedSegment: (qualifiedId: string) => boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Build a linked segment ID from a variant name (e.g., `'settings'` -> `'~settings'`).
|
|
62
|
+
* Nodes identified by linked segments share their attention state with the parent node.
|
|
63
|
+
*/
|
|
64
|
+
export declare const linkedSegment: (variant: string) => string;
|
|
65
|
+
/**
|
|
66
|
+
* Extract the variant name from the last segment of a qualified ID, stripping the linked prefix.
|
|
67
|
+
* e.g. `'root/space/obj/~settings'` -> `'settings'`.
|
|
68
|
+
* If the segment is not linked (no `~` prefix), returns the segment as-is.
|
|
69
|
+
*/
|
|
70
|
+
export declare const getLinkedVariant: (qualifiedId: string) => string;
|
|
71
|
+
/**
|
|
72
|
+
* Get the parent qualified ID (everything before the last `/` segment).
|
|
73
|
+
*/
|
|
74
|
+
export declare const getParentId: (qualifiedId: string | undefined) => string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Extract the segment ID (last segment) of a qualified ID.
|
|
77
|
+
*/
|
|
78
|
+
export declare const getSegmentId: (qualifiedId: string) => string;
|
|
48
79
|
//# sourceMappingURL=attention.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["../../../src/attention.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"attention.d.ts","sourceRoot":"","sources":["../../../src/attention.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;GAGG;AACH,qBAAa,gBAAgB;IAKzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAJ5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+C;IACpE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA0B;gBAGpC,SAAS,EAAE,QAAQ,CAAC,QAAQ,EAC7C,OAAO,GAAE,MAAM,EAAO;IAQxB;;OAEG;IACH,IAAI,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAEjC;IAED;;OAEG;IACH,UAAU,IAAI,SAAS,MAAM,EAAE;IAI/B;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI;IAOtE;;OAEG;IACH,IAAI,IAAI,MAAM,EAAE;IAIhB;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS;IAK1B;;OAEG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI;IAQrE,OAAO,CAAC,QAAQ;IAuEhB,OAAO,CAAC,IAAI;CAQb;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,QAAQ,OAAO,EAAE,MAAK,MAAM,EAAO,KAAG,MAAM,EAoB5F,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAQ5C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAAM,EAG9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,aAAa,MAAM,KAAG,OAGrD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,KAAG,MAAsC,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,aAAa,MAAM,KAAG,MAGtD,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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AAC,KAAK,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CACjE,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,8GAgBxB,CAAC;AAEF,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,0BAA0B,GAC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttentionProvider.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/AttentionProvider.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AttentionProvider.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/AttentionProvider.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,QAAA,MAAM,KAAK,yBASV,CAAC;AAEF,QAAA,MAAM,IAAI;;;;CAIM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionProvider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAyD,MAAM,OAAO,CAAC;AAI7G,OAAO,EAEL,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AAYtB;;GAEG;AAEH,eA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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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC"}
|