@prosary/nuxt 0.0.3 → 0.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.
- package/.dist/{module.d.mts → module.d.ts} +1 -1
- package/.dist/{module.mjs → module.js} +3 -15
- package/.dist/runtime/{client.d.mts → client.d.ts} +1 -1
- package/.dist/runtime/{client.mjs → client.js} +3 -3
- package/.dist/runtime/{composable.d.mts → composable.d.ts} +2 -2
- package/.dist/runtime/{composable.mjs → composable.js} +1 -1
- package/.dist/runtime/{document.d.mts → document.d.ts} +1 -1
- package/.dist/runtime/{plugin.d.mts → plugin.d.ts} +1 -1
- package/.dist/runtime/{plugin.mjs → plugin.js} +1 -1
- package/.dist/runtime/{store.d.mts → store.d.ts} +1 -1
- package/.dist/runtime/{store.mjs → store.js} +1 -1
- package/package.json +13 -13
- /package/.dist/_chunks/libs/@types/{hast.d.mts → hast.d.ts} +0 -0
- /package/.dist/{config.d.mts → config.d.ts} +0 -0
- /package/.dist/{config.mjs → config.js} +0 -0
- /package/.dist/{constant.d.mts → constant.d.ts} +0 -0
- /package/.dist/{constant.mjs → constant.js} +0 -0
- /package/.dist/runtime/{document.mjs → document.js} +0 -0
- /package/.dist/runtime/{negotiate.d.mts → negotiate.d.ts} +0 -0
- /package/.dist/runtime/{negotiate.mjs → negotiate.js} +0 -0
- /package/.dist/runtime/server/{content.d.mts → content.d.ts} +0 -0
- /package/.dist/runtime/server/{content.mjs → content.js} +0 -0
- /package/.dist/runtime/{side.d.mts → side.d.ts} +0 -0
- /package/.dist/runtime/{side.mjs → side.js} +0 -0
- /package/.dist/runtime/{types.d.mts → types.d.ts} +0 -0
- /package/.dist/runtime/{types.mjs → types.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONTENT, CONTENT_URL, MODULES } from "./constant.
|
|
1
|
+
import { CONTENT, CONTENT_URL, MODULES } from "./constant.js";
|
|
2
2
|
import { addComponent, addImports, addPlugin, addServerHandler, addTemplate, createResolver, defineNuxtModule, directoryToURL, tryResolveModule, useLogger } from "@nuxt/kit";
|
|
3
3
|
import { basename, dirname, extname, isAbsolute, join, resolve } from "node:path";
|
|
4
4
|
import { existsSync, readdirSync, statSync } from "node:fs";
|
|
@@ -125,8 +125,7 @@ const loadSource = async (options, nuxt) => {
|
|
|
125
125
|
var module_default = defineNuxtModule({
|
|
126
126
|
meta: {
|
|
127
127
|
name: "prosary",
|
|
128
|
-
configKey: "prosary"
|
|
129
|
-
compatibility: { nuxt: ">=4.5.0" }
|
|
128
|
+
configKey: "prosary"
|
|
130
129
|
},
|
|
131
130
|
setup: async (options, nuxt) => {
|
|
132
131
|
const resolver = createResolver(import.meta.url);
|
|
@@ -172,20 +171,9 @@ var module_default = defineNuxtModule({
|
|
|
172
171
|
write: true,
|
|
173
172
|
getContents: () => file.contents
|
|
174
173
|
});
|
|
175
|
-
const document = resolve(nuxt.options.buildDir, MODULES, "document");
|
|
176
|
-
addTemplate({
|
|
177
|
-
filename: `${MODULES}/document.mjs`,
|
|
178
|
-
write: true,
|
|
179
|
-
getContents: () => `export { default } from ${JSON.stringify(files.document)};\n`
|
|
180
|
-
});
|
|
181
|
-
addTemplate({
|
|
182
|
-
filename: `${MODULES}/document.d.ts`,
|
|
183
|
-
write: true,
|
|
184
|
-
getContents: () => `export { default } from ${JSON.stringify(files.document.replace(/\.ts$/, ""))};\n`
|
|
185
|
-
});
|
|
186
174
|
addComponent({
|
|
187
175
|
name: "Prose",
|
|
188
|
-
filePath:
|
|
176
|
+
filePath: files.document
|
|
189
177
|
});
|
|
190
178
|
addPlugin({ src: files.plugin });
|
|
191
179
|
addImports([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppProsary, ProsaryNuxtApp, SetLocale } from "./types.
|
|
1
|
+
import { AppProsary, ProsaryNuxtApp, SetLocale } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Builds the app's prosary service over reactive state: the selection in
|
|
4
4
|
* {@link accessProsary}'s `useState`, and the active locale's messages in a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { negotiate } from "./negotiate.
|
|
2
|
-
import { onServer } from "./side.
|
|
3
|
-
import { accessProsary } from "./store.
|
|
1
|
+
import { negotiate } from "./negotiate.js";
|
|
2
|
+
import { onServer } from "./side.js";
|
|
3
|
+
import { accessProsary } from "./store.js";
|
|
4
4
|
import { shallowRef } from "vue";
|
|
5
5
|
import { useRequestHeaders } from "#imports";
|
|
6
6
|
import { contract } from "#build/prosary/index.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppProsary, AppProsaryDocument, AppProsaryLocale, AppProsaryResolver, SetLocale } from "./types.
|
|
2
|
-
import { Root } from "../_chunks/libs/@types/hast.
|
|
1
|
+
import { AppProsary, AppProsaryDocument, AppProsaryLocale, AppProsaryResolver, SetLocale } from "./types.js";
|
|
2
|
+
import { Root } from "../_chunks/libs/@types/hast.js";
|
|
3
3
|
import { ComputedRef } from "vue";
|
|
4
4
|
/**
|
|
5
5
|
* Composable for the app's prosary service: the formatting helpers
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONVENTION_COOKIE, LOCALE_COOKIE, TIME_ZONE_COOKIE } from "../constant.
|
|
1
|
+
import { CONVENTION_COOKIE, LOCALE_COOKIE, TIME_ZONE_COOKIE } from "../constant.js";
|
|
2
2
|
import { useCookie, useState } from "#imports";
|
|
3
3
|
import { contract } from "#build/prosary/index.mjs";
|
|
4
4
|
const accessProsary = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosary/nuxt",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Nuxt module for prosary — builds the app's messages, loads one locale per visitor, and provides `$t`",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
"directory": "integrations/nuxt"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "./.dist/module.
|
|
13
|
-
"types": "./.dist/module.d.
|
|
12
|
+
"main": "./.dist/module.js",
|
|
13
|
+
"types": "./.dist/module.d.ts",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./.dist/module.d.
|
|
17
|
-
"import": "./.dist/module.
|
|
16
|
+
"types": "./.dist/module.d.ts",
|
|
17
|
+
"import": "./.dist/module.js"
|
|
18
18
|
},
|
|
19
19
|
"./config": {
|
|
20
|
-
"types": "./.dist/config.d.
|
|
21
|
-
"import": "./.dist/config.
|
|
20
|
+
"types": "./.dist/config.d.ts",
|
|
21
|
+
"import": "./.dist/config.js"
|
|
22
22
|
},
|
|
23
23
|
"./constant": {
|
|
24
|
-
"types": "./.dist/constant.d.
|
|
25
|
-
"import": "./.dist/constant.
|
|
24
|
+
"types": "./.dist/constant.d.ts",
|
|
25
|
+
"import": "./.dist/constant.js"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"@nuxt/kit": "^4.5.0",
|
|
33
33
|
"@types/hast": "^3.0.5",
|
|
34
34
|
"vue": "^3.5.35",
|
|
35
|
-
"@prosary/vue": "0.0.
|
|
36
|
-
"prosary": "0.0.
|
|
35
|
+
"@prosary/vue": "0.0.5",
|
|
36
|
+
"prosary": "0.0.5"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@prosary/kit": "0.0.
|
|
39
|
+
"@prosary/kit": "0.0.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependenciesMeta": {
|
|
42
42
|
"@prosary/kit": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@nuxt/schema": "^4.5.0",
|
|
49
49
|
"@types/node": "^25.9.9",
|
|
50
50
|
"nuxt": "^4.5.0",
|
|
51
|
-
"@prosary/kit": "0.0.
|
|
51
|
+
"@prosary/kit": "0.0.5"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "obuild",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|