@citruslime/ui 5.0.0-beta.0 → 5.0.0-beta.10

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.
@@ -44,6 +44,24 @@ export declare function getClampedDateValue(minDate: string | null, maxDate: str
44
44
  * @returns True if the locale uses 24-hour format, false otherwise.
45
45
  */
46
46
  export declare function is24HourFormat(locale: string): boolean;
47
+ /**
48
+ * Scans a formatted date/time string and returns the character ranges of each
49
+ * logical segment (year, month, day, hour, minute, AM/PM indicator).
50
+ *
51
+ * The detection is purely value-based — no mask or locale knowledge is required.
52
+ * Segments are identified as either runs of digits or an AM/PM indicator
53
+ * (`AM`, `PM`, `am`, `pm`, `a.m.`, `p.m.`, etc.). Everything else
54
+ * (separators such as `/`, `-`, `:`, `,`, spaces) is ignored.
55
+ *
56
+ * @param value - The formatted date/time string currently shown in the input.
57
+ * @returns An array of `{ start, end }` ranges (end is exclusive, matching
58
+ * `setSelectionRange` conventions). Returns an empty array when
59
+ * `value` is empty or no segments are found.
60
+ */
61
+ export declare function getInputSegmentsFromValue(value: string): {
62
+ start: number;
63
+ end: number;
64
+ }[];
47
65
  /**
48
66
  * Generate a date picker mask to be used in V-Calendar components.
49
67
  *
@@ -1,5 +1,5 @@
1
1
  import type { DateFormats, NumberFormats, Messages } from './types';
2
- export declare const i18n: import("vue-i18n").I18n<Record<string, Messages>, Record<string, DateFormats>, Record<string, NumberFormats>, string, true>;
2
+ export declare const i18n: import("vue-i18n").I18n<Record<string, Messages>, Record<string, DateFormats>, Record<string, NumberFormats>, string, false>;
3
3
  /**
4
4
  * Sets the messages for the locale.
5
5
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@citruslime/ui",
3
3
  "type": "module",
4
- "version": "5.0.0-beta.0",
4
+ "version": "5.0.0-beta.10",
5
5
  "author": {
6
6
  "name": "Citrus-Lime Ltd",
7
7
  "url": "https://citruslime.com"
@@ -22,24 +22,20 @@
22
22
  "types": "./dist/main.d.ts",
23
23
  "exports": {
24
24
  ".": {
25
- "development": "./src/main.ts",
26
25
  "import": "./dist/citrus-lime-ui.js",
27
26
  "types": "./dist/main.d.ts"
28
27
  },
29
28
  "./component-resolver": {
30
- "development": "./src/utils/component-resolver.ts",
31
- "module-sync": "./src/utils/component-resolver.ts",
32
29
  "import": "./dist/component-resolver.js",
33
30
  "types": "./dist/utils/component-resolver.d.ts"
34
31
  },
35
32
  "./style": {
36
- "development": "./src/main.css",
37
33
  "default": "./dist/ui.css"
38
34
  }
39
35
  },
40
36
  "dependencies": {
41
- "@citruslime/utils": "3.0.0-beta.0",
42
- "@citruslime/vue-utils": "3.0.0-beta.0",
37
+ "@citruslime/utils": "3.0.0-beta.5",
38
+ "@citruslime/vue-utils": "3.0.0-beta.5",
43
39
  "@iconify/vue": "^5.0.0",
44
40
  "@popperjs/core": "^2.11.8",
45
41
  "@tailwindcss/postcss": "^4.2.0",
@@ -79,7 +75,7 @@
79
75
  "vue-tsc": "^3.2.5"
80
76
  },
81
77
  "scripts": {
82
- "build": "run-p build-only build-types",
78
+ "build": "run-s build-only build-types",
83
79
  "build-only": "vite build",
84
80
  "build-types": "vue-tsc -p ./tsconfig.d.json",
85
81
  "lint": "eslint . --fix --cache && stylelint **/*.{css,vue} --fix --cache",