@zoobzio/nuxt 0.1.2 → 0.1.4
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/README.md +67 -1
- package/app/app.d.ts +14 -0
- package/app/app.vue +4 -8
- package/app/components/accordion.ts +4 -2
- package/app/components/autocomplete.ts +6 -10
- package/app/components/breadcrumb.ts +11 -3
- package/app/components/browser.ts +30 -6
- package/app/components/cell.ts +101 -0
- package/app/components/code.ts +28 -0
- package/app/components/command.ts +19 -1
- package/app/components/date-filters.ts +46 -9
- package/app/components/dialog.ts +13 -0
- package/app/components/directory.ts +10 -3
- package/app/components/editor.ts +8 -4
- package/app/components/fab.ts +9 -0
- package/app/components/facets.ts +14 -4
- package/app/components/form-field.ts +16 -3
- package/app/components/form.ts +20 -2
- package/app/components/hero.ts +7 -1
- package/app/components/keywords.ts +35 -8
- package/app/components/listbox.ts +9 -0
- package/app/components/menu.ts +8 -3
- package/app/components/multi-select.ts +24 -3
- package/app/components/pagination.ts +33 -3
- package/app/components/radio.ts +11 -0
- package/app/components/rich-text.ts +8 -4
- package/app/components/segmented-control.ts +8 -3
- package/app/components/select.ts +13 -2
- package/app/components/table.ts +22 -4
- package/app/components/tabs.ts +7 -3
- package/app/components/tags-input.ts +7 -1
- package/app/components/text.ts +74 -0
- package/app/components/toast.ts +8 -1
- package/app/components/tree.ts +4 -2
- package/app/composables/request.ts +6 -3
- package/app/constants/editor.ts +21 -0
- package/app/error.vue +8 -4
- package/app/factories/browser.ts +9 -2
- package/app/factories/form.ts +15 -6
- package/app/factories/table.ts +17 -4
- package/app/plugins/locale.ts +19 -0
- package/app/types/text.ts +12 -0
- package/app/utils/editor.ts +14 -1
- package/app/utils/text.ts +93 -0
- package/modules/imports/constant.ts +8 -1
- package/nuxt.config.ts +3 -1
- package/package.json +14 -10
package/app/error.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { NuxtError } from "#app";
|
|
3
3
|
|
|
4
|
-
import { clearError } from "#app";
|
|
4
|
+
import { clearError, useNuxtApp } from "#app";
|
|
5
5
|
import { computed } from "vue";
|
|
6
6
|
import {
|
|
7
7
|
ERROR_DEFAULT_STATUS_CODE,
|
|
@@ -14,14 +14,16 @@ const props = defineProps<{
|
|
|
14
14
|
error: NuxtError;
|
|
15
15
|
}>();
|
|
16
16
|
|
|
17
|
+
const { $t: t } = useNuxtApp();
|
|
18
|
+
|
|
17
19
|
const statusCode = computed(
|
|
18
20
|
() => props.error.statusCode ?? ERROR_DEFAULT_STATUS_CODE,
|
|
19
21
|
);
|
|
20
22
|
|
|
21
23
|
const message = computed(() => {
|
|
22
24
|
if (statusCode.value === ERROR_NOT_FOUND_STATUS_CODE)
|
|
23
|
-
return "
|
|
24
|
-
return props.error.message || "
|
|
25
|
+
return t("error.notFound");
|
|
26
|
+
return props.error.message || t("error.unknown");
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
const handleError = () => clearError({ redirect: "/" });
|
|
@@ -31,6 +33,8 @@ const handleError = () => clearError({ redirect: "/" });
|
|
|
31
33
|
<div class="f-error-page">
|
|
32
34
|
<span class="f-error-code">{{ statusCode }}</span>
|
|
33
35
|
<span class="f-error-message">{{ message }}</span>
|
|
34
|
-
<button class="f-error-action" @click="handleError">
|
|
36
|
+
<button class="f-error-action" @click="handleError">
|
|
37
|
+
{{ t("error.home") }}
|
|
38
|
+
</button>
|
|
35
39
|
</div>
|
|
36
40
|
</template>
|
package/app/factories/browser.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { useNuxtApp } from "#app";
|
|
|
5
5
|
import { BrowserService } from "@zoobzio/browser";
|
|
6
6
|
import { accessBrowser } from "../stores/browser";
|
|
7
7
|
import { split } from "../utils/actions";
|
|
8
|
+
import { resolveTexts } from "../utils/text";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Builds the id-scoped composable of a browser. Call it at module scope:
|
|
@@ -12,7 +13,11 @@ import { split } from "../utils/actions";
|
|
|
12
13
|
* the wiring (the fetch and the handlers), and `id` keys everything that
|
|
13
14
|
* follows. Each call of the composable, in setup, builds a service over
|
|
14
15
|
* the id's shared store and relays its domain events onto the app logger and the Nuxt hook
|
|
15
|
-
* bus as `browser:updated` and `browser:navigated`.
|
|
16
|
+
* bus as `browser:updated` and `browser:navigated`. Every text of the
|
|
17
|
+
* config — the columns' and the actions' labels, the root crumb's —
|
|
18
|
+
* resolves through the app's prosary service as the service is built. A
|
|
19
|
+
* config that names no `rootLabel` takes the contract's `browser.root`,
|
|
20
|
+
* so the root crumb reads in the visitor's locale. The machine itself is
|
|
16
21
|
* `@zoobzio/browser`; the Vue browser renders it through its `service`
|
|
17
22
|
* prop.
|
|
18
23
|
*/
|
|
@@ -27,6 +32,7 @@ export const createBrowser = <T>(
|
|
|
27
32
|
const bulk = split(bulkActions);
|
|
28
33
|
const config: Config<T> = {
|
|
29
34
|
...rest,
|
|
35
|
+
rootLabel: rest.rootLabel ?? "browser.root",
|
|
30
36
|
actions: files.descriptors,
|
|
31
37
|
folderActions: folders.descriptors,
|
|
32
38
|
bulkActions: bulk.descriptors,
|
|
@@ -40,8 +46,9 @@ export const createBrowser = <T>(
|
|
|
40
46
|
return (): Service<T> => {
|
|
41
47
|
const nuxt = useNuxtApp();
|
|
42
48
|
const log = nuxt.$logger(id);
|
|
49
|
+
const resolved = resolveTexts(nuxt.$prosary, config);
|
|
43
50
|
const state = accessBrowser<T>(id, initial);
|
|
44
|
-
const service = new BrowserService(id,
|
|
51
|
+
const service = new BrowserService(id, resolved, state, wiring);
|
|
45
52
|
service.on("updated", (event) => {
|
|
46
53
|
log.debug("Browser updated", event);
|
|
47
54
|
nuxt.callHook("browser:updated", event);
|
package/app/factories/form.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FormOptions, UseForm } from "../types/form";
|
|
2
|
-
import type { Actions, Service } from "@zoobzio/form";
|
|
2
|
+
import type { Actions, Config, Service } from "@zoobzio/form";
|
|
3
3
|
|
|
4
4
|
import { useNuxtApp } from "#app";
|
|
5
5
|
import { FormService } from "@zoobzio/form";
|
|
6
6
|
import { accessForm } from "../stores/form";
|
|
7
|
+
import { resolveTexts } from "../utils/text";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Builds the id-scoped composable of a form. Call it at module scope: the
|
|
@@ -11,20 +12,28 @@ import { accessForm } from "../stores/form";
|
|
|
11
12
|
* lifecycle actions and the middleware), and `id` keys everything that
|
|
12
13
|
* follows. Each call of the composable, in setup, builds a service over
|
|
13
14
|
* the id's shared store and relays its domain events onto the app logger and the Nuxt hook
|
|
14
|
-
* bus under the `form:` prefix. The
|
|
15
|
-
*
|
|
15
|
+
* bus under the `form:` prefix. The config's text — each field's label,
|
|
16
|
+
* hint, placeholder and option — resolves through the app's prosary
|
|
17
|
+
* service as the service is built. The `defaults` are the payload's
|
|
18
|
+
* values, data rather than text, and stand as given whatever their keys.
|
|
19
|
+
* The machine itself is `@zoobzio/form`; the Vue form renders it through
|
|
20
|
+
* its `service` prop.
|
|
16
21
|
*/
|
|
17
22
|
export const createForm = <T>(
|
|
18
23
|
id: string,
|
|
19
24
|
options: FormOptions<T>,
|
|
20
25
|
): UseForm<T> => {
|
|
21
|
-
const { init, submit, middleware, initial, ...config } = options;
|
|
26
|
+
const { init, submit, middleware, initial, defaults, ...config } = options;
|
|
22
27
|
const wiring: Actions<T> = { init, submit, middleware };
|
|
23
28
|
return (): Service<T> => {
|
|
24
29
|
const nuxt = useNuxtApp();
|
|
25
30
|
const log = nuxt.$logger(id);
|
|
26
|
-
const
|
|
27
|
-
|
|
31
|
+
const resolved: Config<T> = {
|
|
32
|
+
...resolveTexts(nuxt.$prosary, config),
|
|
33
|
+
...(defaults && { defaults }),
|
|
34
|
+
};
|
|
35
|
+
const state = accessForm(id, resolved, initial);
|
|
36
|
+
const service = new FormService(id, resolved, state, wiring);
|
|
28
37
|
service.on("initialized", (event) => {
|
|
29
38
|
log.debug("Form initialized", event);
|
|
30
39
|
nuxt.callHook("form:initialized", event);
|
package/app/factories/table.ts
CHANGED
|
@@ -2,9 +2,11 @@ import type { TableOptions, UseTable } from "../types/table";
|
|
|
2
2
|
import type { Actions, Config, Service } from "@zoobzio/table";
|
|
3
3
|
|
|
4
4
|
import { useNuxtApp } from "#app";
|
|
5
|
+
import { QUERY_TEXT_KEY, QUERY_TEXT_LITERAL } from "@zoobzio/query";
|
|
5
6
|
import { TableService } from "@zoobzio/table";
|
|
6
7
|
import { accessTable } from "../stores/table";
|
|
7
8
|
import { split } from "../utils/actions";
|
|
9
|
+
import { resolveTexts } from "../utils/text";
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Builds the id-scoped composable of a table. Call it at module scope: the
|
|
@@ -12,8 +14,15 @@ import { split } from "../utils/actions";
|
|
|
12
14
|
* wiring (the fetch and the handlers), and `id` keys everything that
|
|
13
15
|
* follows. Each call of the composable, in setup, builds a service over
|
|
14
16
|
* the id's shared store and relays its domain events onto the app logger and the Nuxt hook
|
|
15
|
-
* bus as `table:updated` and `table:filtered`.
|
|
16
|
-
*
|
|
17
|
+
* bus as `table:updated` and `table:filtered`. Every text of the config —
|
|
18
|
+
* the columns' and the actions' labels, the literals' — resolves through
|
|
19
|
+
* the app's prosary service as the service is built, so a label that is a
|
|
20
|
+
* key of the app's contract reaches the machine — and the search that
|
|
21
|
+
* matches a typed prefix against it — as the visitor reads it. A config
|
|
22
|
+
* that names no literals takes the query's text literal under the
|
|
23
|
+
* contract's `table.text`, so its option reads in the visitor's locale as
|
|
24
|
+
* the search's placeholder does. The machine itself is `@zoobzio/table`;
|
|
25
|
+
* the Vue table renders it through its `service` prop.
|
|
17
26
|
*/
|
|
18
27
|
export const createTable = <T>(
|
|
19
28
|
id: string,
|
|
@@ -24,6 +33,9 @@ export const createTable = <T>(
|
|
|
24
33
|
const bulk = split(bulkActions);
|
|
25
34
|
const config: Config<T> = {
|
|
26
35
|
...rest,
|
|
36
|
+
literals: rest.literals ?? {
|
|
37
|
+
[QUERY_TEXT_KEY]: { ...QUERY_TEXT_LITERAL, label: "table.text" },
|
|
38
|
+
},
|
|
27
39
|
actions: rows.descriptors,
|
|
28
40
|
bulkActions: bulk.descriptors,
|
|
29
41
|
};
|
|
@@ -35,8 +47,9 @@ export const createTable = <T>(
|
|
|
35
47
|
return (): Service<T> => {
|
|
36
48
|
const nuxt = useNuxtApp();
|
|
37
49
|
const log = nuxt.$logger(id);
|
|
38
|
-
const
|
|
39
|
-
const
|
|
50
|
+
const resolved = resolveTexts(nuxt.$prosary, config);
|
|
51
|
+
const state = accessTable(id, resolved, initial);
|
|
52
|
+
const service = new TableService(id, resolved, state, wiring);
|
|
40
53
|
service.on("updated", (event) => {
|
|
41
54
|
log.debug("Table updated", event);
|
|
42
55
|
nuxt.callHook("table:updated", event);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineNuxtPlugin, reloadNuxtApp } from "#app";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Reloads the app when the visitor switches locale. The wrappers resolve
|
|
5
|
+
* text on each render and follow a switch on their own; the services do
|
|
6
|
+
* not, as a factory resolves the labels of its columns, actions and fields
|
|
7
|
+
* once, when the service is built. The prosary module writes the new
|
|
8
|
+
* locale to its cookie before it raises the hook, so the reload renders
|
|
9
|
+
* the app in the locale chosen, from the server on.
|
|
10
|
+
*/
|
|
11
|
+
export default defineNuxtPlugin({
|
|
12
|
+
name: "@zoobzio/nuxt/locale",
|
|
13
|
+
dependsOn: ["prosary"],
|
|
14
|
+
setup: (nuxtApp) => {
|
|
15
|
+
nuxtApp.hook("prosary:locale", () => {
|
|
16
|
+
reloadNuxtApp();
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Contract } from "#build/prosary/index.mjs";
|
|
2
|
+
import type { Message } from "prosary";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A message of the app's contract, as data: its key alone when it takes no
|
|
6
|
+
* values, or the key with its values. `@prosary/nuxt` builds the contract
|
|
7
|
+
* at build time from the prose build the layer names, so inside the layer
|
|
8
|
+
* it is `@zoobzio/prose` and inside an app it is the app's own build, which
|
|
9
|
+
* extends it. What `Text` widens to under the layer, so a column, an
|
|
10
|
+
* action, an item or a field takes any key of the app.
|
|
11
|
+
*/
|
|
12
|
+
export type AppMessage = Message<Contract>;
|
package/app/utils/editor.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IconAlias } from "../types/icon";
|
|
2
|
+
import type { AppMessage } from "../types/text";
|
|
2
3
|
|
|
3
|
-
import { EDITOR_TOOL_ICONS } from "../constants/editor";
|
|
4
|
+
import { EDITOR_TOOL_ICONS, EDITOR_TOOL_TEXT } from "../constants/editor";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* The icon of an editor tool, by its key. A heading tool's key carries its
|
|
@@ -8,3 +9,15 @@ import { EDITOR_TOOL_ICONS } from "../constants/editor";
|
|
|
8
9
|
*/
|
|
9
10
|
export const toolIcon = (key: string): IconAlias | undefined =>
|
|
10
11
|
EDITOR_TOOL_ICONS[/^heading-\d+$/.test(key) ? "heading" : key];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The text of an editor tool, by its key, as a message of the contract. A
|
|
15
|
+
* heading tool's key carries its level (`heading-2`), which the one
|
|
16
|
+
* `editor.heading` message takes as its value. A tool the layer does not
|
|
17
|
+
* name — one an app adds — has none, and its own label stands.
|
|
18
|
+
*/
|
|
19
|
+
export const toolText = (key: string): AppMessage | undefined => {
|
|
20
|
+
const heading = /^heading-(\d+)$/.exec(key);
|
|
21
|
+
if (heading) return ["editor.heading", { level: Number(heading[1]) }];
|
|
22
|
+
return EDITOR_TOOL_TEXT[key];
|
|
23
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { Contract } from "#build/prosary/index.mjs";
|
|
2
|
+
import type { Text } from "@zoobzio/kit";
|
|
3
|
+
import type { Prosary } from "prosary";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The app's prosary service, over its contract: what `@prosary/nuxt`
|
|
7
|
+
* provides as `$prosary` (and names `AppProsary` on `#imports`).
|
|
8
|
+
*/
|
|
9
|
+
type AppProsary = Prosary<Contract>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The properties that carry text in the data the components and the
|
|
13
|
+
* services take: what {@link resolveTexts} resolves, wherever it finds one.
|
|
14
|
+
* `rootLabel` is the browser's root crumb, the one text a service config
|
|
15
|
+
* carries at its top level.
|
|
16
|
+
*/
|
|
17
|
+
const TEXT_KEYS: ReadonlySet<string> = new Set([
|
|
18
|
+
"label",
|
|
19
|
+
"description",
|
|
20
|
+
"title",
|
|
21
|
+
"placeholder",
|
|
22
|
+
"hint",
|
|
23
|
+
"text",
|
|
24
|
+
"rootLabel",
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Whether a value is a message of the app's contract: a key it declares,
|
|
29
|
+
* or such a key with its values. Any other string is data — a file name, a
|
|
30
|
+
* value — and stands as it is.
|
|
31
|
+
*/
|
|
32
|
+
const isMessage = (
|
|
33
|
+
service: AppProsary,
|
|
34
|
+
value: unknown,
|
|
35
|
+
): value is Parameters<AppProsary["format"]>[0] =>
|
|
36
|
+
typeof value === "string"
|
|
37
|
+
? service.schema.check.key(value)
|
|
38
|
+
: Array.isArray(value) && service.schema.check.key(value[0]);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* A plain object: what the data the components take is made of, as against
|
|
42
|
+
* a Date, a class instance or a DOM node, which pass through untouched.
|
|
43
|
+
*/
|
|
44
|
+
const plain = (value: unknown): value is Record<string, unknown> => {
|
|
45
|
+
if (typeof value !== "object" || value === null) return false;
|
|
46
|
+
const proto: unknown = Object.getPrototypeOf(value);
|
|
47
|
+
return proto === Object.prototype || proto === null;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Resolves one text through the app's prosary service: a message of the
|
|
52
|
+
* contract — a key, or a key with its values — formats in the active
|
|
53
|
+
* locale, and any other string stands as it is. What the components
|
|
54
|
+
* render is always a string; what reaches them is resolved here, at the
|
|
55
|
+
* layer's boundary.
|
|
56
|
+
*
|
|
57
|
+
* @param service - The app's prosary service.
|
|
58
|
+
* @param text - A plain string, a key of the contract, or a key with its
|
|
59
|
+
* values. Any other value renders in its string form.
|
|
60
|
+
* @returns The string to render.
|
|
61
|
+
*/
|
|
62
|
+
export const resolveText = (
|
|
63
|
+
service: AppProsary,
|
|
64
|
+
text: Text | unknown,
|
|
65
|
+
): string => (isMessage(service, text) ? service.format(text) : String(text));
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Resolves every text in a value: the `label`, `description`, `title`,
|
|
69
|
+
* `placeholder`, `hint`, `text` and `rootLabel` of each plain object, at
|
|
70
|
+
* any depth of arrays and plain objects, so the options of a select, the
|
|
71
|
+
* groups of a menu, the nodes of a tree or the whole config of a table all
|
|
72
|
+
* resolve in one call. Anything else — a function, a Date, a service — is kept as it is.
|
|
73
|
+
* The result is a copy; the value given is never written.
|
|
74
|
+
*
|
|
75
|
+
* @param service - The app's prosary service.
|
|
76
|
+
* @param value - The data to resolve.
|
|
77
|
+
* @returns The data, with every text a string.
|
|
78
|
+
*/
|
|
79
|
+
export function resolveTexts<T>(service: AppProsary, value: T): T;
|
|
80
|
+
export function resolveTexts(service: AppProsary, value: unknown): unknown {
|
|
81
|
+
if (Array.isArray(value)) {
|
|
82
|
+
return value.map((item: unknown) => resolveTexts(service, item));
|
|
83
|
+
}
|
|
84
|
+
if (!plain(value)) return value;
|
|
85
|
+
const out: Record<string, unknown> = {};
|
|
86
|
+
for (const [key, item] of Object.entries(value)) {
|
|
87
|
+
out[key] =
|
|
88
|
+
TEXT_KEYS.has(key) && (typeof item === "string" || Array.isArray(item))
|
|
89
|
+
? resolveText(service, item)
|
|
90
|
+
: resolveTexts(service, item);
|
|
91
|
+
}
|
|
92
|
+
return out;
|
|
93
|
+
}
|
|
@@ -62,21 +62,26 @@ export const WRAPPED = [
|
|
|
62
62
|
"browser",
|
|
63
63
|
"calendar",
|
|
64
64
|
"checkbox",
|
|
65
|
+
"code",
|
|
65
66
|
"command",
|
|
66
67
|
"date-filters",
|
|
67
68
|
"date-picker",
|
|
68
69
|
"date-range-picker",
|
|
70
|
+
"dialog",
|
|
69
71
|
"directory",
|
|
70
72
|
"editor",
|
|
73
|
+
"fab",
|
|
71
74
|
"facets",
|
|
72
75
|
"file-input",
|
|
73
76
|
"form",
|
|
74
77
|
"form-field",
|
|
75
78
|
"hero",
|
|
76
79
|
"keywords",
|
|
80
|
+
"listbox",
|
|
77
81
|
"menu",
|
|
78
82
|
"multi-select",
|
|
79
83
|
"pagination",
|
|
84
|
+
"radio",
|
|
80
85
|
"range-calendar",
|
|
81
86
|
"rich-text",
|
|
82
87
|
"scroller",
|
|
@@ -142,7 +147,7 @@ export const LAYER = {
|
|
|
142
147
|
"composables/log": ["useLogger"],
|
|
143
148
|
"composables/notification": ["useNotifications"],
|
|
144
149
|
"composables/request": ["useRequest", "useLazyRequest"],
|
|
145
|
-
"constants/editor": ["EDITOR_TOOL_ICONS"],
|
|
150
|
+
"constants/editor": ["EDITOR_TOOL_ICONS", "EDITOR_TOOL_TEXT"],
|
|
146
151
|
"constants/error": [
|
|
147
152
|
"ERROR_DEFAULT_STATUS_CODE",
|
|
148
153
|
"ERROR_NOT_FOUND_STATUS_CODE",
|
|
@@ -161,6 +166,7 @@ export const LAYER = {
|
|
|
161
166
|
"stores/log": ["accessLogs"],
|
|
162
167
|
"stores/notification": ["accessNotifications"],
|
|
163
168
|
"stores/table": ["accessTable"],
|
|
169
|
+
"utils/text": ["resolveText", "resolveTexts"],
|
|
164
170
|
} as const satisfies Record<string, readonly string[]>;
|
|
165
171
|
|
|
166
172
|
// Type-only exports, registered the same way so `import type { TableOptions }
|
|
@@ -196,6 +202,7 @@ export const LAYER_TYPES = {
|
|
|
196
202
|
"types/log": ["LogLevel", "LogLine", "LogEmit", "Logger"],
|
|
197
203
|
"types/notification": ["Notification"],
|
|
198
204
|
"types/request": ["RequestOptions"],
|
|
205
|
+
"types/text": ["AppMessage"],
|
|
199
206
|
"types/table": [
|
|
200
207
|
"TableAction",
|
|
201
208
|
"TableBulkAction",
|
package/nuxt.config.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { defineNuxtConfig } from "nuxt/config";
|
|
|
4
4
|
export default defineNuxtConfig({
|
|
5
5
|
compatibilityDate: "2025-11-06",
|
|
6
6
|
|
|
7
|
-
modules: ["@icon-sheets/nuxt", "@untheme/nuxt"],
|
|
7
|
+
modules: ["@icon-sheets/nuxt", "@untheme/nuxt", "@prosary/nuxt"],
|
|
8
8
|
|
|
9
9
|
imports: { autoImport: false, scan: false },
|
|
10
10
|
|
|
@@ -17,6 +17,8 @@ export default defineNuxtConfig({
|
|
|
17
17
|
|
|
18
18
|
untheme: { preset: "@zoobzio/theme" },
|
|
19
19
|
|
|
20
|
+
prosary: { build: "@zoobzio/prose" },
|
|
21
|
+
|
|
20
22
|
css: [fileURLToPath(new URL("./app/assets/css/reset.css", import.meta.url))],
|
|
21
23
|
|
|
22
24
|
build: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoobzio/nuxt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Nuxt layer for the foundation design system: the Nuxt wiring over @zoobzio/vue and the headless services (useState stores, hook-bus factories, app shell).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -38,21 +38,25 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@icon-sheets/nuxt": "0.0.8",
|
|
40
40
|
"@nuxt/kit": "^4.5.0",
|
|
41
|
+
"@prosary/nuxt": "0.0.10",
|
|
41
42
|
"@untheme/nuxt": "^0.6.1",
|
|
42
43
|
"@vueuse/core": "^14.3.0",
|
|
43
44
|
"ltrl-http": "^0.0.20",
|
|
44
45
|
"objectively": "^0.3.0",
|
|
46
|
+
"prosary": "0.0.10",
|
|
45
47
|
"reka-ui": "^2.6.0",
|
|
46
48
|
"untheme": "^0.6.1",
|
|
47
|
-
"@zoobzio/browser": "0.1.
|
|
48
|
-
"@zoobzio/
|
|
49
|
-
"@zoobzio/
|
|
50
|
-
"@zoobzio/
|
|
51
|
-
"@zoobzio/icons": "0.1.
|
|
52
|
-
"@zoobzio/
|
|
53
|
-
"@zoobzio/
|
|
54
|
-
"@zoobzio/
|
|
55
|
-
"@zoobzio/table": "0.1.
|
|
49
|
+
"@zoobzio/browser": "0.1.4",
|
|
50
|
+
"@zoobzio/form": "0.1.4",
|
|
51
|
+
"@zoobzio/code": "0.1.4",
|
|
52
|
+
"@zoobzio/editor": "0.1.4",
|
|
53
|
+
"@zoobzio/icons": "0.1.4",
|
|
54
|
+
"@zoobzio/kit": "0.1.4",
|
|
55
|
+
"@zoobzio/prose": "0.1.4",
|
|
56
|
+
"@zoobzio/query": "0.1.4",
|
|
57
|
+
"@zoobzio/table": "0.1.4",
|
|
58
|
+
"@zoobzio/theme": "0.1.4",
|
|
59
|
+
"@zoobzio/vue": "0.1.4"
|
|
56
60
|
},
|
|
57
61
|
"devDependencies": {
|
|
58
62
|
"@codemirror/state": "^6.7.6",
|