@ubean/client 0.3.2 → 0.3.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.
Files changed (2) hide show
  1. package/dist/ssr.js +10 -1
  2. package/package.json +7 -7
package/dist/ssr.js CHANGED
@@ -1,4 +1,4 @@
1
- import { r as createUbeanI18n } from "./i18n-t0G3VyBs.js";
1
+ import { n as configureI18nRuntime, r as createUbeanI18n } from "./i18n-t0G3VyBs.js";
2
2
  import { applyAppConfig } from "./define-app.js";
3
3
  import { createSSRApp, defineComponent, h, provide, reactive } from "vue";
4
4
  import { SSR_CONTENT_MARKER, STATE_DATA_ID, STATE_MARKER, __clearDataPayload, __clearDeferred, __resolveDataPayload, __resolveDeferred, __serializeDataPayload, __serializeDeferred, safeJsonStringify } from "@ubean/pages";
@@ -91,6 +91,15 @@ async function prepareRender(options, pageObj, renderContext) {
91
91
  } });
92
92
  }
93
93
  if (pageObj.head) pushPageHead(head, pageObj.head);
94
+ const _routing = renderContext?.routing;
95
+ if (renderContext && _routing) configureI18nRuntime({ config: {
96
+ defaultLocale: _routing.defaultLocale,
97
+ locales: _routing.locales,
98
+ strategy: _routing.strategy,
99
+ fallbackLocale: renderContext.fallbackLocale || _routing.defaultLocale,
100
+ cookieName: renderContext.cookieName || "ubean_locale",
101
+ baseUrl: renderContext.baseUrl || ""
102
+ } });
94
103
  const i18n = renderContext?.locale ? createUbeanI18n({
95
104
  locale: renderContext.locale,
96
105
  fallbackLocale: renderContext.fallbackLocale || renderContext.locale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubean/client",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Framework client runtime for ubean — layered over the lean @ubean/vue kernel, adding app factories, unhead, i18n, data layer, islands hydration and SSR state helpers",
5
5
  "files": [
6
6
  "dist"
@@ -32,11 +32,11 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@ubean/i18n": "0.3.2",
36
- "@ubean/islands": "0.3.2",
37
- "@ubean/pages": "0.3.2",
38
- "@ubean/shared": "0.3.2",
39
- "@ubean/vue": "0.3.2",
35
+ "@ubean/i18n": "0.3.4",
36
+ "@ubean/islands": "0.3.4",
37
+ "@ubean/pages": "0.3.4",
38
+ "@ubean/shared": "0.3.4",
39
+ "@ubean/vue": "0.3.4",
40
40
  "@unhead/vue": "^3.4.0",
41
41
  "@vue/server-renderer": "^3.5.42",
42
42
  "vue": "^3.5.42",
@@ -49,7 +49,7 @@
49
49
  "vite-plus": "0.3.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@ubean/seo": "0.3.2"
52
+ "@ubean/seo": "0.3.4"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@ubean/seo": {