@joewinke/jatui 0.1.31 → 0.2.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/CLAUDE.md +22 -0
- package/dist/actions/attention.d.ts +24 -0
- package/dist/actions/attention.js +94 -0
- package/dist/actions/collapse.js +29 -15
- package/dist/actions/floating.d.ts +53 -0
- package/dist/actions/floating.js +158 -0
- package/dist/actions/listNav.js +137 -108
- package/dist/actions/railNav.js +89 -72
- package/dist/actions/staggerEntrance.d.ts +28 -0
- package/dist/actions/staggerEntrance.js +71 -0
- package/dist/actions/tooltip.d.ts +28 -0
- package/dist/actions/tooltip.js +186 -0
- package/dist/assets/sounds/README.md +47 -0
- package/dist/assets/sounds/error.d.ts +1 -0
- package/dist/assets/sounds/error.js +4 -0
- package/dist/assets/sounds/notify.d.ts +1 -0
- package/dist/assets/sounds/notify.js +4 -0
- package/dist/assets/sounds/pop.d.ts +1 -0
- package/dist/assets/sounds/pop.js +4 -0
- package/dist/assets/sounds/send.d.ts +1 -0
- package/dist/assets/sounds/send.js +4 -0
- package/dist/assets/sounds/success.d.ts +1 -0
- package/dist/assets/sounds/success.js +4 -0
- package/dist/assets/sounds/toggle.d.ts +1 -0
- package/dist/assets/sounds/toggle.js +4 -0
- package/dist/components/AnimatedNumber.svelte +112 -0
- package/dist/components/AnimatedNumber.svelte.d.ts +8 -0
- package/dist/components/Badge.svelte +75 -4
- package/dist/components/Badge.svelte.d.ts +6 -1
- package/dist/components/Button.svelte +196 -21
- package/dist/components/Button.svelte.d.ts +10 -1
- package/dist/components/Carousel.svelte +265 -0
- package/dist/components/Carousel.svelte.d.ts +21 -0
- package/dist/components/ChipInput.svelte +63 -3
- package/dist/components/Collapse.svelte +70 -14
- package/dist/components/Collapse.svelte.d.ts +11 -0
- package/dist/components/ColorSelector.svelte +21 -24
- package/dist/components/CommandPalette.svelte +475 -0
- package/dist/components/CommandPalette.svelte.d.ts +3 -0
- package/dist/components/ContextMenu.svelte +9 -73
- package/dist/components/CopyButton.svelte +156 -0
- package/dist/components/CopyButton.svelte.d.ts +12 -0
- package/dist/components/HoldToConfirm.svelte +183 -0
- package/dist/components/HoldToConfirm.svelte.d.ts +11 -0
- package/dist/components/KeyboardShortcutsOverlay.svelte +54 -8
- package/dist/components/KeyboardShortcutsOverlay.svelte.d.ts +3 -0
- package/dist/components/PasswordMeter.svelte +87 -0
- package/dist/components/PasswordMeter.svelte.d.ts +8 -0
- package/dist/components/PinInput.svelte +186 -0
- package/dist/components/PinInput.svelte.d.ts +13 -0
- package/dist/components/QuantityStepper.svelte +185 -0
- package/dist/components/QuantityStepper.svelte.d.ts +12 -0
- package/dist/components/Skeleton.svelte +123 -0
- package/dist/components/Skeleton.svelte.d.ts +12 -0
- package/dist/components/SpeechForm.svelte +37 -0
- package/dist/components/StatusBadge.svelte +31 -3
- package/dist/components/StatusBadge.svelte.d.ts +0 -5
- package/dist/components/Tabs.svelte +270 -0
- package/dist/components/Tabs.svelte.d.ts +15 -0
- package/dist/components/TextInput.svelte +138 -38
- package/dist/components/TextInput.svelte.d.ts +9 -1
- package/dist/components/VoicePlayer.svelte +51 -0
- package/dist/components/basic/Alert.svelte +36 -0
- package/dist/components/basic/Alert.svelte.d.ts +9 -0
- package/dist/components/basic/Breadcrumb.svelte +27 -0
- package/dist/components/basic/Breadcrumb.svelte.d.ts +11 -0
- package/dist/components/basic/ButtonGroup.svelte +15 -0
- package/dist/components/basic/ButtonGroup.svelte.d.ts +8 -0
- package/dist/components/basic/Checkbox.svelte +85 -0
- package/dist/components/basic/Checkbox.svelte.d.ts +15 -0
- package/dist/components/basic/Empty.svelte +17 -0
- package/dist/components/basic/Empty.svelte.d.ts +8 -0
- package/dist/components/basic/Kbd.svelte +16 -0
- package/dist/components/basic/Kbd.svelte.d.ts +8 -0
- package/dist/components/basic/Pagination.svelte +104 -0
- package/dist/components/basic/Pagination.svelte.d.ts +12 -0
- package/dist/components/basic/RadioGroup.svelte +71 -0
- package/dist/components/basic/RadioGroup.svelte.d.ts +18 -0
- package/dist/components/basic/Separator.svelte +19 -0
- package/dist/components/basic/Separator.svelte.d.ts +8 -0
- package/dist/components/basic/Slider.svelte +72 -0
- package/dist/components/basic/Slider.svelte.d.ts +17 -0
- package/dist/components/basic/Switch.svelte +88 -0
- package/dist/components/basic/Switch.svelte.d.ts +14 -0
- package/dist/components/basic/Toggle.svelte +43 -0
- package/dist/components/basic/Toggle.svelte.d.ts +14 -0
- package/dist/components/graph/GraphCanvas.svelte +103 -0
- package/dist/components/graph/GraphCanvas.svelte.d.ts +22 -0
- package/dist/components/graph/JatuiNode.svelte +128 -0
- package/dist/components/graph/JatuiNode.svelte.d.ts +14 -0
- package/dist/components/graph/theme.d.ts +27 -0
- package/dist/components/graph/theme.js +136 -0
- package/dist/components/markup.js +62 -59
- package/dist/components/messaging/MessageItem.svelte +92 -0
- package/dist/components/messaging/MessageItem.svelte.d.ts +5 -0
- package/dist/components/messaging/TypingIndicator.svelte +63 -0
- package/dist/components/messaging/TypingIndicator.svelte.d.ts +7 -0
- package/dist/components/pipeline/PipelineColumn.svelte +44 -3
- package/dist/components/progress/ProgressBar.svelte +189 -0
- package/dist/components/progress/ProgressBar.svelte.d.ts +17 -0
- package/dist/components/progress/ProgressRing.svelte +138 -0
- package/dist/components/progress/ProgressRing.svelte.d.ts +12 -0
- package/dist/components/progress/Steps.svelte +195 -0
- package/dist/components/progress/Steps.svelte.d.ts +14 -0
- package/dist/components/session-nav/transcriptModel.js +66 -49
- package/dist/components/shell/NavigationMenu.svelte +422 -0
- package/dist/components/shell/NavigationMenu.svelte.d.ts +43 -0
- package/dist/components/shell/Sidebar.svelte +276 -0
- package/dist/components/shell/Sidebar.svelte.d.ts +32 -0
- package/dist/components/shell/SidebarGroup.svelte +180 -0
- package/dist/components/shell/SidebarGroup.svelte.d.ts +19 -0
- package/dist/components/shell/SidebarItem.svelte +170 -0
- package/dist/components/shell/SidebarItem.svelte.d.ts +24 -0
- package/dist/components/shell/shell.d.ts +30 -0
- package/dist/components/shell/shell.js +65 -0
- package/dist/components/table/DataTable.svelte +364 -0
- package/dist/components/table/DataTable.svelte.d.ts +4 -0
- package/dist/components/table/flexRender.d.ts +31 -0
- package/dist/components/table/flexRender.js +32 -0
- package/dist/components/table/types.d.ts +28 -0
- package/dist/components/table/types.js +1 -0
- package/dist/components/toast/ToastHost.svelte +21 -0
- package/dist/components/toast/ToastHost.svelte.d.ts +3 -0
- package/dist/components/toast/ToastItem.svelte +287 -0
- package/dist/components/toast/ToastItem.svelte.d.ts +9 -0
- package/dist/data/emojis.js +4 -4
- package/dist/dnd/autoScroll.js +12 -10
- package/dist/dnd/createDndBoard.svelte.js +110 -76
- package/dist/dnd/createDndBoard.test.js +161 -85
- package/dist/dnd/draggable.js +23 -15
- package/dist/dnd/dropTarget.js +29 -15
- package/dist/dnd/index.d.ts +0 -1
- package/dist/dnd/index.js +0 -1
- package/dist/dnd/types.d.ts +0 -9
- package/dist/dnd/types.js +14 -2
- package/dist/index.d.ts +60 -6
- package/dist/index.js +73 -6
- package/dist/showcase/AnimatedBeam.svelte +183 -0
- package/dist/showcase/AnimatedBeam.svelte.d.ts +26 -0
- package/dist/showcase/AuroraDrift.svelte +74 -0
- package/dist/showcase/AuroraDrift.svelte.d.ts +9 -0
- package/dist/showcase/BentoCard.svelte +50 -0
- package/dist/showcase/BentoCard.svelte.d.ts +14 -0
- package/dist/showcase/BentoGrid.svelte +43 -0
- package/dist/showcase/BentoGrid.svelte.d.ts +12 -0
- package/dist/showcase/BorderBeam.svelte +79 -0
- package/dist/showcase/BorderBeam.svelte.d.ts +12 -0
- package/dist/showcase/ClipWipe.svelte +82 -0
- package/dist/showcase/ClipWipe.svelte.d.ts +12 -0
- package/dist/showcase/Confetti.svelte +71 -0
- package/dist/showcase/Confetti.svelte.d.ts +10 -0
- package/dist/showcase/CursorSpotlight.svelte +85 -0
- package/dist/showcase/CursorSpotlight.svelte.d.ts +9 -0
- package/dist/showcase/DeviceMock.svelte +186 -0
- package/dist/showcase/DeviceMock.svelte.d.ts +11 -0
- package/dist/showcase/Dock.svelte +123 -0
- package/dist/showcase/Dock.svelte.d.ts +17 -0
- package/dist/showcase/FlipCard.svelte +103 -0
- package/dist/showcase/FlipCard.svelte.d.ts +10 -0
- package/dist/showcase/FocusReveal.svelte +83 -0
- package/dist/showcase/FocusReveal.svelte.d.ts +11 -0
- package/dist/showcase/Globe.svelte +202 -0
- package/dist/showcase/Globe.svelte.d.ts +16 -0
- package/dist/showcase/KenBurns.svelte +105 -0
- package/dist/showcase/KenBurns.svelte.d.ts +13 -0
- package/dist/showcase/Marquee.svelte +89 -0
- package/dist/showcase/Marquee.svelte.d.ts +9 -0
- package/dist/showcase/ParallaxTilt.svelte +98 -0
- package/dist/showcase/ParallaxTilt.svelte.d.ts +10 -0
- package/dist/showcase/ScrambleText.svelte +98 -0
- package/dist/showcase/ScrambleText.svelte.d.ts +11 -0
- package/dist/showcase/ShineSweep.svelte +81 -0
- package/dist/showcase/ShineSweep.svelte.d.ts +9 -0
- package/dist/showcase/Terminal.svelte +230 -0
- package/dist/showcase/Terminal.svelte.d.ts +18 -0
- package/dist/showcase/TextSplitReveal.svelte +146 -0
- package/dist/showcase/TextSplitReveal.svelte.d.ts +13 -0
- package/dist/showcase/TextWave.svelte +55 -0
- package/dist/showcase/TextWave.svelte.d.ts +8 -0
- package/dist/showcase/TypewriterText.svelte +130 -0
- package/dist/showcase/TypewriterText.svelte.d.ts +9 -0
- package/dist/showcase/backdrop/GrainGradient.svelte +126 -0
- package/dist/showcase/backdrop/GrainGradient.svelte.d.ts +23 -0
- package/dist/showcase/backdrop/MeshGradient.svelte +104 -0
- package/dist/showcase/backdrop/MeshGradient.svelte.d.ts +20 -0
- package/dist/showcase/backdrop/Metaballs.svelte +116 -0
- package/dist/showcase/backdrop/Metaballs.svelte.d.ts +18 -0
- package/dist/showcase/backdrop/NeuroNoise.svelte +115 -0
- package/dist/showcase/backdrop/NeuroNoise.svelte.d.ts +20 -0
- package/dist/showcase/backdrop/ShowcaseBackdrop.svelte +48 -0
- package/dist/showcase/backdrop/ShowcaseBackdrop.svelte.d.ts +12 -0
- package/dist/showcase/generative/GenerativeBackdrop.svelte +234 -0
- package/dist/showcase/generative/GenerativeBackdrop.svelte.d.ts +9 -0
- package/dist/showcase/generative/intent.d.ts +7 -0
- package/dist/showcase/generative/intent.js +67 -0
- package/dist/showcase/generative/manifest.d.ts +9 -0
- package/dist/showcase/generative/manifest.js +97 -0
- package/dist/showcase/generative/types.d.ts +48 -0
- package/dist/showcase/generative/types.js +8 -0
- package/dist/showcase/index.d.ts +36 -0
- package/dist/showcase/index.js +46 -0
- package/dist/showcase/scroll/SmoothScroll.svelte +49 -0
- package/dist/showcase/scroll/SmoothScroll.svelte.d.ts +12 -0
- package/dist/showcase/scroll/scrollProgress.d.ts +24 -0
- package/dist/showcase/scroll/scrollProgress.js +65 -0
- package/dist/showcase/scroll/scrollReveal.d.ts +30 -0
- package/dist/showcase/scroll/scrollReveal.js +70 -0
- package/dist/stores/commandPalette.svelte.d.ts +24 -0
- package/dist/stores/commandPalette.svelte.js +82 -0
- package/dist/stores/confirmDialog.svelte.js +5 -5
- package/dist/stores/inputDialog.svelte.js +5 -5
- package/dist/stores/toast.svelte.d.ts +28 -0
- package/dist/stores/toast.svelte.js +33 -0
- package/dist/styles/motion.css +46 -0
- package/dist/styles/tokens.css +31 -0
- package/dist/transitions/glide.d.ts +31 -0
- package/dist/transitions/glide.js +58 -0
- package/dist/types/booking.js +4 -4
- package/dist/types/comments.js +2 -2
- package/dist/types/messaging.js +3 -3
- package/dist/types/pipeline.js +2 -2
- package/dist/utils/currency.js +4 -2
- package/dist/utils/daisyuiColors.js +27 -25
- package/dist/utils/dateFormatters.d.ts +20 -0
- package/dist/utils/dateFormatters.js +65 -44
- package/dist/utils/googleMapsLoader.js +100 -46
- package/dist/utils/mentionParser.js +30 -30
- package/dist/utils/phone.js +27 -21
- package/dist/utils/phoneFormat.js +9 -9
- package/dist/utils/sound.d.ts +6 -0
- package/dist/utils/sound.js +113 -0
- package/dist/utils/splitText.d.ts +25 -0
- package/dist/utils/splitText.js +94 -0
- package/dist/utils/taskUtils.js +1 -1
- package/dist/utils/themeWipe.d.ts +21 -0
- package/dist/utils/themeWipe.js +94 -0
- package/dist/utils/viewTransition.d.ts +23 -0
- package/dist/utils/viewTransition.js +75 -0
- package/package.json +56 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
children: import('svelte').Snippet;
|
|
3
|
+
/** Lenis lerp intensity — lower = smoother (default 0.1) */
|
|
4
|
+
lerp?: number;
|
|
5
|
+
/** Lenis scroll duration in seconds (overrides lerp when set) */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** Lenis smooth-wheel toggle (default true) */
|
|
8
|
+
smoothWheel?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const SmoothScroll: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type SmoothScroll = ReturnType<typeof SmoothScroll>;
|
|
12
|
+
export default SmoothScroll;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ScrollProgressOptions {
|
|
2
|
+
/** CSS variable name to bind (default '--scroll-progress') */
|
|
3
|
+
varName?: string;
|
|
4
|
+
/** Container to observe — default window scroll */
|
|
5
|
+
container?: HTMLElement;
|
|
6
|
+
/** Scroll axis (default 'y') */
|
|
7
|
+
axis?: 'x' | 'y';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Svelte action: binds a CSS custom property (default --scroll-progress, 0..1)
|
|
11
|
+
* to the page scroll position via motion scroll(). Uses native ScrollTimeline
|
|
12
|
+
* where available for compositor-thread performance.
|
|
13
|
+
*
|
|
14
|
+
* Reduced-motion: no-ops (leaves var unset / at whatever CSS default).
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* <div use:scrollProgress style="width: calc(var(--scroll-progress) * 100%)">
|
|
18
|
+
* <div use:scrollProgress={{ varName: '--depth', container: panelEl }}>
|
|
19
|
+
*/
|
|
20
|
+
export declare function scrollProgress(node: HTMLElement, opts?: ScrollProgressOptions): {
|
|
21
|
+
destroy?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
destroy(): void;
|
|
24
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { scroll, supportsScrollTimeline } from 'motion';
|
|
2
|
+
/**
|
|
3
|
+
* Svelte action: binds a CSS custom property (default --scroll-progress, 0..1)
|
|
4
|
+
* to the page scroll position via motion scroll(). Uses native ScrollTimeline
|
|
5
|
+
* where available for compositor-thread performance.
|
|
6
|
+
*
|
|
7
|
+
* Reduced-motion: no-ops (leaves var unset / at whatever CSS default).
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <div use:scrollProgress style="width: calc(var(--scroll-progress) * 100%)">
|
|
11
|
+
* <div use:scrollProgress={{ varName: '--depth', container: panelEl }}>
|
|
12
|
+
*/
|
|
13
|
+
export function scrollProgress(node, opts) {
|
|
14
|
+
if (opts === void 0) { opts = {}; }
|
|
15
|
+
var reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
16
|
+
if (reduced)
|
|
17
|
+
return {};
|
|
18
|
+
var _a = opts.varName, varName = _a === void 0 ? '--scroll-progress' : _a, container = opts.container, _b = opts.axis, axis = _b === void 0 ? 'y' : _b;
|
|
19
|
+
// Prefer native ScrollTimeline for compositor-thread perf when available
|
|
20
|
+
if (supportsScrollTimeline() && !container) {
|
|
21
|
+
try {
|
|
22
|
+
// @ts-ignore — ScrollTimeline is not in lib.dom yet
|
|
23
|
+
var timeline = new ScrollTimeline({ source: document.documentElement, axis: axis });
|
|
24
|
+
// Animate a dummy MotionValue-style target via WAAPI
|
|
25
|
+
node.style.setProperty(varName, '0');
|
|
26
|
+
var anim_1 = node.animate({ '--jatui-scroll-noop': ['0', '1'] }, {
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
timeline: timeline,
|
|
29
|
+
fill: 'both'
|
|
30
|
+
});
|
|
31
|
+
// Mirror progress via rAF while ScrollTimeline doesn't yet expose a direct hook
|
|
32
|
+
var rafId_1;
|
|
33
|
+
var tick_1 = function () {
|
|
34
|
+
var _a;
|
|
35
|
+
if (anim_1.currentTime != null) {
|
|
36
|
+
var effect = anim_1.effect;
|
|
37
|
+
var t = effect ? ((_a = effect.getComputedTiming().progress) !== null && _a !== void 0 ? _a : 0) : 0;
|
|
38
|
+
node.style.setProperty(varName, String(t));
|
|
39
|
+
}
|
|
40
|
+
rafId_1 = requestAnimationFrame(tick_1);
|
|
41
|
+
};
|
|
42
|
+
rafId_1 = requestAnimationFrame(tick_1);
|
|
43
|
+
return {
|
|
44
|
+
destroy: function () {
|
|
45
|
+
cancelAnimationFrame(rafId_1);
|
|
46
|
+
anim_1.cancel();
|
|
47
|
+
node.style.removeProperty(varName);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
catch (_c) {
|
|
52
|
+
// fall through to motion scroll()
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Fallback: motion scroll() — JS-thread but cross-browser
|
|
56
|
+
var stop = scroll(function (progress) {
|
|
57
|
+
node.style.setProperty(varName, String(progress));
|
|
58
|
+
}, container ? { container: container, axis: axis } : { axis: axis });
|
|
59
|
+
return {
|
|
60
|
+
destroy: function () {
|
|
61
|
+
stop();
|
|
62
|
+
node.style.removeProperty(varName);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface ScrollRevealOptions {
|
|
2
|
+
/** Translate distance in px (default 16) */
|
|
3
|
+
y?: number;
|
|
4
|
+
/** Duration token override in ms (default: var(--motion-enter) = 200ms) */
|
|
5
|
+
duration?: number;
|
|
6
|
+
/** Run once on first enter (default true) */
|
|
7
|
+
once?: boolean;
|
|
8
|
+
/** IntersectionObserver threshold amount (default 0.15) */
|
|
9
|
+
amount?: number;
|
|
10
|
+
/** Root margin for early trigger (default '-10px') */
|
|
11
|
+
margin?: string;
|
|
12
|
+
/** Stagger delay between children in ms; when set, animates children instead of host */
|
|
13
|
+
stagger?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Svelte action: reveals the element (or its children when stagger > 0) when
|
|
17
|
+
* scrolled into view. Composes with the staggerEntrance ethos — same
|
|
18
|
+
* opacity + translateY arc, same motion tokens.
|
|
19
|
+
*
|
|
20
|
+
* Reduced-motion: jumps to the final (visible) state instantly.
|
|
21
|
+
*
|
|
22
|
+
* Usage:
|
|
23
|
+
* <div use:scrollReveal>…</div>
|
|
24
|
+
* <ul use:scrollReveal={{ stagger: 60 }}>…</ul>
|
|
25
|
+
*/
|
|
26
|
+
export declare function scrollReveal(node: HTMLElement, opts?: ScrollRevealOptions): {
|
|
27
|
+
destroy?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
destroy(): void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { animateMini, inView } from 'motion';
|
|
2
|
+
import { cubicBezier } from 'motion-utils';
|
|
3
|
+
/**
|
|
4
|
+
* Svelte action: reveals the element (or its children when stagger > 0) when
|
|
5
|
+
* scrolled into view. Composes with the staggerEntrance ethos — same
|
|
6
|
+
* opacity + translateY arc, same motion tokens.
|
|
7
|
+
*
|
|
8
|
+
* Reduced-motion: jumps to the final (visible) state instantly.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* <div use:scrollReveal>…</div>
|
|
12
|
+
* <ul use:scrollReveal={{ stagger: 60 }}>…</ul>
|
|
13
|
+
*/
|
|
14
|
+
export function scrollReveal(node, opts) {
|
|
15
|
+
if (opts === void 0) { opts = {}; }
|
|
16
|
+
var _a = opts.y, y = _a === void 0 ? 16 : _a, _b = opts.once, once = _b === void 0 ? true : _b, _c = opts.amount, amount = _c === void 0 ? 0.15 : _c, _d = opts.margin, margin = _d === void 0 ? '-10px' : _d, staggerMs = opts.stagger;
|
|
17
|
+
var reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
18
|
+
var targets = staggerMs != null ? Array.from(node.children) : [node];
|
|
19
|
+
if (reduced) {
|
|
20
|
+
for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) {
|
|
21
|
+
var t = targets_1[_i];
|
|
22
|
+
t.style.opacity = '1';
|
|
23
|
+
t.style.transform = 'none';
|
|
24
|
+
}
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
// Prime targets to start state
|
|
28
|
+
for (var _e = 0, targets_2 = targets; _e < targets_2.length; _e++) {
|
|
29
|
+
var t = targets_2[_e];
|
|
30
|
+
t.style.opacity = '0';
|
|
31
|
+
t.style.transform = "translateY(".concat(y, "px)");
|
|
32
|
+
}
|
|
33
|
+
var enterDuration = parseDuration(opts.duration != null
|
|
34
|
+
? "".concat(opts.duration, "ms")
|
|
35
|
+
: getComputedStyle(document.documentElement).getPropertyValue('--motion-enter').trim() || '200ms');
|
|
36
|
+
var glide = parseGlide(getComputedStyle(document.documentElement)
|
|
37
|
+
.getPropertyValue('--motion-glide')
|
|
38
|
+
.trim());
|
|
39
|
+
var stop = inView(node, function () {
|
|
40
|
+
targets.forEach(function (t, i) {
|
|
41
|
+
animateMini(t, { opacity: [0, 1], transform: ["translateY(".concat(y, "px)"), 'translateY(0px)'] }, {
|
|
42
|
+
duration: enterDuration / 1000,
|
|
43
|
+
ease: glide,
|
|
44
|
+
delay: staggerMs != null ? (i * staggerMs) / 1000 : 0
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
if (once)
|
|
48
|
+
stop();
|
|
49
|
+
}, { amount: amount, margin: margin });
|
|
50
|
+
return {
|
|
51
|
+
destroy: function () {
|
|
52
|
+
stop();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function parseDuration(value) {
|
|
57
|
+
if (value.endsWith('ms'))
|
|
58
|
+
return parseFloat(value);
|
|
59
|
+
if (value.endsWith('s'))
|
|
60
|
+
return parseFloat(value) * 1000;
|
|
61
|
+
return 200;
|
|
62
|
+
}
|
|
63
|
+
function parseGlide(css) {
|
|
64
|
+
var m = css.match(/cubic-bezier\(([^)]+)\)/);
|
|
65
|
+
if (m) {
|
|
66
|
+
var _a = m[1].split(',').map(Number), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];
|
|
67
|
+
return cubicBezier(x1, y1, x2, y2);
|
|
68
|
+
}
|
|
69
|
+
return cubicBezier(0.16, 1, 0.3, 1); // --motion-glide fallback
|
|
70
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type CommandItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
group?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
keywords?: string[];
|
|
7
|
+
shortcut?: string[];
|
|
8
|
+
action: () => void;
|
|
9
|
+
};
|
|
10
|
+
type CommandGroup = {
|
|
11
|
+
label: string;
|
|
12
|
+
items: CommandItem[];
|
|
13
|
+
};
|
|
14
|
+
export declare const commandPalette: {
|
|
15
|
+
readonly open: boolean;
|
|
16
|
+
readonly groups: CommandGroup[];
|
|
17
|
+
readonly recentIds: string[];
|
|
18
|
+
registerCommands(groupLabel: string, items: CommandItem[]): void;
|
|
19
|
+
openPalette(): void;
|
|
20
|
+
closePalette(): void;
|
|
21
|
+
runCommand(item: CommandItem): void;
|
|
22
|
+
getRecentItems(): CommandItem[];
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
var RECENT_KEY = 'jatui:cmd-palette:recent';
|
|
11
|
+
var MAX_RECENT = 8;
|
|
12
|
+
function createCommandPaletteStore() {
|
|
13
|
+
var open = $state(false);
|
|
14
|
+
var groups = $state([]);
|
|
15
|
+
var recentIds = $state([]);
|
|
16
|
+
// Load recent from localStorage on first access
|
|
17
|
+
function loadRecent() {
|
|
18
|
+
if (typeof localStorage === 'undefined')
|
|
19
|
+
return;
|
|
20
|
+
try {
|
|
21
|
+
var raw = localStorage.getItem(RECENT_KEY);
|
|
22
|
+
recentIds = raw ? JSON.parse(raw) : [];
|
|
23
|
+
}
|
|
24
|
+
catch (_a) {
|
|
25
|
+
recentIds = [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function saveRecent(ids) {
|
|
29
|
+
if (typeof localStorage === 'undefined')
|
|
30
|
+
return;
|
|
31
|
+
try {
|
|
32
|
+
localStorage.setItem(RECENT_KEY, JSON.stringify(ids));
|
|
33
|
+
}
|
|
34
|
+
catch (_a) {
|
|
35
|
+
// ignore storage errors
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function recordRecent(id) {
|
|
39
|
+
var updated = __spreadArray([id], recentIds.filter(function (r) { return r !== id; }), true).slice(0, MAX_RECENT);
|
|
40
|
+
recentIds = updated;
|
|
41
|
+
saveRecent(updated);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
get open() {
|
|
45
|
+
return open;
|
|
46
|
+
},
|
|
47
|
+
get groups() {
|
|
48
|
+
return groups;
|
|
49
|
+
},
|
|
50
|
+
get recentIds() {
|
|
51
|
+
return recentIds;
|
|
52
|
+
},
|
|
53
|
+
registerCommands: function (groupLabel, items) {
|
|
54
|
+
var existing = groups.find(function (g) { return g.label === groupLabel; });
|
|
55
|
+
if (existing) {
|
|
56
|
+
existing.items = items;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
groups = __spreadArray(__spreadArray([], groups, true), [{ label: groupLabel, items: items }], false);
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
openPalette: function () {
|
|
63
|
+
loadRecent();
|
|
64
|
+
open = true;
|
|
65
|
+
},
|
|
66
|
+
closePalette: function () {
|
|
67
|
+
open = false;
|
|
68
|
+
},
|
|
69
|
+
runCommand: function (item) {
|
|
70
|
+
recordRecent(item.id);
|
|
71
|
+
open = false;
|
|
72
|
+
item.action();
|
|
73
|
+
},
|
|
74
|
+
getRecentItems: function () {
|
|
75
|
+
var allItems = groups.flatMap(function (g) { return g.items; });
|
|
76
|
+
return recentIds
|
|
77
|
+
.map(function (id) { return allItems.find(function (i) { return i.id === id; }); })
|
|
78
|
+
.filter(function (i) { return !!i; });
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export var commandPalette = createCommandPaletteStore();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Global promise-based confirm dialog.
|
|
3
3
|
* Usage: const ok = await showConfirm({ title: '...', body: '...' })
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
var pending = $state(null);
|
|
6
6
|
export function getPending() {
|
|
7
7
|
return pending;
|
|
8
8
|
}
|
|
@@ -11,21 +11,21 @@ export function showConfirm(options) {
|
|
|
11
11
|
if (pending) {
|
|
12
12
|
pending.resolve(false);
|
|
13
13
|
}
|
|
14
|
-
return new Promise((resolve)
|
|
15
|
-
pending = { options, resolve };
|
|
14
|
+
return new Promise(function (resolve) {
|
|
15
|
+
pending = { options: options, resolve: resolve };
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
export function confirmDialog() {
|
|
19
19
|
if (!pending)
|
|
20
20
|
return;
|
|
21
|
-
|
|
21
|
+
var p = pending;
|
|
22
22
|
pending = null;
|
|
23
23
|
p.resolve(true);
|
|
24
24
|
}
|
|
25
25
|
export function cancelDialog() {
|
|
26
26
|
if (!pending)
|
|
27
27
|
return;
|
|
28
|
-
|
|
28
|
+
var p = pending;
|
|
29
29
|
pending = null;
|
|
30
30
|
p.resolve(false);
|
|
31
31
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Usage: const value = await showInput({ title: '...', placeholder: '...' })
|
|
4
4
|
* Returns the typed string if confirmed, null if cancelled.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
var pending = $state(null);
|
|
7
7
|
export function getPendingInput() {
|
|
8
8
|
return pending;
|
|
9
9
|
}
|
|
@@ -12,21 +12,21 @@ export function showInput(options) {
|
|
|
12
12
|
if (pending) {
|
|
13
13
|
pending.resolve(null);
|
|
14
14
|
}
|
|
15
|
-
return new Promise((resolve)
|
|
16
|
-
pending = { options, resolve };
|
|
15
|
+
return new Promise(function (resolve) {
|
|
16
|
+
pending = { options: options, resolve: resolve };
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
export function submitInput(value) {
|
|
20
20
|
if (!pending)
|
|
21
21
|
return;
|
|
22
|
-
|
|
22
|
+
var p = pending;
|
|
23
23
|
pending = null;
|
|
24
24
|
p.resolve(value);
|
|
25
25
|
}
|
|
26
26
|
export function cancelInput() {
|
|
27
27
|
if (!pending)
|
|
28
28
|
return;
|
|
29
|
-
|
|
29
|
+
var p = pending;
|
|
30
30
|
pending = null;
|
|
31
31
|
p.resolve(null);
|
|
32
32
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ToastType = 'info' | 'success' | 'warning' | 'error';
|
|
2
|
+
export type ToastOptions = {
|
|
3
|
+
type?: ToastType;
|
|
4
|
+
message: string;
|
|
5
|
+
action?: {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
};
|
|
9
|
+
durationMs?: number;
|
|
10
|
+
onUndo?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type Toast = {
|
|
13
|
+
id: number;
|
|
14
|
+
type: ToastType;
|
|
15
|
+
message: string;
|
|
16
|
+
action?: {
|
|
17
|
+
label: string;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
};
|
|
20
|
+
durationMs: number;
|
|
21
|
+
onUndo?: () => void;
|
|
22
|
+
};
|
|
23
|
+
export type DismissHandle = {
|
|
24
|
+
dismiss: () => void;
|
|
25
|
+
};
|
|
26
|
+
export declare function getToasts(): Toast[];
|
|
27
|
+
export declare function showToast(options: ToastOptions): DismissHandle;
|
|
28
|
+
export declare function dismissToast(id: number): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
var nextId = 0;
|
|
11
|
+
var toasts = $state([]);
|
|
12
|
+
export function getToasts() {
|
|
13
|
+
return toasts;
|
|
14
|
+
}
|
|
15
|
+
export function showToast(options) {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
var id = ++nextId;
|
|
18
|
+
var toast = {
|
|
19
|
+
id: id,
|
|
20
|
+
type: (_a = options.type) !== null && _a !== void 0 ? _a : 'info',
|
|
21
|
+
message: options.message,
|
|
22
|
+
action: options.action,
|
|
23
|
+
durationMs: (_b = options.durationMs) !== null && _b !== void 0 ? _b : 5000,
|
|
24
|
+
onUndo: options.onUndo
|
|
25
|
+
};
|
|
26
|
+
toasts = __spreadArray(__spreadArray([], toasts, true), [toast], false);
|
|
27
|
+
return {
|
|
28
|
+
dismiss: function () { return dismissToast(id); }
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function dismissToast(id) {
|
|
32
|
+
toasts = toasts.filter(function (t) { return t.id !== id; });
|
|
33
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* jatui motion tokens — the single source for durations and easing curves.
|
|
3
|
+
*
|
|
4
|
+
* Two curves, one rule:
|
|
5
|
+
* --motion-glide the default for everything: entrances, exits, hovers,
|
|
6
|
+
* containers (modals, drawers, panels), color/opacity.
|
|
7
|
+
* --motion-spring single-overshoot (~6%). ONLY for state-confirmation and
|
|
8
|
+
* gesture-release on small elements — toggle settle, chip
|
|
9
|
+
* add/remove, drop settle, toast entrance. Never on hover
|
|
10
|
+
* or other high-frequency interactions, never on
|
|
11
|
+
* containers, never multi-oscillation.
|
|
12
|
+
*
|
|
13
|
+
* Curves adapted from kinetics (https://kinetics.colorion.co, MIT).
|
|
14
|
+
* Policy: shared/craft/animation-discipline.md in the jat repo
|
|
15
|
+
* ("Curve vs spring" + "Surfaces" sections).
|
|
16
|
+
*/
|
|
17
|
+
:root {
|
|
18
|
+
/* Easing */
|
|
19
|
+
--motion-glide: cubic-bezier(0.16, 1, 0.3, 1); /* ease-out-expo family; default */
|
|
20
|
+
--motion-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* single overshoot; confirmation only */
|
|
21
|
+
--motion-standard: cubic-bezier(0.2, 0, 0, 1); /* M3 standard; symmetric moves */
|
|
22
|
+
|
|
23
|
+
/* Duration */
|
|
24
|
+
--motion-instant: 80ms; /* press/hover micro-feedback (50–100ms band) */
|
|
25
|
+
--motion-fast: 150ms; /* default state-confirmation */
|
|
26
|
+
--motion-enter: 200ms; /* entering UI: modals, sheets, dropdowns, toasts */
|
|
27
|
+
--motion-move: 300ms; /* container morphs, cross-panel moves */
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* Global reduced-motion floor: strip motion, keep end states visible.
|
|
32
|
+
* Components should still pair every animation with a static affordance
|
|
33
|
+
* (color, position, label) so the state change survives without motion.
|
|
34
|
+
* Component-local guards remain good practice — not every consumer loads
|
|
35
|
+
* this file — but this is the backstop.
|
|
36
|
+
*/
|
|
37
|
+
@media (prefers-reduced-motion: reduce) {
|
|
38
|
+
*,
|
|
39
|
+
*::before,
|
|
40
|
+
*::after {
|
|
41
|
+
animation-duration: 0.01ms !important;
|
|
42
|
+
animation-iteration-count: 1 !important;
|
|
43
|
+
transition-duration: 0.01ms !important;
|
|
44
|
+
scroll-behavior: auto !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* jatui design tokens — radius, spacing, border.
|
|
3
|
+
*
|
|
4
|
+
* Sibling of motion.css: jatui owns the token layer; DaisyUI theme
|
|
5
|
+
* variables FEED INTO it (never the other way around). Components use
|
|
6
|
+
* --jatui-* vars, so swapping or dropping the underlying theme system
|
|
7
|
+
* is a change to this file, not to every component.
|
|
8
|
+
*
|
|
9
|
+
* Scale source: DESIGN.md (jat repo) `rounded:` / `spacing:` blocks.
|
|
10
|
+
* DaisyUI 5 per-theme radius vars are honored when present; the
|
|
11
|
+
* DESIGN.md values are the fallback.
|
|
12
|
+
*/
|
|
13
|
+
:root {
|
|
14
|
+
/* Radius — DESIGN.md rounded scale */
|
|
15
|
+
--jatui-radius-field: var(--radius-field, 0.25rem); /* inputs, buttons */
|
|
16
|
+
--jatui-radius-selector: var(--radius-selector, 0.375rem); /* badges, chips, pills */
|
|
17
|
+
--jatui-radius-box: var(--radius-box, 0.5rem); /* cards, modals, panels */
|
|
18
|
+
|
|
19
|
+
/* Spacing rhythm — DESIGN.md spacing scale */
|
|
20
|
+
--jatui-space-xs: 2px;
|
|
21
|
+
--jatui-space-sm: 4px;
|
|
22
|
+
--jatui-space-md: 6px;
|
|
23
|
+
--jatui-space-base: 8px;
|
|
24
|
+
--jatui-space-lg: 12px;
|
|
25
|
+
--jatui-space-xl: 16px;
|
|
26
|
+
--jatui-space-2xl: 24px;
|
|
27
|
+
--jatui-space-3xl: 32px;
|
|
28
|
+
|
|
29
|
+
/* Border — depth comes from tonal surfaces + 1px borders, not shadows */
|
|
30
|
+
--jatui-border-w: 1px;
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type GlideOrigin = 'center' | 'top' | 'tr' | 'right' | 'br' | 'bottom' | 'bl' | 'left' | 'tl';
|
|
2
|
+
export interface GlideParams {
|
|
3
|
+
/** Direction the element slides in from. Default 'bottom'. */
|
|
4
|
+
from?: GlideOrigin;
|
|
5
|
+
/** Travel distance in px. Default 16. */
|
|
6
|
+
distance?: number;
|
|
7
|
+
/** Scale factor at the start of the enter (e.g. 0.95). Omit = no scale. */
|
|
8
|
+
scale?: number;
|
|
9
|
+
/** Add motion-blur (blur filter) during travel. Default false. */
|
|
10
|
+
blur?: boolean;
|
|
11
|
+
/** Duration in ms. Default 200. */
|
|
12
|
+
duration?: number;
|
|
13
|
+
/** Delay in ms. Default 0. */
|
|
14
|
+
delay?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Parameterized directional enter/exit transition.
|
|
18
|
+
*
|
|
19
|
+
* One factory replaces ~54 animista keyframe permutations.
|
|
20
|
+
* Works as both `in:` and `out:` — Svelte mirrors the exit automatically.
|
|
21
|
+
*
|
|
22
|
+
* <div in:glide={{ from: 'bottom' }} out:glide={{ from: 'bottom' }}>…</div>
|
|
23
|
+
*
|
|
24
|
+
* Reduced-motion: opacity fade only (no translate, scale, or blur).
|
|
25
|
+
*/
|
|
26
|
+
export declare function glide(node: HTMLElement, params?: GlideParams): {
|
|
27
|
+
delay: number;
|
|
28
|
+
duration: number;
|
|
29
|
+
easing: (t: number) => number;
|
|
30
|
+
css(t: number): string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// direction taxonomy after animista.net (Ana Travas, BSD-2-Clause site license); keyframes re-authored on jatui motion tokens
|
|
2
|
+
/** Map from direction → [dx, dy] unit vector for the entrance travel. */
|
|
3
|
+
var ORIGIN_VECTOR = {
|
|
4
|
+
center: [0, 0],
|
|
5
|
+
top: [0, -1],
|
|
6
|
+
tr: [1, -1],
|
|
7
|
+
right: [1, 0],
|
|
8
|
+
br: [1, 1],
|
|
9
|
+
bottom: [0, 1],
|
|
10
|
+
bl: [-1, 1],
|
|
11
|
+
left: [-1, 0],
|
|
12
|
+
tl: [-1, -1],
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Parameterized directional enter/exit transition.
|
|
16
|
+
*
|
|
17
|
+
* One factory replaces ~54 animista keyframe permutations.
|
|
18
|
+
* Works as both `in:` and `out:` — Svelte mirrors the exit automatically.
|
|
19
|
+
*
|
|
20
|
+
* <div in:glide={{ from: 'bottom' }} out:glide={{ from: 'bottom' }}>…</div>
|
|
21
|
+
*
|
|
22
|
+
* Reduced-motion: opacity fade only (no translate, scale, or blur).
|
|
23
|
+
*/
|
|
24
|
+
export function glide(node, params) {
|
|
25
|
+
if (params === void 0) { params = {}; }
|
|
26
|
+
var _a = params.from, from = _a === void 0 ? 'bottom' : _a, _b = params.distance, distance = _b === void 0 ? 16 : _b, scale = params.scale, _c = params.blur, blur = _c === void 0 ? false : _c, _d = params.duration, duration = _d === void 0 ? 200 : _d, _e = params.delay, delay = _e === void 0 ? 0 : _e;
|
|
27
|
+
var prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
28
|
+
var _f = ORIGIN_VECTOR[from], ux = _f[0], uy = _f[1];
|
|
29
|
+
// Entrance start state — element travels FROM this position TO its natural position
|
|
30
|
+
var tx = prefersReduced ? 0 : ux * distance;
|
|
31
|
+
var ty = prefersReduced ? 0 : uy * distance;
|
|
32
|
+
var s = (!prefersReduced && scale !== undefined) ? scale : 1;
|
|
33
|
+
var blurPx = (!prefersReduced && blur) ? 4 : 0;
|
|
34
|
+
function buildTransform(progress) {
|
|
35
|
+
// progress goes 0 → 1 on enter; Svelte reverses for exit
|
|
36
|
+
var invP = 1 - progress;
|
|
37
|
+
var x = tx * invP;
|
|
38
|
+
var y = ty * invP;
|
|
39
|
+
var sc = 1 - (1 - s) * invP;
|
|
40
|
+
var b = blurPx * invP;
|
|
41
|
+
var t = "translate(".concat(x, "px, ").concat(y, "px)");
|
|
42
|
+
if (s !== 1)
|
|
43
|
+
t += " scale(".concat(sc, ")");
|
|
44
|
+
var filter = b > 0 ? "blur(".concat(b.toFixed(1), "px)") : '';
|
|
45
|
+
return { transform: t, filter: filter };
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
delay: delay,
|
|
49
|
+
duration: duration,
|
|
50
|
+
easing: function (t) { return t; }, // easing applied via CSS var below
|
|
51
|
+
css: function (t) {
|
|
52
|
+
// t: 0 = start, 1 = end (for `in:`; Svelte inverts for `out:`)
|
|
53
|
+
var _a = buildTransform(t), transform = _a.transform, filter = _a.filter;
|
|
54
|
+
// Apply the glide easing via CSS transition so the CSS var is honored
|
|
55
|
+
return "\n\t\t\t\topacity: ".concat(t, ";\n\t\t\t\ttransform: ").concat(transform, ";\n\t\t\t\t").concat(filter ? "filter: ".concat(filter, ";") : '', "\n\t\t\t\ttransition-timing-function: var(--motion-glide, cubic-bezier(0.16, 1, 0.3, 1));\n\t\t\t");
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
package/dist/types/booking.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Booking System Types
|
|
2
2
|
// Generic types for scheduling/booking UI components
|
|
3
3
|
// Day of week helpers
|
|
4
|
-
export
|
|
4
|
+
export var DAYS_OF_WEEK = [
|
|
5
5
|
'Sunday',
|
|
6
6
|
'Monday',
|
|
7
7
|
'Tuesday',
|
|
@@ -10,14 +10,14 @@ export const DAYS_OF_WEEK = [
|
|
|
10
10
|
'Friday',
|
|
11
11
|
'Saturday'
|
|
12
12
|
];
|
|
13
|
-
export
|
|
13
|
+
export var DAYS_SHORT = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
14
14
|
// Location type display
|
|
15
|
-
export
|
|
15
|
+
export var LOCATION_LABELS = {
|
|
16
16
|
remote: 'Video Call',
|
|
17
17
|
phone: 'Phone Call',
|
|
18
18
|
in_person: 'In Person'
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export var LOCATION_ICONS = {
|
|
21
21
|
remote: 'video',
|
|
22
22
|
phone: 'phone',
|
|
23
23
|
in_person: 'map-pin'
|
package/dist/types/comments.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// Threading is ONE level deep on the data side: a comment is either
|
|
7
7
|
// top-level (`parent_id === null`) or a single-level reply. The UI renders
|
|
8
8
|
// this as two visual levels (a comment and its replies).
|
|
9
|
-
export
|
|
9
|
+
export var COMMENT_ENTITY_TYPES = [
|
|
10
10
|
'project',
|
|
11
11
|
'invoice',
|
|
12
12
|
'contract',
|
|
@@ -16,7 +16,7 @@ export const COMMENT_ENTITY_TYPES = [
|
|
|
16
16
|
'milestone',
|
|
17
17
|
'contract_term'
|
|
18
18
|
];
|
|
19
|
-
export
|
|
19
|
+
export var COMMENT_VISIBILITIES = [
|
|
20
20
|
'internal',
|
|
21
21
|
'client'
|
|
22
22
|
];
|