nuxt-nightly 4.2.0-29354591.74ca73ca → 4.2.0-29354707.56a257a7
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.
|
@@ -17,11 +17,12 @@ export interface NuxtTimeProps {
|
|
|
17
17
|
calendar?: string;
|
|
18
18
|
dayPeriod?: 'narrow' | 'short' | 'long';
|
|
19
19
|
numberingSystem?: string;
|
|
20
|
-
numeric?: 'always' | 'auto';
|
|
21
20
|
dateStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
22
21
|
timeStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
23
22
|
hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
|
|
24
23
|
relative?: boolean;
|
|
24
|
+
numeric?: 'always' | 'auto';
|
|
25
|
+
relativeStyle?: 'long' | 'short' | 'narrow';
|
|
25
26
|
title?: boolean | string;
|
|
26
27
|
}
|
|
27
28
|
declare global {
|
|
@@ -21,11 +21,12 @@ const props = defineProps({
|
|
|
21
21
|
calendar: { type: String, required: false },
|
|
22
22
|
dayPeriod: { type: String, required: false },
|
|
23
23
|
numberingSystem: { type: String, required: false },
|
|
24
|
-
numeric: { type: String, required: false },
|
|
25
24
|
dateStyle: { type: String, required: false },
|
|
26
25
|
timeStyle: { type: String, required: false },
|
|
27
26
|
hourCycle: { type: String, required: false },
|
|
28
27
|
relative: { type: Boolean, required: false },
|
|
28
|
+
numeric: { type: String, required: false },
|
|
29
|
+
relativeStyle: { type: String, required: false },
|
|
29
30
|
title: { type: [Boolean, String], required: false }
|
|
30
31
|
});
|
|
31
32
|
const el = getCurrentInstance()?.vnode.el;
|
|
@@ -51,9 +52,9 @@ if (import.meta.client && props.relative) {
|
|
|
51
52
|
onBeforeUnmount(() => clearInterval(interval));
|
|
52
53
|
}
|
|
53
54
|
const formatter = computed(() => {
|
|
54
|
-
const { locale: propsLocale, relative, ...rest } = props;
|
|
55
|
+
const { locale: propsLocale, relative, relativeStyle, ...rest } = props;
|
|
55
56
|
if (relative) {
|
|
56
|
-
return new Intl.RelativeTimeFormat(_locale ?? propsLocale, rest);
|
|
57
|
+
return new Intl.RelativeTimeFormat(_locale ?? propsLocale, { ...rest, style: relativeStyle });
|
|
57
58
|
}
|
|
58
59
|
return new Intl.DateTimeFormat(_locale ?? propsLocale, rest);
|
|
59
60
|
});
|
|
@@ -104,7 +105,10 @@ if (import.meta.server) {
|
|
|
104
105
|
const options = {};
|
|
105
106
|
for (const name of el2.getAttributeNames()) {
|
|
106
107
|
if (name.startsWith("data-")) {
|
|
107
|
-
|
|
108
|
+
let optionName = name.slice(5).split("-").map(toCamelCase).join("");
|
|
109
|
+
if (optionName === "relativeStyle") {
|
|
110
|
+
optionName = "style";
|
|
111
|
+
}
|
|
108
112
|
options[optionName] = el2.getAttribute(name);
|
|
109
113
|
}
|
|
110
114
|
}
|
|
@@ -17,11 +17,12 @@ export interface NuxtTimeProps {
|
|
|
17
17
|
calendar?: string;
|
|
18
18
|
dayPeriod?: 'narrow' | 'short' | 'long';
|
|
19
19
|
numberingSystem?: string;
|
|
20
|
-
numeric?: 'always' | 'auto';
|
|
21
20
|
dateStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
22
21
|
timeStyle?: 'full' | 'long' | 'medium' | 'short';
|
|
23
22
|
hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
|
|
24
23
|
relative?: boolean;
|
|
24
|
+
numeric?: 'always' | 'auto';
|
|
25
|
+
relativeStyle?: 'long' | 'short' | 'narrow';
|
|
25
26
|
title?: boolean | string;
|
|
26
27
|
}
|
|
27
28
|
declare global {
|
package/dist/index.mjs
CHANGED
|
@@ -3831,7 +3831,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3831
3831
|
});
|
|
3832
3832
|
}
|
|
3833
3833
|
|
|
3834
|
-
const version = "4.2.0-
|
|
3834
|
+
const version = "4.2.0-29354707.56a257a7";
|
|
3835
3835
|
|
|
3836
3836
|
function createImportProtectionPatterns(nuxt, options) {
|
|
3837
3837
|
const patterns = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.2.0-
|
|
3
|
+
"version": "4.2.0-29354707.56a257a7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"@dxup/nuxt": "^0.1.0",
|
|
68
68
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
69
69
|
"@nuxt/devtools": "^2.6.5",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.0-
|
|
71
|
-
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.2.0-
|
|
72
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.0-29354707.56a257a7",
|
|
71
|
+
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.2.0-29354707.56a257a7",
|
|
72
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-29354707.56a257a7",
|
|
73
73
|
"@nuxt/telemetry": "^2.6.6",
|
|
74
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.0-
|
|
74
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.0-29354707.56a257a7",
|
|
75
75
|
"@unhead/vue": "^2.0.14",
|
|
76
76
|
"@vue/shared": "^3.5.22",
|
|
77
77
|
"c12": "^3.3.0",
|