@ponchia/ui 0.9.0 → 0.10.0
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/CHANGELOG.md +70 -4
- package/MIGRATIONS.json +117 -27
- package/README.md +17 -9
- package/behaviors/index.d.ts +0 -2
- package/behaviors/index.d.ts.map +1 -1
- package/behaviors/index.js +0 -2
- package/behaviors/popover.js +4 -4
- package/classes/classes.json +24 -9
- package/classes/index.d.ts +8 -3
- package/classes/index.js +20 -3
- package/classes/vscode.css-custom-data.json +10 -10
- package/css/app.css +52 -30
- package/css/base.css +10 -14
- package/css/content.css +23 -21
- package/css/disclosure.css +17 -17
- package/css/feedback.css +15 -15
- package/css/forms.css +8 -7
- package/css/navigation.css +3 -3
- package/css/overlay.css +13 -29
- package/css/primitives.css +48 -28
- package/css/report.css +66 -42
- package/css/state.css +95 -6
- package/css/table.css +3 -3
- package/css/tokens.css +10 -10
- package/css/workbench.css +21 -9
- package/dist/bronto.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/content.css +1 -1
- package/dist/css/disclosure.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/forms.css +1 -1
- package/dist/css/navigation.css +1 -1
- package/dist/css/overlay.css +1 -1
- package/dist/css/primitives.css +1 -1
- package/dist/css/report-kit.css +1 -1
- package/dist/css/report.css +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/table.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -1
- package/docs/adr/0004-prune-unused-adapters.md +5 -1
- package/docs/adr/0005-productive-tools-and-editorial-reports.md +58 -0
- package/docs/adr/0006-trusted-publishing.md +92 -0
- package/docs/architecture.md +16 -23
- package/docs/command.md +1 -2
- package/docs/compositions.md +110 -0
- package/docs/frontier-primitives.md +1 -2
- package/docs/migrations/0.9-to-0.10.md +47 -0
- package/docs/package-contract.md +9 -12
- package/docs/reference.md +30 -18
- package/docs/reporting.md +15 -9
- package/docs/stability.md +19 -55
- package/docs/state.md +47 -0
- package/docs/usage.md +18 -30
- package/llms.txt +7 -18
- package/package.json +13 -55
- package/tokens/figma.variables.json +20 -20
- package/tokens/index.js +10 -10
- package/tokens/index.json +20 -20
- package/tokens/resolved.json +10 -10
- package/tokens/tokens.dtcg.json +20 -20
- package/behaviors/modal.d.ts +0 -45
- package/behaviors/modal.d.ts.map +0 -1
- package/behaviors/modal.js +0 -373
- package/qwik/index.d.ts +0 -48
- package/qwik/index.d.ts.map +0 -1
- package/qwik/index.js +0 -227
- package/react/index.d.ts +0 -45
- package/react/index.d.ts.map +0 -1
- package/react/index.js +0 -165
- package/solid/index.d.ts +0 -75
- package/solid/index.d.ts.map +0 -1
- package/solid/index.js +0 -172
- package/svelte/index.d.ts +0 -114
- package/svelte/index.d.ts.map +0 -1
- package/svelte/index.js +0 -197
- package/vue/index.d.ts +0 -116
- package/vue/index.d.ts.map +0 -1
- package/vue/index.js +0 -266
package/react/index.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/** Run a delegated behavior for the component's lifetime (init on mount, its
|
|
2
|
-
* returned cleanup on unmount). The behavior is run once; `opts` resolves
|
|
3
|
-
* on mount so refs are usable for scoped roots.
|
|
4
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
5
|
-
* @param {(opts?: T) => Cleanup | void} init
|
|
6
|
-
* @param {BrontoBindingOptsResolver<T>} [opts]
|
|
7
|
-
* @returns {void} */
|
|
8
|
-
export function useBrontoBehavior<T extends DelegateOpts = import("../behaviors/internal.js").DelegateOpts>(init: (opts?: T) => Cleanup | void, opts?: BrontoBindingOptsResolver<T>): void;
|
|
9
|
-
export function useThemeToggle(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>): void;
|
|
10
|
-
export function useDismissible(opts?: BrontoBindingOptsResolver): void;
|
|
11
|
-
export function useDisabledGuard(opts?: BrontoBindingOptsResolver): void;
|
|
12
|
-
export function useDisclosure(opts?: BrontoBindingOptsResolver): void;
|
|
13
|
-
export function useMenu(opts?: BrontoBindingOptsResolver): void;
|
|
14
|
-
export function useFormValidation(opts?: BrontoBindingOptsResolver): void;
|
|
15
|
-
export function useCombobox(opts?: BrontoBindingOptsResolver): void;
|
|
16
|
-
export function usePopover(opts?: BrontoBindingOptsResolver): void;
|
|
17
|
-
export function useTableSort(opts?: BrontoBindingOptsResolver): void;
|
|
18
|
-
export function useTabs(opts?: BrontoBindingOptsResolver): void;
|
|
19
|
-
export function useDialog(opts?: BrontoBindingOptsResolver): void;
|
|
20
|
-
export function useModal(opts?: BrontoBindingOptsResolver): void;
|
|
21
|
-
export function useCarousel(opts?: BrontoBindingOptsResolver): void;
|
|
22
|
-
export function useDotGlyph(opts?: BrontoBindingOptsResolver): void;
|
|
23
|
-
export function useLegend(opts?: BrontoBindingOptsResolver): void;
|
|
24
|
-
export function useConnectors(opts?: BrontoBindingOptsResolver): void;
|
|
25
|
-
export function useSpotlight(opts?: BrontoBindingOptsResolver): void;
|
|
26
|
-
export function useCrosshair(opts?: BrontoBindingOptsResolver): void;
|
|
27
|
-
export function useCommand(opts?: BrontoBindingOptsResolver): void;
|
|
28
|
-
export function useSources(opts?: BrontoBindingOptsResolver): void;
|
|
29
|
-
export function useSplitter(opts?: BrontoBindingOptsResolver): void;
|
|
30
|
-
export function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
|
|
31
|
-
export { applyStoredTheme };
|
|
32
|
-
export type Cleanup = import("../behaviors/index.js").Cleanup;
|
|
33
|
-
export type DelegateOpts = import("../behaviors/index.js").DelegateOpts;
|
|
34
|
-
export type ThemeStorageOpts = import("../behaviors/index.js").ThemeStorageOpts;
|
|
35
|
-
export type ToastOpts = import("../behaviors/index.js").ToastOpts;
|
|
36
|
-
export type BrontoBindingRoot = Document | Element | {
|
|
37
|
-
current: Document | Element | null | undefined;
|
|
38
|
-
} | (() => Document | Element | null | undefined) | null | undefined;
|
|
39
|
-
export type BrontoBindingOpts<T extends DelegateOpts = import("../behaviors/internal.js").DelegateOpts> = Omit<T, "root"> & {
|
|
40
|
-
root?: BrontoBindingRoot;
|
|
41
|
-
};
|
|
42
|
-
export type BrontoBindingOptsResolver<T extends DelegateOpts = import("../behaviors/internal.js").DelegateOpts> = BrontoBindingOpts<T> | (() => BrontoBindingOpts<T> | null | undefined) | null | undefined;
|
|
43
|
-
import { applyStoredTheme } from '../behaviors/index.js';
|
|
44
|
-
export { cls, ui, cx } from "../classes/index.js";
|
|
45
|
-
//# sourceMappingURL=index.d.ts.map
|
package/react/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAoGA;;;;;;sBAMsB;AACtB,kCAJ8B,CAAC,SAAhB,YAAa,0DAChB,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,SAC5B,yBAAyB,CAAC,CAAC,CAAC,GAC1B,IAAI,CAGjB;AAGM,sCADK,yBAAyB,CAAC,gBAAgB,GAAG,YAAY,CAAC,GAAmB,IAAI,CACb;AAEzE,sCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,wCADK,yBAAyB,GAAmB,IAAI,CACwB;AAE7E,qCADK,yBAAyB,GAAmB,IAAI,CACkB;AAEvE,+BADK,yBAAyB,GAAmB,IAAI,CACM;AAE3D,yCADK,yBAAyB,GAAmB,IAAI,CAC0B;AAE/E,mCADK,yBAAyB,GAAmB,IAAI,CACc;AAEnE,kCADK,yBAAyB,GAAmB,IAAI,CACY;AAEjE,oCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,+BADK,yBAAyB,GAAmB,IAAI,CACM;AAE3D,iCADK,yBAAyB,GAAmB,IAAI,CACU;AAE/D,gCADK,yBAAyB,GAAmB,IAAI,CACQ;AAE7D,mCADK,yBAAyB,GAAmB,IAAI,CACc;AAEnE,mCADK,yBAAyB,GAAmB,IAAI,CACc;AAEnE,iCADK,yBAAyB,GAAmB,IAAI,CACU;AAE/D,qCADK,yBAAyB,GAAmB,IAAI,CACkB;AAEvE,oCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,oCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,kCADK,yBAAyB,GAAmB,IAAI,CACY;AAEjE,kCADK,yBAAyB,GAAmB,IAAI,CACY;AAEjE,mCADK,yBAAyB,GAAmB,IAAI,CACc;AAInE,4BADO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,OAAO,CACzB;;sBAlItB,OAAO,uBAAuB,EAAE,OAAO;2BACvC,OAAO,uBAAuB,EAAE,YAAY;+BAC5C,OAAO,uBAAuB,EAAE,gBAAgB;wBAChD,OAAO,uBAAuB,EAAE,SAAS;gCAEzC,QAAQ,GACd,OAAO,GACP;IAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAClD,CAAC,MAAM,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAC7C,IAAI,GACJ,SAAS;8BAIa,CAAC,SAAhB,YAAa,sDACd,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE;sCAI9B,CAAC,SAAhB,YAAa,sDACd,iBAAiB,CAAC,CAAC,CAAC,GAC1B,CAAC,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAC/C,IAAI,GACJ,SAAS;iCA2BT,uBAAuB"}
|
package/react/index.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ponchia/ui/react — thin React bindings over @ponchia/ui/behaviors.
|
|
3
|
-
*
|
|
4
|
-
* The CSS is the framework; these are *optional* hooks that wrap the SSR-safe
|
|
5
|
-
* vanilla `init*` behaviors in a component lifecycle (run on mount, clean up on
|
|
6
|
-
* unmount). They are deliberately thin adapters — not a component library — per
|
|
7
|
-
* the architecture ADR. `react` is an optional peer dependency.
|
|
8
|
-
*
|
|
9
|
-
* The behaviors delegate from a root (default `document`), so call a hook once
|
|
10
|
-
* near the relevant subtree; pass `{ root: ref }` or a resolver callback to
|
|
11
|
-
* scope it. The options resolve on mount, after refs have been assigned.
|
|
12
|
-
*
|
|
13
|
-
* import { useDialog, useToast } from '@ponchia/ui/react';
|
|
14
|
-
* function App() {
|
|
15
|
-
* useDialog(); // wires every .ui-modal under document
|
|
16
|
-
* const toast = useToast();
|
|
17
|
-
* return <button onClick={() => toast('Saved', { tone: 'success' })}>Save</button>;
|
|
18
|
-
* }
|
|
19
|
-
*
|
|
20
|
-
* The public types below are JSDoc `@typedef`s; the shipped `index.d.ts` is
|
|
21
|
-
* generated from them (and these signatures) by `tsc --emitDeclarationOnly`.
|
|
22
|
-
*
|
|
23
|
-
* @deprecated Import the framework-agnostic behavior initializers directly.
|
|
24
|
-
* This adapter remains compatible in 0.7 and is scheduled for removal no
|
|
25
|
-
* earlier than 0.8 because no real consumer adopted it.
|
|
26
|
-
*
|
|
27
|
-
* @typedef {import('../behaviors/index.js').Cleanup} Cleanup
|
|
28
|
-
* @typedef {import('../behaviors/index.js').DelegateOpts} DelegateOpts
|
|
29
|
-
* @typedef {import('../behaviors/index.js').ThemeStorageOpts} ThemeStorageOpts
|
|
30
|
-
* @typedef {import('../behaviors/index.js').ToastOpts} ToastOpts
|
|
31
|
-
*
|
|
32
|
-
* @typedef {Document
|
|
33
|
-
* | Element
|
|
34
|
-
* | { current: Document | Element | null | undefined }
|
|
35
|
-
* | (() => Document | Element | null | undefined)
|
|
36
|
-
* | null
|
|
37
|
-
* | undefined} BrontoBindingRoot
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
42
|
-
* @typedef {Omit<T, 'root'> & { root?: BrontoBindingRoot }} BrontoBindingOpts
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
47
|
-
* @typedef {BrontoBindingOpts<T>
|
|
48
|
-
* | (() => BrontoBindingOpts<T> | null | undefined)
|
|
49
|
-
* | null
|
|
50
|
-
* | undefined} BrontoBindingOptsResolver
|
|
51
|
-
*/
|
|
52
|
-
import { useEffect } from 'react';
|
|
53
|
-
import {
|
|
54
|
-
applyStoredTheme,
|
|
55
|
-
initThemeToggle,
|
|
56
|
-
dismissible,
|
|
57
|
-
initDisabledGuard,
|
|
58
|
-
initDisclosure,
|
|
59
|
-
initMenu,
|
|
60
|
-
initFormValidation,
|
|
61
|
-
initCombobox,
|
|
62
|
-
initPopover,
|
|
63
|
-
initTableSort,
|
|
64
|
-
initTabs,
|
|
65
|
-
initDialog,
|
|
66
|
-
initModal,
|
|
67
|
-
initCarousel,
|
|
68
|
-
initDotGlyph,
|
|
69
|
-
initLegend,
|
|
70
|
-
initConnectors,
|
|
71
|
-
initSpotlight,
|
|
72
|
-
initCrosshair,
|
|
73
|
-
initCommand,
|
|
74
|
-
initSources,
|
|
75
|
-
initSplitter,
|
|
76
|
-
toast,
|
|
77
|
-
} from '../behaviors/index.js';
|
|
78
|
-
|
|
79
|
-
function resolveMaybe(v) {
|
|
80
|
-
return typeof v === 'function' ? v() : v;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function resolveRoot(root) {
|
|
84
|
-
const value = resolveMaybe(root);
|
|
85
|
-
if (value && typeof value === 'object' && 'current' in value) return value.current;
|
|
86
|
-
return value;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function resolveOpts(opts) {
|
|
90
|
-
const value = resolveMaybe(opts);
|
|
91
|
-
if (!value || typeof value !== 'object') return undefined;
|
|
92
|
-
// No `root` key → no scope requested; leave root out so the behavior
|
|
93
|
-
// delegates from `document`. A `root` key that resolves falsy means a scope
|
|
94
|
-
// WAS requested but the ref is not ready: emit `root: null` so the behavior
|
|
95
|
-
// no-ops instead of hijacking the whole document.
|
|
96
|
-
if (!('root' in value)) return { ...value };
|
|
97
|
-
const root = resolveRoot(value.root);
|
|
98
|
-
return { ...value, root: root || null };
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/** Run a delegated behavior for the component's lifetime (init on mount, its
|
|
102
|
-
* returned cleanup on unmount). The behavior is run once; `opts` resolves
|
|
103
|
-
* on mount so refs are usable for scoped roots.
|
|
104
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
105
|
-
* @param {(opts?: T) => Cleanup | void} init
|
|
106
|
-
* @param {BrontoBindingOptsResolver<T>} [opts]
|
|
107
|
-
* @returns {void} */
|
|
108
|
-
export function useBrontoBehavior(init, opts) {
|
|
109
|
-
useEffect(() => init(resolveOpts(opts)), []); // eslint-disable-line react-hooks/exhaustive-deps -- intentional delegated once on mount
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/** @param {BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>} [opts] @returns {void} */
|
|
113
|
-
export const useThemeToggle = (opts) => useBrontoBehavior(initThemeToggle, opts);
|
|
114
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
115
|
-
export const useDismissible = (opts) => useBrontoBehavior(dismissible, opts);
|
|
116
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
117
|
-
export const useDisabledGuard = (opts) => useBrontoBehavior(initDisabledGuard, opts);
|
|
118
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
119
|
-
export const useDisclosure = (opts) => useBrontoBehavior(initDisclosure, opts);
|
|
120
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
121
|
-
export const useMenu = (opts) => useBrontoBehavior(initMenu, opts);
|
|
122
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
123
|
-
export const useFormValidation = (opts) => useBrontoBehavior(initFormValidation, opts);
|
|
124
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
125
|
-
export const useCombobox = (opts) => useBrontoBehavior(initCombobox, opts);
|
|
126
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
127
|
-
export const usePopover = (opts) => useBrontoBehavior(initPopover, opts);
|
|
128
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
129
|
-
export const useTableSort = (opts) => useBrontoBehavior(initTableSort, opts);
|
|
130
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
131
|
-
export const useTabs = (opts) => useBrontoBehavior(initTabs, opts);
|
|
132
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
133
|
-
export const useDialog = (opts) => useBrontoBehavior(initDialog, opts);
|
|
134
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
135
|
-
export const useModal = (opts) => useBrontoBehavior(initModal, opts);
|
|
136
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
137
|
-
export const useCarousel = (opts) => useBrontoBehavior(initCarousel, opts);
|
|
138
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
139
|
-
export const useDotGlyph = (opts) => useBrontoBehavior(initDotGlyph, opts);
|
|
140
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
141
|
-
export const useLegend = (opts) => useBrontoBehavior(initLegend, opts);
|
|
142
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
143
|
-
export const useConnectors = (opts) => useBrontoBehavior(initConnectors, opts);
|
|
144
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
145
|
-
export const useSpotlight = (opts) => useBrontoBehavior(initSpotlight, opts);
|
|
146
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
147
|
-
export const useCrosshair = (opts) => useBrontoBehavior(initCrosshair, opts);
|
|
148
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
149
|
-
export const useCommand = (opts) => useBrontoBehavior(initCommand, opts);
|
|
150
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
151
|
-
export const useSources = (opts) => useBrontoBehavior(initSources, opts);
|
|
152
|
-
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
153
|
-
export const useSplitter = (opts) => useBrontoBehavior(initSplitter, opts);
|
|
154
|
-
|
|
155
|
-
/** The `toast()` imperative (no lifecycle of its own).
|
|
156
|
-
* @returns {(message: string, opts?: ToastOpts) => Cleanup} */
|
|
157
|
-
export const useToast = () => toast;
|
|
158
|
-
|
|
159
|
-
// No-flash theme application has to run before paint; do it in an inline head
|
|
160
|
-
// script, not an effect. Re-exported for manual/SSR-bootstrap use.
|
|
161
|
-
export { applyStoredTheme };
|
|
162
|
-
|
|
163
|
-
// Convenience: the framework-agnostic class contract, re-exported so a React
|
|
164
|
-
// consumer needs one import.
|
|
165
|
-
export { cls, ui, cx } from '../classes/index.js';
|
package/solid/index.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/** Run a delegated behavior for the component's lifetime (init after mount, its
|
|
2
|
-
* returned cleanup before re-init/dispose). Options resolve after mount and
|
|
3
|
-
* re-resolve when tracked Solid signals change.
|
|
4
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
5
|
-
* @param {(opts?: T) => Cleanup | void} init
|
|
6
|
-
* @param {BrontoBindingOptsResolver<T>} [opts]
|
|
7
|
-
* @returns {void}
|
|
8
|
-
*/
|
|
9
|
-
export function useBrontoBehavior<T extends DelegateOpts = import("../behaviors/internal.js").DelegateOpts>(init: (opts?: T) => Cleanup | void, opts?: BrontoBindingOptsResolver<T>): void;
|
|
10
|
-
/** @type {(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>) => void} */
|
|
11
|
-
export const useThemeToggle: (opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>) => void;
|
|
12
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
13
|
-
export const useDismissible: (opts?: BrontoBindingOptsResolver) => void;
|
|
14
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
15
|
-
export const useDisabledGuard: (opts?: BrontoBindingOptsResolver) => void;
|
|
16
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
17
|
-
export const useDisclosure: (opts?: BrontoBindingOptsResolver) => void;
|
|
18
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
19
|
-
export const useMenu: (opts?: BrontoBindingOptsResolver) => void;
|
|
20
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
21
|
-
export const useFormValidation: (opts?: BrontoBindingOptsResolver) => void;
|
|
22
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
23
|
-
export const useCombobox: (opts?: BrontoBindingOptsResolver) => void;
|
|
24
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
25
|
-
export const usePopover: (opts?: BrontoBindingOptsResolver) => void;
|
|
26
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
27
|
-
export const useTableSort: (opts?: BrontoBindingOptsResolver) => void;
|
|
28
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
29
|
-
export const useTabs: (opts?: BrontoBindingOptsResolver) => void;
|
|
30
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
31
|
-
export const useDialog: (opts?: BrontoBindingOptsResolver) => void;
|
|
32
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
33
|
-
export const useModal: (opts?: BrontoBindingOptsResolver) => void;
|
|
34
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
35
|
-
export const useCarousel: (opts?: BrontoBindingOptsResolver) => void;
|
|
36
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
37
|
-
export const useDotGlyph: (opts?: BrontoBindingOptsResolver) => void;
|
|
38
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
39
|
-
export const useLegend: (opts?: BrontoBindingOptsResolver) => void;
|
|
40
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
41
|
-
export const useConnectors: (opts?: BrontoBindingOptsResolver) => void;
|
|
42
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
43
|
-
export const useSpotlight: (opts?: BrontoBindingOptsResolver) => void;
|
|
44
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
45
|
-
export const useCrosshair: (opts?: BrontoBindingOptsResolver) => void;
|
|
46
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
47
|
-
export const useCommand: (opts?: BrontoBindingOptsResolver) => void;
|
|
48
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
49
|
-
export const useSources: (opts?: BrontoBindingOptsResolver) => void;
|
|
50
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
51
|
-
export const useSplitter: (opts?: BrontoBindingOptsResolver) => void;
|
|
52
|
-
/** The `toast()` imperative (no lifecycle of its own).
|
|
53
|
-
* @type {() => (message: string, opts?: ToastOpts) => Cleanup} */
|
|
54
|
-
export const useToast: () => (message: string, opts?: ToastOpts) => Cleanup;
|
|
55
|
-
export { applyStoredTheme };
|
|
56
|
-
export type Cleanup = import("../behaviors/index.js").Cleanup;
|
|
57
|
-
export type DelegateOpts = import("../behaviors/index.js").DelegateOpts;
|
|
58
|
-
export type ThemeStorageOpts = import("../behaviors/index.js").ThemeStorageOpts;
|
|
59
|
-
export type ToastOpts = import("../behaviors/index.js").ToastOpts;
|
|
60
|
-
export type BrontoBindingRoot = Document | Element | {
|
|
61
|
-
current: Document | Element | null | undefined;
|
|
62
|
-
} | (() => Document | Element | null | undefined) | null | undefined;
|
|
63
|
-
/**
|
|
64
|
-
* Behavior options with the `root` widened to accept Solid refs/resolvers.
|
|
65
|
-
*/
|
|
66
|
-
export type BrontoBindingOpts<T extends DelegateOpts = import("../behaviors/internal.js").DelegateOpts> = Omit<T, "root"> & {
|
|
67
|
-
root?: BrontoBindingRoot;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* `BrontoBindingOpts<T>`, or a callback that returns it on mount (after refs).
|
|
71
|
-
*/
|
|
72
|
-
export type BrontoBindingOptsResolver<T extends DelegateOpts = import("../behaviors/internal.js").DelegateOpts> = BrontoBindingOpts<T> | (() => BrontoBindingOpts<T> | null | undefined) | null | undefined;
|
|
73
|
-
import { applyStoredTheme } from '../behaviors/index.js';
|
|
74
|
-
export { cls, ui, cx } from "../classes/index.js";
|
|
75
|
-
//# sourceMappingURL=index.d.ts.map
|
package/solid/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAsGA;;;;;;;GAOG;AACH,kCAL6B,CAAC,SAAhB,YAAa,0DAChB,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,SAC5B,yBAAyB,CAAC,CAAC,CAAC,GAC1B,IAAI,CAShB;AAED,0FAA0F;AAC1F,6BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,GAAG,YAAY,CAAC,KAAK,IAAI,CACL;AACjF,yDAAyD;AACzD,6BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACwB;AAC7E,yDAAyD;AACzD,+BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACgC;AACrF,yDAAyD;AACzD,4BADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAC0B;AAC/E,yDAAyD;AACzD,sBADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACc;AACnE,yDAAyD;AACzD,gCADW,CAAC,IAAI,CAAC,EAAE,yBAAyB,KAAK,IAAI,CACkC;AACvF,yDAAyD;AACzD,0BADW,C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O,CAC1B;;sBA1IvB,OAAO,uBAAuB,EAAE,OAAO;2BACvC,OAAO,uBAAuB,EAAE,YAAY;+BAC5C,OAAO,uBAAuB,EAAE,gBAAgB;wBAChD,OAAO,uBAAuB,EAAE,SAAS;gCAEzC,QAAQ,GACd,OAAO,GACP;IAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAClD,CAAC,MAAM,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAC7C,IAAI,GACJ,SAAS;;;;8BAKa,CAAC,SAAhB,YAAa,sDACd,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE;;;;sCAK9B,CAAC,SAAhB,YAAa,sDACd,iBAAiB,CAAC,CAAC,CAAC,GAC1B,CAAC,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAC/C,IAAI,GACJ,SAAS;iCA2BT,uBAAuB"}
|
package/solid/index.js
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ponchia/ui/solid — thin Solid bindings over @ponchia/ui/behaviors.
|
|
3
|
-
*
|
|
4
|
-
* The CSS is the framework; these are *optional* primitives that wrap the
|
|
5
|
-
* SSR-safe vanilla `init*` behaviors in Solid's lifecycle (run on mount, clean
|
|
6
|
-
* up on dispose). Thin adapters, not a component library (architecture ADR).
|
|
7
|
-
* `solid-js` is an optional peer dependency.
|
|
8
|
-
*
|
|
9
|
-
* Behaviors delegate from a root (default `document`); call a primitive once in
|
|
10
|
-
* a component that owns the relevant subtree, and pass a root resolver to scope
|
|
11
|
-
* it when the element is assigned by Solid's ref lifecycle.
|
|
12
|
-
*
|
|
13
|
-
* import { useDialog, useToast } from '@ponchia/ui/solid';
|
|
14
|
-
* function App() {
|
|
15
|
-
* useDialog(); // wires every .ui-modal under document
|
|
16
|
-
* const toast = useToast();
|
|
17
|
-
* return <button onClick={() => toast('Saved', { tone: 'success' })}>Save</button>;
|
|
18
|
-
* }
|
|
19
|
-
*
|
|
20
|
-
* The public types below are JSDoc `@typedef`s; the shipped `index.d.ts` is
|
|
21
|
-
* generated from them (and these signatures) by `tsc --emitDeclarationOnly`.
|
|
22
|
-
*
|
|
23
|
-
* @deprecated Import the framework-agnostic behavior initializers directly.
|
|
24
|
-
* This adapter remains compatible in 0.7 and is scheduled for removal no
|
|
25
|
-
* earlier than 0.8 because no real consumer adopted it.
|
|
26
|
-
*
|
|
27
|
-
* @typedef {import('../behaviors/index.js').Cleanup} Cleanup
|
|
28
|
-
* @typedef {import('../behaviors/index.js').DelegateOpts} DelegateOpts
|
|
29
|
-
* @typedef {import('../behaviors/index.js').ThemeStorageOpts} ThemeStorageOpts
|
|
30
|
-
* @typedef {import('../behaviors/index.js').ToastOpts} ToastOpts
|
|
31
|
-
*
|
|
32
|
-
* @typedef {Document
|
|
33
|
-
* | Element
|
|
34
|
-
* | { current: Document | Element | null | undefined }
|
|
35
|
-
* | (() => Document | Element | null | undefined)
|
|
36
|
-
* | null
|
|
37
|
-
* | undefined} BrontoBindingRoot
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Behavior options with the `root` widened to accept Solid refs/resolvers.
|
|
42
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
43
|
-
* @typedef {Omit<T, 'root'> & { root?: BrontoBindingRoot }} BrontoBindingOpts
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* `BrontoBindingOpts<T>`, or a callback that returns it on mount (after refs).
|
|
48
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
49
|
-
* @typedef {BrontoBindingOpts<T>
|
|
50
|
-
* | (() => BrontoBindingOpts<T> | null | undefined)
|
|
51
|
-
* | null
|
|
52
|
-
* | undefined} BrontoBindingOptsResolver
|
|
53
|
-
*/
|
|
54
|
-
import { createEffect, onCleanup, onMount } from 'solid-js';
|
|
55
|
-
import {
|
|
56
|
-
applyStoredTheme,
|
|
57
|
-
initThemeToggle,
|
|
58
|
-
dismissible,
|
|
59
|
-
initDisabledGuard,
|
|
60
|
-
initDisclosure,
|
|
61
|
-
initMenu,
|
|
62
|
-
initFormValidation,
|
|
63
|
-
initCombobox,
|
|
64
|
-
initPopover,
|
|
65
|
-
initTableSort,
|
|
66
|
-
initTabs,
|
|
67
|
-
initDialog,
|
|
68
|
-
initModal,
|
|
69
|
-
initCarousel,
|
|
70
|
-
initDotGlyph,
|
|
71
|
-
initLegend,
|
|
72
|
-
initConnectors,
|
|
73
|
-
initSpotlight,
|
|
74
|
-
initCrosshair,
|
|
75
|
-
initCommand,
|
|
76
|
-
initSources,
|
|
77
|
-
initSplitter,
|
|
78
|
-
toast,
|
|
79
|
-
} from '../behaviors/index.js';
|
|
80
|
-
|
|
81
|
-
function resolveMaybe(v) {
|
|
82
|
-
return typeof v === 'function' ? v() : v;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function resolveRoot(root) {
|
|
86
|
-
const value = resolveMaybe(root);
|
|
87
|
-
if (value && typeof value === 'object' && 'current' in value) return value.current;
|
|
88
|
-
return value;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function resolveOpts(opts) {
|
|
92
|
-
const value = resolveMaybe(opts);
|
|
93
|
-
if (!value || typeof value !== 'object') return undefined;
|
|
94
|
-
// No `root` key → no scope requested; leave root out so the behavior
|
|
95
|
-
// delegates from `document`. A `root` key that resolves falsy means a scope
|
|
96
|
-
// WAS requested but the ref is not ready: emit `root: null` so the behavior
|
|
97
|
-
// no-ops instead of hijacking the whole document.
|
|
98
|
-
if (!('root' in value)) return { ...value };
|
|
99
|
-
const root = resolveRoot(value.root);
|
|
100
|
-
return { ...value, root: root || null };
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** Run a delegated behavior for the component's lifetime (init after mount, its
|
|
104
|
-
* returned cleanup before re-init/dispose). Options resolve after mount and
|
|
105
|
-
* re-resolve when tracked Solid signals change.
|
|
106
|
-
* @template {DelegateOpts} [T=DelegateOpts]
|
|
107
|
-
* @param {(opts?: T) => Cleanup | void} init
|
|
108
|
-
* @param {BrontoBindingOptsResolver<T>} [opts]
|
|
109
|
-
* @returns {void}
|
|
110
|
-
*/
|
|
111
|
-
export function useBrontoBehavior(init, opts) {
|
|
112
|
-
onMount(() => {
|
|
113
|
-
createEffect(() => {
|
|
114
|
-
const cleanup = init(resolveOpts(opts));
|
|
115
|
-
if (typeof cleanup === 'function') onCleanup(cleanup);
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/** @type {(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>) => void} */
|
|
121
|
-
export const useThemeToggle = (opts) => useBrontoBehavior(initThemeToggle, opts);
|
|
122
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
123
|
-
export const useDismissible = (opts) => useBrontoBehavior(dismissible, opts);
|
|
124
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
125
|
-
export const useDisabledGuard = (opts) => useBrontoBehavior(initDisabledGuard, opts);
|
|
126
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
127
|
-
export const useDisclosure = (opts) => useBrontoBehavior(initDisclosure, opts);
|
|
128
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
129
|
-
export const useMenu = (opts) => useBrontoBehavior(initMenu, opts);
|
|
130
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
131
|
-
export const useFormValidation = (opts) => useBrontoBehavior(initFormValidation, opts);
|
|
132
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
133
|
-
export const useCombobox = (opts) => useBrontoBehavior(initCombobox, opts);
|
|
134
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
135
|
-
export const usePopover = (opts) => useBrontoBehavior(initPopover, opts);
|
|
136
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
137
|
-
export const useTableSort = (opts) => useBrontoBehavior(initTableSort, opts);
|
|
138
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
139
|
-
export const useTabs = (opts) => useBrontoBehavior(initTabs, opts);
|
|
140
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
141
|
-
export const useDialog = (opts) => useBrontoBehavior(initDialog, opts);
|
|
142
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
143
|
-
export const useModal = (opts) => useBrontoBehavior(initModal, opts);
|
|
144
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
145
|
-
export const useCarousel = (opts) => useBrontoBehavior(initCarousel, opts);
|
|
146
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
147
|
-
export const useDotGlyph = (opts) => useBrontoBehavior(initDotGlyph, opts);
|
|
148
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
149
|
-
export const useLegend = (opts) => useBrontoBehavior(initLegend, opts);
|
|
150
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
151
|
-
export const useConnectors = (opts) => useBrontoBehavior(initConnectors, opts);
|
|
152
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
153
|
-
export const useSpotlight = (opts) => useBrontoBehavior(initSpotlight, opts);
|
|
154
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
155
|
-
export const useCrosshair = (opts) => useBrontoBehavior(initCrosshair, opts);
|
|
156
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
157
|
-
export const useCommand = (opts) => useBrontoBehavior(initCommand, opts);
|
|
158
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
159
|
-
export const useSources = (opts) => useBrontoBehavior(initSources, opts);
|
|
160
|
-
/** @type {(opts?: BrontoBindingOptsResolver) => void} */
|
|
161
|
-
export const useSplitter = (opts) => useBrontoBehavior(initSplitter, opts);
|
|
162
|
-
|
|
163
|
-
/** The `toast()` imperative (no lifecycle of its own).
|
|
164
|
-
* @type {() => (message: string, opts?: ToastOpts) => Cleanup} */
|
|
165
|
-
export const useToast = () => toast;
|
|
166
|
-
|
|
167
|
-
// No-flash theme application must run before paint — do it in an inline head
|
|
168
|
-
// script, not on mount. Re-exported for manual/SSR-bootstrap use.
|
|
169
|
-
export { applyStoredTheme };
|
|
170
|
-
|
|
171
|
-
// Convenience: the framework-agnostic class contract, re-exported.
|
|
172
|
-
export { cls, ui, cx } from '../classes/index.js';
|
package/svelte/index.d.ts
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a Svelte action from any Bronto delegated behavior initializer.
|
|
3
|
-
*
|
|
4
|
-
* @param {(opts?: DelegateOpts) => Cleanup | void} init
|
|
5
|
-
* @returns {BrontoAction}
|
|
6
|
-
*/
|
|
7
|
-
export function createBrontoAction(init: (opts?: DelegateOpts) => Cleanup | void): BrontoAction;
|
|
8
|
-
/**
|
|
9
|
-
* Generic escape hatch for custom behavior initializers.
|
|
10
|
-
*
|
|
11
|
-
* @param {Element} node
|
|
12
|
-
* @param {BrontoBehaviorParams | null | undefined} params
|
|
13
|
-
* @returns {SvelteActionReturn}
|
|
14
|
-
*/
|
|
15
|
-
export function brontoBehavior(node: Element, params: BrontoBehaviorParams | null | undefined): SvelteActionReturn;
|
|
16
|
-
/**
|
|
17
|
-
* Generic escape hatch for custom behavior initializers.
|
|
18
|
-
*
|
|
19
|
-
* @param {Element} node
|
|
20
|
-
* @param {BrontoBehaviorParams | null | undefined} params
|
|
21
|
-
* @returns {SvelteActionReturn}
|
|
22
|
-
*/
|
|
23
|
-
export function useBrontoBehavior(node: Element, params: BrontoBehaviorParams | null | undefined): SvelteActionReturn;
|
|
24
|
-
/** @type {BrontoThemeAction} */
|
|
25
|
-
export const themeToggle: BrontoThemeAction;
|
|
26
|
-
/** @type {BrontoAction} */
|
|
27
|
-
export const dismissible: BrontoAction;
|
|
28
|
-
/** @type {BrontoAction} */
|
|
29
|
-
export const disabledGuard: BrontoAction;
|
|
30
|
-
/** @type {BrontoAction} */
|
|
31
|
-
export const disclosure: BrontoAction;
|
|
32
|
-
/** @type {BrontoAction} */
|
|
33
|
-
export const menu: BrontoAction;
|
|
34
|
-
/** @type {BrontoAction} */
|
|
35
|
-
export const formValidation: BrontoAction;
|
|
36
|
-
/** @type {BrontoAction} */
|
|
37
|
-
export const combobox: BrontoAction;
|
|
38
|
-
/** @type {BrontoAction} */
|
|
39
|
-
export const popover: BrontoAction;
|
|
40
|
-
/** @type {BrontoAction} */
|
|
41
|
-
export const tableSort: BrontoAction;
|
|
42
|
-
/** @type {BrontoAction} */
|
|
43
|
-
export const tabs: BrontoAction;
|
|
44
|
-
/** @type {BrontoAction} */
|
|
45
|
-
export const dialog: BrontoAction;
|
|
46
|
-
/** @type {BrontoAction} */
|
|
47
|
-
export const modal: BrontoAction;
|
|
48
|
-
/** @type {BrontoAction} */
|
|
49
|
-
export const carousel: BrontoAction;
|
|
50
|
-
/** @type {BrontoAction} */
|
|
51
|
-
export const dotGlyph: BrontoAction;
|
|
52
|
-
/** @type {BrontoAction} */
|
|
53
|
-
export const legend: BrontoAction;
|
|
54
|
-
/** @type {BrontoAction} */
|
|
55
|
-
export const connectors: BrontoAction;
|
|
56
|
-
/** @type {BrontoAction} */
|
|
57
|
-
export const spotlight: BrontoAction;
|
|
58
|
-
/** @type {BrontoAction} */
|
|
59
|
-
export const crosshair: BrontoAction;
|
|
60
|
-
/** @type {BrontoAction} */
|
|
61
|
-
export const command: BrontoAction;
|
|
62
|
-
/** @type {BrontoAction} */
|
|
63
|
-
export const sources: BrontoAction;
|
|
64
|
-
/** @type {BrontoAction} */
|
|
65
|
-
export const splitter: BrontoAction;
|
|
66
|
-
/** @type {BrontoThemeAction} */
|
|
67
|
-
export const useThemeToggle: BrontoThemeAction;
|
|
68
|
-
export const useDismissible: BrontoAction;
|
|
69
|
-
export const useDisabledGuard: BrontoAction;
|
|
70
|
-
export const useDisclosure: BrontoAction;
|
|
71
|
-
export const useMenu: BrontoAction;
|
|
72
|
-
export const useFormValidation: BrontoAction;
|
|
73
|
-
export const useCombobox: BrontoAction;
|
|
74
|
-
export const usePopover: BrontoAction;
|
|
75
|
-
export const useTableSort: BrontoAction;
|
|
76
|
-
export const useTabs: BrontoAction;
|
|
77
|
-
export const useDialog: BrontoAction;
|
|
78
|
-
export const useModal: BrontoAction;
|
|
79
|
-
export const useCarousel: BrontoAction;
|
|
80
|
-
export const useDotGlyph: BrontoAction;
|
|
81
|
-
export const useLegend: BrontoAction;
|
|
82
|
-
export const useConnectors: BrontoAction;
|
|
83
|
-
export const useSpotlight: BrontoAction;
|
|
84
|
-
export const useCrosshair: BrontoAction;
|
|
85
|
-
export const useCommand: BrontoAction;
|
|
86
|
-
export const useSources: BrontoAction;
|
|
87
|
-
export const useSplitter: BrontoAction;
|
|
88
|
-
export function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
|
|
89
|
-
export type Cleanup = import("../behaviors/index.js").Cleanup;
|
|
90
|
-
export type DelegateOpts = import("../behaviors/index.js").DelegateOpts;
|
|
91
|
-
export type ThemeStorageOpts = import("../behaviors/index.js").ThemeStorageOpts;
|
|
92
|
-
export type ToastOpts = import("../behaviors/index.js").ToastOpts;
|
|
93
|
-
export type BrontoActionRoot = Document | Element | null | undefined;
|
|
94
|
-
export type BrontoActionOpts = Omit<DelegateOpts, "root"> & {
|
|
95
|
-
root?: BrontoActionRoot;
|
|
96
|
-
};
|
|
97
|
-
export type BrontoThemeActionOpts = Omit<ThemeStorageOpts & DelegateOpts, "root"> & {
|
|
98
|
-
root?: BrontoActionRoot;
|
|
99
|
-
};
|
|
100
|
-
export type BrontoBehaviorParams = {
|
|
101
|
-
init: (opts?: DelegateOpts) => Cleanup | void;
|
|
102
|
-
opts?: BrontoActionOpts | null | undefined;
|
|
103
|
-
};
|
|
104
|
-
export type BrontoAction = (node: Element, opts?: BrontoActionOpts | null | undefined) => SvelteActionReturn;
|
|
105
|
-
export type BrontoThemeAction = (node: Element, opts?: BrontoThemeActionOpts | null | undefined) => SvelteActionReturn;
|
|
106
|
-
export type SvelteActionReturn = {
|
|
107
|
-
update?: (next?: unknown) => void;
|
|
108
|
-
destroy: () => void;
|
|
109
|
-
};
|
|
110
|
-
import { applyStoredTheme } from '../behaviors/index.js';
|
|
111
|
-
import { toast } from '../behaviors/index.js';
|
|
112
|
-
export { applyStoredTheme, toast };
|
|
113
|
-
export { cls, ui, cx } from "../classes/index.js";
|
|
114
|
-
//# sourceMappingURL=index.d.ts.map
|
package/svelte/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAiFA;;;;;GAKG;AACH,yCAHW,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,GAAG,IAAI,GACrC,YAAY,CAexB;AAED;;;;;;GAMG;AACH,qCAJW,OAAO,UACP,oBAAoB,GAAG,IAAI,GAAG,SAAS,GACrC,kBAAkB,CAa9B;AAlBD;;;;;;GAMG;AACH,wCAJW,OAAO,UACP,oBAAoB,GAAG,IAAI,GAAG,SAAS,GACrC,kBAAkB,CAa9B;AAID,gCAAgC;AAChC,0BADW,iBAAiB,CACmC;AAC/D,2BAA2B;AAC3B,0BADW,YAAY,CACwC;AAC/D,2BAA2B;AAC3B,4BADW,YAAY,CAC4C;AACnE,2BAA2B;AAC3B,yBADW,YAAY,CACsC;AAC7D,2BAA2B;AAC3B,mBADW,YAAY,CAC0B;AACjD,2BAA2B;AAC3B,6BADW,YAAY,CAC8C;AACrE,2BAA2B;AAC3B,uBADW,YAAY,CACkC;AACzD,2BAA2B;AAC3B,sBADW,YAAY,CACgC;AACvD,2BAA2B;AAC3B,wBADW,YAAY,CACoC;AAC3D,2BAA2B;AAC3B,mBADW,YAAY,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