@vuetify/v0 1.0.3 → 1.0.5

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 (73) hide show
  1. package/dist/adapter-BCtceV3b.mjs +66 -0
  2. package/dist/{adapter-C5F2huij.d.mts → adapter-Bc0yPSfo.d.mts} +6 -1
  3. package/dist/browser/index.d.ts +23 -7
  4. package/dist/browser/index.js +163 -73
  5. package/dist/components/index.d.mts +1 -1
  6. package/dist/components/index.mjs +1 -1
  7. package/dist/{components-CeyYdes9.mjs → components-OCsY4P1f.mjs} +50 -16
  8. package/dist/composables/index.d.mts +2 -2
  9. package/dist/composables/index.mjs +22 -22
  10. package/dist/{composables-Br-ApSWN.mjs → composables-xhcxXjuE.mjs} +44 -65
  11. package/dist/constants/index.mjs +1 -1
  12. package/dist/{createDataTable-B1uf_rZu.mjs → createDataTable-D38H0Zbp.mjs} +3 -3
  13. package/dist/{createGroup-Czt0x8tf.mjs → createGroup-CjUHFae5.mjs} +1 -1
  14. package/dist/{createRegistry-Cu1WQTyV.mjs → createRegistry-B8VqA-QF.mjs} +1 -1
  15. package/dist/{createSelection-kydb14hZ.mjs → createSelection-BXd5clS0.mjs} +1 -1
  16. package/dist/{createSingle-JWAjGQLk.mjs → createSingle-Bdkfht_B.mjs} +1 -1
  17. package/dist/{createTokens-BD7p5_XB.mjs → createTokens-vgyk_0vA.mjs} +2 -2
  18. package/dist/data-table/index.mjs +1 -1
  19. package/dist/date/index.d.mts +2 -2
  20. package/dist/date/index.mjs +7 -36
  21. package/dist/features/adapters/posthog/index.mjs +1 -1
  22. package/dist/features/index.d.mts +1 -1
  23. package/dist/features/index.mjs +1 -1
  24. package/dist/{globals-XB8xcQFv.mjs → globals-B7ejLnrz.mjs} +1 -1
  25. package/dist/{index-0Wnlny_C.d.mts → index-CrAgM2EJ.d.mts} +5 -3
  26. package/dist/{index-BS_OGRsE.d.mts → index-DY81ptHb.d.mts} +112 -103
  27. package/dist/index.d.mts +3 -3
  28. package/dist/index.mjs +24 -24
  29. package/dist/json/web-types.json +1 -1
  30. package/dist/locale/adapters/index.mjs +1 -1
  31. package/dist/locale/adapters/v0/index.mjs +1 -1
  32. package/dist/locale/index.d.mts +1 -1
  33. package/dist/locale/index.mjs +2 -2
  34. package/dist/logger/adapters/index.mjs +1 -1
  35. package/dist/logger/adapters/v0/index.mjs +1 -1
  36. package/dist/logger/index.d.mts +1 -1
  37. package/dist/logger/index.mjs +2 -2
  38. package/dist/notifications/index.d.mts +1 -1
  39. package/dist/notifications/index.mjs +2 -2
  40. package/dist/palettes/index.d.mts +1 -1
  41. package/dist/permissions/adapters/index.d.mts +1 -1
  42. package/dist/permissions/adapters/v0/index.d.mts +1 -1
  43. package/dist/permissions/index.d.mts +1 -1
  44. package/dist/permissions/index.mjs +1 -1
  45. package/dist/rules/index.d.mts +1 -1
  46. package/dist/rules/index.mjs +1 -1
  47. package/dist/storage/index.d.mts +1 -1
  48. package/dist/storage/index.mjs +1 -1
  49. package/dist/theme/adapters/index.d.mts +1 -1
  50. package/dist/theme/adapters/index.mjs +2 -2
  51. package/dist/theme/adapters/unhead/index.d.mts +1 -1
  52. package/dist/theme/adapters/unhead/index.mjs +1 -1
  53. package/dist/theme/adapters/v0/index.d.mts +1 -1
  54. package/dist/theme/adapters/v0/index.mjs +1 -1
  55. package/dist/theme/index.d.mts +1 -1
  56. package/dist/theme/index.mjs +3 -3
  57. package/dist/{unhead-VVWCVv5Z.mjs → unhead-DxiB3P5p.mjs} +1 -1
  58. package/dist/{useEventListener-DasgNSNh.mjs → useEventListener-BjWJPfYS.mjs} +1 -1
  59. package/dist/{useFeatures-SX-DoCwv.mjs → useFeatures-DcgU66KC.mjs} +3 -3
  60. package/dist/{useLocale-C8E7B4Il.mjs → useLocale-B2BAEieU.mjs} +4 -4
  61. package/dist/{useLogger-pEmKLFsd.mjs → useLogger-CXKIZhks.mjs} +2 -2
  62. package/dist/{useNotifications-C6xFiQsD.mjs → useNotifications-Czgbh8Ns.mjs} +3 -3
  63. package/dist/{usePermissions-CCA_18Be.mjs → usePermissions-BkndJNpk.mjs} +2 -2
  64. package/dist/{useRovingFocus-D2_aApXC.mjs → useRovingFocus-Cn96TXRw.mjs} +37 -21
  65. package/dist/{useRules-CWWsE2Xt.mjs → useRules-NzJChxfk.mjs} +2 -2
  66. package/dist/{useStorage-Dd_snxwm.mjs → useStorage-D6xihSHv.mjs} +3 -3
  67. package/dist/{useTheme-8qFLgTvi.mjs → useTheme-BuXEQdPz.mjs} +4 -4
  68. package/dist/utilities/index.mjs +1 -1
  69. package/dist/{v0-DYG-2UmI.mjs → v0-BFMaRqAx.mjs} +1 -1
  70. package/dist/{v0-Bdm1oHXK.mjs → v0-eZcJPyii.mjs} +1 -1
  71. package/dist/{v0-BLhsLm61.mjs → v0-gU93DxmF.mjs} +1 -1
  72. package/package.json +1 -1
  73. package/dist/adapter-Cy7wXVFe.mjs +0 -4
@@ -0,0 +1,66 @@
1
+ //#region src/composables/useDate/weekinfo.ts
2
+ const FRI_REGIONS = "MV";
3
+ const SAT_REGIONS = "AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY";
4
+ const SUN_REGIONS = "AG AS BD BR BS BT BU BW BZ CA CO DM DO ET GT GU HK HN ID IL IN IS JM JP JT KE KH KR LA MH MI MM MO MT MX MZ NI NP NT PA PE PH PK PR PT PU PY PZ RH SA SG SV TH TT TW UM US VE VI WK WS YD YE ZA ZW";
5
+ const MD4_REGIONS = "AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GG GI GP GR HU IE IM IS IT JE LI LT LU MC MQ NL NO PL PT RE RU SE SJ SK SM VA";
6
+ const FW_DAYS = [
7
+ "sun",
8
+ "mon",
9
+ "tue",
10
+ "wed",
11
+ "thu",
12
+ "fri",
13
+ "sat"
14
+ ];
15
+ /** language[-script]-region tag parse for runtimes without Intl.Locale */
16
+ const REGION_PATTERN = /^[a-z]{2,8}(?:-[a-z]{4})?-([a-z]{2}|\d{3})(?:-|$)/i;
17
+ /** Explicit `-u-fw-` week-start keyword on the tag; always wins over region data */
18
+ function deriveFw(locale) {
19
+ const match = /-fw-(sun|mon|tue|wed|thu|fri|sat)(?:-|$)/.exec(locale.toLowerCase());
20
+ return match ? FW_DAYS.indexOf(match[1]) : void 0;
21
+ }
22
+ /**
23
+ * Resolve the region governing week data. A region declared on the tag wins
24
+ * (matching ICU, which honors even unknown declared regions like 'en-ZZ');
25
+ * bare tags resolve their likely region via maximize ('de' → 'DE',
26
+ * 'en' → 'US'), with the world region as the last resort.
27
+ */
28
+ function deriveRegion(locale) {
29
+ const declared = REGION_PATTERN.exec(locale)?.[1]?.toUpperCase();
30
+ if (declared) return declared;
31
+ try {
32
+ return new Intl.Locale(locale).maximize().region ?? "001";
33
+ } catch {
34
+ return "001";
35
+ }
36
+ }
37
+ /** CLDR firstDay lookup, already in v0's 0=Sun...6=Sat convention */
38
+ function deriveFirstDay(region) {
39
+ if (SUN_REGIONS.includes(region)) return 0;
40
+ if (SAT_REGIONS.includes(region)) return 6;
41
+ if (FRI_REGIONS.includes(region)) return 5;
42
+ return 1;
43
+ }
44
+ /** CLDR minimalDays lookup */
45
+ function deriveMinimalDays(region) {
46
+ return MD4_REGIONS.includes(region) ? 4 : 1;
47
+ }
48
+ /**
49
+ * Derive week info for a locale from CLDR data.
50
+ *
51
+ * @param locale An Intl locale string (e.g. 'de-DE', 'en', 'ar-EG', 'en-u-fw-mon').
52
+ * @returns firstDay in v0's 0=Sun...6=Sat convention, plus minimalDays.
53
+ */
54
+ /* @__NO_SIDE_EFFECTS__ */
55
+ function deriveWeekInfo(locale) {
56
+ const region = deriveRegion(locale);
57
+ return {
58
+ firstDay: deriveFw(locale) ?? deriveFirstDay(region),
59
+ minimalDays: deriveMinimalDays(region)
60
+ };
61
+ }
62
+ //#endregion
63
+ //#region src/composables/useDate/adapters/adapter.ts
64
+ var DateAdapter = class {};
65
+ //#endregion
66
+ export { deriveWeekInfo as n, DateAdapter as t };
@@ -84,7 +84,12 @@ declare abstract class DateAdapter<T = Temporal.PlainDateTime> {
84
84
  abstract setMinutes(date: T, minutes: number): T;
85
85
  abstract setSeconds(date: T, seconds: number): T;
86
86
  abstract getWeekdays(weekdayFormat?: 'long' | 'short' | 'narrow'): string[];
87
- abstract getWeekArray(date: T): T[][];
87
+ /**
88
+ * Weeks-of-7 matrix for the month containing `date`, spilling into adjacent
89
+ * months at the edges. With `fixedWeeks`, trailing weeks pad the matrix to a
90
+ * constant 6 rows (42 cells) so calendar grids keep a stable height.
91
+ */
92
+ abstract getWeekArray(date: T, fixedWeeks?: boolean): T[][];
88
93
  /** Get array of months in a year (12 dates, one for each month) */
89
94
  abstract getMonthArray(date: T): T[];
90
95
  /** Get array of years between start and end dates */
@@ -234,6 +234,10 @@ interface AlertDialogContext {
234
234
  id: string;
235
235
  titleId: string;
236
236
  descriptionId: string;
237
+ /** Whether an AlertDialog.Title child is currently mounted */
238
+ hasTitle: ShallowRef<boolean>;
239
+ /** Whether an AlertDialog.Description child is currently mounted */
240
+ hasDescription: ShallowRef<boolean>;
237
241
  isPending: ShallowRef<boolean>;
238
242
  cancelEl: ShallowRef<HTMLElement | null>;
239
243
  open: () => void;
@@ -339,8 +343,8 @@ interface AlertDialogContentSlotProps {
339
343
  'id': string;
340
344
  'role': 'alertdialog';
341
345
  'aria-modal': 'true';
342
- 'aria-labelledby': string;
343
- 'aria-describedby': string;
346
+ 'aria-labelledby': string | undefined;
347
+ 'aria-describedby': string | undefined;
344
348
  'style': {
345
349
  zIndex: number;
346
350
  };
@@ -7115,6 +7119,10 @@ interface DialogContext {
7115
7119
  id: string;
7116
7120
  titleId: string;
7117
7121
  descriptionId: string;
7122
+ /** Whether a Dialog.Title child is currently mounted */
7123
+ hasTitle: ShallowRef<boolean>;
7124
+ /** Whether a Dialog.Description child is currently mounted */
7125
+ hasDescription: ShallowRef<boolean>;
7118
7126
  open: () => void;
7119
7127
  close: () => void;
7120
7128
  }
@@ -7215,8 +7223,8 @@ interface DialogContentSlotProps {
7215
7223
  'id': string;
7216
7224
  'role': 'dialog';
7217
7225
  'aria-modal': 'true';
7218
- 'aria-labelledby': string;
7219
- 'aria-describedby': string;
7226
+ 'aria-labelledby': string | undefined;
7227
+ 'aria-describedby': string | undefined;
7220
7228
  'style': {
7221
7229
  zIndex: number;
7222
7230
  };
@@ -12891,7 +12899,12 @@ declare abstract class DateAdapter<T = Temporal.PlainDateTime> {
12891
12899
  abstract setMinutes(date: T, minutes: number): T;
12892
12900
  abstract setSeconds(date: T, seconds: number): T;
12893
12901
  abstract getWeekdays(weekdayFormat?: 'long' | 'short' | 'narrow'): string[];
12894
- abstract getWeekArray(date: T): T[][];
12902
+ /**
12903
+ * Weeks-of-7 matrix for the month containing `date`, spilling into adjacent
12904
+ * months at the edges. With `fixedWeeks`, trailing weeks pad the matrix to a
12905
+ * constant 6 rows (42 cells) so calendar grids keep a stable height.
12906
+ */
12907
+ abstract getWeekArray(date: T, fixedWeeks?: boolean): T[][];
12895
12908
  /** Get array of months in a year (12 dates, one for each month) */
12896
12909
  abstract getMonthArray(date: T): T[];
12897
12910
  /** Get array of years between start and end dates */
@@ -13317,8 +13330,10 @@ interface DropIndicator {
13317
13330
  rect: DOMRect;
13318
13331
  }
13319
13332
  /**
13320
- * Position passed to drop hooks. `index` and `indicator` are populated for
13321
- * oriented zones; unoriented zones receive only the pointer location.
13333
+ * Position passed to drop hooks. `index` is populated for oriented zones;
13334
+ * unoriented zones receive only the pointer location. `indicator` is absent
13335
+ * when no slot was proposed: an empty zone resolves `index` to `0`, a drop on
13336
+ * a slot flanking the drag's own position resolves to that position (a stay).
13322
13337
  *
13323
13338
  * @example
13324
13339
  * ```ts
@@ -20223,6 +20238,7 @@ interface SelectActivatorSlotProps {
20223
20238
  'aria-disabled': boolean;
20224
20239
  'disabled': true | undefined;
20225
20240
  'tabindex': 0 | undefined;
20241
+ 'data-disabled': true | undefined;
20226
20242
  'data-open': true | undefined;
20227
20243
  'style': Record<string, string>;
20228
20244
  'onClick': () => void;
@@ -135,7 +135,7 @@ const SUPPORTS_MATCH_MEDIA = IN_BROWSER && "matchMedia" in window && typeof wind
135
135
  const SUPPORTS_OBSERVER = IN_BROWSER && "ResizeObserver" in window;
136
136
  const SUPPORTS_INTERSECTION_OBSERVER = IN_BROWSER && "IntersectionObserver" in window;
137
137
  const SUPPORTS_MUTATION_OBSERVER = IN_BROWSER && "MutationObserver" in window;
138
- const version = "1.0.3";
138
+ const version = "1.0.5";
139
139
  /* v8 ignore next -- build-time constant, __DEV__ short-circuits in tests */
140
140
  const __LOGGER_ENABLED__ = false;
141
141
  //#endregion
@@ -915,6 +915,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
915
915
  const cancelEl = shallowRef(null);
916
916
  const titleId = `${id}-title`;
917
917
  const descriptionId = `${id}-description`;
918
+ const hasTitle = shallowRef(false);
919
+ const hasDescription = shallowRef(false);
918
920
  function open() {
919
921
  isOpen.value = true;
920
922
  }
@@ -927,6 +929,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
927
929
  id,
928
930
  titleId,
929
931
  descriptionId,
932
+ hasTitle,
933
+ hasDescription,
930
934
  isPending,
931
935
  cancelEl,
932
936
  open,
@@ -4175,8 +4179,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
4175
4179
  "id": context.id,
4176
4180
  "role": "alertdialog",
4177
4181
  "aria-modal": "true",
4178
- "aria-labelledby": context.titleId,
4179
- "aria-describedby": context.descriptionId,
4182
+ "aria-labelledby": context.hasTitle.value ? context.titleId : void 0,
4183
+ "aria-describedby": context.hasDescription.value ? context.descriptionId : void 0,
4180
4184
  "style": { zIndex: ticket.zIndex.value },
4181
4185
  "onCancel": onCancel,
4182
4186
  "onClose": onClose
@@ -4206,6 +4210,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
4206
4210
  },
4207
4211
  setup(__props) {
4208
4212
  const context = useAlertDialogContext(__props.namespace);
4213
+ onMounted(() => {
4214
+ context.hasDescription.value = true;
4215
+ });
4216
+ onBeforeUnmount(() => {
4217
+ context.hasDescription.value = false;
4218
+ });
4209
4219
  const slotProps = toRef(() => ({ attrs: { id: context.descriptionId } }));
4210
4220
  return (_ctx, _cache) => {
4211
4221
  return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
@@ -4230,6 +4240,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4230
4240
  },
4231
4241
  setup(__props) {
4232
4242
  const context = useAlertDialogContext(__props.namespace);
4243
+ onMounted(() => {
4244
+ context.hasTitle.value = true;
4245
+ });
4246
+ onBeforeUnmount(() => {
4247
+ context.hasTitle.value = false;
4248
+ });
4233
4249
  const slotProps = toRef(() => ({ attrs: { id: context.titleId } }));
4234
4250
  return (_ctx, _cache) => {
4235
4251
  return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
@@ -9784,25 +9800,41 @@ function usePopover(options = {}) {
9784
9800
  "position-anchor": anchor,
9785
9801
  "position-try-fallbacks": positionTry
9786
9802
  }));
9787
- /* v8 ignore start -- browser popover API */
9788
9803
  function attach(el) {
9789
- onMounted(() => {
9790
- const element = toValue(el);
9791
- if (isOpen.value) element?.showPopover?.();
9792
- });
9793
- watch(isOpen, (value) => {
9804
+ let current;
9805
+ function hide(element) {
9806
+ if (!IN_BROWSER || /* @__PURE__ */ isNullOrUndefined(element)) return;
9807
+ try {
9808
+ if (element.matches?.(":popover-open") === false) return;
9809
+ element.hidePopover?.();
9810
+ } catch {}
9811
+ }
9812
+ function sync() {
9813
+ if (!IN_BROWSER) return;
9794
9814
  const element = toValue(el);
9795
- if (!element?.isConnected) return;
9796
- if (value === element.matches?.(":popover-open")) return;
9797
- if (value) element.showPopover?.();
9798
- else element.hidePopover?.();
9815
+ if (!/* @__PURE__ */ isNullOrUndefined(current) && current !== element) hide(current);
9816
+ current = /* @__PURE__ */ isNullOrUndefined(element) ? void 0 : element;
9817
+ if (/* @__PURE__ */ isNullOrUndefined(element)) return;
9818
+ if (!isOpen.value) {
9819
+ hide(element);
9820
+ return;
9821
+ }
9822
+ if (!element.isConnected) return;
9823
+ if (element.matches?.(":popover-open")) return;
9824
+ element.showPopover?.();
9825
+ }
9826
+ watch([isOpen, () => toValue(el)], sync, {
9827
+ immediate: true,
9828
+ flush: "post"
9799
9829
  });
9830
+ onScopeDispose(() => {
9831
+ hide(toValue(el) ?? current);
9832
+ }, true);
9800
9833
  useEventListener(el, "toggle", (e) => {
9801
9834
  if (!toValue(el)?.isConnected) return;
9802
9835
  isOpen.value = e.newState === "open";
9803
9836
  });
9804
9837
  }
9805
- /* v8 ignore stop */
9806
9838
  return {
9807
9839
  isOpen,
9808
9840
  id,
@@ -11308,6 +11340,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
11308
11340
  const id = __props.id ?? /* @__PURE__ */ useId();
11309
11341
  const titleId = `${id}-title`;
11310
11342
  const descriptionId = `${id}-description`;
11343
+ const hasTitle = shallowRef(false);
11344
+ const hasDescription = shallowRef(false);
11311
11345
  function open() {
11312
11346
  isOpen.value = true;
11313
11347
  }
@@ -11319,6 +11353,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
11319
11353
  id,
11320
11354
  titleId,
11321
11355
  descriptionId,
11356
+ hasTitle,
11357
+ hasDescription,
11322
11358
  open,
11323
11359
  close
11324
11360
  });
@@ -11449,8 +11485,8 @@ const _sfc_main$57 = /* @__PURE__ */ defineComponent({
11449
11485
  "id": context.id,
11450
11486
  "role": "dialog",
11451
11487
  "aria-modal": "true",
11452
- "aria-labelledby": context.titleId,
11453
- "aria-describedby": context.descriptionId,
11488
+ "aria-labelledby": context.hasTitle.value ? context.titleId : void 0,
11489
+ "aria-describedby": context.hasDescription.value ? context.descriptionId : void 0,
11454
11490
  "style": { zIndex: ticket.zIndex.value },
11455
11491
  "onCancel": onCancel,
11456
11492
  "onClose": onClose
@@ -11480,6 +11516,12 @@ const _sfc_main$58 = /* @__PURE__ */ defineComponent({
11480
11516
  },
11481
11517
  setup(__props) {
11482
11518
  const context = useDialogContext(__props.namespace);
11519
+ onMounted(() => {
11520
+ context.hasDescription.value = true;
11521
+ });
11522
+ onBeforeUnmount(() => {
11523
+ context.hasDescription.value = false;
11524
+ });
11483
11525
  const slotProps = toRef(() => ({ attrs: { id: context.descriptionId } }));
11484
11526
  return (_ctx, _cache) => {
11485
11527
  return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
@@ -11504,6 +11546,12 @@ const _sfc_main$60 = /* @__PURE__ */ defineComponent({
11504
11546
  },
11505
11547
  setup(__props) {
11506
11548
  const context = useDialogContext(__props.namespace);
11549
+ onMounted(() => {
11550
+ context.hasTitle.value = true;
11551
+ });
11552
+ onBeforeUnmount(() => {
11553
+ context.hasTitle.value = false;
11554
+ });
11507
11555
  const slotProps = toRef(() => ({ attrs: { id: context.titleId } }));
11508
11556
  return (_ctx, _cache) => {
11509
11557
  return openBlock(), createBlock(unref(_sfc_main$9), mergeProps({
@@ -18466,6 +18514,7 @@ const _sfc_main$117 = /* @__PURE__ */ defineComponent({
18466
18514
  "aria-disabled": toValue(context.disabled),
18467
18515
  "disabled": toValue(context.disabled) || void 0,
18468
18516
  "tabindex": __props.as === "button" ? void 0 : 0,
18517
+ "data-disabled": toValue(context.disabled) || void 0,
18469
18518
  "data-open": context.isOpen.value || void 0,
18470
18519
  "style": context.popover.anchorStyles.value,
18471
18520
  onClick,
@@ -21504,7 +21553,8 @@ const _sfc_main$140 = /* @__PURE__ */ defineComponent({
21504
21553
  flexGrow: 0,
21505
21554
  flexShrink: 0,
21506
21555
  flexBasis: `${size.value}%`,
21507
- overflow: "hidden"
21556
+ minWidth: 0,
21557
+ minHeight: 0
21508
21558
  }
21509
21559
  ]
21510
21560
  }), {
@@ -28635,6 +28685,68 @@ const [createBreakpointsContext, createBreakpointsPlugin, useBreakpoints] = crea
28635
28685
  }
28636
28686
  });
28637
28687
  //#endregion
28688
+ //#region src/composables/useDate/weekinfo.ts
28689
+ const FRI_REGIONS = "MV";
28690
+ const SAT_REGIONS = "AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY";
28691
+ const SUN_REGIONS = "AG AS BD BR BS BT BU BW BZ CA CO DM DO ET GT GU HK HN ID IL IN IS JM JP JT KE KH KR LA MH MI MM MO MT MX MZ NI NP NT PA PE PH PK PR PT PU PY PZ RH SA SG SV TH TT TW UM US VE VI WK WS YD YE ZA ZW";
28692
+ const MD4_REGIONS = "AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GG GI GP GR HU IE IM IS IT JE LI LT LU MC MQ NL NO PL PT RE RU SE SJ SK SM VA";
28693
+ const FW_DAYS = [
28694
+ "sun",
28695
+ "mon",
28696
+ "tue",
28697
+ "wed",
28698
+ "thu",
28699
+ "fri",
28700
+ "sat"
28701
+ ];
28702
+ /** language[-script]-region tag parse for runtimes without Intl.Locale */
28703
+ const REGION_PATTERN = /^[a-z]{2,8}(?:-[a-z]{4})?-([a-z]{2}|\d{3})(?:-|$)/i;
28704
+ /** Explicit `-u-fw-` week-start keyword on the tag; always wins over region data */
28705
+ function deriveFw(locale) {
28706
+ const match = /-fw-(sun|mon|tue|wed|thu|fri|sat)(?:-|$)/.exec(locale.toLowerCase());
28707
+ return match ? FW_DAYS.indexOf(match[1]) : void 0;
28708
+ }
28709
+ /**
28710
+ * Resolve the region governing week data. A region declared on the tag wins
28711
+ * (matching ICU, which honors even unknown declared regions like 'en-ZZ');
28712
+ * bare tags resolve their likely region via maximize ('de' → 'DE',
28713
+ * 'en' → 'US'), with the world region as the last resort.
28714
+ */
28715
+ function deriveRegion(locale) {
28716
+ const declared = REGION_PATTERN.exec(locale)?.[1]?.toUpperCase();
28717
+ if (declared) return declared;
28718
+ try {
28719
+ return new Intl.Locale(locale).maximize().region ?? "001";
28720
+ } catch {
28721
+ return "001";
28722
+ }
28723
+ }
28724
+ /** CLDR firstDay lookup, already in v0's 0=Sun...6=Sat convention */
28725
+ function deriveFirstDay(region) {
28726
+ if (SUN_REGIONS.includes(region)) return 0;
28727
+ if (SAT_REGIONS.includes(region)) return 6;
28728
+ if (FRI_REGIONS.includes(region)) return 5;
28729
+ return 1;
28730
+ }
28731
+ /** CLDR minimalDays lookup */
28732
+ function deriveMinimalDays(region) {
28733
+ return MD4_REGIONS.includes(region) ? 4 : 1;
28734
+ }
28735
+ /**
28736
+ * Derive week info for a locale from CLDR data.
28737
+ *
28738
+ * @param locale An Intl locale string (e.g. 'de-DE', 'en', 'ar-EG', 'en-u-fw-mon').
28739
+ * @returns firstDay in v0's 0=Sun...6=Sat convention, plus minimalDays.
28740
+ */
28741
+ /* @__NO_SIDE_EFFECTS__ */
28742
+ function deriveWeekInfo(locale) {
28743
+ const region = deriveRegion(locale);
28744
+ return {
28745
+ firstDay: deriveFw(locale) ?? deriveFirstDay(region),
28746
+ minimalDays: deriveMinimalDays(region)
28747
+ };
28748
+ }
28749
+ //#endregion
28638
28750
  //#region src/composables/useDate/adapters/adapter.ts
28639
28751
  var DateAdapter = class {};
28640
28752
  //#endregion
@@ -28696,19 +28808,6 @@ const defaultLocales = {
28696
28808
  ar: "ar-SA"
28697
28809
  };
28698
28810
  /**
28699
- * Derive firstDayOfWeek from an Intl locale string.
28700
- * Returns 0-6 (0=Sun) or 0 as fallback.
28701
- */
28702
- function deriveFirstDayOfWeek(locale) {
28703
- try {
28704
- const info = new Intl.Locale(locale).getWeekInfo?.();
28705
- /* v8 ignore next -- defensive: getWeekInfo always returns info in Node 22+ */
28706
- return info ? info.firstDay % 7 : 0;
28707
- } catch {
28708
- return 0;
28709
- }
28710
- }
28711
- /**
28712
28811
  * Creates a new date context.
28713
28812
  *
28714
28813
  * @param options Adapter and locale configuration.
@@ -28750,7 +28849,7 @@ function createDate(options) {
28750
28849
  const firstDayOfWeek = computed(() => {
28751
28850
  if (!/* @__PURE__ */ isUndefined(explicitFirstDay)) return explicitFirstDay;
28752
28851
  const loc = locale.value;
28753
- return loc ? deriveFirstDayOfWeek(loc) : 0;
28852
+ return loc ? (/* @__PURE__ */ deriveWeekInfo(loc)).firstDay : 0;
28754
28853
  });
28755
28854
  if (/* @__PURE__ */ instanceExists()) onScopeDispose(watchEffect(() => {
28756
28855
  const loc = locale.value;
@@ -29272,6 +29371,10 @@ var KeyboardAdapter = class extends DragDropAdapter {
29272
29371
  * Pure math for resolving where in an oriented zone a pointer would drop.
29273
29372
  * Internal — consumers rely on the `position.index` / `position.indicator`
29274
29373
  * fields delivered to `onDrop`.
29374
+ *
29375
+ * Assumes rects ascend along the axis (DOM order in normal flow). Reversed
29376
+ * layouts resolve arbitrary slots — always have — and sorting is not the fix:
29377
+ * the slot must stay the child's DOM index for consumers to splice by.
29275
29378
  */
29276
29379
  function resolveDropPosition(point, rects, orientation) {
29277
29380
  if (rects.length === 0) return null;
@@ -29279,49 +29382,19 @@ function resolveDropPosition(point, rects, orientation) {
29279
29382
  const start = orientation === "vertical" ? "top" : "left";
29280
29383
  const end = orientation === "vertical" ? "bottom" : "right";
29281
29384
  const coord = point[axis];
29282
- if (coord < rects[0][start]) return {
29283
- index: 0,
29385
+ let index = rects.length;
29386
+ for (const [at, rect] of rects.entries()) if (coord < rect[start] + (rect[end] - rect[start]) / 2) {
29387
+ index = at;
29388
+ break;
29389
+ }
29390
+ return index === 0 ? {
29391
+ index,
29284
29392
  edge: "before",
29285
29393
  rect: rects[0]
29286
- };
29287
- const last = rects.at(-1);
29288
- if (coord > last[end]) return {
29289
- index: rects.length,
29290
- edge: "after",
29291
- rect: last
29292
- };
29293
- for (const [index, rect] of rects.entries()) if (coord >= rect[start] && coord <= rect[end]) {
29294
- if (coord < rect[start] + (rect[end] - rect[start]) / 2) return {
29295
- index,
29296
- edge: "before",
29297
- rect
29298
- };
29299
- return {
29300
- index: index + 1,
29301
- edge: "after",
29302
- rect
29303
- };
29304
- }
29305
- for (let index = 0; index < rects.length - 1; index++) {
29306
- const a = rects[index];
29307
- const b = rects[index + 1];
29308
- if (coord > a[end] && coord < b[start]) {
29309
- if (coord <= (a[end] + b[start]) / 2) return {
29310
- index: index + 1,
29311
- edge: "after",
29312
- rect: a
29313
- };
29314
- return {
29315
- index: index + 1,
29316
- edge: "before",
29317
- rect: b
29318
- };
29319
- }
29320
- }
29321
- return {
29322
- index: rects.length,
29394
+ } : {
29395
+ index,
29323
29396
  edge: "after",
29324
- rect: last
29397
+ rect: rects[index - 1]
29325
29398
  };
29326
29399
  }
29327
29400
  /**
@@ -29434,7 +29507,11 @@ function useDragDrop(options = {}) {
29434
29507
  });
29435
29508
  const indicator = computed(() => {
29436
29509
  if (!registration.orientation || !isOver.value || !active.value) return null;
29437
- return resolveDropPosition(active.value.current, rects.value, registration.orientation);
29510
+ const resolved = resolveDropPosition(active.value.current, rects.value, registration.orientation);
29511
+ if (!resolved) return null;
29512
+ const from = home(el.value, active.value.id);
29513
+ if (from !== -1 && (resolved.index === from || resolved.index === from + 1)) return null;
29514
+ return resolved;
29438
29515
  });
29439
29516
  const input = {
29440
29517
  ...registration,
@@ -29460,6 +29537,16 @@ function useDragDrop(options = {}) {
29460
29537
  }
29461
29538
  return null;
29462
29539
  }
29540
+ function home(zoneEl, id) {
29541
+ const source = toValue(_draggables.get(id)?.el);
29542
+ if (!zoneEl || !source) return -1;
29543
+ for (let el = source.parentElement; el; el = el.parentElement) {
29544
+ if (!nodes.has(el)) continue;
29545
+ if (el !== zoneEl) return -1;
29546
+ break;
29547
+ }
29548
+ return Array.from(zoneEl.children).findIndex((child) => child.contains(source));
29549
+ }
29463
29550
  function position(zoneId, drag) {
29464
29551
  const zone = _zones.get(zoneId);
29465
29552
  const out = { pointer: drag.current };
@@ -29468,7 +29555,10 @@ function useDragDrop(options = {}) {
29468
29555
  if (resolved) {
29469
29556
  out.index = resolved.index;
29470
29557
  out.indicator = resolved;
29471
- } else out.index = 0;
29558
+ } else {
29559
+ const from = home(toValue(zone.el), drag.id);
29560
+ out.index = from === -1 ? 0 : from;
29561
+ }
29472
29562
  }
29473
29563
  return out;
29474
29564
  }