@ui-sdk/vue 0.0.0-stage → 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +10 -2
- package/dist/accordion.d.ts +561 -0
- package/dist/accordion.js +24 -0
- package/dist/agent.d.ts +2 -0
- package/dist/agent.js +7 -0
- package/dist/alert-dialog.d.ts +231 -0
- package/dist/alert-dialog.js +33 -0
- package/dist/async-options.d.ts +18 -0
- package/dist/async-options.js +40 -0
- package/dist/autocomplete.d.ts +384 -0
- package/dist/autocomplete.js +344 -0
- package/dist/avatar.d.ts +40 -0
- package/dist/avatar.js +28 -0
- package/dist/button.d.ts +52 -0
- package/dist/button.js +43 -0
- package/dist/calendar-context.d.ts +10 -0
- package/dist/calendar-context.js +7 -0
- package/dist/calendar.d.ts +311 -0
- package/dist/calendar.js +349 -0
- package/dist/carousel.d.ts +236 -0
- package/dist/carousel.js +204 -0
- package/dist/checkbox.d.ts +211 -0
- package/dist/checkbox.js +151 -0
- package/dist/children.d.ts +41 -0
- package/dist/children.js +135 -0
- package/dist/collapsible.d.ts +54 -0
- package/dist/collapsible.js +18 -0
- package/dist/color-picker.d.ts +187 -0
- package/dist/color-picker.js +158 -0
- package/dist/color.d.ts +2 -0
- package/dist/color.js +21 -0
- package/dist/combobox.d.ts +517 -0
- package/dist/combobox.js +531 -0
- package/dist/command.d.ts +322 -0
- package/dist/command.js +345 -0
- package/dist/controller-target.d.ts +49 -0
- package/dist/controller-target.js +112 -0
- package/dist/create-parts.d.ts +126 -0
- package/dist/create-parts.js +206 -0
- package/dist/date-input.d.ts +133 -0
- package/dist/date-input.js +31 -0
- package/dist/date-picker.d.ts +328 -0
- package/dist/date-picker.js +354 -0
- package/dist/date.d.ts +2 -0
- package/dist/date.js +59 -0
- package/dist/dialog-parts.d.ts +259 -0
- package/dist/dialog-parts.js +300 -0
- package/dist/dialog.d.ts +251 -0
- package/dist/dialog.js +25 -0
- package/dist/drawer.d.ts +304 -0
- package/dist/drawer.js +373 -0
- package/dist/editor-context.d.ts +4 -0
- package/dist/editor-context.js +5 -0
- package/dist/field-context.d.ts +26 -0
- package/dist/field-context.js +44 -0
- package/dist/field.d.ts +154 -0
- package/dist/field.js +240 -0
- package/dist/file-input.d.ts +212 -0
- package/dist/file-input.js +255 -0
- package/dist/form-inputs.d.ts +16 -0
- package/dist/form-inputs.js +25 -0
- package/dist/gesture.d.ts +1 -0
- package/dist/gesture.js +15 -0
- package/dist/history.d.ts +2 -0
- package/dist/history.js +11 -0
- package/dist/hover-card.d.ts +137 -0
- package/dist/hover-card.js +153 -0
- package/dist/image-cropper.d.ts +74 -0
- package/dist/image-cropper.js +36 -0
- package/dist/image.d.ts +2 -0
- package/dist/image.js +5 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +60 -0
- package/dist/input.d.ts +120 -0
- package/dist/input.js +73 -0
- package/dist/item-icon.d.ts +34 -0
- package/dist/item-icon.js +63 -0
- package/dist/label.d.ts +16 -0
- package/dist/label.js +8 -0
- package/dist/lifecycle.d.ts +11 -0
- package/dist/lifecycle.js +91 -0
- package/dist/list-items.d.ts +38 -0
- package/dist/list-items.js +59 -0
- package/dist/list-text.d.ts +7 -0
- package/dist/list-text.js +15 -0
- package/dist/listbox.d.ts +273 -0
- package/dist/listbox.js +126 -0
- package/dist/menu.d.ts +678 -0
- package/dist/menu.js +607 -0
- package/dist/menubar-context.d.ts +5 -0
- package/dist/menubar-context.js +5 -0
- package/dist/menubar.d.ts +61 -0
- package/dist/menubar.js +48 -0
- package/dist/meter.d.ts +41 -0
- package/dist/meter.js +37 -0
- package/dist/navigation-menu.d.ts +228 -0
- package/dist/navigation-menu.js +195 -0
- package/dist/number-input.d.ts +176 -0
- package/dist/number-input.js +231 -0
- package/dist/number.d.ts +2 -0
- package/dist/number.js +39 -0
- package/dist/nuxt/entries.json +977 -0
- package/dist/nuxt/module.d.ts +18 -0
- package/dist/nuxt/module.js +31 -0
- package/dist/nuxt/registrations.d.ts +22 -0
- package/dist/nuxt/registrations.js +22 -0
- package/dist/observe.d.ts +2 -0
- package/dist/observe.js +7 -0
- package/dist/otp-input.d.ts +142 -0
- package/dist/otp-input.js +130 -0
- package/dist/overlays.d.ts +40 -0
- package/dist/overlays.js +118 -0
- package/dist/pagination.d.ts +201 -0
- package/dist/pagination.js +146 -0
- package/dist/password-input.d.ts +144 -0
- package/dist/password-input.js +134 -0
- package/dist/popover.d.ts +211 -0
- package/dist/popover.js +258 -0
- package/dist/popup.d.ts +60 -0
- package/dist/popup.js +89 -0
- package/dist/preferences.d.ts +44 -0
- package/dist/preferences.js +102 -0
- package/dist/primitive.d.ts +2 -0
- package/dist/primitive.js +11 -0
- package/dist/progress.d.ts +41 -0
- package/dist/progress.js +37 -0
- package/dist/radio.d.ts +164 -0
- package/dist/radio.js +145 -0
- package/dist/rating.d.ts +149 -0
- package/dist/rating.js +146 -0
- package/dist/renderless.d.ts +4 -0
- package/dist/renderless.js +28 -0
- package/dist/resizable.d.ts +54 -0
- package/dist/resizable.js +22 -0
- package/dist/scroll-area.d.ts +72 -0
- package/dist/scroll-area.js +77 -0
- package/dist/segmented-control.d.ts +151 -0
- package/dist/segmented-control.js +110 -0
- package/dist/segmented-input.d.ts +76 -0
- package/dist/segmented-input.js +115 -0
- package/dist/select.d.ts +458 -0
- package/dist/select.js +468 -0
- package/dist/separator.d.ts +14 -0
- package/dist/separator.js +8 -0
- package/dist/shortcuts.d.ts +32 -0
- package/dist/shortcuts.js +56 -0
- package/dist/slider.d.ts +65 -0
- package/dist/slider.js +194 -0
- package/dist/switch.d.ts +103 -0
- package/dist/switch.js +71 -0
- package/dist/tabs.d.ts +338 -0
- package/dist/tabs.js +27 -0
- package/dist/text-control.d.ts +89 -0
- package/dist/text-control.js +51 -0
- package/dist/text-match.d.ts +2 -0
- package/dist/text-match.js +7 -0
- package/dist/textarea.d.ts +106 -0
- package/dist/textarea.js +68 -0
- package/dist/time-input.d.ts +131 -0
- package/dist/time-input.js +32 -0
- package/dist/timeline.d.ts +81 -0
- package/dist/timeline.js +30 -0
- package/dist/toast-parts.d.ts +203 -0
- package/dist/toast-parts.js +270 -0
- package/dist/toast.d.ts +2 -0
- package/dist/toast.js +21 -0
- package/dist/toggle-props.d.ts +22 -0
- package/dist/toggle-props.js +14 -0
- package/dist/toggle.d.ts +199 -0
- package/dist/toggle.js +129 -0
- package/dist/token-input.d.ts +136 -0
- package/dist/token-input.js +214 -0
- package/dist/toolbar-context.d.ts +7 -0
- package/dist/toolbar-context.js +20 -0
- package/dist/toolbar.d.ts +120 -0
- package/dist/toolbar.js +77 -0
- package/dist/tooltip.d.ts +160 -0
- package/dist/tooltip.js +224 -0
- package/dist/tree.d.ts +300 -0
- package/dist/tree.js +209 -0
- package/dist/trigger-menu.d.ts +452 -0
- package/dist/trigger-menu.js +254 -0
- package/dist/use-primitive.d.ts +132 -0
- package/dist/use-primitive.js +462 -0
- package/dist/waterfall.d.ts +201 -0
- package/dist/waterfall.js +171 -0
- package/docs/README.md +89 -0
- package/docs/agents.md +1523 -0
- package/docs/components/accordion.md +1369 -0
- package/docs/components/alert-dialog.md +799 -0
- package/docs/components/autocomplete.md +1857 -0
- package/docs/components/avatar.md +272 -0
- package/docs/components/button.md +435 -0
- package/docs/components/calendar.md +1589 -0
- package/docs/components/carousel.md +1171 -0
- package/docs/components/checkbox.md +1008 -0
- package/docs/components/collapsible.md +536 -0
- package/docs/components/color-picker.md +706 -0
- package/docs/components/combobox.md +3504 -0
- package/docs/components/command.md +1481 -0
- package/docs/components/date-input.md +536 -0
- package/docs/components/date-picker.md +1244 -0
- package/docs/components/dialog.md +1397 -0
- package/docs/components/drawer.md +1166 -0
- package/docs/components/field.md +538 -0
- package/docs/components/file-input.md +611 -0
- package/docs/components/hover-card.md +505 -0
- package/docs/components/image-cropper.md +556 -0
- package/docs/components/input.md +306 -0
- package/docs/components/label.md +203 -0
- package/docs/components/listbox.md +1004 -0
- package/docs/components/menu.md +1229 -0
- package/docs/components/menubar.md +443 -0
- package/docs/components/meter.md +315 -0
- package/docs/components/navigation-menu.md +1523 -0
- package/docs/components/number-input.md +1029 -0
- package/docs/components/otp-input.md +512 -0
- package/docs/components/pagination.md +613 -0
- package/docs/components/password-input.md +649 -0
- package/docs/components/popover.md +1448 -0
- package/docs/components/preferences.md +208 -0
- package/docs/components/progress.md +423 -0
- package/docs/components/radio.md +785 -0
- package/docs/components/rating.md +416 -0
- package/docs/components/resizable.md +910 -0
- package/docs/components/scroll-area.md +915 -0
- package/docs/components/segmented-control.md +435 -0
- package/docs/components/select.md +2015 -0
- package/docs/components/separator.md +229 -0
- package/docs/components/slider.md +1084 -0
- package/docs/components/switch.md +565 -0
- package/docs/components/tabs.md +944 -0
- package/docs/components/textarea.md +299 -0
- package/docs/components/time-input.md +224 -0
- package/docs/components/timeline.md +654 -0
- package/docs/components/toast.md +1224 -0
- package/docs/components/toggle.md +500 -0
- package/docs/components/token-input.md +953 -0
- package/docs/components/toolbar.md +739 -0
- package/docs/components/tooltip.md +818 -0
- package/docs/components/tree.md +1306 -0
- package/docs/components/trigger-menu.md +1223 -0
- package/docs/components/waterfall.md +717 -0
- package/docs/controllers.md +71 -0
- package/docs/core.md +8027 -0
- package/docs/custom-parts.md +89 -0
- package/docs/first-component.md +83 -0
- package/docs/forms.md +122 -0
- package/docs/installation.md +72 -0
- package/docs/introduction.md +32 -0
- package/docs/lists-and-menus.md +122 -0
- package/docs/llms.txt +1502 -0
- package/docs/parts-and-composition.md +85 -0
- package/docs/popups.md +108 -0
- package/docs/rendering.md +56 -0
- package/docs/server-rendering.md +180 -0
- package/docs/state-and-events.md +100 -0
- package/docs/styling-and-animation.md +148 -0
- package/docs/utilities/async-options.md +348 -0
- package/docs/utilities/shortcuts.md +159 -0
- package/package.json +352 -3
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
// src/use-primitive.ts
|
|
2
|
+
import {
|
|
3
|
+
attrs as partAttrs,
|
|
4
|
+
createListSnapshots,
|
|
5
|
+
directNames,
|
|
6
|
+
handlers as partHandlers,
|
|
7
|
+
keep,
|
|
8
|
+
partState,
|
|
9
|
+
present as isPresent,
|
|
10
|
+
ref,
|
|
11
|
+
renderVersion,
|
|
12
|
+
sameSlotState,
|
|
13
|
+
selectedKeys,
|
|
14
|
+
subscribe,
|
|
15
|
+
takeOwnId,
|
|
16
|
+
unwatched,
|
|
17
|
+
yieldToAuthor
|
|
18
|
+
} from "@ui-sdk/core/renderer";
|
|
19
|
+
import {
|
|
20
|
+
computed,
|
|
21
|
+
defineComponent,
|
|
22
|
+
getCurrentInstance,
|
|
23
|
+
h,
|
|
24
|
+
inject,
|
|
25
|
+
normalizeClass,
|
|
26
|
+
normalizeStyle,
|
|
27
|
+
onMounted,
|
|
28
|
+
onScopeDispose,
|
|
29
|
+
onUnmounted,
|
|
30
|
+
provide,
|
|
31
|
+
shallowRef,
|
|
32
|
+
toRaw,
|
|
33
|
+
useAttrs,
|
|
34
|
+
useId,
|
|
35
|
+
useSlots,
|
|
36
|
+
watchEffect
|
|
37
|
+
} from "vue";
|
|
38
|
+
import { slotContent } from "./children.js";
|
|
39
|
+
import { useBindings } from "./lifecycle.js";
|
|
40
|
+
var optionalBoolean = { type: Boolean, default: void 0 };
|
|
41
|
+
var orModel = (value, model) => value === void 0 ? model : value;
|
|
42
|
+
var combined = /* @__PURE__ */ new WeakMap();
|
|
43
|
+
function bothRefs(a, b) {
|
|
44
|
+
if (!a || !b) {
|
|
45
|
+
return a ?? b;
|
|
46
|
+
}
|
|
47
|
+
let inner = combined.get(a);
|
|
48
|
+
if (!inner) {
|
|
49
|
+
combined.set(a, inner = /* @__PURE__ */ new WeakMap());
|
|
50
|
+
}
|
|
51
|
+
let ref2 = inner.get(b);
|
|
52
|
+
if (!ref2) {
|
|
53
|
+
ref2 = (el) => {
|
|
54
|
+
a(el);
|
|
55
|
+
b(el);
|
|
56
|
+
};
|
|
57
|
+
inner.set(b, ref2);
|
|
58
|
+
}
|
|
59
|
+
return ref2;
|
|
60
|
+
}
|
|
61
|
+
var styles = /* @__PURE__ */ new Map();
|
|
62
|
+
function styleObject(css) {
|
|
63
|
+
let style = styles.get(css);
|
|
64
|
+
if (style) {
|
|
65
|
+
return style;
|
|
66
|
+
}
|
|
67
|
+
style = {};
|
|
68
|
+
for (const declaration of css.split(";")) {
|
|
69
|
+
const index = declaration.indexOf(":");
|
|
70
|
+
if (index !== -1) {
|
|
71
|
+
style[declaration.slice(0, index).trim()] = declaration.slice(index + 1).trim();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (styles.size >= 500) {
|
|
75
|
+
styles.clear();
|
|
76
|
+
}
|
|
77
|
+
styles.set(css, style);
|
|
78
|
+
return style;
|
|
79
|
+
}
|
|
80
|
+
var listenerProps = /* @__PURE__ */ new Map();
|
|
81
|
+
function listenerProp(type) {
|
|
82
|
+
let prop = listenerProps.get(type);
|
|
83
|
+
if (!prop) {
|
|
84
|
+
listenerProps.set(
|
|
85
|
+
type,
|
|
86
|
+
prop = `on${type[0].toUpperCase()}${type.slice(1)}`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
return prop;
|
|
90
|
+
}
|
|
91
|
+
function mergeAttrs(result, attrs) {
|
|
92
|
+
const own = yieldToAuthor(attrs, (name) => result[name] != null);
|
|
93
|
+
for (const key in own) {
|
|
94
|
+
const value = own[key];
|
|
95
|
+
if (value === void 0 || key === "id" && result.id != null) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (key === "style") {
|
|
99
|
+
result.style = result.style ? normalizeStyle([result.style, styleObject(value)]) : styleObject(value);
|
|
100
|
+
} else {
|
|
101
|
+
result[key] = key === "class" && result.class ? normalizeClass([result.class, value]) : value;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
var scopes = /* @__PURE__ */ new WeakMap();
|
|
107
|
+
function scopeKey(primitive) {
|
|
108
|
+
let key = scopes.get(primitive);
|
|
109
|
+
if (!key) {
|
|
110
|
+
scopes.set(primitive, key = Symbol(primitive.name));
|
|
111
|
+
}
|
|
112
|
+
return key;
|
|
113
|
+
}
|
|
114
|
+
var pascal = (name) => name.replace(/(^|-)(\w)/g, (_, _dash, char) => char.toUpperCase());
|
|
115
|
+
function useScope(primitive) {
|
|
116
|
+
return inject(scopeKey(primitive), null);
|
|
117
|
+
}
|
|
118
|
+
function useHandle(primitive) {
|
|
119
|
+
const scope = useScope(primitive);
|
|
120
|
+
if (!scope) {
|
|
121
|
+
const name = pascal(primitive.name);
|
|
122
|
+
throw new Error(`${name} parts must be used inside <${name}>.`);
|
|
123
|
+
}
|
|
124
|
+
return scope.handle;
|
|
125
|
+
}
|
|
126
|
+
function provideHandle(handle) {
|
|
127
|
+
provide(scopeKey(handle.primitive), {
|
|
128
|
+
handle,
|
|
129
|
+
around: {}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function provideProps(primitive, slot, props) {
|
|
133
|
+
const scope = useScope(primitive);
|
|
134
|
+
if (scope) {
|
|
135
|
+
provide(scopeKey(primitive), {
|
|
136
|
+
...scope,
|
|
137
|
+
around: { ...scope.around, [slot]: props }
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
var memo = (compute) => {
|
|
142
|
+
const value = computed(compute);
|
|
143
|
+
return () => value.value;
|
|
144
|
+
};
|
|
145
|
+
function usePrimitive(primitive, options) {
|
|
146
|
+
const id = `ui-sdk-${useId()}`;
|
|
147
|
+
const snapshot = createListSnapshots(primitive, memo);
|
|
148
|
+
const instance = unwatched(
|
|
149
|
+
() => primitive(snapshot({ ...options(), id }))
|
|
150
|
+
);
|
|
151
|
+
onMounted(() => keep(instance));
|
|
152
|
+
const version = shallowRef(renderVersion(instance));
|
|
153
|
+
onScopeDispose(
|
|
154
|
+
instance.subscribe(() => version.value = renderVersion(instance))
|
|
155
|
+
);
|
|
156
|
+
onScopeDispose(() => instance.destroy());
|
|
157
|
+
watchEffect(() => instance.setOptions(snapshot({ ...options(), id })));
|
|
158
|
+
const partRef = useBindings();
|
|
159
|
+
const watchPart = createPartWatcher(instance);
|
|
160
|
+
watchers.set(instance, watchPart);
|
|
161
|
+
const track = (part) => {
|
|
162
|
+
const owner = getCurrentInstance();
|
|
163
|
+
if (owner) {
|
|
164
|
+
return watchPart(owner, part);
|
|
165
|
+
}
|
|
166
|
+
version.value;
|
|
167
|
+
};
|
|
168
|
+
const value = {
|
|
169
|
+
primitive,
|
|
170
|
+
instance,
|
|
171
|
+
// Read when used, since reading it wakes an asleep instance.
|
|
172
|
+
get api() {
|
|
173
|
+
return instance.api;
|
|
174
|
+
},
|
|
175
|
+
// Reading it inside a render tracks every change that affects rendering.
|
|
176
|
+
get state() {
|
|
177
|
+
version.value;
|
|
178
|
+
return instance.get();
|
|
179
|
+
},
|
|
180
|
+
// Reading it inside a render tracks this part's presence.
|
|
181
|
+
present(name, props) {
|
|
182
|
+
const part = instance.part(name, props);
|
|
183
|
+
const present = isPresent(part);
|
|
184
|
+
const watched = track(part);
|
|
185
|
+
if (watched) {
|
|
186
|
+
watched.present = present;
|
|
187
|
+
}
|
|
188
|
+
return present;
|
|
189
|
+
},
|
|
190
|
+
// Attributes, listeners and a ref for a slot's element. Vue binds HTML
|
|
191
|
+
// attributes as-is. User listeners run first and can preventDefault().
|
|
192
|
+
// Reading it inside a render tracks the part's attributes.
|
|
193
|
+
slot(name, props, user = {}) {
|
|
194
|
+
const part = instance.part(name, props);
|
|
195
|
+
takeOwnId(part, user.id);
|
|
196
|
+
const attrs = partAttrs(part);
|
|
197
|
+
const watched = track(part);
|
|
198
|
+
if (watched) {
|
|
199
|
+
watched.attrs = attrs;
|
|
200
|
+
}
|
|
201
|
+
const result = {};
|
|
202
|
+
for (const key in user) {
|
|
203
|
+
if (key !== "ref") {
|
|
204
|
+
result[key] = user[key];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
mergeAttrs(result, attrs);
|
|
208
|
+
const handlers = partHandlers(part);
|
|
209
|
+
for (const type in handlers) {
|
|
210
|
+
const prop = listenerProp(type);
|
|
211
|
+
const handler = handlers[type];
|
|
212
|
+
const userHandler = result[prop];
|
|
213
|
+
result[prop] = userHandler ? (event) => {
|
|
214
|
+
for (const fn of [userHandler].flat()) {
|
|
215
|
+
fn?.(event);
|
|
216
|
+
}
|
|
217
|
+
handler(event);
|
|
218
|
+
} : handler;
|
|
219
|
+
}
|
|
220
|
+
result.ref = bothRefs(
|
|
221
|
+
user.ref,
|
|
222
|
+
partRef(ref(part, { by: "framework", attaches: "all" }), name)
|
|
223
|
+
);
|
|
224
|
+
return result;
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
provideHandle(value);
|
|
228
|
+
return value;
|
|
229
|
+
}
|
|
230
|
+
var watchers = /* @__PURE__ */ new WeakMap();
|
|
231
|
+
function createPartWatcher(instance) {
|
|
232
|
+
const owners = /* @__PURE__ */ new WeakMap();
|
|
233
|
+
function check(part, watch, liveOnly) {
|
|
234
|
+
watch.onChange?.();
|
|
235
|
+
const moved = () => watch.present !== void 0 && isPresent(part, watch.props) !== watch.present;
|
|
236
|
+
if (liveOnly) {
|
|
237
|
+
if (moved()) {
|
|
238
|
+
watch.tick.value++;
|
|
239
|
+
}
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
const version = renderVersion(instance);
|
|
243
|
+
if (version === watch.version) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
watch.version = version;
|
|
247
|
+
if (moved() || watch.attrs && !sameAttrs(
|
|
248
|
+
partAttrs(part, watch.props),
|
|
249
|
+
watch.attrs,
|
|
250
|
+
directNames(part)
|
|
251
|
+
)) {
|
|
252
|
+
watch.tick.value++;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return (owner, part) => {
|
|
256
|
+
let watched = owners.get(owner);
|
|
257
|
+
if (!watched) {
|
|
258
|
+
const own = watched = /* @__PURE__ */ new Map();
|
|
259
|
+
owners.set(owner, own);
|
|
260
|
+
onUnmounted(() => own.forEach((watch2) => watch2.unsubscribe?.()), owner);
|
|
261
|
+
}
|
|
262
|
+
let watch = watched.get(part);
|
|
263
|
+
if (!watch) {
|
|
264
|
+
watched.set(
|
|
265
|
+
part,
|
|
266
|
+
watch = { tick: shallowRef(0), props: part.props, version: 0 }
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
watch.props = part.props;
|
|
270
|
+
watch.version = renderVersion(instance);
|
|
271
|
+
const subscription = selectedKeys(part);
|
|
272
|
+
if (watch.subscription !== subscription) {
|
|
273
|
+
const current = watch;
|
|
274
|
+
current.unsubscribe?.();
|
|
275
|
+
current.subscription = subscription;
|
|
276
|
+
current.unsubscribe = subscribe(
|
|
277
|
+
part,
|
|
278
|
+
(liveOnly) => check(part, current, liveOnly)
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
watch.tick.value;
|
|
282
|
+
return watch;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
function sameAttrs(a, b, skip = []) {
|
|
286
|
+
const keys = Object.keys(a);
|
|
287
|
+
return keys.length === Object.keys(b).length && keys.every((key) => a[key] === b[key] || skip.includes(key));
|
|
288
|
+
}
|
|
289
|
+
function copyProps(props) {
|
|
290
|
+
const copy = {};
|
|
291
|
+
for (const key in toRaw(props)) {
|
|
292
|
+
copy[key] = props[key];
|
|
293
|
+
}
|
|
294
|
+
return copy;
|
|
295
|
+
}
|
|
296
|
+
function trackedState(instance, name, props) {
|
|
297
|
+
const tick = shallowRef(0);
|
|
298
|
+
let last;
|
|
299
|
+
let unsubscribe;
|
|
300
|
+
const read = /* @__PURE__ */ new Set();
|
|
301
|
+
const current = () => partState(instance.part(name, props()));
|
|
302
|
+
const changed = (next) => {
|
|
303
|
+
for (const key of read) {
|
|
304
|
+
if (!sameSlotState(next[key], last[key])) {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return false;
|
|
309
|
+
};
|
|
310
|
+
const listener = () => {
|
|
311
|
+
const next = current();
|
|
312
|
+
if (!changed(next)) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
last = next;
|
|
316
|
+
read.clear();
|
|
317
|
+
tick.value++;
|
|
318
|
+
};
|
|
319
|
+
const component = getCurrentInstance();
|
|
320
|
+
const shared = component && watchers.get(instance);
|
|
321
|
+
let watch;
|
|
322
|
+
let subscribed;
|
|
323
|
+
let selected;
|
|
324
|
+
const watchPart = (part) => {
|
|
325
|
+
const values = selectedKeys(part);
|
|
326
|
+
if (part === subscribed && values === selected) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
subscribed = part;
|
|
330
|
+
selected = values;
|
|
331
|
+
if (shared) {
|
|
332
|
+
if (watch) {
|
|
333
|
+
watch.onChange = void 0;
|
|
334
|
+
}
|
|
335
|
+
watch = shared(component, part);
|
|
336
|
+
watch.onChange = listener;
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
unsubscribe?.();
|
|
340
|
+
unsubscribe = subscribe(part, listener);
|
|
341
|
+
};
|
|
342
|
+
onScopeDispose(() => unsubscribe?.());
|
|
343
|
+
return new Proxy({}, {
|
|
344
|
+
get(_, key) {
|
|
345
|
+
tick.value;
|
|
346
|
+
const part = instance.part(name, props());
|
|
347
|
+
last = partState(part);
|
|
348
|
+
if (typeof key === "string") {
|
|
349
|
+
read.add(key);
|
|
350
|
+
}
|
|
351
|
+
watchPart(part);
|
|
352
|
+
return last[key];
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
var SlotHost = defineComponent({
|
|
357
|
+
name: "SlotHost",
|
|
358
|
+
props: {
|
|
359
|
+
slot: {
|
|
360
|
+
type: Function,
|
|
361
|
+
required: true
|
|
362
|
+
},
|
|
363
|
+
state: { type: Object, required: true },
|
|
364
|
+
fallback: Function
|
|
365
|
+
},
|
|
366
|
+
setup: (props) => () => slotContent(props.slot, { state: props.state }) ?? props.fallback?.()
|
|
367
|
+
});
|
|
368
|
+
var fallbacks = /* @__PURE__ */ new WeakMap();
|
|
369
|
+
function fallbackOf(slots, fallback) {
|
|
370
|
+
let entry = fallbacks.get(slots);
|
|
371
|
+
if (!entry) {
|
|
372
|
+
const latest = shallowRef(fallback);
|
|
373
|
+
fallbacks.set(slots, entry = { latest, fallback: () => latest.value() });
|
|
374
|
+
}
|
|
375
|
+
entry.latest.value = fallback;
|
|
376
|
+
return entry.fallback;
|
|
377
|
+
}
|
|
378
|
+
function defaultSlot(slots, state, fallback) {
|
|
379
|
+
if (!slots.default) {
|
|
380
|
+
return fallback?.();
|
|
381
|
+
}
|
|
382
|
+
return h(SlotHost, {
|
|
383
|
+
slot: slots.default,
|
|
384
|
+
state,
|
|
385
|
+
fallback: fallback && fallbackOf(slots, fallback)
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
var contents = /* @__PURE__ */ new WeakMap();
|
|
389
|
+
function contentOf(slots, own) {
|
|
390
|
+
let content = contents.get(slots);
|
|
391
|
+
if (!content) {
|
|
392
|
+
const latest = shallowRef(own);
|
|
393
|
+
contents.set(
|
|
394
|
+
slots,
|
|
395
|
+
content = { own: latest, component: () => latest.value() }
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
content.own.value = own;
|
|
399
|
+
return content.component;
|
|
400
|
+
}
|
|
401
|
+
function renderElement(props, slots, state, element) {
|
|
402
|
+
const { tag, children, hidden } = element;
|
|
403
|
+
const own = children ? () => children(state) : () => slots.default?.({ state });
|
|
404
|
+
if (slots.render) {
|
|
405
|
+
const rendered = slots.render({
|
|
406
|
+
props,
|
|
407
|
+
state,
|
|
408
|
+
children: contentOf(slots, own)
|
|
409
|
+
});
|
|
410
|
+
if (hidden) {
|
|
411
|
+
return [...rendered, hidden()];
|
|
412
|
+
}
|
|
413
|
+
return rendered.length === 1 ? rendered[0] : rendered;
|
|
414
|
+
}
|
|
415
|
+
const content = hidden ? () => [own(), hidden()] : own;
|
|
416
|
+
return h(tag, props, content());
|
|
417
|
+
}
|
|
418
|
+
function usePart(handle, slot, slotProps = () => ({}), props, element = "div") {
|
|
419
|
+
const component = getCurrentInstance();
|
|
420
|
+
if (!component) {
|
|
421
|
+
throw new Error(`The ${slot} part must call usePart in its setup.`);
|
|
422
|
+
}
|
|
423
|
+
const owner = typeof handle === "function" ? useScope(handle)?.handle : handle;
|
|
424
|
+
if (!owner) {
|
|
425
|
+
throw new Error(
|
|
426
|
+
`The ${slot} part must be used inside its primitive's root.`
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
const attrs = useAttrs();
|
|
430
|
+
const slots = useSlots();
|
|
431
|
+
const user = props ?? (() => attrs);
|
|
432
|
+
const options = typeof element === "string" ? { tag: element } : element;
|
|
433
|
+
const state = trackedState(owner.instance, slot, slotProps);
|
|
434
|
+
const render = () => {
|
|
435
|
+
const current = slotProps();
|
|
436
|
+
if (!owner.present(slot, current)) {
|
|
437
|
+
return null;
|
|
438
|
+
}
|
|
439
|
+
const merged = owner.slot(slot, current, user());
|
|
440
|
+
return renderElement(
|
|
441
|
+
options.extend ? options.extend(merged) : merged,
|
|
442
|
+
slots,
|
|
443
|
+
state,
|
|
444
|
+
options
|
|
445
|
+
);
|
|
446
|
+
};
|
|
447
|
+
return Object.assign(render, { state });
|
|
448
|
+
}
|
|
449
|
+
export {
|
|
450
|
+
copyProps,
|
|
451
|
+
defaultSlot,
|
|
452
|
+
optionalBoolean,
|
|
453
|
+
orModel,
|
|
454
|
+
pascal,
|
|
455
|
+
provideHandle,
|
|
456
|
+
provideProps,
|
|
457
|
+
renderElement,
|
|
458
|
+
useHandle,
|
|
459
|
+
usePart,
|
|
460
|
+
usePrimitive,
|
|
461
|
+
useScope
|
|
462
|
+
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { type ListHighlightDetails, type NumberFormat, type WaterfallBarLabelDetails, type WaterfallController, type WaterfallData, type WaterfallDataItem, type WaterfallExpandedChangeReason, type WaterfallValueChangeReason } from "@ui-sdk/core/waterfall";
|
|
2
|
+
import type { ChangeDetails } from "@ui-sdk/core";
|
|
3
|
+
import { type PropType } from "vue";
|
|
4
|
+
import { type PartSlots } from "./use-primitive.js";
|
|
5
|
+
type Value = string | null;
|
|
6
|
+
/**
|
|
7
|
+
* A trace's spans on a shared time axis, as a tree of rows you expand and
|
|
8
|
+
* collapse, with one tab stop. Without content, it renders a row for every span.
|
|
9
|
+
* @experimental
|
|
10
|
+
*/
|
|
11
|
+
declare const Waterfall: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
12
|
+
items: {
|
|
13
|
+
type: PropType<WaterfallData>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
range: PropType<[number, number]>;
|
|
17
|
+
value: {
|
|
18
|
+
type: PropType<Value>;
|
|
19
|
+
default: undefined;
|
|
20
|
+
};
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: PropType<Value>;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
defaultValue: {
|
|
26
|
+
type: PropType<Value>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
expanded: {
|
|
30
|
+
type: PropType<string[]>;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
33
|
+
defaultExpanded: {
|
|
34
|
+
type: PropType<string[]>;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
format: PropType<NumberFormat>;
|
|
38
|
+
locale: StringConstructor;
|
|
39
|
+
getBarLabel: PropType<(item: WaterfallDataItem, details: WaterfallBarLabelDetails) => string>;
|
|
40
|
+
controller: PropType<WaterfallController>;
|
|
41
|
+
debug: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: undefined;
|
|
44
|
+
};
|
|
45
|
+
}>, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
}>[] | null) & {
|
|
50
|
+
state: NoInfer<import("@ui-sdk/core/waterfall").WaterfallState>;
|
|
51
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
52
|
+
"update:value": (_value: Value) => true;
|
|
53
|
+
"update:modelValue": (_value: Value) => true;
|
|
54
|
+
valueChange: (_value: Value, _details: ChangeDetails<WaterfallValueChangeReason>) => true;
|
|
55
|
+
"update:expanded": (_expanded: string[]) => true;
|
|
56
|
+
expandedChange: (_expanded: string[], _details: ChangeDetails<WaterfallExpandedChangeReason>) => true;
|
|
57
|
+
highlight: (_value: string, _details: ListHighlightDetails) => true;
|
|
58
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
items: {
|
|
60
|
+
type: PropType<WaterfallData>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
range: PropType<[number, number]>;
|
|
64
|
+
value: {
|
|
65
|
+
type: PropType<Value>;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
modelValue: {
|
|
69
|
+
type: PropType<Value>;
|
|
70
|
+
default: undefined;
|
|
71
|
+
};
|
|
72
|
+
defaultValue: {
|
|
73
|
+
type: PropType<Value>;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
expanded: {
|
|
77
|
+
type: PropType<string[]>;
|
|
78
|
+
default: undefined;
|
|
79
|
+
};
|
|
80
|
+
defaultExpanded: {
|
|
81
|
+
type: PropType<string[]>;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
format: PropType<NumberFormat>;
|
|
85
|
+
locale: StringConstructor;
|
|
86
|
+
getBarLabel: PropType<(item: WaterfallDataItem, details: WaterfallBarLabelDetails) => string>;
|
|
87
|
+
controller: PropType<WaterfallController>;
|
|
88
|
+
debug: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: undefined;
|
|
91
|
+
};
|
|
92
|
+
}>> & Readonly<{
|
|
93
|
+
"onUpdate:modelValue"?: ((_value: Value) => any) | undefined;
|
|
94
|
+
"onUpdate:value"?: ((_value: Value) => any) | undefined;
|
|
95
|
+
onValueChange?: ((_value: Value, _details: ChangeDetails<WaterfallValueChangeReason>) => any) | undefined;
|
|
96
|
+
onHighlight?: ((_value: string, _details: ListHighlightDetails) => any) | undefined;
|
|
97
|
+
"onUpdate:expanded"?: ((_expanded: string[]) => any) | undefined;
|
|
98
|
+
onExpandedChange?: ((_expanded: string[], _details: ChangeDetails<WaterfallExpandedChangeReason>) => any) | undefined;
|
|
99
|
+
}>, {
|
|
100
|
+
value: Value;
|
|
101
|
+
debug: boolean;
|
|
102
|
+
defaultValue: Value;
|
|
103
|
+
expanded: string[];
|
|
104
|
+
defaultExpanded: string[];
|
|
105
|
+
modelValue: Value;
|
|
106
|
+
}, PartSlots<import("@ui-sdk/core/waterfall").WaterfallPrimitive, "root">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "div">;
|
|
107
|
+
/**
|
|
108
|
+
* The row of column headers, above the rows.
|
|
109
|
+
* @experimental
|
|
110
|
+
*/
|
|
111
|
+
declare const WaterfallHeaderRow: Pick<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, "div">;
|
|
112
|
+
/**
|
|
113
|
+
* A column's header, like "Name" or "Timeline".
|
|
114
|
+
* @experimental
|
|
115
|
+
*/
|
|
116
|
+
declare const WaterfallColumnHeader: Pick<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<{}>>, "div">;
|
|
117
|
+
/**
|
|
118
|
+
* One time on the axis, placed by `--waterfall-tick`. Without content, it shows the time.
|
|
119
|
+
* @experimental
|
|
120
|
+
*/
|
|
121
|
+
declare const WaterfallTick: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
122
|
+
time: {
|
|
123
|
+
type: NumberConstructor;
|
|
124
|
+
required: true;
|
|
125
|
+
};
|
|
126
|
+
}>, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
127
|
+
[key: string]: any;
|
|
128
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
129
|
+
[key: string]: any;
|
|
130
|
+
}>[] | null) & {
|
|
131
|
+
state: NoInfer<import("@ui-sdk/core/waterfall").WaterfallTimeState>;
|
|
132
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
133
|
+
time: {
|
|
134
|
+
type: NumberConstructor;
|
|
135
|
+
required: true;
|
|
136
|
+
};
|
|
137
|
+
}>> & Readonly<{}>, {}, PartSlots<import("@ui-sdk/core/waterfall").WaterfallPrimitive, "tick">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "span">;
|
|
138
|
+
/**
|
|
139
|
+
* The ruler of round times above the bars, hidden from screen readers. Without content, it renders its ticks.
|
|
140
|
+
* @experimental
|
|
141
|
+
*/
|
|
142
|
+
declare const WaterfallAxis: import("./create-parts.js").ElementPart<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
143
|
+
maxTicks: NumberConstructor;
|
|
144
|
+
}>, (() => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
145
|
+
[key: string]: any;
|
|
146
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
147
|
+
[key: string]: any;
|
|
148
|
+
}>[] | null) & {
|
|
149
|
+
state: NoInfer<import("@ui-sdk/core/waterfall").WaterfallAxisState>;
|
|
150
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
151
|
+
maxTicks: NumberConstructor;
|
|
152
|
+
}>> & Readonly<{}>, {}, PartSlots<import("@ui-sdk/core/waterfall").WaterfallPrimitive, "axis">, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, "div">;
|
|
153
|
+
/**
|
|
154
|
+
* A moment across every row, like DOMContentLoaded, placed by `--waterfall-mark`.
|
|
155
|
+
* @experimental
|
|
156
|
+
*/
|
|
157
|
+
declare const WaterfallMark: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/waterfall").WaterfallTimeProps> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallTimeState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/waterfall").WaterfallTimeProps> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallTimeState>>>, "span">;
|
|
158
|
+
/**
|
|
159
|
+
* One span's row. Its `--waterfall-start` and `--waterfall-size` place the span's bar.
|
|
160
|
+
* @experimental
|
|
161
|
+
*/
|
|
162
|
+
declare const WaterfallRow: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowProps> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowProps> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, "div">;
|
|
163
|
+
/**
|
|
164
|
+
* The cell that names the span. Put the indicator and the span's label in it.
|
|
165
|
+
* @experimental
|
|
166
|
+
*/
|
|
167
|
+
declare const WaterfallRowHeader: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
168
|
+
value?: string;
|
|
169
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
170
|
+
value?: string;
|
|
171
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, "div">;
|
|
172
|
+
/**
|
|
173
|
+
* The arrow that expands and collapses a span with children.
|
|
174
|
+
* @experimental
|
|
175
|
+
*/
|
|
176
|
+
declare const WaterfallIndicator: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
177
|
+
value?: string;
|
|
178
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
179
|
+
value?: string;
|
|
180
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, "span">;
|
|
181
|
+
/**
|
|
182
|
+
* A cell of your own, like a status or a size.
|
|
183
|
+
* @experimental
|
|
184
|
+
*/
|
|
185
|
+
declare const WaterfallCell: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
186
|
+
value?: string;
|
|
187
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
188
|
+
value?: string;
|
|
189
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, "div">;
|
|
190
|
+
/**
|
|
191
|
+
* The cell on the time axis, which screen readers hear as the span's start and duration.
|
|
192
|
+
* @experimental
|
|
193
|
+
*/
|
|
194
|
+
declare const WaterfallBar: Pick<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
195
|
+
value?: string;
|
|
196
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, never> & import("./create-parts.js").ElementConstructor<import("vue").DefineSetupFnComponent<Omit<NoInfer<{
|
|
197
|
+
value?: string;
|
|
198
|
+
}> & import("@ui-sdk/core/renderer").BaseSlotProps, never>, {} & {}, import("./use-primitive.js").StateSlots<NoInfer<import("@ui-sdk/core/waterfall").WaterfallRowState>>>, "div">;
|
|
199
|
+
export { createWaterfallController, visibleWaterfallRows, } from "@ui-sdk/core/waterfall";
|
|
200
|
+
export { Waterfall, WaterfallAxis, WaterfallBar, WaterfallCell, WaterfallColumnHeader, WaterfallHeaderRow, WaterfallIndicator, WaterfallMark, WaterfallRow, WaterfallRowHeader, WaterfallTick, };
|
|
201
|
+
export type { ListHighlightDetails, NumberFormat, WaterfallApi, WaterfallAxisProps, WaterfallAxisState, WaterfallBarLabelDetails, WaterfallChangeOptions, WaterfallController, WaterfallData, WaterfallDataItem, WaterfallDataRow, WaterfallExpandedChangeReason, WaterfallOptions, WaterfallPrimitive, WaterfallRowPartProps, WaterfallRowProps, WaterfallRowState, WaterfallState, WaterfallTickData, WaterfallTimeProps, WaterfallTimeState, WaterfallValueChangeReason, } from "@ui-sdk/core/waterfall";
|