@astryxdesign/core 0.7.2-canary.c68f5e8 → 0.7.2-canary.fc12a18
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/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +10 -2
- package/dist/Markdown/plugins/frontmatter.d.ts.map +1 -1
- package/dist/Markdown/plugins/frontmatter.js +7 -3
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +3 -1
- package/dist/PowerSearch/PowerSearch.js +1 -1
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +6 -2
- package/dist/Switch/Switch.d.ts +1 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +7 -1
- package/dist/Text/useTruncation.d.ts +7 -5
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +16 -5
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +11 -0
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +26 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +83 -1
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +83 -1
- package/dist/utils/sharedMutationObserver.d.ts +21 -0
- package/dist/utils/sharedMutationObserver.d.ts.map +1 -0
- package/dist/utils/sharedMutationObserver.js +69 -0
- package/locales/en.json +328 -0
- package/locales/pseudo.json +246 -0
- package/package.json +3 -3
- package/src/HoverCard/HoverCard.test.tsx +58 -0
- package/src/HoverCard/useHoverCard.tsx +10 -2
- package/src/List/ListItem.doc.mjs +8 -5
- package/src/Markdown/plugins/frontmatter.test.tsx +25 -0
- package/src/Markdown/plugins/frontmatter.ts +7 -3
- package/src/MultiSelector/hooks.ts +3 -1
- package/src/MultiSelector/useMultiCombobox.doc.mjs +267 -0
- package/src/PowerSearch/PowerSearch.test.tsx +85 -0
- package/src/PowerSearch/PowerSearch.tsx +2 -2
- package/src/Selector/hooks.ts +6 -2
- package/src/Selector/useCombobox.doc.mjs +237 -0
- package/src/Switch/Switch.test.tsx +21 -0
- package/src/Switch/Switch.tsx +5 -0
- package/src/Text/useTruncation.test.tsx +69 -0
- package/src/Text/useTruncation.ts +16 -5
- package/src/Tokenizer/Tokenizer.test.tsx +54 -1
- package/src/Tooltip/useTooltip.test.tsx +13 -0
- package/src/Tooltip/useTooltip.tsx +11 -0
- package/src/Typeahead/BaseTypeahead.tsx +26 -0
- package/src/Typeahead/Typeahead.test.tsx +260 -2
- package/src/i18n/generated-locales/en.generated.ts +89 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +89 -0
- package/src/utils/sharedMutationObserver.test.ts +53 -0
- package/src/utils/sharedMutationObserver.ts +78 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHoverCard.d.ts","sourceRoot":"","sources":["../../src/HoverCard/useHoverCard.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AA6BlC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CA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;IAC9B;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B;;;OAGG;IACH,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;OAIG;IACH,cAAc,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEzC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,QAAQ,EAAE,SAAS,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,KAC5C,SAAS,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAyBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAyc5E"}
|
|
@@ -145,6 +145,14 @@ export function useHoverCard(options = {}) {
|
|
|
145
145
|
isHoveringContentRef.current = false;
|
|
146
146
|
hideLayer();
|
|
147
147
|
}, [clearTimeouts, hideLayer]);
|
|
148
|
+
|
|
149
|
+
// The imperative hide. A card closed while the pointer rests on it unmounts
|
|
150
|
+
// without a mouseleave, so the content-hover latch is cleared here; left set,
|
|
151
|
+
// it would keep the trigger's next hover-open from closing on leave.
|
|
152
|
+
const hide = useCallback(() => {
|
|
153
|
+
isHoveringContentRef.current = false;
|
|
154
|
+
hideLayer();
|
|
155
|
+
}, [hideLayer]);
|
|
148
156
|
const {
|
|
149
157
|
isTouchPointerRef,
|
|
150
158
|
isTouchInteraction,
|
|
@@ -291,7 +299,7 @@ export function useHoverCard(options = {}) {
|
|
|
291
299
|
// clear it.
|
|
292
300
|
const card = typeof document === 'undefined' ? null : document.getElementById(layerId);
|
|
293
301
|
const hadFocus = card?.contains(document.activeElement) ?? false;
|
|
294
|
-
|
|
302
|
+
hide();
|
|
295
303
|
if (hadFocus) {
|
|
296
304
|
isEscapeDismissingRef.current = true;
|
|
297
305
|
triggerRef.current?.focus();
|
|
@@ -448,6 +456,6 @@ export function useHoverCard(options = {}) {
|
|
|
448
456
|
isOpen: isLayerOpen,
|
|
449
457
|
renderHoverCard,
|
|
450
458
|
show: showLayer,
|
|
451
|
-
hide
|
|
459
|
+
hide
|
|
452
460
|
};
|
|
453
461
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../../src/Markdown/plugins/frontmatter.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAKL,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAEzB,MAAM,YAAY,CAAC;AAMpB,KAAK,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAO1D,MAAM,WAAW,0BAA0B,CACzC,QAAQ,SAAS,kBAAkB;IAEnC,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,QAAQ,CAAC;CACzD;AAED,MAAM,MAAM,8BAA8B,CACxC,QAAQ,SAAS,kBAAkB,IAEjC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GACzB;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAC,GAC1B;IACE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,Q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,QAAQ,CAAC;CAC7B,CAAC;AAEN,MAAM,WAAW,mBAAmB,CAAC,QAAQ,SAAS,kBAAkB;IACtE,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC5C,KAAK,CACH,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,OAAO,GAChB,8BAA8B,CAAC,QAAQ,CAAC,CAAC;IAC5C,WAAW,CACT,QAAQ,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAC/C,QAAQ,GAAG,SAAS,CAAC;CACzB;AAsED,wBAAgB,yBAAyB,CAAC,QAAQ,SAAS,kBAAkB,EAC3E,OAAO,EAAE,0BAA0B,CAAC,QAAQ,CAAC,GAC5C,mBAAmB,CAAC,QAAQ,CAAC,CAoE/B"}
|
|
@@ -35,20 +35,24 @@ function readFrontmatter(source) {
|
|
|
35
35
|
status: 'defer'
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const entries = new Map();
|
|
39
39
|
for (const line of body.slice(0, close.index).split(/\r?\n/)) {
|
|
40
40
|
if (line.trim() === '') {
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
43
|
const separator = line.indexOf(':');
|
|
44
44
|
const key = line.slice(0, separator).trim();
|
|
45
|
-
if (separator <= 0 || key === '' ||
|
|
45
|
+
if (separator <= 0 || key === '' || entries.has(key)) {
|
|
46
46
|
return {
|
|
47
47
|
status: 'none'
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
entries.set(key, line.slice(separator + 1).trim());
|
|
51
51
|
}
|
|
52
|
+
// A plain object, so a parser that returns the record unchanged passes the
|
|
53
|
+
// JSON-like metadata check. `fromEntries` defines every key as an own data
|
|
54
|
+
// property, so a field named `__proto__` stays a field.
|
|
55
|
+
const fields = Object.fromEntries(entries);
|
|
52
56
|
let end = openingLength + close.index + close[0].length;
|
|
53
57
|
if (source.startsWith('\r\n', end)) {
|
|
54
58
|
end += 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/MultiSelector/hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/MultiSelector/hooks.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAErD,UAAU,uBAAuB;IAC/B,eAAe,EAAE,uBAAuB,EAAE,CAAC;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1C,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,6DAA6D;AAC7D,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEpD,UAAU,sBAAsB;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,4EAA4E;IAC5E,eAAe,EAAE,iBAAiB,CAAC;IACnC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,iFAAiF;IACjF,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,+DAA+D;IAC/D,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC5C,gBAAgB,EAAE,CAChB,IAAI,EAAE,uBAAuB,EAC7B,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,iBAAiB,KACrB,IAAI,CAAC;CACX;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,UAAkB,EAClB,MAAM,EACN,SAAiB,EACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAgB,EAChB,SAAS,EACT,MAAc,EACd,YAAY,EACZ,gBAAgB,GACjB,EAAE,uBAAuB,GAAG,sBAAsB,CAwSlD"}
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
* @file hooks.ts
|
|
7
7
|
* @input Uses React hooks, MultiSelectorOptionData type
|
|
8
8
|
* @output Exports useMultiCombobox hook
|
|
9
|
-
* @position
|
|
9
|
+
* @position Public hook, exported from the MultiSelector entry point; used by
|
|
10
|
+
* MultiSelector.tsx
|
|
10
11
|
*
|
|
11
12
|
* SYNC: When modified, update:
|
|
12
13
|
* - /packages/core/src/MultiSelector/index.ts
|
|
14
|
+
* - /packages/core/src/MultiSelector/useMultiCombobox.doc.mjs
|
|
13
15
|
*/
|
|
14
16
|
import { useCallback, useRef, useState } from 'react';
|
|
15
17
|
import { isRtlElement } from "../hooks/isRtlElement.js";
|
|
@@ -532,7 +532,7 @@ export function PowerSearch({
|
|
|
532
532
|
} else if (change.type === 'remove' && change.item) {
|
|
533
533
|
const auxData = change.item.auxiliaryData;
|
|
534
534
|
if (auxData?.filterIndex != null) {
|
|
535
|
-
const newFilters = filters.filter((_, i) =>
|
|
535
|
+
const newFilters = filters.filter((_, i) => _items.some(item => item.auxiliaryData?.filterIndex === i));
|
|
536
536
|
onChange(newFilters, 'remove', auxData.filterIndex);
|
|
537
537
|
}
|
|
538
538
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/Selector/hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/Selector/hooks.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAyBhD,UAAU,4BAA4B;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7C,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC1C;AAED,UAAU,2BAA2B;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,SAAS,GACV,EAAE,4BAA4B,GAAG,2BAA2B,CAgF5D;AAMD,UAAU,kBAAkB;IAC1B,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,iBAAiB;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACjD,gBAAgB,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,eAAe,EACf,KAAK,EACL,UAAkB,EAClB,MAAM,EACN,SAAiB,EACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,SAAS,GACV,EAAE,kBAAkB,GAAG,iBAAiB,CAqOxC"}
|
package/dist/Selector/hooks.js
CHANGED
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
* @file hooks.ts
|
|
7
7
|
* @input Uses untransformed DOM layout geometry from the Selector's outer
|
|
8
8
|
* anchor, listbox, and selected option
|
|
9
|
-
* @output Hooks for Selector
|
|
10
|
-
*
|
|
9
|
+
* @output Hooks for Selector: useSelectedItemOffset, and useCombobox (public,
|
|
10
|
+
* exported from the Selector entry point; also used by CommandPalette)
|
|
11
|
+
* @position Selector hooks; used by Selector.tsx and CommandPalette
|
|
12
|
+
*
|
|
13
|
+
* SYNC: When useCombobox's options or return change, update:
|
|
14
|
+
* - /packages/core/src/Selector/useCombobox.doc.mjs
|
|
11
15
|
*/
|
|
12
16
|
import { useCallback, useState } from 'react';
|
|
13
17
|
import { useHighlightedOptionScroll } from "../hooks/useHighlightedOptionScroll.js";
|
package/dist/Switch/Switch.d.ts
CHANGED
|
@@ -159,7 +159,7 @@ export interface SwitchProps extends Omit<BaseProps, 'onChange'> {
|
|
|
159
159
|
* />
|
|
160
160
|
* ```
|
|
161
161
|
*/
|
|
162
|
-
export declare function Switch({ label, isLabelHidden, description, onChange, changeAction, isLoading, value, isDisabled, htmlName, disabledMessage, isOptional, isRequired, onFocus, onBlur, labelIcon, labelTooltip, labelPosition, labelSpacing, status, size, width, xstyle, className, style, ref, 'aria-describedby': ariaDescribedByProp, ...rest }: SwitchProps): import("react").JSX.Element;
|
|
162
|
+
export declare function Switch({ label, isLabelHidden, description, onChange, changeAction, isLoading, value, isDisabled, htmlName, disabledMessage, isOptional, isRequired, onFocus, onBlur, labelIcon, labelTooltip, labelPosition, labelSpacing, status, size, width, xstyle, className, style, ref, 'aria-describedby': ariaDescribedByProp, 'aria-labelledby': ariaLabelledByProp, ...rest }: SwitchProps): import("react").JSX.Element;
|
|
163
163
|
export declare namespace Switch {
|
|
164
164
|
var displayName: string;
|
|
165
165
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAMhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAkV9C,MAAM,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D;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,UAAkB,EAClB,QAAQ,EACR,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,OAAO,EACP,MAAM,EACN,SAAS,EACT,YAAY,EACZ,aAAqB,EACrB,YAAoB,EACpB,MAAM,EACN,IAAW,EACX,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,kBAAkB,EAAE,mBAAmB,EACvC,iBAAiB,EAAE,kBAAkB,EACrC,GAAG,IAAI,EACR,EAAE,WAAW,+BAiOb;yBA9Pe,MAAM"}
|
package/dist/Switch/Switch.js
CHANGED
|
@@ -292,6 +292,7 @@ export function Switch({
|
|
|
292
292
|
style,
|
|
293
293
|
ref,
|
|
294
294
|
'aria-describedby': ariaDescribedByProp,
|
|
295
|
+
'aria-labelledby': ariaLabelledByProp,
|
|
295
296
|
...rest
|
|
296
297
|
}) {
|
|
297
298
|
const t = useTranslator();
|
|
@@ -388,7 +389,12 @@ export function Switch({
|
|
|
388
389
|
}
|
|
389
390
|
},
|
|
390
391
|
onFocus: onFocus,
|
|
391
|
-
onBlur: onBlur
|
|
392
|
+
onBlur: onBlur
|
|
393
|
+
// A caller's `aria-labelledby` names the control (a visible title
|
|
394
|
+
// elsewhere in the row, for example), so it reaches the input rather
|
|
395
|
+
// than the field wrapper via `...rest`.
|
|
396
|
+
,
|
|
397
|
+
"aria-labelledby": ariaLabelledByProp,
|
|
392
398
|
"aria-describedby": ariaDescribedBy,
|
|
393
399
|
"aria-invalid": status?.type === 'error' ? true : undefined,
|
|
394
400
|
"aria-busy": isBusy || undefined,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file useTruncation.ts
|
|
3
|
-
* @input Uses React hooks, sharedResizeObserver
|
|
3
|
+
* @input Uses React hooks, sharedResizeObserver, sharedMutationObserver
|
|
4
4
|
* @output Exports useTruncation hook for detecting text overflow
|
|
5
5
|
* @position Hook; consumed by Text.tsx, Heading.tsx
|
|
6
6
|
*
|
|
@@ -32,10 +32,12 @@ export interface UseTruncationReturn {
|
|
|
32
32
|
/**
|
|
33
33
|
* Hook for detecting text overflow/truncation.
|
|
34
34
|
*
|
|
35
|
-
* Uses a shared ResizeObserver singleton (via observeResize)
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* Uses a shared ResizeObserver singleton (via observeResize) for size
|
|
36
|
+
* changes and a shared MutationObserver singleton (via observeContent) for
|
|
37
|
+
* content changes, so even hundreds of table cells create one observer of
|
|
38
|
+
* each kind. Observing content matters because an element whose text changes
|
|
39
|
+
* without resizing (a fixed-width status line) must still be re-measured for
|
|
40
|
+
* the tooltip text and the truncated state to follow the current content.
|
|
39
41
|
*
|
|
40
42
|
* - Single-line: compares scrollWidth > offsetWidth
|
|
41
43
|
* - Multi-line: uses Range.getBoundingClientRect() to measure actual content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTruncation.d.ts","sourceRoot":"","sources":["../../src/Text/useTruncation.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAAgC,KAAK,WAAW,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useTruncation.d.ts","sourceRoot":"","sources":["../../src/Text/useTruncation.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAAgC,KAAK,WAAW,EAAC,MAAM,OAAO,CAAC;AAItE,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,oBAAoB,GAC5B,mBAAmB,CAmFrB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file useTruncation.ts
|
|
7
|
-
* @input Uses React hooks, sharedResizeObserver
|
|
7
|
+
* @input Uses React hooks, sharedResizeObserver, sharedMutationObserver
|
|
8
8
|
* @output Exports useTruncation hook for detecting text overflow
|
|
9
9
|
* @position Hook; consumed by Text.tsx, Heading.tsx
|
|
10
10
|
*
|
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { useCallback, useRef, useState } from 'react';
|
|
15
15
|
import { observeResize } from "../utils/sharedResizeObserver.js";
|
|
16
|
+
import { observeContent } from "../utils/sharedMutationObserver.js";
|
|
16
17
|
/**
|
|
17
18
|
* Hook for detecting text overflow/truncation.
|
|
18
19
|
*
|
|
19
|
-
* Uses a shared ResizeObserver singleton (via observeResize)
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Uses a shared ResizeObserver singleton (via observeResize) for size
|
|
21
|
+
* changes and a shared MutationObserver singleton (via observeContent) for
|
|
22
|
+
* content changes, so even hundreds of table cells create one observer of
|
|
23
|
+
* each kind. Observing content matters because an element whose text changes
|
|
24
|
+
* without resizing (a fixed-width status line) must still be re-measured for
|
|
25
|
+
* the tooltip text and the truncated state to follow the current content.
|
|
23
26
|
*
|
|
24
27
|
* - Single-line: compares scrollWidth > offsetWidth
|
|
25
28
|
* - Multi-line: uses Range.getBoundingClientRect() to measure actual content
|
|
@@ -44,6 +47,7 @@ export function useTruncation(options) {
|
|
|
44
47
|
const [fullText, setFullText] = useState('');
|
|
45
48
|
const elementRef = useRef(null);
|
|
46
49
|
const unobserveRef = useRef(null);
|
|
50
|
+
const unobserveContentRef = useRef(null);
|
|
47
51
|
const checkTruncation = useCallback(element => {
|
|
48
52
|
if (maxLines === 0) {
|
|
49
53
|
setIsTruncated(false);
|
|
@@ -80,6 +84,8 @@ export function useTruncation(options) {
|
|
|
80
84
|
// by element leaves any other observer of the same node untouched.
|
|
81
85
|
unobserveRef.current?.();
|
|
82
86
|
unobserveRef.current = null;
|
|
87
|
+
unobserveContentRef.current?.();
|
|
88
|
+
unobserveContentRef.current = null;
|
|
83
89
|
elementRef.current = element;
|
|
84
90
|
if (element && maxLines > 0) {
|
|
85
91
|
// Observe via shared singleton (if available).
|
|
@@ -92,6 +98,11 @@ export function useTruncation(options) {
|
|
|
92
98
|
} else {
|
|
93
99
|
checkTruncation(element);
|
|
94
100
|
}
|
|
101
|
+
// New text in a box that keeps its size fires no resize, so the
|
|
102
|
+
// captured text and truncated state would otherwise stay stale.
|
|
103
|
+
unobserveContentRef.current = observeContent(element, () => {
|
|
104
|
+
checkTruncation(element);
|
|
105
|
+
});
|
|
95
106
|
} else {
|
|
96
107
|
setIsTruncated(false);
|
|
97
108
|
setFullText('');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/useTooltip.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,OAA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OAAO,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAE9B;;;OAGG;IACH,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEtC;;;;OAIG;IACH,cAAc,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEzC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;OAOG;IACH,aAAa,EAAE,CACb,QAAQ,EAAE,SAAS,EACnB,KAAK,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,KAC5C,SAAS,CAAC;CAChB;AAyBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,cAAmB,GAAG,aAAa,CAwXtE"}
|
|
@@ -177,6 +177,17 @@ export function useTooltip(options = {}) {
|
|
|
177
177
|
}, delay);
|
|
178
178
|
}, [isEnabled, isOpen, clearTimeouts, showLayer, delay]);
|
|
179
179
|
|
|
180
|
+
// A show scheduled while the triggers were enabled must not outlive them:
|
|
181
|
+
// disabling also detaches the leave listener that would have cancelled it,
|
|
182
|
+
// so the timer would open a tooltip that nothing ever closes. Only the
|
|
183
|
+
// pending show is dropped; a pending hide still runs.
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
if (!isEnabled && showTimeoutRef.current) {
|
|
186
|
+
clearTimeout(showTimeoutRef.current);
|
|
187
|
+
showTimeoutRef.current = null;
|
|
188
|
+
}
|
|
189
|
+
}, [isEnabled]);
|
|
190
|
+
|
|
180
191
|
// Schedule hide with delay (suppressed when isOpen is true).
|
|
181
192
|
// A small hover bridge (when hideDelay is 0) lets the pointer travel from the
|
|
182
193
|
// trigger onto the tooltip surface without the tooltip vanishing — required
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTypeahead.d.ts","sourceRoot":"","sources":["../../src/Typeahead/BaseTypeahead.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AA2BnD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AAW1D,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,cAAc,CAAE,SAAQ,IAAI,CACxE,SAAS,CAAC,WAAW,CAAC,EACtB,UAAU,CACX;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAEnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IAEpC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC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;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;IAEtD;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAE3B;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAE1C;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE/D;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAoKD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,EA82BrB,CAAC,CAAC,SAAS,cAAc,EAC5B,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KACzB,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -340,6 +340,32 @@ export const BaseTypeahead = function BaseTypeahead({
|
|
|
340
340
|
sourceGenRef.current = ++searchGenRef.current;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
+
// The previous source is remembered in state, not a ref, so a render React
|
|
344
|
+
// discards cannot consume the comparison without its state updates.
|
|
345
|
+
const [sourceOfState, setSourceOfState] = useState(searchSource);
|
|
346
|
+
if (sourceOfState !== searchSource) {
|
|
347
|
+
setSourceOfState(searchSource);
|
|
348
|
+
if (isLoading) {
|
|
349
|
+
setIsLoading(false);
|
|
350
|
+
setHasSearched(false);
|
|
351
|
+
}
|
|
352
|
+
loadingRef.current = false;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// When the search source is replaced, any in-flight load from the previous
|
|
356
|
+
// source is abandoned (generation bumped above). Notify the wrapper's busy lane
|
|
357
|
+
// in an effect so external store listeners run safely after commit.
|
|
358
|
+
const isInitialMountRef = useRef(true);
|
|
359
|
+
useEffect(() => {
|
|
360
|
+
if (isInitialMountRef.current) {
|
|
361
|
+
isInitialMountRef.current = false;
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (!loadingRef.current) {
|
|
365
|
+
onLoadingChangeRef.current?.(false);
|
|
366
|
+
}
|
|
367
|
+
}, [searchSource]);
|
|
368
|
+
|
|
343
369
|
// Layer for dropdown
|
|
344
370
|
const handleLayerShow = useCallback(() => {
|
|
345
371
|
onOpenChange?.(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"en.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/en.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmjBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -436,6 +436,88 @@ const runtimeCatalog = {
|
|
|
436
436
|
'@astryx.transferList.announceSearchResults': '{count, number} {count, plural, one {item} other {items}} found.',
|
|
437
437
|
'@astryx.transferListSelector.apply': 'Apply',
|
|
438
438
|
'@astryx.transferListSelector.cancel': 'Cancel',
|
|
439
|
-
'@astryx.transferListSelector.triggerLabel': '{count, number} selected'
|
|
439
|
+
'@astryx.transferListSelector.triggerLabel': '{count, number} selected',
|
|
440
|
+
'@astryx.emojiPicker.label': 'Emoji',
|
|
441
|
+
'@astryx.emojiPicker.searchLabel': 'Search emoji',
|
|
442
|
+
'@astryx.emojiPicker.frequentlyUsed': 'Frequently used',
|
|
443
|
+
'@astryx.emojiPicker.searchResults': 'Search results',
|
|
444
|
+
'@astryx.emojiPicker.noResults': 'No emoji match “{query}”',
|
|
445
|
+
'@astryx.emojiPicker.loading': 'Loading emoji',
|
|
446
|
+
'@astryx.emojiPicker.loadFailed': "More emoji couldn't be loaded.",
|
|
447
|
+
'@astryx.emojiPicker.groupSmileysEmotion': 'Smileys & emotion',
|
|
448
|
+
'@astryx.emojiPicker.groupPeopleBody': 'People & body',
|
|
449
|
+
'@astryx.emojiPicker.groupAnimalsNature': 'Animals & nature',
|
|
450
|
+
'@astryx.emojiPicker.groupFoodDrink': 'Food & drink',
|
|
451
|
+
'@astryx.emojiPicker.groupTravelPlaces': 'Travel & places',
|
|
452
|
+
'@astryx.emojiPicker.groupActivities': 'Activities',
|
|
453
|
+
'@astryx.emojiPicker.groupObjects': 'Objects',
|
|
454
|
+
'@astryx.emojiPicker.groupSymbols': 'Symbols',
|
|
455
|
+
'@astryx.emojiPicker.groupFlags': 'Flags',
|
|
456
|
+
'@astryx.comments.retry': 'Retry',
|
|
457
|
+
'@astryx.commentComposer.placeholder': 'Write a comment…',
|
|
458
|
+
'@astryx.commentComposer.noAgents': 'No agents',
|
|
459
|
+
'@astryx.commentComposer.agents': 'Agents',
|
|
460
|
+
'@astryx.commentComposer.uploadFailed': "Images couldn't be added",
|
|
461
|
+
'@astryx.commentComposer.imagesOnly': 'Only image files can be added',
|
|
462
|
+
'@astryx.commentComposer.chooseImages': 'Choose images',
|
|
463
|
+
'@astryx.commentComposer.imageAlt': 'Image attachment',
|
|
464
|
+
'@astryx.commentComposer.removeQuote': 'Remove quoted text',
|
|
465
|
+
'@astryx.commentComposer.attachImages': 'Attach images',
|
|
466
|
+
'@astryx.commentComposer.addEmoji': 'Add emoji',
|
|
467
|
+
'@astryx.commentComposer.cancel': 'Cancel',
|
|
468
|
+
'@astryx.comments.actionsLabel': "Actions for {name}'s comment",
|
|
469
|
+
'@astryx.comments.addReaction': 'Add reaction',
|
|
470
|
+
'@astryx.comments.agentBadge': 'Agent',
|
|
471
|
+
'@astryx.comments.agentLogo': '{name} logo',
|
|
472
|
+
'@astryx.comments.chooseReaction': 'Choose a reaction',
|
|
473
|
+
'@astryx.comments.copyLink': 'Copy comment link',
|
|
474
|
+
'@astryx.comments.currentVersion': 'Current version',
|
|
475
|
+
'@astryx.comments.delete': 'Delete',
|
|
476
|
+
'@astryx.comments.deleteDescription': "Delete {name}'s comment? This action cannot be undone.",
|
|
477
|
+
'@astryx.comments.deleteFailed': "This comment couldn't be deleted.",
|
|
478
|
+
'@astryx.comments.deleteFailedRetry': "This comment couldn't be deleted. Try again.",
|
|
479
|
+
'@astryx.comments.deleteTitle': 'Delete comment?',
|
|
480
|
+
'@astryx.comments.edit': 'Edit',
|
|
481
|
+
'@astryx.comments.editFailed': "Your edit couldn't be saved.",
|
|
482
|
+
'@astryx.comments.editPlaceholder': 'Edit comment',
|
|
483
|
+
'@astryx.comments.edited': 'Edited',
|
|
484
|
+
'@astryx.comments.editingContext': 'Editing comment',
|
|
485
|
+
'@astryx.comments.hideReplies': 'Hide replies',
|
|
486
|
+
'@astryx.comments.historyEmptyDescription': 'This comment has no earlier versions.',
|
|
487
|
+
'@astryx.comments.historyEmptyTitle': 'No edit history',
|
|
488
|
+
'@astryx.comments.historyFailed': "Edit history couldn't load",
|
|
489
|
+
'@astryx.comments.historyLoadFailed': "The comment's edit history couldn't be loaded. Try again.",
|
|
490
|
+
'@astryx.comments.historyLoading': 'Loading edit history',
|
|
491
|
+
'@astryx.comments.historySubtitle': 'Comment by {name}',
|
|
492
|
+
'@astryx.comments.historyTitle': 'Edit history',
|
|
493
|
+
'@astryx.comments.linkCopied': 'Comment link copied',
|
|
494
|
+
'@astryx.comments.otherReactors': '{count, plural, one {# other} other {# others}}',
|
|
495
|
+
'@astryx.comments.outdated': 'Outdated',
|
|
496
|
+
'@astryx.comments.reactionCelebrate': 'Celebrate',
|
|
497
|
+
'@astryx.comments.reactionCount': '{reaction}: {count, number}',
|
|
498
|
+
'@astryx.comments.reactionFailed': "Your reaction couldn't be saved.",
|
|
499
|
+
'@astryx.comments.reactionLaugh': 'Haha',
|
|
500
|
+
'@astryx.comments.reactionLike': 'Like',
|
|
501
|
+
'@astryx.comments.reactionLove': 'Love',
|
|
502
|
+
'@astryx.comments.reactionSad': 'Sad',
|
|
503
|
+
'@astryx.comments.reactionWow': 'Wow',
|
|
504
|
+
'@astryx.comments.reopen': 'Reopen',
|
|
505
|
+
'@astryx.comments.reopenFailed': "This thread couldn't be reopened.",
|
|
506
|
+
'@astryx.comments.reply': 'Reply',
|
|
507
|
+
'@astryx.comments.replyFailed': "Your reply couldn't be posted.",
|
|
508
|
+
'@astryx.comments.replyPlaceholder': 'Reply to {name}…',
|
|
509
|
+
'@astryx.comments.replyingContext': 'Replying to {name}',
|
|
510
|
+
'@astryx.comments.resolve': 'Mark as resolved',
|
|
511
|
+
'@astryx.comments.resolveFailed': "This thread couldn't be resolved.",
|
|
512
|
+
'@astryx.comments.resolved': 'Resolved',
|
|
513
|
+
'@astryx.comments.resolvedBy': 'Resolved by {name}',
|
|
514
|
+
'@astryx.comments.retryFailed': "Retrying didn't work.",
|
|
515
|
+
'@astryx.comments.sendFailed': "Couldn't send this comment.",
|
|
516
|
+
'@astryx.comments.threadLabel': 'Thread by {name}',
|
|
517
|
+
'@astryx.comments.unread': 'New',
|
|
518
|
+
'@astryx.comments.unsavedDraft': 'Unsaved draft. Dismiss again to discard it.',
|
|
519
|
+
'@astryx.comments.versionAuthor': 'by {name}',
|
|
520
|
+
'@astryx.comments.viewHistory': 'View edit history',
|
|
521
|
+
'@astryx.comments.viewReplies': 'View {count, plural, one {# reply} other {# replies}}'
|
|
440
522
|
};
|
|
441
523
|
export default runtimeCatalog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"pseudo.generated.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated-locales/pseudo.generated.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,QAAA,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4jBpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -436,6 +436,88 @@ const runtimeCatalog = {
|
|
|
436
436
|
'@astryx.transferList.announceSearchResults': '⟦{count, number} {count, plural, one {item} other {items}} ƒóúñð.⟧',
|
|
437
437
|
'@astryx.transferListSelector.apply': '⟦Àþþłý⟧',
|
|
438
438
|
'@astryx.transferListSelector.cancel': '⟦Çàñçéł⟧',
|
|
439
|
-
'@astryx.transferListSelector.triggerLabel': '⟦{count, number} šéłéçţéð⟧'
|
|
439
|
+
'@astryx.transferListSelector.triggerLabel': '⟦{count, number} šéłéçţéð⟧',
|
|
440
|
+
'@astryx.emojiPicker.label': '⟦Éɱóĵí⟧',
|
|
441
|
+
'@astryx.emojiPicker.searchLabel': '⟦Šéàřçĥ éɱóĵí⟧',
|
|
442
|
+
'@astryx.emojiPicker.frequentlyUsed': '⟦Ƒřéɋúéñţłý úšéð⟧',
|
|
443
|
+
'@astryx.emojiPicker.searchResults': '⟦Šéàřçĥ řéšúłţš⟧',
|
|
444
|
+
'@astryx.emojiPicker.noResults': '⟦Ñó éɱóĵí ɱàţçĥ “{query}”⟧',
|
|
445
|
+
'@astryx.emojiPicker.loading': '⟦Łóàðíñĝ éɱóĵí⟧',
|
|
446
|
+
'@astryx.emojiPicker.loadFailed': "⟦Ṁóřé éɱóĵí çóúłðñ'ţ ƀé łóàðéð.⟧",
|
|
447
|
+
'@astryx.emojiPicker.groupSmileysEmotion': '⟦Šɱíłéýš & éɱóţíóñ⟧',
|
|
448
|
+
'@astryx.emojiPicker.groupPeopleBody': '⟦Þéóþłé & ƀóðý⟧',
|
|
449
|
+
'@astryx.emojiPicker.groupAnimalsNature': '⟦Àñíɱàłš & ñàţúřé⟧',
|
|
450
|
+
'@astryx.emojiPicker.groupFoodDrink': '⟦Ƒóóð & ðříñķ⟧',
|
|
451
|
+
'@astryx.emojiPicker.groupTravelPlaces': '⟦Ţřàṽéł & þłàçéš⟧',
|
|
452
|
+
'@astryx.emojiPicker.groupActivities': '⟦Àçţíṽíţíéš⟧',
|
|
453
|
+
'@astryx.emojiPicker.groupObjects': '⟦Óƀĵéçţš⟧',
|
|
454
|
+
'@astryx.emojiPicker.groupSymbols': '⟦Šýɱƀółš⟧',
|
|
455
|
+
'@astryx.emojiPicker.groupFlags': '⟦Ƒłàĝš⟧',
|
|
456
|
+
'@astryx.comments.retry': '⟦Řéţřý⟧',
|
|
457
|
+
'@astryx.commentComposer.placeholder': '⟦Ŵříţé à çóɱɱéñţ…⟧',
|
|
458
|
+
'@astryx.commentComposer.noAgents': '⟦Ñó àĝéñţš⟧',
|
|
459
|
+
'@astryx.commentComposer.agents': '⟦Àĝéñţš⟧',
|
|
460
|
+
'@astryx.commentComposer.uploadFailed': "⟦Íɱàĝéš çóúłðñ'ţ ƀé àððéð⟧",
|
|
461
|
+
'@astryx.commentComposer.imagesOnly': '⟦Óñłý íɱàĝé ƒíłéš çàñ ƀé àððéð⟧',
|
|
462
|
+
'@astryx.commentComposer.chooseImages': '⟦Çĥóóšé íɱàĝéš⟧',
|
|
463
|
+
'@astryx.commentComposer.imageAlt': '⟦Íɱàĝé àţţàçĥɱéñţ⟧',
|
|
464
|
+
'@astryx.commentComposer.removeQuote': '⟦Řéɱóṽé ɋúóţéð ţéẋţ⟧',
|
|
465
|
+
'@astryx.commentComposer.attachImages': '⟦Àţţàçĥ íɱàĝéš⟧',
|
|
466
|
+
'@astryx.commentComposer.addEmoji': '⟦Àðð éɱóĵí⟧',
|
|
467
|
+
'@astryx.commentComposer.cancel': '⟦Çàñçéł⟧',
|
|
468
|
+
'@astryx.comments.actionsLabel': "⟦Àçţíóñš ƒóř {name}'š çóɱɱéñţ⟧",
|
|
469
|
+
'@astryx.comments.addReaction': '⟦Àðð řéàçţíóñ⟧',
|
|
470
|
+
'@astryx.comments.agentBadge': '⟦Àĝéñţ⟧',
|
|
471
|
+
'@astryx.comments.agentLogo': '⟦{name} łóĝó⟧',
|
|
472
|
+
'@astryx.comments.chooseReaction': '⟦Çĥóóšé à řéàçţíóñ⟧',
|
|
473
|
+
'@astryx.comments.copyLink': '⟦Çóþý çóɱɱéñţ łíñķ⟧',
|
|
474
|
+
'@astryx.comments.currentVersion': '⟦Çúřřéñţ ṽéřšíóñ⟧',
|
|
475
|
+
'@astryx.comments.delete': '⟦Ðéłéţé⟧',
|
|
476
|
+
'@astryx.comments.deleteDescription': "⟦Ðéłéţé {name}'š çóɱɱéñţ? Ţĥíš àçţíóñ çàññóţ ƀé úñðóñé.⟧",
|
|
477
|
+
'@astryx.comments.deleteFailed': "⟦Ţĥíš çóɱɱéñţ çóúłðñ'ţ ƀé ðéłéţéð.⟧",
|
|
478
|
+
'@astryx.comments.deleteFailedRetry': "⟦Ţĥíš çóɱɱéñţ çóúłðñ'ţ ƀé ðéłéţéð. Ţřý àĝàíñ.⟧",
|
|
479
|
+
'@astryx.comments.deleteTitle': '⟦Ðéłéţé çóɱɱéñţ?⟧',
|
|
480
|
+
'@astryx.comments.edit': '⟦Éðíţ⟧',
|
|
481
|
+
'@astryx.comments.editFailed': "⟦Ýóúř éðíţ çóúłðñ'ţ ƀé šàṽéð.⟧",
|
|
482
|
+
'@astryx.comments.editPlaceholder': '⟦Éðíţ çóɱɱéñţ⟧',
|
|
483
|
+
'@astryx.comments.edited': '⟦Éðíţéð⟧',
|
|
484
|
+
'@astryx.comments.editingContext': '⟦Éðíţíñĝ çóɱɱéñţ⟧',
|
|
485
|
+
'@astryx.comments.hideReplies': '⟦Ĥíðé řéþłíéš⟧',
|
|
486
|
+
'@astryx.comments.historyEmptyDescription': '⟦Ţĥíš çóɱɱéñţ ĥàš ñó éàřłíéř ṽéřšíóñš.⟧',
|
|
487
|
+
'@astryx.comments.historyEmptyTitle': '⟦Ñó éðíţ ĥíšţóřý⟧',
|
|
488
|
+
'@astryx.comments.historyFailed': "⟦Éðíţ ĥíšţóřý çóúłðñ'ţ łóàð⟧",
|
|
489
|
+
'@astryx.comments.historyLoadFailed': "⟦Ţĥé çóɱɱéñţ'š éðíţ ĥíšţóřý çóúłðñ'ţ ƀé łóàðéð. Ţřý àĝàíñ.⟧",
|
|
490
|
+
'@astryx.comments.historyLoading': '⟦Łóàðíñĝ éðíţ ĥíšţóřý⟧',
|
|
491
|
+
'@astryx.comments.historySubtitle': '⟦Çóɱɱéñţ ƀý {name}⟧',
|
|
492
|
+
'@astryx.comments.historyTitle': '⟦Éðíţ ĥíšţóřý⟧',
|
|
493
|
+
'@astryx.comments.linkCopied': '⟦Çóɱɱéñţ łíñķ çóþíéð⟧',
|
|
494
|
+
'@astryx.comments.otherReactors': '⟦{count, plural, one {# other} other {# others}}⟧',
|
|
495
|
+
'@astryx.comments.outdated': '⟦Óúţðàţéð⟧',
|
|
496
|
+
'@astryx.comments.reactionCelebrate': '⟦Çéłéƀřàţé⟧',
|
|
497
|
+
'@astryx.comments.reactionCount': '⟦{reaction}: {count, number}⟧',
|
|
498
|
+
'@astryx.comments.reactionFailed': "⟦Ýóúř řéàçţíóñ çóúłðñ'ţ ƀé šàṽéð.⟧",
|
|
499
|
+
'@astryx.comments.reactionLaugh': '⟦Ĥàĥà⟧',
|
|
500
|
+
'@astryx.comments.reactionLike': '⟦Łíķé⟧',
|
|
501
|
+
'@astryx.comments.reactionLove': '⟦Łóṽé⟧',
|
|
502
|
+
'@astryx.comments.reactionSad': '⟦Šàð⟧',
|
|
503
|
+
'@astryx.comments.reactionWow': '⟦Ŵóŵ⟧',
|
|
504
|
+
'@astryx.comments.reopen': '⟦Řéóþéñ⟧',
|
|
505
|
+
'@astryx.comments.reopenFailed': "⟦Ţĥíš ţĥřéàð çóúłðñ'ţ ƀé řéóþéñéð.⟧",
|
|
506
|
+
'@astryx.comments.reply': '⟦Řéþłý⟧',
|
|
507
|
+
'@astryx.comments.replyFailed': "⟦Ýóúř řéþłý çóúłðñ'ţ ƀé þóšţéð.⟧",
|
|
508
|
+
'@astryx.comments.replyPlaceholder': '⟦Řéþłý ţó {name}…⟧',
|
|
509
|
+
'@astryx.comments.replyingContext': '⟦Řéþłýíñĝ ţó {name}⟧',
|
|
510
|
+
'@astryx.comments.resolve': '⟦Ṁàřķ àš řéšółṽéð⟧',
|
|
511
|
+
'@astryx.comments.resolveFailed': "⟦Ţĥíš ţĥřéàð çóúłðñ'ţ ƀé řéšółṽéð.⟧",
|
|
512
|
+
'@astryx.comments.resolved': '⟦Řéšółṽéð⟧',
|
|
513
|
+
'@astryx.comments.resolvedBy': '⟦Řéšółṽéð ƀý {name}⟧',
|
|
514
|
+
'@astryx.comments.retryFailed': "⟦Řéţřýíñĝ ðíðñ'ţ ŵóřķ.⟧",
|
|
515
|
+
'@astryx.comments.sendFailed': "⟦Çóúłðñ'ţ šéñð ţĥíš çóɱɱéñţ.⟧",
|
|
516
|
+
'@astryx.comments.threadLabel': '⟦Ţĥřéàð ƀý {name}⟧',
|
|
517
|
+
'@astryx.comments.unread': '⟦Ñéŵ⟧',
|
|
518
|
+
'@astryx.comments.unsavedDraft': '⟦Úñšàṽéð ðřàƒţ. Ðíšɱíšš àĝàíñ ţó ðíšçàřð íţ.⟧',
|
|
519
|
+
'@astryx.comments.versionAuthor': '⟦ƀý {name}⟧',
|
|
520
|
+
'@astryx.comments.viewHistory': '⟦Ṽíéŵ éðíţ ĥíšţóřý⟧',
|
|
521
|
+
'@astryx.comments.viewReplies': '⟦Ṽíéŵ {count, plural, one {# reply} other {# replies}}⟧'
|
|
440
522
|
};
|
|
441
523
|
export default runtimeCatalog;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file sharedMutationObserver.ts
|
|
3
|
+
* @input MutationObserver API
|
|
4
|
+
* @output Exports observeContent for shared content-change observation
|
|
5
|
+
* @position Internal utility; consumed by useTruncation. The content-change
|
|
6
|
+
* counterpart of sharedResizeObserver: one observer for every element, so a
|
|
7
|
+
* repeated cell or row path does not create one observer per instance.
|
|
8
|
+
*/
|
|
9
|
+
type ContentCallback = () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Call `callback` when the element's text or children change (including
|
|
12
|
+
* descendants). Returns an unsubscribe that removes only this registration.
|
|
13
|
+
*
|
|
14
|
+
* MutationObserver has no per-target unobserve, so a released element stays
|
|
15
|
+
* registered with the shared observer until no element remains; its records
|
|
16
|
+
* match no callback and are ignored. The observer disconnects and is released
|
|
17
|
+
* when the last registration goes.
|
|
18
|
+
*/
|
|
19
|
+
export declare function observeContent(element: Element, callback: ContentCallback): () => void;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=sharedMutationObserver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedMutationObserver.d.ts","sourceRoot":"","sources":["../../src/utils/sharedMutationObserver.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,KAAK,eAAe,GAAG,MAAM,IAAI,CAAC;AAuBlC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,GACxB,MAAM,IAAI,CA6BZ"}
|