vue-intlayer 9.7.0 → 9.7.1
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/cjs/analytics/useAnalytics.cjs +1 -1
- package/dist/cjs/analytics/useConversion.cjs +1 -1
- package/dist/cjs/analytics/useExperiment.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/devtools/formatDictionaryForInspector.cjs +1 -1
- package/dist/cjs/devtools/index.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/format/index.cjs +1 -1
- package/dist/cjs/html/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/esm/UI/ContentSelector.mjs +1 -2
- package/dist/esm/analytics/exposureSink.mjs +1 -2
- package/dist/esm/analytics/useAnalytics.mjs +19 -20
- package/dist/esm/analytics/useConversion.mjs +3 -4
- package/dist/esm/analytics/useExperiment.mjs +4 -5
- package/dist/esm/client/installIntlayer.mjs +1 -2
- package/dist/esm/client/useDictionary.mjs +1 -2
- package/dist/esm/client/useDictionaryAsync.mjs +1 -2
- package/dist/esm/client/useDictionaryDynamic.mjs +1 -2
- package/dist/esm/client/useIntlayer.mjs +1 -2
- package/dist/esm/client/useLoadDynamic.mjs +1 -2
- package/dist/esm/client/useLocale.mjs +6 -11
- package/dist/esm/client/useLocaleStorage.mjs +1 -2
- package/dist/esm/client/usePathname.mjs +1 -2
- package/dist/esm/client/useRewriteURL.mjs +1 -2
- package/dist/esm/devtools/buildLocalesInspectorNode.mjs +1 -2
- package/dist/esm/devtools/editDictionaryContent.mjs +1 -2
- package/dist/esm/devtools/editorServer.mjs +1 -2
- package/dist/esm/devtools/formatDictionaryForInspector.mjs +20 -33
- package/dist/esm/devtools/index.mjs +57 -58
- package/dist/esm/editor/ContentSelector.mjs +1 -3
- package/dist/esm/editor/useEditor.mjs +11 -12
- package/dist/esm/format/index.mjs +10 -10
- package/dist/esm/format/useCompact.mjs +1 -2
- package/dist/esm/format/useCurrency.mjs +1 -2
- package/dist/esm/format/useDate.mjs +1 -2
- package/dist/esm/format/useIntl.mjs +1 -2
- package/dist/esm/format/useList.mjs +1 -2
- package/dist/esm/format/useNumber.mjs +1 -2
- package/dist/esm/format/usePercentage.mjs +1 -2
- package/dist/esm/format/useRelativeTime.mjs +1 -2
- package/dist/esm/format/useUnit.mjs +1 -2
- package/dist/esm/getDictionary.mjs +1 -2
- package/dist/esm/getIntlayer.mjs +1 -2
- package/dist/esm/html/HTMLRenderer.mjs +1 -2
- package/dist/esm/html/index.mjs +3 -3
- package/dist/esm/html/installIntlayerHTML.mjs +1 -2
- package/dist/esm/index.mjs +17 -17
- package/dist/esm/markdown/MarkdownRenderer.mjs +1 -2
- package/dist/esm/markdown/compiler.mjs +1 -2
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +1 -2
- package/dist/esm/markdown/runtime.mjs +1 -2
- package/dist/esm/plugins.mjs +63 -64
- package/dist/esm/renderIntlayerNode.mjs +1 -2
- package/dist/esm-BnFj8Txc.js +1 -0
- package/dist/{esm-CtrrRmRn.mjs → esm-hfQR-yiQ.mjs} +77 -82
- package/dist/{isEnabled-BbWU6Ox5.mjs → isEnabled-DVKEZ2He.mjs} +1 -2
- package/package.json +12 -12
- package/dist/esm-CXlI80Tk.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { applyDictionaryEdit as
|
|
5
|
-
import { createEditorServerSession as
|
|
6
|
-
import {
|
|
1
|
+
import { createIntlayerClient as e } from "../client/installIntlayer.mjs";
|
|
2
|
+
import { setLocaleInStorage as t } from "../client/useLocaleStorage.mjs";
|
|
3
|
+
import { buildLocalesInspectorNode as n, getLocaleFromNodeId as r, isLocaleNodeId as i } from "./buildLocalesInspectorNode.mjs";
|
|
4
|
+
import { applyDictionaryEdit as a, getEditKeyPath as o, getEditability as s, parseEditPath as c } from "./editDictionaryContent.mjs";
|
|
5
|
+
import { createEditorServerSession as l } from "./editorServer.mjs";
|
|
6
|
+
import { formatDictionaryForInspector as u, listInspectorEntries as d } from "./formatDictionaryForInspector.mjs";
|
|
7
7
|
import { internationalization as f } from "@intlayer/config/built";
|
|
8
8
|
import { watch as p } from "vue";
|
|
9
9
|
import { getDictionaries as m } from "@intlayer/dictionaries-entry";
|
|
10
10
|
import { setupDevtoolsPlugin as h } from "@vue/devtools-api";
|
|
11
|
-
|
|
11
|
+
// src/devtools/index.ts
|
|
12
12
|
var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-offline", { defaultLocale: y, locales: b } = f ?? {}, x = h, S = (e) => e.localId ?? e.key, C = (e, t) => Object.values(e).flat().find((e) => S(e) === t), w = (e) => e.locale ?? e.filePath?.split("/").pop() ?? "declaration", T = (f) => {
|
|
13
13
|
x({
|
|
14
14
|
id: g,
|
|
@@ -18,7 +18,7 @@ var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-
|
|
|
18
18
|
componentStateTypes: [g],
|
|
19
19
|
app: f
|
|
20
20
|
}, (f) => {
|
|
21
|
-
let h =
|
|
21
|
+
let h = l();
|
|
22
22
|
h.fetchUnmergedDictionaries().then((e) => {
|
|
23
23
|
e && f.sendInspectorTree(_);
|
|
24
24
|
}), f.addInspector({
|
|
@@ -30,23 +30,23 @@ var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-
|
|
|
30
30
|
icon: "check",
|
|
31
31
|
tooltip: "Set as current locale",
|
|
32
32
|
action: (n) => {
|
|
33
|
-
if (!
|
|
34
|
-
let
|
|
35
|
-
if (!b?.map(String).includes(
|
|
36
|
-
console.error(`Locale ${
|
|
33
|
+
if (!i(n)) return;
|
|
34
|
+
let a = r(n);
|
|
35
|
+
if (!b?.map(String).includes(a)) {
|
|
36
|
+
console.error(`Locale ${a} is not available`);
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
let
|
|
40
|
-
|
|
39
|
+
let o = e();
|
|
40
|
+
o.setLocale(a), t(a, o.isCookieEnabled ?? !0), f.sendInspectorTree(_), f.sendInspectorState(_);
|
|
41
41
|
}
|
|
42
42
|
}]
|
|
43
|
-
}), p(() =>
|
|
43
|
+
}), p(() => e().locale.value, () => {
|
|
44
44
|
f.sendInspectorTree(_), f.sendInspectorState(_);
|
|
45
|
-
}), f.on.getInspectorTree(async (
|
|
46
|
-
if (
|
|
47
|
-
let
|
|
48
|
-
if (
|
|
49
|
-
|
|
45
|
+
}), f.on.getInspectorTree(async (t) => {
|
|
46
|
+
if (t.inspectorId !== "intlayer-dictionaries-inspector") return;
|
|
47
|
+
let r = e().locale.value ?? y, i = await h.fetchUnmergedDictionaries();
|
|
48
|
+
if (i) {
|
|
49
|
+
t.rootNodes = [...Object.entries(i).flatMap(([e, t]) => t.map((n) => ({
|
|
50
50
|
id: S(n),
|
|
51
51
|
label: t.length > 1 ? `${e} (${w(n)})` : e,
|
|
52
52
|
tags: [{
|
|
@@ -54,15 +54,15 @@ var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-
|
|
|
54
54
|
textColor: 16777215,
|
|
55
55
|
backgroundColor: 4372611
|
|
56
56
|
}]
|
|
57
|
-
}))),
|
|
57
|
+
}))), n(r)];
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
...
|
|
60
|
+
let a = m(), o = Object.keys(a);
|
|
61
|
+
t.rootNodes = [
|
|
62
|
+
...o.length === 0 ? [{
|
|
63
63
|
id: "intlayer-no-dictionaries",
|
|
64
64
|
label: "No dictionaries loaded. Add an Intlayer build plugin (e.g. vite-intlayer) to generate them."
|
|
65
|
-
}] :
|
|
65
|
+
}] : o.map((e) => ({
|
|
66
66
|
id: e,
|
|
67
67
|
label: e
|
|
68
68
|
})),
|
|
@@ -70,34 +70,34 @@ var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-
|
|
|
70
70
|
id: v,
|
|
71
71
|
label: "Enable live editing (editor server)"
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
n(r)
|
|
74
74
|
];
|
|
75
|
-
}), f.on.getInspectorState(async (
|
|
76
|
-
if (
|
|
77
|
-
let
|
|
78
|
-
if (
|
|
79
|
-
|
|
75
|
+
}), f.on.getInspectorState(async (t) => {
|
|
76
|
+
if (t.inspectorId !== "intlayer-dictionaries-inspector") return;
|
|
77
|
+
let n = e().locale.value ?? y;
|
|
78
|
+
if (t.nodeId === "intlayer-locales") {
|
|
79
|
+
t.state = { Locales: (b ?? []).map((e) => ({
|
|
80
80
|
key: e,
|
|
81
|
-
value: e ===
|
|
81
|
+
value: e === n ? "current" : "",
|
|
82
82
|
editable: !1
|
|
83
83
|
})) };
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
if (
|
|
87
|
-
let
|
|
88
|
-
|
|
86
|
+
if (i(t.nodeId)) {
|
|
87
|
+
let e = r(t.nodeId);
|
|
88
|
+
t.state = { Locale: [{
|
|
89
89
|
key: "locale",
|
|
90
|
-
value:
|
|
90
|
+
value: e,
|
|
91
91
|
editable: !1
|
|
92
92
|
}, {
|
|
93
93
|
key: "current",
|
|
94
|
-
value:
|
|
94
|
+
value: e === n,
|
|
95
95
|
editable: !1
|
|
96
96
|
}] };
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
if (
|
|
100
|
-
|
|
99
|
+
if (t.nodeId === "intlayer-editor-offline") {
|
|
100
|
+
t.state = { "Live editing": [
|
|
101
101
|
{
|
|
102
102
|
key: "status",
|
|
103
103
|
value: "Intlayer editor server not detected",
|
|
@@ -116,46 +116,46 @@ var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-
|
|
|
116
116
|
] };
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
let a = await h.fetchUnmergedDictionaries(),
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
Translations:
|
|
119
|
+
let a = await h.fetchUnmergedDictionaries(), o = a ? C(a, t.nodeId) : void 0;
|
|
120
|
+
if (o) {
|
|
121
|
+
t.state = {
|
|
122
|
+
Translations: d(o).map(({ label: e, keyPath: t, value: n }) => ({
|
|
123
123
|
key: e,
|
|
124
124
|
value: n,
|
|
125
|
-
editable: o
|
|
125
|
+
editable: s(o, t) !== null
|
|
126
126
|
})),
|
|
127
127
|
Metadata: [
|
|
128
128
|
{
|
|
129
129
|
key: "key",
|
|
130
|
-
value:
|
|
130
|
+
value: o.key,
|
|
131
131
|
editable: !1
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
key: "title",
|
|
135
|
-
value:
|
|
135
|
+
value: o.title ?? "",
|
|
136
136
|
editable: !1
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
key: "description",
|
|
140
|
-
value:
|
|
140
|
+
value: o.description ?? "",
|
|
141
141
|
editable: !1
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
key: "file",
|
|
145
|
-
value:
|
|
145
|
+
value: o.filePath ?? "",
|
|
146
146
|
editable: !1
|
|
147
147
|
}
|
|
148
148
|
]
|
|
149
149
|
};
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
let c = m()[
|
|
152
|
+
let c = m()[t.nodeId];
|
|
153
153
|
if (!c) {
|
|
154
|
-
|
|
154
|
+
t.state = {};
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
let l =
|
|
158
|
-
|
|
157
|
+
let l = u(c);
|
|
158
|
+
t.state = {
|
|
159
159
|
Translations: Object.entries(l).map(([e, t]) => ({
|
|
160
160
|
key: e,
|
|
161
161
|
value: t,
|
|
@@ -183,15 +183,15 @@ var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-
|
|
|
183
183
|
let g = Promise.resolve();
|
|
184
184
|
f.on.editInspectorState((e) => {
|
|
185
185
|
if (e.inspectorId !== "intlayer-dictionaries-inspector" || e.state.remove) return;
|
|
186
|
-
let t =
|
|
186
|
+
let t = c(e.path), n = e.state.value;
|
|
187
187
|
if (t && typeof n == "string") return g = g.catch(() => {}).then(async () => {
|
|
188
188
|
let r = await h.fetchUnmergedDictionaries();
|
|
189
189
|
if (!r) return;
|
|
190
|
-
let
|
|
191
|
-
if (!
|
|
192
|
-
let s =
|
|
190
|
+
let i = C(r, e.nodeId);
|
|
191
|
+
if (!i) return;
|
|
192
|
+
let s = o(i, t);
|
|
193
193
|
if (!s) return;
|
|
194
|
-
let c = i
|
|
194
|
+
let c = a(i, s, n);
|
|
195
195
|
if (c) try {
|
|
196
196
|
await h.writeDictionary(c);
|
|
197
197
|
} catch (e) {
|
|
@@ -203,5 +203,4 @@ var g = "intlayer", _ = "intlayer-dictionaries-inspector", v = "intlayer-editor-
|
|
|
203
203
|
});
|
|
204
204
|
});
|
|
205
205
|
};
|
|
206
|
-
//#endregion
|
|
207
206
|
export { v as EDITOR_OFFLINE_NODE_ID, g as INTLAYER_DEVTOOLS_PLUGIN_ID, _ as INTLAYER_DICTIONARIES_INSPECTOR_ID, T as enableIntlayerDevtools };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, h as t } from "vue";
|
|
2
2
|
import { isEnabled as n } from "@intlayer/editor/isEnabled";
|
|
3
|
-
|
|
4
|
-
//#region src/editor/ContentSelector.vue
|
|
3
|
+
// src/editor/ContentSelector.vue
|
|
5
4
|
var r = e({
|
|
6
5
|
name: "ContentSelector",
|
|
7
6
|
props: {
|
|
@@ -21,5 +20,4 @@ var r = e({
|
|
|
21
20
|
}, r.default?.());
|
|
22
21
|
}
|
|
23
22
|
});
|
|
24
|
-
//#endregion
|
|
25
23
|
export { r as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
|
+
import { setLocaleInStorage as t } from "../client/useLocaleStorage.mjs";
|
|
3
3
|
import { inject as n, onMounted as r, onUnmounted as i, watchEffect as a } from "vue";
|
|
4
4
|
import { isEnabled as o } from "@intlayer/editor/isEnabled";
|
|
5
|
-
|
|
6
|
-
var s = (
|
|
7
|
-
let n =
|
|
5
|
+
// src/editor/useEditor.ts
|
|
6
|
+
var s = (e) => {
|
|
7
|
+
let n = e?.locale, r = null, i = null, o = !1;
|
|
8
8
|
return import("@intlayer/editor").then(({ initEditorClient: s }) => {
|
|
9
9
|
if (o) return;
|
|
10
10
|
let c = s();
|
|
@@ -12,20 +12,20 @@ var s = (t) => {
|
|
|
12
12
|
let e = n.value;
|
|
13
13
|
e && c.currentLocale.set(e);
|
|
14
14
|
})), i = c.onLocaleChangeRequested((n) => {
|
|
15
|
-
|
|
15
|
+
e?.setLocale(n), t(n, !0);
|
|
16
16
|
});
|
|
17
17
|
}).catch(() => {}), () => {
|
|
18
18
|
o = !0, r?.(), i?.(), import("@intlayer/editor").then(({ stopEditorClient: e }) => {
|
|
19
19
|
e();
|
|
20
20
|
}).catch(() => {});
|
|
21
21
|
};
|
|
22
|
-
}, c = (
|
|
22
|
+
}, c = (t) => {
|
|
23
23
|
if (process.env.INTLAYER_EDITOR_ENABLED === "false" || !o) return;
|
|
24
|
-
if (
|
|
24
|
+
if (t) {
|
|
25
25
|
let n = null;
|
|
26
|
-
|
|
26
|
+
t.mixin({
|
|
27
27
|
inject: { _intlayerClient: {
|
|
28
|
-
from:
|
|
28
|
+
from: e,
|
|
29
29
|
default: null
|
|
30
30
|
} },
|
|
31
31
|
mounted() {
|
|
@@ -39,12 +39,11 @@ var s = (t) => {
|
|
|
39
39
|
});
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
let a = n(
|
|
42
|
+
let a = n(e), c = null;
|
|
43
43
|
r(() => {
|
|
44
44
|
c = s(a);
|
|
45
45
|
}), i(() => {
|
|
46
46
|
c?.();
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
|
-
//#endregion
|
|
50
49
|
export { c as useEditor };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
1
|
+
import { useCompact as e } from "./useCompact.mjs";
|
|
2
|
+
import { useCurrency as t } from "./useCurrency.mjs";
|
|
3
|
+
import { useDate as n } from "./useDate.mjs";
|
|
4
|
+
import { useIntl as r } from "./useIntl.mjs";
|
|
5
|
+
import { useList as i } from "./useList.mjs";
|
|
6
|
+
import { useNumber as a } from "./useNumber.mjs";
|
|
7
|
+
import { usePercentage as o } from "./usePercentage.mjs";
|
|
8
|
+
import { useRelativeTime as s } from "./useRelativeTime.mjs";
|
|
9
|
+
import { useUnit as c } from "./useUnit.mjs";
|
|
10
|
+
export { e as useCompact, t as useCurrency, n as useDate, r as useIntl, i as useList, a as useNumber, o as usePercentage, s as useRelativeTime, c as useUnit };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { compact as r } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/useCompact.ts
|
|
5
5
|
var i = () => {
|
|
6
6
|
let i = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -12,5 +12,4 @@ var i = () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as useCompact };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { currency as r } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/useCurrency.ts
|
|
5
5
|
var i = () => {
|
|
6
6
|
let i = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -12,5 +12,4 @@ var i = () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as useCurrency };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { date as r, presets as i } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/useDate.ts
|
|
5
5
|
var a = () => {
|
|
6
6
|
let a = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -18,5 +18,4 @@ var a = () => {
|
|
|
18
18
|
};
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { a as useDate };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { bindIntl as r } from "@intlayer/core/utils";
|
|
4
|
-
|
|
4
|
+
// src/format/useIntl.ts
|
|
5
5
|
var i = (i) => {
|
|
6
6
|
let a = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -9,5 +9,4 @@ var i = (i) => {
|
|
|
9
9
|
return r(e);
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { i as useIntl };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { list as r } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/useList.ts
|
|
5
5
|
var i = () => {
|
|
6
6
|
let i = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -12,5 +12,4 @@ var i = () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as useList };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { number as r } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/useNumber.ts
|
|
5
5
|
var i = () => {
|
|
6
6
|
let i = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -12,5 +12,4 @@ var i = () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as useNumber };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { percentage as r } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/usePercentage.ts
|
|
5
5
|
var i = () => {
|
|
6
6
|
let i = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -12,5 +12,4 @@ var i = () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as usePercentage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { relativeTime as r } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/useRelativeTime.ts
|
|
5
5
|
var i = () => {
|
|
6
6
|
let i = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -12,5 +12,4 @@ var i = () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as useRelativeTime };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { INTLAYER_SYMBOL as e } from "../client/installIntlayer.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { units as r } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
4
|
+
// src/format/useUnit.ts
|
|
5
5
|
var i = () => {
|
|
6
6
|
let i = n(e, null);
|
|
7
7
|
return t(() => {
|
|
@@ -12,5 +12,4 @@ var i = () => {
|
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { i as useUnit };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { getPlugins as e } from "./plugins.mjs";
|
|
2
2
|
import { getDictionary as t } from "@intlayer/core/interpreter";
|
|
3
|
-
|
|
3
|
+
// src/getDictionary.ts
|
|
4
4
|
var n = (n, r) => {
|
|
5
5
|
let i = typeof r == "object" && r ? r.locale : r;
|
|
6
6
|
return t(n, r, e(i));
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { n as getDictionary };
|
package/dist/esm/getIntlayer.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { getPlugins as e } from "./plugins.mjs";
|
|
2
2
|
import { getIntlayer as t } from "@intlayer/core/interpreter";
|
|
3
|
-
|
|
3
|
+
// src/getIntlayer.ts
|
|
4
4
|
var n = (n, r) => {
|
|
5
5
|
let i = typeof r == "object" && r ? r.locale : r;
|
|
6
6
|
return t(n, r, e(i));
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { n as getIntlayer };
|
|
@@ -2,7 +2,7 @@ import { useHTML as e } from "./installIntlayerHTML.mjs";
|
|
|
2
2
|
import { getHTML as t } from "@intlayer/core/interpreter";
|
|
3
3
|
import { defineComponent as n, h as r } from "vue";
|
|
4
4
|
import { VOID_HTML_ELEMENTS as i } from "@intlayer/core/transpiler";
|
|
5
|
-
|
|
5
|
+
// src/html/HTMLRenderer.ts
|
|
6
6
|
var a = (e, { components: n = {} } = {}) => {
|
|
7
7
|
let a = Object.fromEntries(Object.entries(n).filter(([, e]) => e).map(([e, t]) => [e, (e) => r(t, e, e?.children)])), o = new Proxy(a, { get(e, t) {
|
|
8
8
|
if (typeof t == "string" && t in e) return e[t];
|
|
@@ -29,5 +29,4 @@ var a = (e, { components: n = {} } = {}) => {
|
|
|
29
29
|
return () => t(e.content);
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
//#endregion
|
|
33
32
|
export { s as HTMLRenderer, a as renderHTML, o as useHTMLRenderer };
|
package/dist/esm/html/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
import { HTMLRenderer as e, renderHTML as t, useHTMLRenderer as n } from "./HTMLRenderer.mjs";
|
|
2
|
+
import { installIntlayerHTML as r, intlayerHTML as i, useHTML as a } from "./installIntlayerHTML.mjs";
|
|
3
|
+
export { e as HTMLRenderer, r as installIntlayerHTML, i as intlayerHTML, t as renderHTML, a as useHTML, n as useHTMLRenderer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getHTML as e } from "@intlayer/core/interpreter";
|
|
2
2
|
import { inject as t, provide as n } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/html/installIntlayerHTML.ts
|
|
4
4
|
var r = Symbol("intlayerHTML"), i = null, a = (e) => i || (i = { renderHTML: e }, i), o = (t, i) => {
|
|
5
5
|
let o;
|
|
6
6
|
if (typeof i == "function") o = i;
|
|
@@ -19,5 +19,4 @@ var r = Symbol("intlayerHTML"), i = null, a = (e) => i || (i = { renderHTML: e }
|
|
|
19
19
|
} } : o(e, t));
|
|
20
20
|
t.provide(r, s);
|
|
21
21
|
}, s = { install: o }, c = () => t(r);
|
|
22
|
-
//#endregion
|
|
23
22
|
export { r as INTLAYER_HTML_SYMBOL, a as createIntlayerHTMLClient, o as installIntlayerHTML, s as intlayerHTML, c as useHTML };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useConversion as p } from "./analytics/useConversion.mjs";
|
|
7
|
-
import { useExperiment as m } from "./analytics/useExperiment.mjs";
|
|
1
|
+
import { useEditor as e } from "./editor/useEditor.mjs";
|
|
2
|
+
import { INTLAYER_SYMBOL as t, createIntlayerClient as n, installIntlayer as r, intlayer as i } from "./client/installIntlayer.mjs";
|
|
3
|
+
import { useAnalytics as a } from "./analytics/useAnalytics.mjs";
|
|
4
|
+
import { useConversion as o } from "./analytics/useConversion.mjs";
|
|
5
|
+
import { useExperiment as s } from "./analytics/useExperiment.mjs";
|
|
8
6
|
import "./analytics/index.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
7
|
+
import { getDictionary as c } from "./getDictionary.mjs";
|
|
8
|
+
import { atPath as l, createIntlayerLeafProxy as u, isComponentLike as d, isIntlayerNode as f, isObjectLike as p, toComponent as m, useDictionary as h } from "./client/useDictionary.mjs";
|
|
9
|
+
import { useDictionaryAsync as g } from "./client/useDictionaryAsync.mjs";
|
|
10
|
+
import { useDictionaryDynamic as _ } from "./client/useDictionaryDynamic.mjs";
|
|
11
|
+
import { getIntlayer as v } from "./getIntlayer.mjs";
|
|
12
|
+
import { useIntlayer as y } from "./client/useIntlayer.mjs";
|
|
13
|
+
import { useLoadDynamic as b } from "./client/useLoadDynamic.mjs";
|
|
14
|
+
import { useLocale as x } from "./client/useLocale.mjs";
|
|
15
|
+
import { usePathname as S } from "./client/usePathname.mjs";
|
|
16
|
+
import { useRewriteURL as C } from "./client/useRewriteURL.mjs";
|
|
17
17
|
import "./client/index.mjs";
|
|
18
|
-
import {
|
|
19
|
-
export {
|
|
18
|
+
import { getPlugins as w, htmlPlugin as T, insertionPlugin as E, intlayerNodePlugins as D, markdownPlugin as O, markdownStringPlugin as k } from "./plugins.mjs";
|
|
19
|
+
export { t as INTLAYER_SYMBOL, l as atPath, n as createIntlayerClient, u as createIntlayerLeafProxy, c as getDictionary, v as getIntlayer, w as getPlugins, T as htmlPlugin, E as insertionPlugin, r as installIntlayer, i as intlayer, D as intlayerNodePlugins, d as isComponentLike, f as isIntlayerNode, p as isObjectLike, O as markdownPlugin, k as markdownStringPlugin, m as toComponent, a as useAnalytics, o as useConversion, h as useDictionary, g as useDictionaryAsync, _ as useDictionaryDynamic, e as useEditor, s as useExperiment, y as useIntlayer, b as useLoadDynamic, x as useLocale, S as usePathname, C as useRewriteURL };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMarkdown as e } from "./installIntlayerMarkdown.mjs";
|
|
2
2
|
import { defineComponent as t } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/markdown/MarkdownRenderer.ts
|
|
4
4
|
var n = async (e, { components: t, wrapper: n, forceBlock: r, forceInline: i, preserveFrontmatter: a, tagfilter: o } = {}) => {
|
|
5
5
|
let s = {
|
|
6
6
|
components: t,
|
|
@@ -104,5 +104,4 @@ var n = async (e, { components: t, wrapper: n, forceBlock: r, forceInline: i, pr
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
-
//#endregion
|
|
108
107
|
export { i as MarkdownRenderer, n as renderMarkdown, r as useMarkdownRenderer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "./runtime.mjs";
|
|
2
2
|
import { compileWithOptions as t, parseMarkdown as n, renderMarkdownAst as r } from "@intlayer/core/markdown";
|
|
3
|
-
|
|
3
|
+
// src/markdown/compiler.ts
|
|
4
4
|
var i = (t = "", r = {}) => {
|
|
5
5
|
let { components: i, namedCodesToUnicode: a, sanitizer: o, slugify: s, ...c } = r;
|
|
6
6
|
return n(t, {
|
|
@@ -21,5 +21,4 @@ var i = (t = "", r = {}) => {
|
|
|
21
21
|
slugify: c
|
|
22
22
|
}, l);
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { a as compileMarkdown, i as parseMarkdown };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compileMarkdown as e } from "./compiler.mjs";
|
|
2
2
|
import { h as t, inject as n, provide as r, shallowRef as i } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/markdown/installIntlayerMarkdown.ts
|
|
4
4
|
var a = Symbol("intlayerMarkdown"), o = (e) => typeof e?.then == "function", s = null, c = (e, t) => s || (s = {
|
|
5
5
|
components: t,
|
|
6
6
|
renderMarkdown: e
|
|
@@ -51,5 +51,4 @@ var a = Symbol("intlayerMarkdown"), o = (e) => typeof e?.then == "function", s =
|
|
|
51
51
|
if (!e) throw Error("useMarkdown must be used within a MarkdownProvider");
|
|
52
52
|
return e;
|
|
53
53
|
};
|
|
54
|
-
//#endregion
|
|
55
54
|
export { a as INTLAYER_MARKDOWN_SYMBOL, c as createIntlayerMarkdownClient, l as installIntlayerMarkdown, u as intlayerMarkdown, d as useMarkdown };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment as e, cloneVNode as t, h as n } from "vue";
|
|
2
|
-
|
|
2
|
+
// src/markdown/runtime.ts
|
|
3
3
|
var r = (e) => typeof e == "string" || typeof e == "symbol" ? !1 : typeof e == "function" || typeof e == "object", i = {
|
|
4
4
|
createElement: (e, t, ...i) => i.length === 0 ? n(e, t) : r(e) ? n(e, t, { default: () => i }) : i.length === 1 ? n(e, t, i[0]) : n(e, t, i),
|
|
5
5
|
cloneElement: (e, n, ...r) => t(e, n),
|
|
@@ -16,5 +16,4 @@ var r = (e) => typeof e == "string" || typeof e == "symbol" ? !1 : typeof e == "
|
|
|
16
16
|
createElement: (e, n, ...r) => t(e, n, r)
|
|
17
17
|
} : i;
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { a as createVueRuntime, i as default, i as vueRuntime };
|