@octans/ui 1.6.1 → 1.7.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/dist/components/FileInput/FileInput.vue.d.ts +6 -0
- package/dist/components/FileInput/ItemList.vue.d.ts +6 -0
- package/dist/components/Formatter/Formatter.vue.d.ts +28 -0
- package/dist/lib.d.ts +26 -2
- package/dist/ui.js +1255 -1219
- package/dist/ui.umd.js +4 -4
- package/dist/utils/date.d.ts +24 -3
- package/dist/utils/format.d.ts +11 -0
- package/package.json +3 -3
- package/skills/octans-ui/SKILL.md +24 -7
|
@@ -398,6 +398,9 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
398
398
|
timezone: {
|
|
399
399
|
type: StringConstructor;
|
|
400
400
|
};
|
|
401
|
+
inputTimezone: {
|
|
402
|
+
type: StringConstructor;
|
|
403
|
+
};
|
|
401
404
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
402
405
|
[key: string]: any;
|
|
403
406
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -420,6 +423,9 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
420
423
|
timezone: {
|
|
421
424
|
type: StringConstructor;
|
|
422
425
|
};
|
|
426
|
+
inputTimezone: {
|
|
427
|
+
type: StringConstructor;
|
|
428
|
+
};
|
|
423
429
|
}>> & Readonly<{}>, {
|
|
424
430
|
locale: string;
|
|
425
431
|
currency: string;
|
|
@@ -43,6 +43,9 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
43
43
|
timezone: {
|
|
44
44
|
type: StringConstructor;
|
|
45
45
|
};
|
|
46
|
+
inputTimezone: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
};
|
|
46
49
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
47
50
|
[key: string]: any;
|
|
48
51
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -65,6 +68,9 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
65
68
|
timezone: {
|
|
66
69
|
type: StringConstructor;
|
|
67
70
|
};
|
|
71
|
+
inputTimezone: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
};
|
|
68
74
|
}>> & Readonly<{}>, {
|
|
69
75
|
locale: string;
|
|
70
76
|
currency: string;
|
|
@@ -26,6 +26,20 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
26
26
|
timezone: {
|
|
27
27
|
type: StringConstructor;
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* IANA time zone a `value` that names no zone of its own is READ in.
|
|
31
|
+
*
|
|
32
|
+
* `timezone` is the clock the date is shown on; this is the clock it was
|
|
33
|
+
* written on. `'2024-03-15 02:00:00'` straight out of a MySQL `DATETIME`
|
|
34
|
+
* names no instant, so without this it is taken as the viewer's own local
|
|
35
|
+
* time and the same row reads as a different moment in every country.
|
|
36
|
+
*
|
|
37
|
+
* Usually you want `setInputTimezone('UTC')` at app start. This is the
|
|
38
|
+
* per-instance override, for the one feed that disagrees.
|
|
39
|
+
*/
|
|
40
|
+
inputTimezone: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
};
|
|
29
43
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
30
44
|
[key: string]: any;
|
|
31
45
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -54,6 +68,20 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
54
68
|
timezone: {
|
|
55
69
|
type: StringConstructor;
|
|
56
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* IANA time zone a `value` that names no zone of its own is READ in.
|
|
73
|
+
*
|
|
74
|
+
* `timezone` is the clock the date is shown on; this is the clock it was
|
|
75
|
+
* written on. `'2024-03-15 02:00:00'` straight out of a MySQL `DATETIME`
|
|
76
|
+
* names no instant, so without this it is taken as the viewer's own local
|
|
77
|
+
* time and the same row reads as a different moment in every country.
|
|
78
|
+
*
|
|
79
|
+
* Usually you want `setInputTimezone('UTC')` at app start. This is the
|
|
80
|
+
* per-instance override, for the one feed that disagrees.
|
|
81
|
+
*/
|
|
82
|
+
inputTimezone: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
};
|
|
57
85
|
}>> & Readonly<{}>, {
|
|
58
86
|
locale: string;
|
|
59
87
|
currency: string;
|
package/dist/lib.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { format } from './utils/format';
|
|
2
|
-
import { setLocale, setTimezone, getTimezone } from './utils/date';
|
|
2
|
+
import { setLocale, setTimezone, getTimezone, setInputTimezone, getInputTimezone } from './utils/date';
|
|
3
3
|
import { setTheme, toggleTheme, getResolvedTheme, getThemePreference, onThemeChange, persistTheme } from './utils/theme';
|
|
4
4
|
import { translate, setTranslations, addTranslations, setTranslationLocale, getTranslationLocale, getAvailableLocales, TranslationDictionary } from './utils/translate';
|
|
5
5
|
import * as components from './components/all';
|
|
@@ -9,10 +9,32 @@ interface PluginOptions {
|
|
|
9
9
|
translations?: Record<string, TranslationDictionary>;
|
|
10
10
|
/** Locale to activate at install time. Defaults to `'en'`. */
|
|
11
11
|
locale?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Library-wide display time zone to activate at install time, as an IANA id
|
|
14
|
+
* (`'Australia/Sydney'`). Equivalent to calling `setTimezone` yourself.
|
|
15
|
+
*
|
|
16
|
+
* Left unset, dates render in the viewer's own clock. Affects DISPLAY only —
|
|
17
|
+
* a stored value is not reinterpreted. A zone this runtime does not know
|
|
18
|
+
* warns and falls back rather than throwing.
|
|
19
|
+
*/
|
|
20
|
+
timezone?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Time zone that date strings carrying no zone of their own are READ in, as
|
|
23
|
+
* an IANA id — `'UTC'` for the usual case. Equivalent to calling
|
|
24
|
+
* `setInputTimezone` yourself.
|
|
25
|
+
*
|
|
26
|
+
* The companion to `timezone`, and the other half of the same question:
|
|
27
|
+
* `timezone` is the clock dates are SHOWN on, this is the clock they were
|
|
28
|
+
* WRITTEN on. A MySQL `DATETIME` comes back as `'2024-03-15 02:00:00'`,
|
|
29
|
+
* which names no instant, so left unset it is read as the viewer's own local
|
|
30
|
+
* time — and the same stored row then means something different to a reader
|
|
31
|
+
* in Sydney than to one in London, whatever `timezone` says.
|
|
32
|
+
*/
|
|
33
|
+
inputTimezone?: string;
|
|
12
34
|
}
|
|
13
35
|
export * from './components/all';
|
|
14
36
|
export { addCollection, addIcon } from '@iconify/vue';
|
|
15
|
-
export { setTimezone, getTimezone } from './utils/date';
|
|
37
|
+
export { setTimezone, getTimezone, setInputTimezone, getInputTimezone } from './utils/date';
|
|
16
38
|
export { translate, $t, setTranslations, addTranslations, setTranslationLocale, getTranslationLocale, getAvailableLocales, type TranslationDictionary } from './utils/translate';
|
|
17
39
|
export { setTheme, toggleTheme, getResolvedTheme, getThemePreference, onThemeChange, persistTheme, type ThemeType, type ThemePreferenceType } from './utils/theme';
|
|
18
40
|
export { listCustomThemes, getCustomTheme, saveCustomTheme, deleteCustomTheme, applyCustomTheme, clearCustomTheme, restoreCustomTheme, getActiveCustomThemeId, getResolvedTokenValue, exportCustomTheme, importCustomTheme, createThemeId, ThemeImportError, type CustomTheme } from './utils/customTheme';
|
|
@@ -32,6 +54,8 @@ declare const UI: {
|
|
|
32
54
|
t: typeof translate;
|
|
33
55
|
setTimezone: typeof setTimezone;
|
|
34
56
|
getTimezone: typeof getTimezone;
|
|
57
|
+
setInputTimezone: typeof setInputTimezone;
|
|
58
|
+
getInputTimezone: typeof getInputTimezone;
|
|
35
59
|
setTranslations: typeof setTranslations;
|
|
36
60
|
addTranslations: typeof addTranslations;
|
|
37
61
|
setTranslationLocale: typeof setTranslationLocale;
|