@joewinke/jatui 0.2.12 → 0.2.13

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.
Files changed (53) hide show
  1. package/dist/actions/attention.js +21 -13
  2. package/dist/actions/collapse.js +15 -29
  3. package/dist/actions/floating.js +29 -37
  4. package/dist/actions/listNav.js +108 -137
  5. package/dist/actions/railNav.js +72 -89
  6. package/dist/actions/staggerEntrance.js +19 -23
  7. package/dist/actions/tooltip.js +63 -51
  8. package/dist/assets/sounds/error.js +1 -1
  9. package/dist/assets/sounds/notify.js +1 -1
  10. package/dist/assets/sounds/pop.js +1 -1
  11. package/dist/assets/sounds/send.js +1 -1
  12. package/dist/assets/sounds/success.js +1 -1
  13. package/dist/assets/sounds/toggle.js +1 -1
  14. package/dist/components/graph/theme.js +26 -36
  15. package/dist/components/markup.js +59 -62
  16. package/dist/components/session-nav/transcriptModel.js +49 -66
  17. package/dist/components/shell/shell.js +14 -15
  18. package/dist/components/table/flexRender.js +2 -2
  19. package/dist/data/emojis.js +4 -4
  20. package/dist/dnd/autoScroll.js +10 -12
  21. package/dist/dnd/createDndBoard.js +94 -185
  22. package/dist/dnd/draggable.js +15 -23
  23. package/dist/dnd/dropTarget.js +15 -29
  24. package/dist/dnd/types.d.ts +9 -0
  25. package/dist/dnd/types.js +2 -14
  26. package/dist/showcase/generative/intent.js +19 -21
  27. package/dist/showcase/generative/manifest.js +27 -80
  28. package/dist/showcase/scroll/scrollProgress.js +20 -22
  29. package/dist/showcase/scroll/scrollReveal.js +17 -20
  30. package/dist/stores/commandPalette.js +18 -46
  31. package/dist/stores/confirmDialog.js +9 -9
  32. package/dist/stores/inputDialog.js +9 -9
  33. package/dist/stores/toast.js +10 -33
  34. package/dist/transitions/glide.js +29 -25
  35. package/dist/types/booking.js +4 -4
  36. package/dist/types/comments.js +2 -2
  37. package/dist/types/messaging.js +3 -3
  38. package/dist/types/pipeline.js +2 -2
  39. package/dist/utils/currency.js +2 -4
  40. package/dist/utils/daisyuiColors.js +25 -27
  41. package/dist/utils/dateFormatters.js +44 -44
  42. package/dist/utils/googleMapsLoader.js +46 -100
  43. package/dist/utils/mentionParser.js +30 -30
  44. package/dist/utils/phone.js +21 -27
  45. package/dist/utils/phoneFormat.js +9 -9
  46. package/dist/utils/sound.js +27 -78
  47. package/dist/utils/splitText.js +15 -26
  48. package/dist/utils/taskUtils.js +1 -1
  49. package/dist/utils/themeWipe.js +27 -72
  50. package/dist/utils/viewTransition.js +6 -51
  51. package/package.json +7 -3
  52. package/dist/dnd/createDndBoard.test.d.ts +0 -1
  53. package/dist/dnd/createDndBoard.test.js +0 -261
@@ -1,89 +1,37 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- var CACHE = new Map();
1
+ const CACHE = new Map();
38
2
  /**
39
3
  * Fetch and validate the asset manifest for a given assetId.
40
4
  * Returns null if the manifest is missing or malformed.
41
5
  * Results are memoised for the lifetime of the page.
42
6
  */
43
- export function loadManifest(assetId_1) {
44
- return __awaiter(this, arguments, Promise, function (assetId, baseUrl) {
45
- var cacheKey, url, res, data, _a;
46
- var _b;
47
- if (baseUrl === void 0) { baseUrl = ''; }
48
- return __generator(this, function (_c) {
49
- switch (_c.label) {
50
- case 0:
51
- cacheKey = "".concat(baseUrl, "/").concat(assetId);
52
- if (CACHE.has(cacheKey))
53
- return [2 /*return*/, (_b = CACHE.get(cacheKey)) !== null && _b !== void 0 ? _b : null];
54
- _c.label = 1;
55
- case 1:
56
- _c.trys.push([1, 4, , 5]);
57
- url = "".concat(baseUrl, "/gen/").concat(assetId, "/manifest.json");
58
- return [4 /*yield*/, fetch(url)];
59
- case 2:
60
- res = _c.sent();
61
- if (!res.ok) {
62
- CACHE.set(cacheKey, null);
63
- return [2 /*return*/, null];
64
- }
65
- return [4 /*yield*/, res.json()];
66
- case 3:
67
- data = _c.sent();
68
- if (!isValidManifest(data)) {
69
- CACHE.set(cacheKey, null);
70
- return [2 /*return*/, null];
71
- }
72
- CACHE.set(cacheKey, data);
73
- return [2 /*return*/, data];
74
- case 4:
75
- _a = _c.sent();
76
- CACHE.set(cacheKey, null);
77
- return [2 /*return*/, null];
78
- case 5: return [2 /*return*/];
79
- }
80
- });
81
- });
7
+ export async function loadManifest(assetId, baseUrl = '') {
8
+ const cacheKey = `${baseUrl}/${assetId}`;
9
+ if (CACHE.has(cacheKey))
10
+ return CACHE.get(cacheKey) ?? null;
11
+ try {
12
+ const url = `${baseUrl}/gen/${assetId}/manifest.json`;
13
+ const res = await fetch(url);
14
+ if (!res.ok) {
15
+ CACHE.set(cacheKey, null);
16
+ return null;
17
+ }
18
+ const data = await res.json();
19
+ if (!isValidManifest(data)) {
20
+ CACHE.set(cacheKey, null);
21
+ return null;
22
+ }
23
+ CACHE.set(cacheKey, data);
24
+ return data;
25
+ }
26
+ catch {
27
+ CACHE.set(cacheKey, null);
28
+ return null;
29
+ }
82
30
  }
83
31
  function isValidManifest(data) {
84
32
  if (!data || typeof data !== 'object')
85
33
  return false;
86
- var m = data;
34
+ const m = data;
87
35
  return (typeof m.assetId === 'string' &&
88
36
  typeof m.active === 'string' &&
89
37
  Array.isArray(m.variants) &&
@@ -91,7 +39,6 @@ function isValidManifest(data) {
91
39
  m.palette.length > 0);
92
40
  }
93
41
  /** Build the asset base path for a given assetId + hash. */
94
- export function assetPath(assetId, hash, baseUrl) {
95
- if (baseUrl === void 0) { baseUrl = ''; }
96
- return "".concat(baseUrl, "/gen/").concat(assetId, "/").concat(hash);
42
+ export function assetPath(assetId, hash, baseUrl = '') {
43
+ return `${baseUrl}/gen/${assetId}/${hash}`;
97
44
  }
@@ -10,54 +10,52 @@ import { scroll, supportsScrollTimeline } from 'motion';
10
10
  * <div use:scrollProgress style="width: calc(var(--scroll-progress) * 100%)">
11
11
  * <div use:scrollProgress={{ varName: '--depth', container: panelEl }}>
12
12
  */
13
- export function scrollProgress(node, opts) {
14
- if (opts === void 0) { opts = {}; }
15
- var reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
13
+ export function scrollProgress(node, opts = {}) {
14
+ const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
16
15
  if (reduced)
17
16
  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;
17
+ const { varName = '--scroll-progress', container, axis = 'y' } = opts;
19
18
  // Prefer native ScrollTimeline for compositor-thread perf when available
20
19
  if (supportsScrollTimeline() && !container) {
21
20
  try {
22
21
  // @ts-ignore — ScrollTimeline is not in lib.dom yet
23
- var timeline = new ScrollTimeline({ source: document.documentElement, axis: axis });
22
+ const timeline = new ScrollTimeline({ source: document.documentElement, axis });
24
23
  // Animate a dummy MotionValue-style target via WAAPI
25
24
  node.style.setProperty(varName, '0');
26
- var anim_1 = node.animate({ '--jatui-scroll-noop': ['0', '1'] }, {
25
+ const anim = node.animate({ '--jatui-scroll-noop': ['0', '1'] }, {
27
26
  // @ts-ignore
28
- timeline: timeline,
27
+ timeline,
29
28
  fill: 'both'
30
29
  });
31
30
  // 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;
31
+ let rafId;
32
+ const tick = () => {
33
+ if (anim.currentTime != null) {
34
+ const effect = anim.effect;
35
+ const t = effect ? (effect.getComputedTiming().progress ?? 0) : 0;
38
36
  node.style.setProperty(varName, String(t));
39
37
  }
40
- rafId_1 = requestAnimationFrame(tick_1);
38
+ rafId = requestAnimationFrame(tick);
41
39
  };
42
- rafId_1 = requestAnimationFrame(tick_1);
40
+ rafId = requestAnimationFrame(tick);
43
41
  return {
44
- destroy: function () {
45
- cancelAnimationFrame(rafId_1);
46
- anim_1.cancel();
42
+ destroy() {
43
+ cancelAnimationFrame(rafId);
44
+ anim.cancel();
47
45
  node.style.removeProperty(varName);
48
46
  }
49
47
  };
50
48
  }
51
- catch (_c) {
49
+ catch {
52
50
  // fall through to motion scroll()
53
51
  }
54
52
  }
55
53
  // Fallback: motion scroll() — JS-thread but cross-browser
56
- var stop = scroll(function (progress) {
54
+ const stop = scroll((progress) => {
57
55
  node.style.setProperty(varName, String(progress));
58
- }, container ? { container: container, axis: axis } : { axis: axis });
56
+ }, container ? { container, axis } : { axis });
59
57
  return {
60
- destroy: function () {
58
+ destroy() {
61
59
  stop();
62
60
  node.style.removeProperty(varName);
63
61
  }
@@ -11,34 +11,31 @@ import { cubicBezier } from 'motion-utils';
11
11
  * <div use:scrollReveal>…</div>
12
12
  * <ul use:scrollReveal={{ stagger: 60 }}>…</ul>
13
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];
14
+ export function scrollReveal(node, opts = {}) {
15
+ const { y = 16, once = true, amount = 0.15, margin = '-10px', stagger: staggerMs } = opts;
16
+ const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
17
+ const targets = staggerMs != null ? Array.from(node.children) : [node];
19
18
  if (reduced) {
20
- for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) {
21
- var t = targets_1[_i];
19
+ for (const t of targets) {
22
20
  t.style.opacity = '1';
23
21
  t.style.transform = 'none';
24
22
  }
25
23
  return {};
26
24
  }
27
25
  // Prime targets to start state
28
- for (var _e = 0, targets_2 = targets; _e < targets_2.length; _e++) {
29
- var t = targets_2[_e];
26
+ for (const t of targets) {
30
27
  t.style.opacity = '0';
31
- t.style.transform = "translateY(".concat(y, "px)");
28
+ t.style.transform = `translateY(${y}px)`;
32
29
  }
33
- var enterDuration = parseDuration(opts.duration != null
34
- ? "".concat(opts.duration, "ms")
30
+ const enterDuration = parseDuration(opts.duration != null
31
+ ? `${opts.duration}ms`
35
32
  : getComputedStyle(document.documentElement).getPropertyValue('--motion-enter').trim() || '200ms');
36
- var glide = parseGlide(getComputedStyle(document.documentElement)
33
+ const glide = parseGlide(getComputedStyle(document.documentElement)
37
34
  .getPropertyValue('--motion-glide')
38
35
  .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)'] }, {
36
+ const stop = inView(node, () => {
37
+ targets.forEach((t, i) => {
38
+ animateMini(t, { opacity: [0, 1], transform: [`translateY(${y}px)`, 'translateY(0px)'] }, {
42
39
  duration: enterDuration / 1000,
43
40
  ease: glide,
44
41
  delay: staggerMs != null ? (i * staggerMs) / 1000 : 0
@@ -46,9 +43,9 @@ export function scrollReveal(node, opts) {
46
43
  });
47
44
  if (once)
48
45
  stop();
49
- }, { amount: amount, margin: margin });
46
+ }, { amount, margin: margin });
50
47
  return {
51
- destroy: function () {
48
+ destroy() {
52
49
  stop();
53
50
  }
54
51
  };
@@ -61,9 +58,9 @@ function parseDuration(value) {
61
58
  return 200;
62
59
  }
63
60
  function parseGlide(css) {
64
- var m = css.match(/cubic-bezier\(([^)]+)\)/);
61
+ const m = css.match(/cubic-bezier\(([^)]+)\)/);
65
62
  if (m) {
66
- var _a = m[1].split(',').map(Number), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];
63
+ const [x1, y1, x2, y2] = m[1].split(',').map(Number);
67
64
  return cubicBezier(x1, y1, x2, y2);
68
65
  }
69
66
  return cubicBezier(0.16, 1, 0.3, 1); // --motion-glide fallback
@@ -1,35 +1,23 @@
1
1
  /* commandPalette.svelte.js generated by Svelte v5.53.11 */
2
2
  import * as $ from 'svelte/internal/client';
3
3
 
4
- var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
5
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
6
- if (ar || !(i in from)) {
7
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
8
-
9
- ar[i] = from[i];
10
- }
11
- }
12
-
13
- return to.concat(ar || Array.prototype.slice.call(from));
14
- };
15
-
16
- var RECENT_KEY = 'jatui:cmd-palette:recent';
17
- var MAX_RECENT = 8;
4
+ const RECENT_KEY = 'jatui:cmd-palette:recent';
5
+ const MAX_RECENT = 8;
18
6
 
19
7
  function createCommandPaletteStore() {
20
- var open = $.state(false);
21
- var groups = $.state($.proxy([]));
22
- var recentIds = $.state($.proxy([]));
8
+ let open = $.state(false);
9
+ let groups = $.state($.proxy([]));
10
+ let recentIds = $.state($.proxy([]));
23
11
 
24
12
  // Load recent from localStorage on first access
25
13
  function loadRecent() {
26
14
  if (typeof localStorage === 'undefined') return;
27
15
 
28
16
  try {
29
- var raw = localStorage.getItem(RECENT_KEY);
17
+ const raw = localStorage.getItem(RECENT_KEY);
30
18
 
31
19
  $.set(recentIds, raw ? JSON.parse(raw) : [], true);
32
- } catch(_a) {
20
+ } catch {
33
21
  $.set(recentIds, [], true);
34
22
  }
35
23
  }
@@ -39,19 +27,13 @@ function createCommandPaletteStore() {
39
27
 
40
28
  try {
41
29
  localStorage.setItem(RECENT_KEY, JSON.stringify(ids));
42
- } catch(_a) {
30
+ } catch {
43
31
  // ignore storage errors
44
32
  }
45
33
  }
46
34
 
47
35
  function recordRecent(id) {
48
- var updated = __spreadArray(
49
- [id],
50
- $.safe_get(recentIds).filter(function (r) {
51
- return r !== id;
52
- }),
53
- true
54
- ).slice(0, MAX_RECENT);
36
+ const updated = [id, ...$.get(recentIds).filter((r) => r !== id)].slice(0, MAX_RECENT);
55
37
 
56
38
  $.set(recentIds, updated, true);
57
39
  saveRecent(updated);
@@ -59,26 +41,24 @@ function createCommandPaletteStore() {
59
41
 
60
42
  return {
61
43
  get open() {
62
- return $.safe_get(open);
44
+ return $.get(open);
63
45
  },
64
46
 
65
47
  get groups() {
66
- return $.safe_get(groups);
48
+ return $.get(groups);
67
49
  },
68
50
 
69
51
  get recentIds() {
70
- return $.safe_get(recentIds);
52
+ return $.get(recentIds);
71
53
  },
72
54
 
73
55
  registerCommands(groupLabel, items) {
74
- var existing = $.safe_get(groups).find(function (g) {
75
- return g.label === groupLabel;
76
- });
56
+ const existing = $.get(groups).find((g) => g.label === groupLabel);
77
57
 
78
58
  if (existing) {
79
59
  existing.items = items;
80
60
  } else {
81
- $.set(groups, __spreadArray(__spreadArray([], $.safe_get(groups), true), [{ label: groupLabel, items }], false), true);
61
+ $.set(groups, [...$.get(groups), { label: groupLabel, items }], true);
82
62
  }
83
63
  },
84
64
 
@@ -98,19 +78,11 @@ function createCommandPaletteStore() {
98
78
  },
99
79
 
100
80
  getRecentItems() {
101
- var allItems = $.safe_get(groups).flatMap(function (g) {
102
- return g.items;
103
- });
104
-
105
- return $.safe_get(recentIds).map(function (id) {
106
- return allItems.find(function (i) {
107
- return i.id === id;
108
- });
109
- }).filter(function (i) {
110
- return !!i;
111
- });
81
+ const allItems = $.get(groups).flatMap((g) => g.items);
82
+
83
+ return $.get(recentIds).map((id) => allItems.find((i) => i.id === id)).filter((i) => !!i);
112
84
  }
113
85
  };
114
86
  }
115
87
 
116
- export var commandPalette = createCommandPaletteStore();
88
+ export const commandPalette = createCommandPaletteStore();
@@ -1,36 +1,36 @@
1
1
  /* confirmDialog.svelte.js generated by Svelte v5.53.11 */
2
2
  import * as $ from 'svelte/internal/client';
3
3
 
4
- var pending = $.state(null);
4
+ let pending = $.state(null);
5
5
 
6
6
  export function getPending() {
7
- return $.safe_get(pending);
7
+ return $.get(pending);
8
8
  }
9
9
 
10
10
  export function showConfirm(options) {
11
11
  // If a dialog is already open, cancel it first.
12
- if ($.safe_get(pending)) {
13
- $.safe_get(pending).resolve(false);
12
+ if ($.get(pending)) {
13
+ $.get(pending).resolve(false);
14
14
  }
15
15
 
16
- return new Promise(function (resolve) {
16
+ return new Promise((resolve) => {
17
17
  $.set(pending, { options, resolve }, true);
18
18
  });
19
19
  }
20
20
 
21
21
  export function confirmDialog() {
22
- if (!$.safe_get(pending)) return;
22
+ if (!$.get(pending)) return;
23
23
 
24
- var p = $.safe_get(pending);
24
+ const p = $.get(pending);
25
25
 
26
26
  $.set(pending, null);
27
27
  p.resolve(true);
28
28
  }
29
29
 
30
30
  export function cancelDialog() {
31
- if (!$.safe_get(pending)) return;
31
+ if (!$.get(pending)) return;
32
32
 
33
- var p = $.safe_get(pending);
33
+ const p = $.get(pending);
34
34
 
35
35
  $.set(pending, null);
36
36
  p.resolve(false);
@@ -1,36 +1,36 @@
1
1
  /* inputDialog.svelte.js generated by Svelte v5.53.11 */
2
2
  import * as $ from 'svelte/internal/client';
3
3
 
4
- var pending = $.state(null);
4
+ let pending = $.state(null);
5
5
 
6
6
  export function getPendingInput() {
7
- return $.safe_get(pending);
7
+ return $.get(pending);
8
8
  }
9
9
 
10
10
  export function showInput(options) {
11
11
  // If a dialog is already open, cancel it first.
12
- if ($.safe_get(pending)) {
13
- $.safe_get(pending).resolve(null);
12
+ if ($.get(pending)) {
13
+ $.get(pending).resolve(null);
14
14
  }
15
15
 
16
- return new Promise(function (resolve) {
16
+ return new Promise((resolve) => {
17
17
  $.set(pending, { options, resolve }, true);
18
18
  });
19
19
  }
20
20
 
21
21
  export function submitInput(value) {
22
- if (!$.safe_get(pending)) return;
22
+ if (!$.get(pending)) return;
23
23
 
24
- var p = $.safe_get(pending);
24
+ const p = $.get(pending);
25
25
 
26
26
  $.set(pending, null);
27
27
  p.resolve(value);
28
28
  }
29
29
 
30
30
  export function cancelInput() {
31
- if (!$.safe_get(pending)) return;
31
+ if (!$.get(pending)) return;
32
32
 
33
- var p = $.safe_get(pending);
33
+ const p = $.get(pending);
34
34
 
35
35
  $.set(pending, null);
36
36
  p.resolve(null);
@@ -1,53 +1,30 @@
1
1
  /* toast.svelte.js generated by Svelte v5.53.11 */
2
2
  import * as $ from 'svelte/internal/client';
3
3
 
4
- var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
5
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
6
- if (ar || !(i in from)) {
7
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
8
-
9
- ar[i] = from[i];
10
- }
11
- }
12
-
13
- return to.concat(ar || Array.prototype.slice.call(from));
14
- };
15
-
16
- var nextId = 0;
17
- var toasts = $.state($.proxy([]));
4
+ let nextId = 0;
5
+ let toasts = $.state($.proxy([]));
18
6
 
19
7
  export function getToasts() {
20
- return $.safe_get(toasts);
8
+ return $.get(toasts);
21
9
  }
22
10
 
23
11
  export function showToast(options) {
24
- var _a, _b;
25
- var id = ++nextId;
12
+ const id = ++nextId;
26
13
 
27
- var toast = {
14
+ const toast = {
28
15
  id,
29
- type: (_a = options.type) !== null && _a !== void 0 ? _a : 'info',
16
+ type: options.type ?? 'info',
30
17
  message: options.message,
31
18
  action: options.action,
32
- durationMs: (_b = options.durationMs) !== null && _b !== void 0 ? _b : 5000,
19
+ durationMs: options.durationMs ?? 5000,
33
20
  onUndo: options.onUndo
34
21
  };
35
22
 
36
- $.set(toasts, __spreadArray(__spreadArray([], $.safe_get(toasts), true), [toast], false), true);
23
+ $.set(toasts, [...$.get(toasts), toast], true);
37
24
 
38
- return {
39
- dismiss() {
40
- return dismissToast(id);
41
- }
42
- };
25
+ return { dismiss: () => dismissToast(id) };
43
26
  }
44
27
 
45
28
  export function dismissToast(id) {
46
- $.set(
47
- toasts,
48
- $.safe_get(toasts).filter(function (t) {
49
- return t.id !== id;
50
- }),
51
- true
52
- );
29
+ $.set(toasts, $.get(toasts).filter((t) => t.id !== id), true);
53
30
  }
@@ -1,6 +1,6 @@
1
1
  // direction taxonomy after animista.net (Ana Travas, BSD-2-Clause site license); keyframes re-authored on jatui motion tokens
2
2
  /** Map from direction → [dx, dy] unit vector for the entrance travel. */
3
- var ORIGIN_VECTOR = {
3
+ const ORIGIN_VECTOR = {
4
4
  center: [0, 0],
5
5
  top: [0, -1],
6
6
  tr: [1, -1],
@@ -21,38 +21,42 @@ var ORIGIN_VECTOR = {
21
21
  *
22
22
  * Reduced-motion: opacity fade only (no translate, scale, or blur).
23
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];
24
+ export function glide(node, params = {}) {
25
+ const { from = 'bottom', distance = 16, scale, blur = false, duration = 200, delay = 0, } = params;
26
+ const prefersReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
27
+ const [ux, uy] = ORIGIN_VECTOR[from];
29
28
  // 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;
29
+ const tx = prefersReduced ? 0 : ux * distance;
30
+ const ty = prefersReduced ? 0 : uy * distance;
31
+ const s = (!prefersReduced && scale !== undefined) ? scale : 1;
32
+ const blurPx = (!prefersReduced && blur) ? 4 : 0;
34
33
  function buildTransform(progress) {
35
34
  // 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)");
35
+ const invP = 1 - progress;
36
+ const x = tx * invP;
37
+ const y = ty * invP;
38
+ const sc = 1 - (1 - s) * invP;
39
+ const b = blurPx * invP;
40
+ let t = `translate(${x}px, ${y}px)`;
42
41
  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 };
42
+ t += ` scale(${sc})`;
43
+ const filter = b > 0 ? `blur(${b.toFixed(1)}px)` : '';
44
+ return { transform: t, filter };
46
45
  }
47
46
  return {
48
- delay: delay,
49
- duration: duration,
50
- easing: function (t) { return t; }, // easing applied via CSS var below
51
- css: function (t) {
47
+ delay,
48
+ duration,
49
+ easing: (t) => t, // easing applied via CSS var below
50
+ css(t) {
52
51
  // t: 0 = start, 1 = end (for `in:`; Svelte inverts for `out:`)
53
- var _a = buildTransform(t), transform = _a.transform, filter = _a.filter;
52
+ const { transform, filter } = buildTransform(t);
54
53
  // 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");
54
+ return `
55
+ opacity: ${t};
56
+ transform: ${transform};
57
+ ${filter ? `filter: ${filter};` : ''}
58
+ transition-timing-function: var(--motion-glide, cubic-bezier(0.16, 1, 0.3, 1));
59
+ `;
56
60
  },
57
61
  };
58
62
  }
@@ -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 var DAYS_OF_WEEK = [
4
+ export const DAYS_OF_WEEK = [
5
5
  'Sunday',
6
6
  'Monday',
7
7
  'Tuesday',
@@ -10,14 +10,14 @@ export var DAYS_OF_WEEK = [
10
10
  'Friday',
11
11
  'Saturday'
12
12
  ];
13
- export var DAYS_SHORT = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
13
+ export const DAYS_SHORT = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
14
14
  // Location type display
15
- export var LOCATION_LABELS = {
15
+ export const LOCATION_LABELS = {
16
16
  remote: 'Video Call',
17
17
  phone: 'Phone Call',
18
18
  in_person: 'In Person'
19
19
  };
20
- export var LOCATION_ICONS = {
20
+ export const LOCATION_ICONS = {
21
21
  remote: 'video',
22
22
  phone: 'phone',
23
23
  in_person: 'map-pin'