nuxt-nightly 4.2.0-29351098.ba0dfebc → 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.
@@ -21,6 +21,8 @@ export interface NuxtTimeProps {
21
21
  timeStyle?: 'full' | 'long' | 'medium' | 'short';
22
22
  hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
23
23
  relative?: boolean;
24
+ numeric?: 'always' | 'auto';
25
+ relativeStyle?: 'long' | 'short' | 'narrow';
24
26
  title?: boolean | string;
25
27
  }
26
28
  declare global {
@@ -25,6 +25,8 @@ const props = defineProps({
25
25
  timeStyle: { type: String, required: false },
26
26
  hourCycle: { type: String, required: false },
27
27
  relative: { type: Boolean, required: false },
28
+ numeric: { type: String, required: false },
29
+ relativeStyle: { type: String, required: false },
28
30
  title: { type: [Boolean, String], required: false }
29
31
  });
30
32
  const el = getCurrentInstance()?.vnode.el;
@@ -50,9 +52,9 @@ if (import.meta.client && props.relative) {
50
52
  onBeforeUnmount(() => clearInterval(interval));
51
53
  }
52
54
  const formatter = computed(() => {
53
- const { locale: propsLocale, relative, ...rest } = props;
55
+ const { locale: propsLocale, relative, relativeStyle, ...rest } = props;
54
56
  if (relative) {
55
- return new Intl.RelativeTimeFormat(_locale ?? propsLocale, rest);
57
+ return new Intl.RelativeTimeFormat(_locale ?? propsLocale, { ...rest, style: relativeStyle });
56
58
  }
57
59
  return new Intl.DateTimeFormat(_locale ?? propsLocale, rest);
58
60
  });
@@ -103,7 +105,10 @@ if (import.meta.server) {
103
105
  const options = {};
104
106
  for (const name of el2.getAttributeNames()) {
105
107
  if (name.startsWith("data-")) {
106
- const optionName = name.slice(5).split("-").map(toCamelCase).join("");
108
+ let optionName = name.slice(5).split("-").map(toCamelCase).join("");
109
+ if (optionName === "relativeStyle") {
110
+ optionName = "style";
111
+ }
107
112
  options[optionName] = el2.getAttribute(name);
108
113
  }
109
114
  }
@@ -21,6 +21,8 @@ export interface NuxtTimeProps {
21
21
  timeStyle?: 'full' | 'long' | 'medium' | 'short';
22
22
  hourCycle?: 'h11' | 'h12' | 'h23' | 'h24';
23
23
  relative?: boolean;
24
+ numeric?: 'always' | 'auto';
25
+ relativeStyle?: 'long' | 'short' | 'narrow';
24
26
  title?: boolean | string;
25
27
  }
26
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-29351098.ba0dfebc";
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-29351098.ba0dfebc",
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-29351098.ba0dfebc",
71
- "@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.2.0-29351098.ba0dfebc",
72
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.0-29351098.ba0dfebc",
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-29351098.ba0dfebc",
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",