defuss 2.0.11 → 2.0.12
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/index.cjs +3 -10
- package/dist/index.mjs +4 -11
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -116,7 +116,8 @@ const createI18n = () => {
|
|
|
116
116
|
};
|
|
117
117
|
return api;
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
globalThis.__defuss_i18n = globalThis.__defuss_i18n || createI18n();
|
|
120
|
+
const i18n = globalThis.__defuss_i18n;
|
|
120
121
|
|
|
121
122
|
const Trans = ({
|
|
122
123
|
key,
|
|
@@ -127,17 +128,9 @@ const Trans = ({
|
|
|
127
128
|
}) => {
|
|
128
129
|
const _ref = ref || {};
|
|
129
130
|
const updateContent = () => {
|
|
130
|
-
console.log("Trans updateContent called for key:", key);
|
|
131
131
|
const value = i18n.t(key, values);
|
|
132
|
-
console.log("Trans updateContent: computed value:", value);
|
|
133
132
|
if (_ref.current) {
|
|
134
|
-
|
|
135
|
-
"Trans updateContent: updating DOM element",
|
|
136
|
-
_ref.current.innerText
|
|
137
|
-
);
|
|
138
|
-
dom.$(_ref.current).update(value);
|
|
139
|
-
} else {
|
|
140
|
-
console.log("Trans updateContent: _ref.current is null/undefined");
|
|
133
|
+
_ref.current.textContent = value;
|
|
141
134
|
}
|
|
142
135
|
};
|
|
143
136
|
_ref.updateValues = (newValues) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as createStore,
|
|
1
|
+
import { l as createStore, m as isServer, k as createRef, $, f as isRef } from './dom-BODEuMW4.mjs';
|
|
2
2
|
export { J as Call, O as CallChainImpl, P as CallChainImplThenable, F as Fragment, D as addElementEvent, K as addNonChainedReturnCallNames, n as areDomNodesEqual, B as checkElementVisibility, G as clearElementEvents, Y as createCall, Z as createGetterSetterCall, c as createInPlaceErrorMessageVNode, _ as createSubChain, S as delayedAutoStart, T as dequery, H as domNodeToVNode, N as emptyImpl, R as getAllFormValues, W as getDefaultDequeryOptions, C as getEventMap, z as getMimeType, L as getNonChainedReturnCallNames, g as getRenderer, b as globalScopeDomApis, h as handleLifecycleEventsForOnMount, I as htmlStringToVNodes, U as isDequery, V as isDequeryOptionsObject, v as isHTML, i as isJSX, x as isMarkup, M as isNonChainedReturnCall, t as isSVG, j as jsx, e as jsxDEV, d as jsxs, X as mapArrayIndexAccess, o as observeUnmount, s as parseDOM, A as processAllFormElements, E as removeElementEvent, a as renderIsomorphicAsync, r as renderIsomorphicSync, y as renderMarkup, a2 as renderNode, q as replaceDomWithVdom, a3 as resolveNodes, a1 as runWithTimeGuard, Q as scrollHelper, a0 as subChainForNextAwait, a4 as traverse, u as updateDom, p as updateDomWithVdom, w as waitForDOM, a5 as webstorage } from './dom-BODEuMW4.mjs';
|
|
3
3
|
import 'defuss-runtime';
|
|
4
4
|
|
|
@@ -115,7 +115,8 @@ const createI18n = () => {
|
|
|
115
115
|
};
|
|
116
116
|
return api;
|
|
117
117
|
};
|
|
118
|
-
|
|
118
|
+
globalThis.__defuss_i18n = globalThis.__defuss_i18n || createI18n();
|
|
119
|
+
const i18n = globalThis.__defuss_i18n;
|
|
119
120
|
|
|
120
121
|
const Trans = ({
|
|
121
122
|
key,
|
|
@@ -126,17 +127,9 @@ const Trans = ({
|
|
|
126
127
|
}) => {
|
|
127
128
|
const _ref = ref || {};
|
|
128
129
|
const updateContent = () => {
|
|
129
|
-
console.log("Trans updateContent called for key:", key);
|
|
130
130
|
const value = i18n.t(key, values);
|
|
131
|
-
console.log("Trans updateContent: computed value:", value);
|
|
132
131
|
if (_ref.current) {
|
|
133
|
-
|
|
134
|
-
"Trans updateContent: updating DOM element",
|
|
135
|
-
_ref.current.innerText
|
|
136
|
-
);
|
|
137
|
-
$(_ref.current).update(value);
|
|
138
|
-
} else {
|
|
139
|
-
console.log("Trans updateContent: _ref.current is null/undefined");
|
|
132
|
+
_ref.current.textContent = value;
|
|
140
133
|
}
|
|
141
134
|
};
|
|
142
135
|
_ref.updateValues = (newValues) => {
|