@dxos/react-ui-attention 0.8.4-main.ef1bc66f44 → 0.8.4-main.f466a3d56e
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/LICENSE +102 -5
- package/dist/lib/browser/chunk-D2BLVJ6Z.mjs +421 -0
- package/dist/lib/browser/chunk-D2BLVJ6Z.mjs.map +7 -0
- package/dist/lib/browser/chunk-I4VO2RQM.mjs +255 -0
- package/dist/lib/browser/chunk-I4VO2RQM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +24 -25
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +4 -3
- package/dist/lib/browser/testing/index.mjs.map +2 -2
- package/dist/lib/browser/types/index.mjs +29 -0
- package/dist/lib/node-esm/chunk-6INLBC62.mjs +423 -0
- package/dist/lib/node-esm/chunk-6INLBC62.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZTUVSH4P.mjs +256 -0
- package/dist/lib/node-esm/chunk-ZTUVSH4P.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +24 -25
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +4 -3
- package/dist/lib/node-esm/testing/index.mjs.map +2 -2
- package/dist/lib/node-esm/types/index.mjs +30 -0
- package/dist/types/src/attention.d.ts +46 -11
- package/dist/types/src/attention.d.ts.map +1 -1
- package/dist/types/src/components/AttentionGlyph/AttentionGlyph.d.ts.map +1 -0
- package/dist/types/src/components/AttentionGlyph/AttentionGlyph.stories.d.ts.map +1 -0
- package/dist/types/src/components/AttentionGlyph/index.d.ts +2 -0
- package/dist/types/src/components/AttentionGlyph/index.d.ts.map +1 -0
- package/dist/types/src/components/AttentionProvider/AttentionProvider.d.ts +34 -0
- package/dist/types/src/components/AttentionProvider/AttentionProvider.d.ts.map +1 -0
- package/dist/types/src/components/AttentionProvider/AttentionProvider.stories.d.ts.map +1 -0
- package/dist/types/src/components/AttentionProvider/index.d.ts +2 -0
- package/dist/types/src/components/AttentionProvider/index.d.ts.map +1 -0
- package/dist/types/src/components/{SelectionProvider.d.ts → SelectionProvider/SelectionProvider.d.ts} +3 -3
- package/dist/types/src/components/SelectionProvider/SelectionProvider.d.ts.map +1 -0
- package/dist/types/src/components/SelectionProvider/index.d.ts +2 -0
- package/dist/types/src/components/SelectionProvider/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/selection.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withAttention.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -32
- package/src/attention.test.ts +179 -23
- package/src/attention.ts +136 -54
- package/src/components/{AttentionGlyph.stories.tsx → AttentionGlyph/AttentionGlyph.stories.tsx} +2 -2
- package/src/components/{AttentionGlyph.tsx → AttentionGlyph/AttentionGlyph.tsx} +12 -5
- package/src/components/AttentionGlyph/index.ts +5 -0
- package/src/components/{AttentionProvider.stories.tsx → AttentionProvider/AttentionProvider.stories.tsx} +2 -3
- package/src/components/AttentionProvider/AttentionProvider.tsx +176 -0
- package/src/components/AttentionProvider/index.ts +5 -0
- package/src/components/{SelectionProvider.tsx → SelectionProvider/SelectionProvider.tsx} +15 -8
- package/src/components/SelectionProvider/index.ts +5 -0
- package/src/index.ts +0 -1
- package/src/selection.ts +10 -8
- package/src/testing/decorators/withAttention.ts +1 -0
- package/src/types/index.ts +9 -0
- package/dist/lib/browser/chunk-PAZBZOO2.mjs +0 -7
- package/dist/lib/browser/chunk-PAZBZOO2.mjs.map +0 -7
- package/dist/lib/browser/chunk-W5HPVX5Q.mjs +0 -705
- package/dist/lib/browser/chunk-W5HPVX5Q.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -7
- package/dist/lib/node-esm/chunk-NFJ45DDP.mjs +0 -706
- package/dist/lib/node-esm/chunk-NFJ45DDP.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
- package/dist/lib/node-esm/types.mjs +0 -8
- package/dist/types/src/components/AttentionGlyph.d.ts.map +0 -1
- package/dist/types/src/components/AttentionGlyph.stories.d.ts.map +0 -1
- package/dist/types/src/components/AttentionProvider.d.ts +0 -39
- package/dist/types/src/components/AttentionProvider.d.ts.map +0 -1
- package/dist/types/src/components/AttentionProvider.stories.d.ts.map +0 -1
- package/dist/types/src/components/SelectionProvider.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -10
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/AttentionProvider.tsx +0 -208
- package/src/types.ts +0 -16
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/types/src/components/{AttentionGlyph.d.ts → AttentionGlyph/AttentionGlyph.d.ts} +0 -0
- /package/dist/types/src/components/{AttentionGlyph.stories.d.ts → AttentionGlyph/AttentionGlyph.stories.d.ts} +0 -0
- /package/dist/types/src/components/{AttentionProvider.stories.d.ts → AttentionProvider/AttentionProvider.stories.d.ts} +0 -0
|
@@ -7,8 +7,7 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
9
9
|
|
|
10
|
-
import { withAttention } from '
|
|
11
|
-
|
|
10
|
+
import { withAttention } from '../../testing';
|
|
12
11
|
import { useAttentionAttributes } from './AttentionProvider';
|
|
13
12
|
|
|
14
13
|
const Attendable = ({ id }: { id: string }) => {
|
|
@@ -16,7 +15,7 @@ const Attendable = ({ id }: { id: string }) => {
|
|
|
16
15
|
|
|
17
16
|
return (
|
|
18
17
|
<div {...attentionAttrs}>
|
|
19
|
-
<textarea className='attention-surface resize-none' placeholder={id} />
|
|
18
|
+
<textarea className='dx-attention-surface resize-none' placeholder={id} />
|
|
20
19
|
</div>
|
|
21
20
|
);
|
|
22
21
|
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { RegistryContext } from '@effect-atom/atom-react';
|
|
6
|
+
import { createContext } from '@radix-ui/react-context';
|
|
7
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
8
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
9
|
+
import React, {
|
|
10
|
+
type ComponentPropsWithRef,
|
|
11
|
+
type FocusEvent,
|
|
12
|
+
type PropsWithChildren,
|
|
13
|
+
forwardRef,
|
|
14
|
+
useCallback,
|
|
15
|
+
useContext,
|
|
16
|
+
useEffect,
|
|
17
|
+
useMemo,
|
|
18
|
+
useState,
|
|
19
|
+
} from 'react';
|
|
20
|
+
|
|
21
|
+
import { log } from '@dxos/log';
|
|
22
|
+
import { useDefaultValue } from '@dxos/react-hooks';
|
|
23
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
24
|
+
import { mx } from '@dxos/ui-theme';
|
|
25
|
+
|
|
26
|
+
import { type Attention, AttentionManager, getAttendables } from '../../attention';
|
|
27
|
+
|
|
28
|
+
const ATTENTION_NAME = 'Attention';
|
|
29
|
+
const ATTENDABLE_ATTRIBUTE = 'data-attendable-id';
|
|
30
|
+
const ATTENTION_SOURCE_ATTRIBUTE = 'data-w-attention-source';
|
|
31
|
+
|
|
32
|
+
type AttentionContextValue = {
|
|
33
|
+
attention: AttentionManager;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const [AttentionContextProvider, useAttentionContext] = createContext<AttentionContextValue>(ATTENTION_NAME, {
|
|
37
|
+
attention: undefined as unknown as AttentionManager,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const UNKNOWN_ATTENDABLE = { hasAttention: false, isAncestor: false, isRelated: false } as Attention;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Subscribe to the attention state for a qualified graph ID.
|
|
44
|
+
*/
|
|
45
|
+
// TODO(burdon): Unify with seleciton and change to contextId?
|
|
46
|
+
const useAttention = (attendableId?: string): Attention => {
|
|
47
|
+
const { attention } = useAttentionContext(ATTENTION_NAME);
|
|
48
|
+
const [state, setState] = useState<Attention>(UNKNOWN_ATTENDABLE);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (!attendableId || !attention) {
|
|
51
|
+
setState(UNKNOWN_ATTENDABLE);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const currentState = attention.get(attendableId);
|
|
56
|
+
setState(currentState);
|
|
57
|
+
|
|
58
|
+
return attention.subscribe(attendableId, (newState) => {
|
|
59
|
+
setState(newState);
|
|
60
|
+
});
|
|
61
|
+
}, [attention, attendableId]);
|
|
62
|
+
|
|
63
|
+
return state;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const useAttended = () => {
|
|
67
|
+
const { attention } = useAttentionContext(ATTENTION_NAME);
|
|
68
|
+
const [current, setCurrent] = useState<readonly string[]>([]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (!attention) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
setCurrent(attention.getCurrent());
|
|
75
|
+
|
|
76
|
+
return attention.subscribeCurrent((newCurrent) => {
|
|
77
|
+
setCurrent(newCurrent);
|
|
78
|
+
});
|
|
79
|
+
}, [attention]);
|
|
80
|
+
|
|
81
|
+
return current;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Computes HTML element attributes to apply so the attention system can detect changes.
|
|
86
|
+
*/
|
|
87
|
+
const useAttentionAttributes = (attendableId?: string) => {
|
|
88
|
+
const { hasAttention } = useAttention(attendableId);
|
|
89
|
+
return useMemo(() => {
|
|
90
|
+
const attributes: Record<string, string | undefined> = { [ATTENDABLE_ATTRIBUTE]: attendableId };
|
|
91
|
+
if (hasAttention) {
|
|
92
|
+
attributes[ATTENTION_SOURCE_ATTRIBUTE] = 'true';
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return attributes;
|
|
96
|
+
}, [attendableId, hasAttention]);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
type RootAttentionProviderProps = PropsWithChildren<{
|
|
100
|
+
attention?: AttentionManager;
|
|
101
|
+
onChange?: (nextAttended: string[]) => void;
|
|
102
|
+
}>;
|
|
103
|
+
|
|
104
|
+
const RootAttentionProvider = ({ children, attention: propsAttention, onChange }: RootAttentionProviderProps) => {
|
|
105
|
+
const registry = useContext(RegistryContext);
|
|
106
|
+
const attention = useDefaultValue(propsAttention, () => new AttentionManager(registry));
|
|
107
|
+
|
|
108
|
+
const handleFocus = useCallback(
|
|
109
|
+
(event: FocusEvent) => {
|
|
110
|
+
// NOTE(thure): Use the following to debug focus movement across the app:
|
|
111
|
+
log('focus', { related: event.relatedTarget, target: event.target });
|
|
112
|
+
|
|
113
|
+
const selector = [
|
|
114
|
+
'[data-attendable-id]',
|
|
115
|
+
...Array.from(document.querySelectorAll('[aria-controls]')).map(
|
|
116
|
+
(el) => `[id="${el.getAttribute('aria-controls')}"]`,
|
|
117
|
+
),
|
|
118
|
+
].join(',');
|
|
119
|
+
const prev = attention.getCurrent();
|
|
120
|
+
const next = getAttendables(selector, event.target);
|
|
121
|
+
// TODO(wittjosiah): Not allowing empty state means that the attended item is not strictly guaranteed to be in the DOM.
|
|
122
|
+
// Currently this depends on the deck in order to ensure that when the attended item is removed something else is attended.
|
|
123
|
+
// Only update state if the result is different and not empty.
|
|
124
|
+
if (next.length > 0 && (prev.length !== next.length || !!prev.find((id, index) => next[index] !== id))) {
|
|
125
|
+
attention.update(next);
|
|
126
|
+
onChange?.(next);
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
[attention, onChange],
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<AttentionContextProvider attention={attention}>
|
|
134
|
+
<div className='contents' onFocusCapture={handleFocus}>
|
|
135
|
+
{children}
|
|
136
|
+
</div>
|
|
137
|
+
</AttentionContextProvider>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export type AttendableContainerProps = ThemedClassName<
|
|
142
|
+
ComponentPropsWithRef<'div'> & { id: string; asChild?: boolean }
|
|
143
|
+
>;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Note that DeckPlugin and StackPlugin both handle attention on their own,
|
|
147
|
+
* and when rendering content in those cases it is not necessary to also render an `AttendableContainer`.
|
|
148
|
+
* This component is primarily for Storybook stories and other testing scenarios,
|
|
149
|
+
* or the rare cases where an attendable entity is rendered outside of either of those plugins.
|
|
150
|
+
*/
|
|
151
|
+
const AttendableContainer = forwardRef<HTMLDivElement, AttendableContainerProps>(
|
|
152
|
+
({ id, classNames, children, asChild, ...props }, forwardedRef) => {
|
|
153
|
+
const attentionAttrs = useAttentionAttributes(id);
|
|
154
|
+
const Comp = asChild ? Slot : Primitive.div;
|
|
155
|
+
return (
|
|
156
|
+
<Comp
|
|
157
|
+
role='none'
|
|
158
|
+
{...props}
|
|
159
|
+
{...attentionAttrs}
|
|
160
|
+
className={mx('dx-attention-surface', props.tabIndex === 0 && 'dx-focus-ring-inset-over-all', classNames)}
|
|
161
|
+
ref={forwardedRef}
|
|
162
|
+
>
|
|
163
|
+
{children}
|
|
164
|
+
</Comp>
|
|
165
|
+
);
|
|
166
|
+
},
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
export {
|
|
170
|
+
RootAttentionProvider,
|
|
171
|
+
AttendableContainer,
|
|
172
|
+
useAttentionContext,
|
|
173
|
+
useAttention,
|
|
174
|
+
useAttended,
|
|
175
|
+
useAttentionAttributes,
|
|
176
|
+
};
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
type SelectionMode,
|
|
16
16
|
type SelectionResult,
|
|
17
17
|
defaultSelection,
|
|
18
|
-
} from '
|
|
18
|
+
} from '../../selection';
|
|
19
19
|
|
|
20
20
|
const SELECTION_NAME = 'Selection';
|
|
21
21
|
|
|
@@ -23,6 +23,11 @@ type SelectionContextValue = {
|
|
|
23
23
|
selection: SelectionManager;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
// Default value lets consumers like `useSelected` render outside a
|
|
27
|
+
// `SelectionProvider` (e.g. isolated stories) without throwing —
|
|
28
|
+
// `selection` reads as `undefined` and the hook falls back to the
|
|
29
|
+
// per-mode default result. Without this default, Radix `createContext`
|
|
30
|
+
// throws "Selection must be used within Selection" on every consumer.
|
|
26
31
|
const [SelectionContextProvider, useSelectionContext] = createContext<SelectionContextValue>(SELECTION_NAME, {
|
|
27
32
|
selection: undefined as unknown as SelectionManager,
|
|
28
33
|
});
|
|
@@ -30,20 +35,20 @@ const [SelectionContextProvider, useSelectionContext] = createContext<SelectionC
|
|
|
30
35
|
/**
|
|
31
36
|
* Manages selection state across the app for multiple contexts.
|
|
32
37
|
*/
|
|
33
|
-
// TODO(burdon): When is the selection removed?
|
|
34
38
|
export const SelectionProvider = ({
|
|
35
39
|
children,
|
|
36
|
-
selection:
|
|
40
|
+
selection: selectionProp,
|
|
37
41
|
}: PropsWithChildren<{ selection?: SelectionManager }>) => {
|
|
38
42
|
const registry = useContext(RegistryContext);
|
|
39
|
-
const selection = useDefaultValue(
|
|
43
|
+
const selection = useDefaultValue(selectionProp, () => new SelectionManager(registry));
|
|
44
|
+
|
|
40
45
|
return <SelectionContextProvider selection={selection}>{children}</SelectionContextProvider>;
|
|
41
46
|
};
|
|
42
47
|
|
|
43
48
|
/**
|
|
44
49
|
* Get the selection contexts.
|
|
45
50
|
*/
|
|
46
|
-
export const useSelectionManager = () => {
|
|
51
|
+
export const useSelectionManager = (): SelectionManager => {
|
|
47
52
|
const { selection } = useSelectionContext(SELECTION_NAME);
|
|
48
53
|
return selection;
|
|
49
54
|
};
|
|
@@ -101,11 +106,13 @@ export type UseSelectionActions = {
|
|
|
101
106
|
/**
|
|
102
107
|
* Provides functions to manage the selection state for multiple contexts.
|
|
103
108
|
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const stableContextIds = useMemo(() => contextIds, [JSON.stringify(contextIds)]); // TODO(burdon): Avoid stringify.
|
|
109
|
+
export const useSelectionActions = (contextIds: string[]): UseSelectionActions => {
|
|
110
|
+
const stableContextIds = useMemo(() => contextIds, [JSON.stringify(contextIds)]);
|
|
107
111
|
const { selection } = useSelectionContext(SELECTION_NAME);
|
|
108
112
|
|
|
113
|
+
// No-op when rendered outside a `SelectionProvider` (e.g. an isolated
|
|
114
|
+
// story or a test harness) — `selection` is `undefined` from the
|
|
115
|
+
// context default value. Matches the pre-co-locate behaviour.
|
|
109
116
|
const singleSelect = useCallback(
|
|
110
117
|
(id: string) => {
|
|
111
118
|
if (!selection) {
|
package/src/index.ts
CHANGED
package/src/selection.ts
CHANGED
|
@@ -8,15 +8,17 @@ import * as Schema from 'effect/Schema';
|
|
|
8
8
|
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
|
|
11
|
-
// TODO(burdon): Reconcile with @dxos/graph.
|
|
12
|
-
|
|
13
11
|
export type SelectionMode = 'single' | 'multi' | 'range' | 'multi-range';
|
|
14
12
|
|
|
15
13
|
export const SelectionSchema = Schema.Union(
|
|
16
|
-
Schema.Struct({
|
|
17
|
-
|
|
18
|
-
Schema.
|
|
19
|
-
),
|
|
14
|
+
Schema.Struct({
|
|
15
|
+
mode: Schema.Literal('single'),
|
|
16
|
+
id: Schema.optional(Schema.String),
|
|
17
|
+
}).pipe(Schema.mutable),
|
|
18
|
+
Schema.Struct({
|
|
19
|
+
mode: Schema.Literal('multi'),
|
|
20
|
+
ids: Schema.Array(Schema.String).pipe(Schema.mutable),
|
|
21
|
+
}).pipe(Schema.mutable),
|
|
20
22
|
Schema.Struct({
|
|
21
23
|
mode: Schema.Literal('range'),
|
|
22
24
|
from: Schema.optional(Schema.String),
|
|
@@ -49,7 +51,6 @@ export type SelectionResult<T extends SelectionMode> = T extends 'single'
|
|
|
49
51
|
? { from: string; to: string }[]
|
|
50
52
|
: never;
|
|
51
53
|
|
|
52
|
-
// TODO(burdon): Refactor.
|
|
53
54
|
export const getSelectionSet = (selectionManager: SelectionManager, contextId?: string) => {
|
|
54
55
|
const ids = new Set<string>(contextId ? [contextId] : []);
|
|
55
56
|
for (const context of selectionManager.getSelectionContexts()) {
|
|
@@ -125,13 +126,14 @@ export class SelectionManager {
|
|
|
125
126
|
this._registry.update(this._state, (state) => ({
|
|
126
127
|
selections: { ...state.selections, [contextId]: newSelection },
|
|
127
128
|
}));
|
|
129
|
+
|
|
128
130
|
return newSelection;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
|
-
// TODO(burdon): Disambiguate with getSelection?
|
|
132
133
|
getSelected<T extends SelectionMode>(contextId: string, mode: T = 'multi' as T): SelectionResult<T> {
|
|
133
134
|
const selection = this.getSelection(contextId, mode);
|
|
134
135
|
invariant(selection?.mode === mode, 'Selection mode mismatch');
|
|
136
|
+
|
|
135
137
|
// Cast required because TypeScript can't infer the relationship between T and the matched result.
|
|
136
138
|
return Match.type<Selection>().pipe(
|
|
137
139
|
Match.when({ mode: 'single' }, (s) => s.id),
|
|
@@ -20,6 +20,7 @@ export const withAttention = (initialAttendedId?: string): Decorator => {
|
|
|
20
20
|
() => (initialAttendedId ? new AttentionManager(registry, [initialAttendedId]) : undefined),
|
|
21
21
|
[registry],
|
|
22
22
|
);
|
|
23
|
+
|
|
23
24
|
return createElement(
|
|
24
25
|
RegistryContext.Provider,
|
|
25
26
|
{ value: registry },
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// UI-free re-exports of @dxos/react-ui-attention. Importing from here does not
|
|
6
|
+
// pull in React components, so it is safe to use from operations, schemas, and
|
|
7
|
+
// other non-DOM code that only needs the data model and pure helpers.
|
|
8
|
+
export * from '../attention';
|
|
9
|
+
export * from '../selection';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// NOTE: Chosen from RFC 1738's `safe` characters: http://www.faqs.org/rfcs/rfc1738.html\nexport const ATTENDABLE_PATH_SEPARATOR = '~';\n\nexport type Attention = {\n hasAttention: boolean;\n isAncestor: boolean;\n isRelated: boolean;\n};\n\nexport type CurrentState = {\n current: string[];\n};\n"],
|
|
5
|
-
"mappings": ";AAKO,IAAMA,4BAA4B;",
|
|
6
|
-
"names": ["ATTENDABLE_PATH_SEPARATOR"]
|
|
7
|
-
}
|