@antadesign/anta 0.3.29 → 0.3.30
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/anta_helpers.js +1 -1
- package/dist/bundle.js +26 -26
- package/dist/components/Breadcrumbs.d.ts +1 -1
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/ButtonCopy.d.ts +1 -1
- package/dist/elements/a-box.js +2 -0
- package/dist/elements/a-icon.shapes.d.ts +1 -1
- package/dist/elements/a-input-time.js +2 -2
- package/dist/elements/a-input.js +2 -2
- package/dist/elements/shadow-aria.d.ts +1 -1
- package/dist/jsx-runtime.d.ts +10 -0
- package/dist/jsx-runtime.js +12 -0
- package/dist/toaster.d.ts +1 -1
- package/docs/changelog.md +7 -0
- package/docs/index.md +1 -0
- package/docs/packages/plot.md +3771 -0
- package/package.json +14 -10
|
@@ -123,5 +123,5 @@ export type BreadcrumbsProps = BaseProps & {
|
|
|
123
123
|
* />
|
|
124
124
|
* ```
|
|
125
125
|
*/
|
|
126
|
-
export declare const Breadcrumbs: ({ items, priority, size, separator, maxItems, itemsBeforeCollapse, moreLabel, underline, underlineOnHover, paddingless, className, style,
|
|
126
|
+
export declare const Breadcrumbs: ({ items, priority, size, separator, maxItems, itemsBeforeCollapse, moreLabel, underline, underlineOnHover, paddingless, className, style, 'aria-label': ariaLabel, ...rest }: BreadcrumbsProps) => any;
|
|
127
127
|
export {};
|
|
@@ -113,14 +113,14 @@ export type PriorityMode = {
|
|
|
113
113
|
underline?: never;
|
|
114
114
|
underlineOnHover?: never;
|
|
115
115
|
paddingless?: never;
|
|
116
|
-
} | UnderlineMode & {
|
|
116
|
+
} | (UnderlineMode & {
|
|
117
117
|
priority: 'tertiary';
|
|
118
118
|
paddingless?: never;
|
|
119
|
-
} | UnderlineMode & {
|
|
119
|
+
}) | (UnderlineMode & {
|
|
120
120
|
priority: 'quaternary';
|
|
121
121
|
/** Drops outer padding to zero. */
|
|
122
122
|
paddingless?: boolean;
|
|
123
|
-
};
|
|
123
|
+
});
|
|
124
124
|
export type ButtonProps = BaseButtonProps & PriorityMode & ContentMode & SubmitMode & BaseProps;
|
|
125
125
|
/**
|
|
126
126
|
* Action button.
|
|
@@ -56,4 +56,4 @@ export type ButtonCopyProps = ButtonProps & {
|
|
|
56
56
|
* <ButtonCopy copyUrl label="Copy link" /> // copies location.href
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
export declare const ButtonCopy: ({ icon, iconPlacement, copiedLabel, tone, onCopied, onCopyRequest, copy, copyNode, copyUrl, copyWithUrl, label, children,
|
|
59
|
+
export declare const ButtonCopy: ({ icon, iconPlacement, copiedLabel, tone, onCopied, onCopyRequest, copy, copyNode, copyUrl, copyWithUrl, label, children, 'aria-label': ariaLabel, ...rest }: ButtonCopyProps) => any;
|
package/dist/elements/a-box.js
CHANGED
|
@@ -19,6 +19,8 @@ class BoxWindowStore {
|
|
|
19
19
|
this.#queries = [this.#dark, this.#finePointer, this.#coarsePointer, this.#hover, this.#reducedMotion];
|
|
20
20
|
this.#device = deviceSnapshot(view.navigator);
|
|
21
21
|
}
|
|
22
|
+
view;
|
|
23
|
+
doc;
|
|
22
24
|
#contextBoxes = /* @__PURE__ */ new Set();
|
|
23
25
|
#observedBoxes = /* @__PURE__ */ new Set();
|
|
24
26
|
#dark;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IconShapes } from '@antadesign/anta';
|
|
2
|
-
export declare const ICON_SHAPES: readonly [
|
|
2
|
+
export declare const ICON_SHAPES: readonly ['arrow-left-to-line', 'arrow-left', 'arrow-narrow-down', 'arrow-narrow-up-down', 'arrow-narrow-up', 'arrow-right', 'arrow-top-right', 'asterisk', 'blank', 'book-open', 'braces', 'bug', 'calendar-days', 'calendar', 'case-sensitive', 'chat', 'check', 'chevron-down', 'chevron-left', 'chevron-right', 'chevron-up', 'chevrons-right', 'circle-check', 'circle-dot', 'circle-large', 'circle-small-solid', 'circle-user', 'circle', 'click', 'clock', 'cloud-upload', 'columns-3-cog', 'copy', 'corner-down-right', 'cube', 'dollar-sign', 'dots-vertical', 'download', 'edit', 'external-link', 'eye-closed', 'eye', 'file-down', 'file', 'filter-x', 'filter', 'folder-close', 'folder-open', 'folder-tree', 'hat-glasses', 'heart-handshake', 'heart', 'history-tree', 'history', 'home', 'hourglass', 'info', 'link', 'list-collapse', 'maximize', 'megaphone', 'menu', 'minimize', 'minus', 'moon', 'more', 'move-horizontal', 'not-equal', 'play', 'plus', 'pointer', 'presentation', 'refresh-ccw-dot', 'refresh', 'regex', 'repeat', 'rotate-ccw', 'rss', 'runs-history', 'scroll-text', 'search-check', 'search', 'send', 'settings', 'share', 'sparkles', 'square-check-big', 'square-menu', 'sun', 'swatch-book', 'table-2', 'tag', 'text-cursor-input', 'text-initial', 'timer', 'toggle-right', 'trash', 'view', 'warning-diamond', 'warning-triangle', 'webhook', 'workflow', 'x'];
|
|
3
3
|
export declare const ICON_SYNONYMS: Readonly<Record<string, readonly string[]>>;
|
|
4
4
|
declare module '@antadesign/anta' {
|
|
5
5
|
interface IconShapes {
|
|
@@ -10,8 +10,8 @@ const INPUT_TIME_ARIA = [
|
|
|
10
10
|
"aria-errormessage"
|
|
11
11
|
];
|
|
12
12
|
const INPUT_TIME_ARIA_SET = new Set(INPUT_TIME_ARIA);
|
|
13
|
-
const READ_DELEGATED_ARIA = Symbol("readDelegatedAria");
|
|
14
|
-
const WRITE_DELEGATED_ARIA = Symbol("writeDelegatedAria");
|
|
13
|
+
const READ_DELEGATED_ARIA = /* @__PURE__ */ Symbol("readDelegatedAria");
|
|
14
|
+
const WRITE_DELEGATED_ARIA = /* @__PURE__ */ Symbol("writeDelegatedAria");
|
|
15
15
|
const CLEAR_TRIGGER = "clearrequest";
|
|
16
16
|
const CLEAR_INPUT_EVENT = "clearinput";
|
|
17
17
|
const pad2 = (n) => String(n).padStart(2, "0");
|
package/dist/elements/a-input.js
CHANGED
|
@@ -184,8 +184,8 @@ const SHADOW_STYLE = `
|
|
|
184
184
|
line-height: calc(var(--_lh) - 2px);
|
|
185
185
|
}
|
|
186
186
|
`;
|
|
187
|
-
const READ_DELEGATED_ARIA = Symbol("readDelegatedAria");
|
|
188
|
-
const WRITE_DELEGATED_ARIA = Symbol("writeDelegatedAria");
|
|
187
|
+
const READ_DELEGATED_ARIA = /* @__PURE__ */ Symbol("readDelegatedAria");
|
|
188
|
+
const WRITE_DELEGATED_ARIA = /* @__PURE__ */ Symbol("writeDelegatedAria");
|
|
189
189
|
class AInputElement extends HTMLElementBase {
|
|
190
190
|
static formAssociated = true;
|
|
191
191
|
static observedAttributes = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Standard semantic attributes that a shadow-hosted control may consume from
|
|
2
2
|
* its custom-element host. Keeping the public spelling standard lets raw HTML,
|
|
3
3
|
* React, Preact, and custom JSX runtimes use the same API. */
|
|
4
|
-
export declare const SHADOW_ARIA_ATTRIBUTES: readonly [
|
|
4
|
+
export declare const SHADOW_ARIA_ATTRIBUTES: readonly ['role', 'aria-activedescendant', 'aria-atomic', 'aria-autocomplete', 'aria-braillelabel', 'aria-brailleroledescription', 'aria-busy', 'aria-checked', 'aria-colcount', 'aria-colindex', 'aria-colspan', 'aria-controls', 'aria-current', 'aria-description', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-expanded', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-level', 'aria-live', 'aria-modal', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed', 'aria-readonly', 'aria-relevant', 'aria-required', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-setsize', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext'];
|
|
5
5
|
export type ShadowAriaAttribute = (typeof SHADOW_ARIA_ATTRIBUTES)[number];
|
|
6
6
|
export declare const SHADOW_ARIA_ATTRIBUTE_SET: Set<string>;
|
|
7
7
|
export declare function ariaAttributeProperty(name: ShadowAriaAttribute): string;
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ type JsxFunction = {
|
|
|
8
8
|
type UseState = <S>(initial: S | (() => S)) => [S, (next: S | ((prev: S) => S)) => void];
|
|
9
9
|
type UseId = () => string;
|
|
10
10
|
type UseMemo = <T>(factory: () => T, deps: unknown[]) => T;
|
|
11
|
+
type UseRef = <T>(initial: T) => {
|
|
12
|
+
current: T;
|
|
13
|
+
};
|
|
14
|
+
type UseLayoutEffect = (effect: () => void | (() => void), deps?: unknown[]) => void;
|
|
11
15
|
type UseSyncExternalStore = <T>(subscribe: (onChange: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T;
|
|
12
16
|
declare let _Fragment: ComponentType;
|
|
13
17
|
/**
|
|
@@ -33,6 +37,8 @@ export declare function configure(jsx: JsxFunction, Fragment?: ComponentType, ho
|
|
|
33
37
|
useState?: UseState;
|
|
34
38
|
useId?: UseId;
|
|
35
39
|
useMemo?: UseMemo;
|
|
40
|
+
useRef?: UseRef;
|
|
41
|
+
useLayoutEffect?: UseLayoutEffect;
|
|
36
42
|
useSyncExternalStore?: UseSyncExternalStore;
|
|
37
43
|
}): void;
|
|
38
44
|
/** Hooks indirection so wrappers depend on the configured renderer, not a hard
|
|
@@ -40,6 +46,10 @@ export declare function configure(jsx: JsxFunction, Fragment?: ComponentType, ho
|
|
|
40
46
|
export declare function useState<S>(initial: S | (() => S)): [S, (next: S | ((prev: S) => S)) => void];
|
|
41
47
|
export declare function useId(): string;
|
|
42
48
|
export declare function useMemo<T>(factory: () => T, deps: unknown[]): T;
|
|
49
|
+
export declare function useRef<T>(initial: T): {
|
|
50
|
+
current: T;
|
|
51
|
+
};
|
|
52
|
+
export declare function useLayoutEffect(effect: () => void | (() => void), deps?: unknown[]): void;
|
|
43
53
|
export declare function useSyncExternalStore<T>(subscribe: (onChange: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T): T;
|
|
44
54
|
export declare function jsx(type: ComponentType, props: Record<string, unknown> | null, key?: string | number): unknown;
|
|
45
55
|
export declare function jsxs(type: ComponentType, props: Record<string, unknown> | null, key?: string | number): unknown;
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -4,6 +4,8 @@ let _Fragment = React.Fragment;
|
|
|
4
4
|
let _useState = React.useState;
|
|
5
5
|
let _useId = React.useId;
|
|
6
6
|
let _useMemo = React.useMemo;
|
|
7
|
+
let _useRef = React.useRef;
|
|
8
|
+
let _useLayoutEffect = React.useLayoutEffect;
|
|
7
9
|
let _useSyncExternalStore = React.useSyncExternalStore;
|
|
8
10
|
function configure(jsx2, Fragment, hooks) {
|
|
9
11
|
_jsx = jsx2;
|
|
@@ -11,6 +13,8 @@ function configure(jsx2, Fragment, hooks) {
|
|
|
11
13
|
if (hooks?.useState) _useState = hooks.useState;
|
|
12
14
|
if (hooks?.useId) _useId = hooks.useId;
|
|
13
15
|
if (hooks?.useMemo) _useMemo = hooks.useMemo;
|
|
16
|
+
if (hooks?.useRef) _useRef = hooks.useRef;
|
|
17
|
+
if (hooks?.useLayoutEffect) _useLayoutEffect = hooks.useLayoutEffect;
|
|
14
18
|
if (hooks?.useSyncExternalStore) _useSyncExternalStore = hooks.useSyncExternalStore;
|
|
15
19
|
}
|
|
16
20
|
function useState(initial) {
|
|
@@ -22,6 +26,12 @@ function useId() {
|
|
|
22
26
|
function useMemo(factory, deps) {
|
|
23
27
|
return _useMemo(factory, deps);
|
|
24
28
|
}
|
|
29
|
+
function useRef(initial) {
|
|
30
|
+
return _useRef(initial);
|
|
31
|
+
}
|
|
32
|
+
function useLayoutEffect(effect, deps) {
|
|
33
|
+
return _useLayoutEffect(effect, deps);
|
|
34
|
+
}
|
|
25
35
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
26
36
|
return _useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
27
37
|
}
|
|
@@ -47,7 +57,9 @@ export {
|
|
|
47
57
|
jsx,
|
|
48
58
|
jsxs,
|
|
49
59
|
useId,
|
|
60
|
+
useLayoutEffect,
|
|
50
61
|
useMemo,
|
|
62
|
+
useRef,
|
|
51
63
|
useState,
|
|
52
64
|
useSyncExternalStore
|
|
53
65
|
};
|
package/dist/toaster.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
/** The placement zones, in the order their `<slot name>` appears in the toaster
|
|
24
24
|
* shadow. Single source of truth: `a-toaster` builds its zones from this list, so
|
|
25
25
|
* a placement can't drift between the type here and the element's slots. */
|
|
26
|
-
export declare const TOAST_PLACEMENTS: readonly [
|
|
26
|
+
export declare const TOAST_PLACEMENTS: readonly ['top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right'];
|
|
27
27
|
/** Where a toast is anchored in the viewport. */
|
|
28
28
|
export type ToastPlacement = (typeof TOAST_PLACEMENTS)[number];
|
|
29
29
|
/** What a toast's render function may return: a string / JSX (rendered through
|
package/docs/changelog.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
This page tracks changes that ship in `@antadesign/anta`. Documentation-only
|
|
4
4
|
changes are not listed.
|
|
5
5
|
|
|
6
|
+
## 0.3.30 — September 17, 2026
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Export `useRef` and `useLayoutEffect` from the JSX runtime, with React defaults
|
|
11
|
+
and overrides through `configure()` for other renderers.
|
|
12
|
+
|
|
6
13
|
## 0.3.29 — September 15, 2026
|
|
7
14
|
|
|
8
15
|
### Added
|