vue-intlayer 5.3.13 → 5.4.0-canary.0
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/ContentSelector.vue_vue_type_script_setup_true_lang-Dfu1ALQx.mjs +71 -0
- package/dist/ContentSelector.vue_vue_type_script_setup_true_lang-OSRmjq5b.js +1 -0
- package/dist/ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-BML9iRiS.mjs +45 -0
- package/dist/ContentSelectorWrapper.vue_vue_type_script_setup_true_lang-CE_1sBPk.js +1 -0
- package/dist/EditedContentRenderer.vue_vue_type_script_setup_true_lang-CvPgk7Z3.mjs +39 -0
- package/dist/EditedContentRenderer.vue_vue_type_script_setup_true_lang-Yqrgst_y.js +1 -0
- package/dist/cjs/UI/ContentSelector.cjs +1 -0
- package/dist/cjs/client/computedProxy.cjs +1 -0
- package/dist/cjs/client/index.cjs +1 -0
- package/dist/cjs/client/installIntlayer.cjs +1 -0
- package/dist/cjs/client/useDictionary.cjs +1 -0
- package/dist/cjs/client/useIntlayer.cjs +1 -0
- package/dist/cjs/client/useLocale.cjs +1 -0
- package/dist/cjs/client/useLocaleCookie.cjs +1 -0
- package/dist/cjs/editor/ContentSelectorWrapper.cjs +1 -0
- package/dist/cjs/editor/EditedContentRenderer.cjs +1 -0
- package/dist/cjs/editor/EditorSelectorRenderer.cjs +1 -0
- package/dist/cjs/editor/changedContent.cjs +1 -0
- package/dist/cjs/editor/communicator.cjs +1 -0
- package/dist/cjs/editor/configuration.cjs +1 -0
- package/dist/cjs/editor/createSharedComposable.cjs +1 -0
- package/dist/cjs/editor/dictionariesRecord.cjs +1 -0
- package/dist/cjs/editor/editedContent.cjs +1 -0
- package/dist/cjs/editor/editorEnabled.cjs +1 -0
- package/dist/cjs/editor/editorLocale.cjs +1 -0
- package/dist/cjs/editor/focusDictionary.cjs +1 -0
- package/dist/cjs/editor/index.cjs +1 -0
- package/dist/cjs/editor/installIntlayerEditor.cjs +1 -0
- package/dist/cjs/editor/useCrossFrameMessageListener.cjs +1 -0
- package/dist/cjs/editor/useCrossFrameState.cjs +1 -0
- package/dist/cjs/editor/useCrossURLPathState.cjs +1 -0
- package/dist/cjs/editor/useEditedContentRenderer.cjs +1 -0
- package/dist/cjs/editor/useEditor.cjs +1 -0
- package/dist/cjs/editor/useIframeClickInterceptor.cjs +1 -0
- package/dist/cjs/getDictionary.cjs +1 -0
- package/dist/cjs/getIntlayer.cjs +1 -0
- package/dist/cjs/index.cjs +1 -25
- package/dist/cjs/markdown/index.cjs +1 -0
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +1 -0
- package/dist/cjs/plugins.cjs +1 -0
- package/dist/cjs/renderIntlayerNode.cjs +1 -0
- package/dist/cjs/server/IntlayerServerProvider.cjs +1 -0
- package/dist/cjs/server/index.cjs +1 -0
- package/dist/cjs/server/serverContext.cjs +1 -0
- package/dist/cjs/server/t.cjs +1 -0
- package/dist/cjs/server/useDictionary.cjs +1 -0
- package/dist/cjs/server/useIntlayer.cjs +1 -0
- package/dist/esm/UI/ContentSelector.mjs +4 -0
- package/dist/esm/client/computedProxy.mjs +24 -0
- package/dist/esm/client/index.mjs +12 -0
- package/dist/esm/client/installIntlayer.mjs +28 -0
- package/dist/esm/client/useDictionary.mjs +16 -0
- package/dist/esm/client/useIntlayer.mjs +14 -0
- package/dist/esm/client/useLocale.mjs +33 -0
- package/dist/esm/client/useLocaleCookie.mjs +19 -0
- package/dist/esm/editor/ContentSelectorWrapper.mjs +4 -0
- package/dist/esm/editor/EditedContentRenderer.mjs +4 -0
- package/dist/esm/editor/EditorSelectorRenderer.mjs +39 -0
- package/dist/esm/editor/changedContent.mjs +21 -0
- package/dist/esm/editor/communicator.mjs +37 -0
- package/dist/esm/editor/configuration.mjs +13 -0
- package/dist/esm/editor/createSharedComposable.mjs +15 -0
- package/dist/esm/editor/dictionariesRecord.mjs +49 -0
- package/dist/esm/editor/editedContent.mjs +43 -0
- package/dist/esm/editor/editorEnabled.mjs +36 -0
- package/dist/esm/editor/editorLocale.mjs +29 -0
- package/dist/esm/editor/focusDictionary.mjs +39 -0
- package/dist/esm/editor/index.mjs +6 -0
- package/dist/esm/editor/installIntlayerEditor.mjs +18 -0
- package/dist/esm/editor/useCrossFrameMessageListener.mjs +31 -0
- package/dist/esm/editor/useCrossFrameState.mjs +44 -0
- package/dist/esm/editor/useCrossURLPathState.mjs +26 -0
- package/dist/esm/editor/useEditedContentRenderer.mjs +17 -0
- package/dist/esm/editor/useEditor.mjs +14 -0
- package/dist/esm/editor/useIframeClickInterceptor.mjs +23 -0
- package/dist/esm/getDictionary.mjs +17 -0
- package/dist/esm/getIntlayer.mjs +13 -0
- package/dist/esm/index.mjs +25 -3
- package/dist/esm/markdown/index.mjs +7 -0
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +25 -0
- package/dist/esm/plugins.mjs +90 -0
- package/dist/esm/renderIntlayerNode.mjs +12 -0
- package/dist/esm/server/IntlayerServerProvider.mjs +12 -0
- package/dist/esm/server/index.mjs +16 -0
- package/dist/esm/server/serverContext.mjs +34 -0
- package/dist/esm/server/t.mjs +10 -0
- package/dist/esm/server/useDictionary.mjs +10 -0
- package/dist/esm/server/useIntlayer.mjs +10 -0
- package/dist/types/UI/ContentSelector.vue.d.ts +33 -0
- package/dist/types/UI/ContentSelector.vue.d.ts.map +1 -0
- package/dist/types/client/computedProxy.d.ts +3 -0
- package/dist/types/client/computedProxy.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +5 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/installIntlayer.d.ts +16 -0
- package/dist/types/client/installIntlayer.d.ts.map +1 -0
- package/dist/types/client/useDictionary.d.ts +5 -0
- package/dist/types/client/useDictionary.d.ts.map +1 -0
- package/dist/types/client/useIntlayer.d.ts +11 -0
- package/dist/types/client/useIntlayer.d.ts.map +1 -0
- package/dist/types/client/useLocale.d.ts +16 -0
- package/dist/types/client/useLocale.d.ts.map +1 -0
- package/dist/types/client/useLocaleCookie.d.ts +17 -0
- package/dist/types/client/useLocaleCookie.d.ts.map +1 -0
- package/dist/types/editor/ContentSelectorWrapper.vue.d.ts +26 -0
- package/dist/types/editor/ContentSelectorWrapper.vue.d.ts.map +1 -0
- package/dist/types/editor/changedContent.d.ts +15 -0
- package/dist/types/editor/changedContent.d.ts.map +1 -0
- package/dist/types/editor/communicator.d.ts +28 -0
- package/dist/types/editor/communicator.d.ts.map +1 -0
- package/dist/types/editor/configuration.d.ts +2 -0
- package/dist/types/editor/configuration.d.ts.map +1 -0
- package/dist/types/editor/createSharedComposable.d.ts +13 -0
- package/dist/types/editor/createSharedComposable.d.ts.map +1 -0
- package/dist/types/editor/dictionariesRecord.d.ts +16 -0
- package/dist/types/editor/dictionariesRecord.d.ts.map +1 -0
- package/dist/types/editor/editedContent.d.ts +19 -0
- package/dist/types/editor/editedContent.d.ts.map +1 -0
- package/dist/types/editor/editorEnabled.d.ts +16 -0
- package/dist/types/editor/editorEnabled.d.ts.map +1 -0
- package/dist/types/editor/editorLocale.d.ts +3 -0
- package/dist/types/editor/editorLocale.d.ts.map +1 -0
- package/dist/types/editor/focusDictionary.d.ts +24 -0
- package/dist/types/editor/focusDictionary.d.ts.map +1 -0
- package/dist/types/editor/index.d.ts +3 -0
- package/dist/types/editor/index.d.ts.map +1 -0
- package/dist/types/editor/installIntlayerEditor.d.ts +15 -0
- package/dist/types/editor/installIntlayerEditor.d.ts.map +1 -0
- package/dist/types/editor/useCrossFrameMessageListener.d.ts +11 -0
- package/dist/types/editor/useCrossFrameMessageListener.d.ts.map +1 -0
- package/dist/types/editor/useCrossFrameState.d.ts +24 -0
- package/dist/types/editor/useCrossFrameState.d.ts.map +1 -0
- package/dist/types/editor/useCrossURLPathState.d.ts +16 -0
- package/dist/types/editor/useCrossURLPathState.d.ts.map +1 -0
- package/dist/types/editor/useEditedContentRenderer.d.ts +10 -0
- package/dist/types/editor/useEditedContentRenderer.d.ts.map +1 -0
- package/dist/types/editor/useEditor.d.ts +2 -0
- package/dist/types/editor/useEditor.d.ts.map +1 -0
- package/dist/types/editor/useIframeClickInterceptor.d.ts +11 -0
- package/dist/types/editor/useIframeClickInterceptor.d.ts.map +1 -0
- package/dist/types/getDictionary.d.ts +5 -0
- package/dist/types/getDictionary.d.ts.map +1 -0
- package/dist/types/getIntlayer.d.ts +5 -0
- package/dist/types/getIntlayer.d.ts.map +1 -0
- package/dist/types/index.d.ts +10 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markdown/index.d.ts +2 -0
- package/dist/types/markdown/index.d.ts.map +1 -0
- package/dist/types/markdown/installIntlayerMarkdown.d.ts +17 -0
- package/dist/types/markdown/installIntlayerMarkdown.d.ts.map +1 -0
- package/dist/types/plugins.d.ts +46 -0
- package/dist/types/plugins.d.ts.map +1 -0
- package/dist/types/renderIntlayerNode.d.ts +36 -0
- package/dist/types/renderIntlayerNode.d.ts.map +1 -0
- package/dist/types/server/IntlayerServerProvider.d.ts +38 -0
- package/dist/types/server/IntlayerServerProvider.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +6 -0
- package/dist/types/server/index.d.ts.map +1 -0
- package/dist/types/server/serverContext.d.ts +35 -0
- package/dist/types/server/serverContext.d.ts.map +1 -0
- package/dist/types/server/t.d.ts +24 -0
- package/dist/types/server/t.d.ts.map +1 -0
- package/dist/types/server/useDictionary.d.ts +19 -0
- package/dist/types/server/useDictionary.d.ts.map +1 -0
- package/dist/types/server/useIntlayer.d.ts +16 -0
- package/dist/types/server/useIntlayer.d.ts.map +1 -0
- package/package.json +34 -14
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/intlayerMiddlewarePlugin.cjs +0 -224
- package/dist/cjs/intlayerMiddlewarePlugin.cjs.map +0 -1
- package/dist/cjs/intlayerPlugin.cjs +0 -76
- package/dist/cjs/intlayerPlugin.cjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/intlayerMiddlewarePlugin.mjs +0 -200
- package/dist/esm/intlayerMiddlewarePlugin.mjs.map +0 -1
- package/dist/esm/intlayerPlugin.mjs +0 -52
- package/dist/esm/intlayerPlugin.mjs.map +0 -1
- package/dist/types/intlayerMiddlewarePlugin.d.ts +0 -6
- package/dist/types/intlayerMiddlewarePlugin.d.ts.map +0 -1
- package/dist/types/intlayerPlugin.d.ts +0 -16
- package/dist/types/intlayerPlugin.d.ts.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IntlayerServerContext as t, getIntlayerLocale as o, provideIntlayerLocale as a, withIntlayerLocale as n } from "./IntlayerServerProvider.mjs";
|
|
2
|
+
import { createServerContext as x, getServerContext as p } from "./serverContext.mjs";
|
|
3
|
+
import { t as c } from "./t.mjs";
|
|
4
|
+
import { useDictionary as m } from "./useDictionary.mjs";
|
|
5
|
+
import { useIntlayer as i } from "./useIntlayer.mjs";
|
|
6
|
+
export {
|
|
7
|
+
t as IntlayerServerContext,
|
|
8
|
+
x as createServerContext,
|
|
9
|
+
o as getIntlayerLocale,
|
|
10
|
+
p as getServerContext,
|
|
11
|
+
a as provideIntlayerLocale,
|
|
12
|
+
c as t,
|
|
13
|
+
m as useDictionary,
|
|
14
|
+
i as useIntlayer,
|
|
15
|
+
n as withIntlayerLocale
|
|
16
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const s = /* @__PURE__ */ new Map(), v = (r) => {
|
|
2
|
+
c();
|
|
3
|
+
const t = Symbol("serverContext");
|
|
4
|
+
s.set(t, { value: void 0 });
|
|
5
|
+
const e = () => s.get(t) || { value: void 0 };
|
|
6
|
+
return {
|
|
7
|
+
// Method to provide a value to the context
|
|
8
|
+
provide: (n) => {
|
|
9
|
+
const o = e();
|
|
10
|
+
o.value = n, s.set(t, o);
|
|
11
|
+
},
|
|
12
|
+
// Method to consume the context value with a callback
|
|
13
|
+
consume: (n) => {
|
|
14
|
+
const o = e();
|
|
15
|
+
return n(o ? o.value : r);
|
|
16
|
+
},
|
|
17
|
+
// Internal storage access
|
|
18
|
+
_storage: e,
|
|
19
|
+
_defaultValue: r
|
|
20
|
+
};
|
|
21
|
+
}, u = ({
|
|
22
|
+
_storage: r,
|
|
23
|
+
_defaultValue: t
|
|
24
|
+
}) => {
|
|
25
|
+
const e = r();
|
|
26
|
+
return e ? e.value : t;
|
|
27
|
+
}, c = () => {
|
|
28
|
+
if (typeof window < "u")
|
|
29
|
+
throw new Error("createServerContext only works in Server Components");
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
v as createServerContext,
|
|
33
|
+
u as getServerContext
|
|
34
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getTranslation as o } from "@intlayer/core";
|
|
2
|
+
import { IntlayerServerContext as n } from "./IntlayerServerProvider.mjs";
|
|
3
|
+
import { getServerContext as a } from "./serverContext.mjs";
|
|
4
|
+
const i = (t, r) => {
|
|
5
|
+
const e = a(n);
|
|
6
|
+
return o(t, r ?? e);
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
i as t
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getDictionary as o } from "../getDictionary.mjs";
|
|
2
|
+
import { IntlayerServerContext as n } from "./IntlayerServerProvider.mjs";
|
|
3
|
+
import { getServerContext as i } from "./serverContext.mjs";
|
|
4
|
+
const p = (r, t) => {
|
|
5
|
+
const e = t ?? i(n);
|
|
6
|
+
return o(r, e);
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
p as useDictionary
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getIntlayer as o } from "../getIntlayer.mjs";
|
|
2
|
+
import { IntlayerServerContext as n } from "./IntlayerServerProvider.mjs";
|
|
3
|
+
import { getServerContext as m } from "./serverContext.mjs";
|
|
4
|
+
const c = (r, t) => {
|
|
5
|
+
const e = t ?? m(n);
|
|
6
|
+
return o(r, e);
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
c as useIntlayer
|
|
10
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
onClickOutside?: () => void;
|
|
3
|
+
pressDuration?: number;
|
|
4
|
+
isSelecting?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {
|
|
12
|
+
containerRef: HTMLSpanElement;
|
|
13
|
+
};
|
|
14
|
+
rootEl: HTMLSpanElement;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
click: (...args: any[]) => void;
|
|
19
|
+
press: (...args: any[]) => void;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
21
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onPress?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
containerRef: HTMLSpanElement;
|
|
25
|
+
}, HTMLSpanElement>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=ContentSelector.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/UI/ContentSelector.vue"],"names":[],"mappings":"AAsHA,KAAK,KAAK,GAAG;IACX,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAkFF,iBAAS,cAAc;WAkDT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;mBASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computedProxy.d.ts","sourceRoot":"","sources":["../../../src/client/computedProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,KAAK,CAAC;AAEnD,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,MAAM,EAAE,KAAK,WAAW,CAAC,CAAC,CAAC,KAAG,CAuBlE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Locales, LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
import { App, Ref } from 'vue';
|
|
3
|
+
export declare const INTLAYER_SYMBOL: unique symbol;
|
|
4
|
+
export type IntlayerProvider = {
|
|
5
|
+
locale: Ref<Locales>;
|
|
6
|
+
setLocale: (locale: LocalesValues) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Create and return a single IntlayerProvider instance
|
|
10
|
+
*/
|
|
11
|
+
export declare const createIntlayerClient: (locale?: LocalesValues) => IntlayerProvider;
|
|
12
|
+
/**
|
|
13
|
+
* Helper to install the Intlayer provider into the app
|
|
14
|
+
*/
|
|
15
|
+
export declare const installIntlayer: (app: App, locale?: LocalesValues) => void;
|
|
16
|
+
//# sourceMappingURL=installIntlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installIntlayer.d.ts","sourceRoot":"","sources":["../../../src/client/installIntlayer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,KAAK,GAAG,EAAY,GAAG,EAAO,MAAM,KAAK,CAAC;AAGnD,eAAO,MAAM,eAAe,eAAqB,CAAC;AAOlD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,aAAa,KACrB,gBAiBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,GAAG,EAAE,SAAS,aAAa,SAM/D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
import { Dictionary } from '@intlayer/core';
|
|
3
|
+
import { DeepTransformContent } from '../plugins';
|
|
4
|
+
export declare const useDictionary: <T extends Dictionary>(dictionary: T, locale?: LocalesValues) => DeepTransformContent<T["content"]>;
|
|
5
|
+
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","sourceRoot":"","sources":["../../../src/client/useDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIlD,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,UAAU,EAChD,YAAY,CAAC,EACb,SAAS,aAAa,KACrB,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,CAYnC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
import { DictionaryKeys } from '@intlayer/core';
|
|
3
|
+
import { IntlayerDictionaryTypesConnector } from 'intlayer';
|
|
4
|
+
import { DeepTransformContent } from '../plugins';
|
|
5
|
+
/**
|
|
6
|
+
* On the client side, Hook that picking one dictionary by its key and return the content
|
|
7
|
+
*
|
|
8
|
+
* If the locale is not provided, it will use the locale from the client context
|
|
9
|
+
*/
|
|
10
|
+
export declare const useIntlayer: <T extends DictionaryKeys>(key: T, locale?: LocalesValues) => DeepTransformContent<IntlayerDictionaryTypesConnector[T]["content"]>;
|
|
11
|
+
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","sourceRoot":"","sources":["../../../src/client/useIntlayer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIlD;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,cAAc,EAClD,KAAK,CAAC,EACN,SAAS,aAAa,KACrB,oBAAoB,CAAC,gCAAgC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CASrE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
type useLocaleProps = {
|
|
3
|
+
onLocaleChange?: (locale: LocalesValues) => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* On the client side, composable to get the current locale and all related fields
|
|
7
|
+
*/
|
|
8
|
+
export declare const useLocale: ({ onLocaleChange }?: useLocaleProps) => {
|
|
9
|
+
locale: import('vue').ComputedRef<import('intlayer').Locales>;
|
|
10
|
+
defaultLocale: import('intlayer').Locales;
|
|
11
|
+
availableLocales: import('intlayer').Locales[];
|
|
12
|
+
localeList: import('intlayer').Locales[];
|
|
13
|
+
setLocale: (newLocale: LocalesValues) => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM7D,KAAK,cAAc,GAAG;IACpB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,qBAAoB,cAAmB;;;;;2BASjC,aAAa;CAoB5C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
/**
|
|
3
|
+
* Get the locale cookie
|
|
4
|
+
*/
|
|
5
|
+
export declare const localeCookie: LocalesValues | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Set the locale cookie
|
|
8
|
+
*/
|
|
9
|
+
export declare const setLocaleCookie: (locale: LocalesValues) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Hook that provides the locale cookie and a function to set it
|
|
12
|
+
*/
|
|
13
|
+
export declare const useLocaleCookie: () => {
|
|
14
|
+
localeCookie: LocalesValues | undefined;
|
|
15
|
+
setLocaleCookie: (locale: LocalesValues) => void;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useLocaleCookie.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocaleCookie.d.ts","sourceRoot":"","sources":["../../../src/client/useLocaleCookie.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAc7D;;GAEG;AACH,eAAO,MAAM,YAAY,EACrB,aAAa,GACb,SAAS,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,aAAa,SAEpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;8BAPY,aAAa;CAUnD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { NodeProps } from '@intlayer/core';
|
|
3
|
+
/**
|
|
4
|
+
* Combine your NodeProps (which include dictionaryKey & keyPath)
|
|
5
|
+
* with any other div‐like attributes (omitting Vue's `children`).
|
|
6
|
+
*/
|
|
7
|
+
type Props = NodeProps & /* @vue-ignore */ Omit<HTMLAttributes, 'children'>;
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: {}): any;
|
|
12
|
+
default?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: any;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=ContentSelectorWrapper.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentSelectorWrapper.vue.d.ts","sourceRoot":"","sources":["../../../src/editor/ContentSelectorWrapper.vue"],"names":[],"mappings":"AAUA;AAiDA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAM/D;;;GAGG;AACH,KAAK,KAAK,GAAG,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AA2B5E,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;yBAXrB,GAAG;yBACH,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Dictionary } from '@intlayer/core';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
export declare const createChangedContentClient: () => {
|
|
4
|
+
state: Record<string, Dictionary>;
|
|
5
|
+
setChangedContent: (dictionaryKey: Dictionary["key"], newValue: Dictionary["content"]) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Helper to install the Intlayer provider into the app
|
|
9
|
+
*/
|
|
10
|
+
export declare const installChangedContent: (app: App) => void;
|
|
11
|
+
export declare const useChangedContent: () => {
|
|
12
|
+
state: Record<string, Dictionary>;
|
|
13
|
+
setChangedContent: (dictionaryKey: Dictionary["key"], newValue: Dictionary["content"]) => void;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=changedContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changedContent.d.ts","sourceRoot":"","sources":["../../../src/editor/changedContent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAY,MAAM,KAAK,CAAC;AAcpC,eAAO,MAAM,0BAA0B;;uCAWpB,UAAU,CAAC,KAAK,CAAC,YACtB,UAAU,CAAC,SAAS,CAAC;CAYlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,KAAK,GAAG,SAI7C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;uCAxBX,UAAU,CAAC,KAAK,CAAC,YACtB,UAAU,CAAC,SAAS,CAAC;CA2BlC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Interface defining a cross-frame communicator
|
|
4
|
+
*/
|
|
5
|
+
export type Communicator = {
|
|
6
|
+
postMessage: typeof window.postMessage;
|
|
7
|
+
allowedOrigins?: string[];
|
|
8
|
+
senderId: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Configuration options for the communicator
|
|
12
|
+
*/
|
|
13
|
+
export type CommunicatorOptions = Omit<Communicator, 'senderId'>;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a communicator client
|
|
16
|
+
* @param options - Options for configuring the communicator
|
|
17
|
+
*/
|
|
18
|
+
export declare const createCommunicator: (options?: CommunicatorOptions) => Communicator;
|
|
19
|
+
/**
|
|
20
|
+
* Helper to install the Intlayer communicator into the app
|
|
21
|
+
*/
|
|
22
|
+
export declare const installCommunicator: (app: App, options?: CommunicatorOptions) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Hook to access the communicator
|
|
25
|
+
* @returns The communicator instance
|
|
26
|
+
*/
|
|
27
|
+
export declare const useCommunicator: () => Communicator;
|
|
28
|
+
//# sourceMappingURL=communicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communicator.d.ts","sourceRoot":"","sources":["../../../src/editor/communicator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAoB,MAAM,KAAK,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,OAAO,MAAM,CAAC,WAAW,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAwBjE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAS,mBAAiD,iBAW3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,KAAK,GAAG,EACR,UAAS,mBAAiD,SAK3D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,YAYlC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/editor/configuration.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,YAQ5B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type AnyFn = (...args: any[]) => any;
|
|
2
|
+
export type SharedComposableReturn<T extends AnyFn = AnyFn> = T;
|
|
3
|
+
/**
|
|
4
|
+
* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare function tryOnScopeDispose(fn: () => void): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Make a composable function usable with multiple Vue instances.
|
|
10
|
+
*/
|
|
11
|
+
export declare const createSharedComposable: <Fn extends AnyFn>(composable: Fn) => SharedComposableReturn<Fn>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=createSharedComposable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSharedComposable.d.ts","sourceRoot":"","sources":["../../../src/editor/createSharedComposable.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAErC,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC;AAIhE;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,IAAI,WAM/C;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,EAAE,SAAS,KAAK,EACrD,YAAY,EAAE,KACb,sBAAsB,CAAC,EAAE,CAuB3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dictionary } from '@intlayer/core';
|
|
2
|
+
import { App, Ref } from 'vue';
|
|
3
|
+
export type DictionaryContent = Record<Dictionary['key'], Dictionary>;
|
|
4
|
+
type DictionariesRecordClient = {
|
|
5
|
+
localeDictionaries: Ref<DictionaryContent>;
|
|
6
|
+
setLocaleDictionaries: (newValue: DictionaryContent) => void;
|
|
7
|
+
setLocaleDictionary: (d: Dictionary) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const createDictionaryRecordClient: () => DictionariesRecordClient;
|
|
10
|
+
/**
|
|
11
|
+
* Helper to install the provider into the app
|
|
12
|
+
*/
|
|
13
|
+
export declare const installDictionariesRecord: (app: App) => void;
|
|
14
|
+
export declare const useDictionariesRecord: () => void;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=dictionariesRecord.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionariesRecord.d.ts","sourceRoot":"","sources":["../../../src/editor/dictionariesRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,GAAG,EAAuC,GAAG,EAAS,MAAM,KAAK,CAAC;AAa3E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAEtE,KAAK,wBAAwB,GAAG;IAC9B,kBAAkB,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC3C,qBAAqB,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7D,mBAAmB,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAC9C,CAAC;AAKF,eAAO,MAAM,4BAA4B,gCAqBxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,KAAK,GAAG,SAIjD,CAAC;AAEF,eAAO,MAAM,qBAAqB,YAsBhC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ContentNode, Dictionary, KeyPath } from '@intlayer/core';
|
|
2
|
+
import { App, Ref } from 'vue';
|
|
3
|
+
export type EditedContent = Record<Dictionary['key'], Dictionary>;
|
|
4
|
+
type EditedContentClient = {
|
|
5
|
+
editedContent: Ref<EditedContent>;
|
|
6
|
+
setEditedContent: (editedContent: EditedContent) => void;
|
|
7
|
+
getEditedContentValue: (dictionaryKey: Dictionary['key'], keyPath: KeyPath[]) => ContentNode | undefined;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Creates an edited content client
|
|
11
|
+
*/
|
|
12
|
+
export declare const createEditedContentClient: () => EditedContentClient;
|
|
13
|
+
/**
|
|
14
|
+
* Helper to install the edited content into the app
|
|
15
|
+
*/
|
|
16
|
+
export declare const installEditedContent: (app: App) => void;
|
|
17
|
+
export declare const useEditedContent: () => EditedContentClient;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=editedContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editedContent.d.ts","sourceRoot":"","sources":["../../../src/editor/editedContent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGvE,OAAO,EAAE,GAAG,EAAoB,GAAG,EAAc,MAAM,KAAK,CAAC;AAI7D,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAElE,KAAK,mBAAmB,GAAG;IACzB,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAClC,gBAAgB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,IAAI,CAAC;IACzD,qBAAqB,EAAE,CACrB,aAAa,EAAE,UAAU,CAAC,KAAK,CAAC,EAChC,OAAO,EAAE,OAAO,EAAE,KACf,WAAW,GAAG,SAAS,CAAC;CAC9B,CAAC;AASF;;GAEG;AACH,eAAO,MAAM,yBAAyB,2BAsBrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,GAAG,SAI5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,2BAqB3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { App, Ref } from 'vue';
|
|
2
|
+
export type EditorEnabledStateProps = {
|
|
3
|
+
wrapperEnabled: Ref<boolean>;
|
|
4
|
+
isInIframe: Ref<boolean>;
|
|
5
|
+
enabled: Ref<boolean>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Creates an editor wrapperEnabled client
|
|
9
|
+
*/
|
|
10
|
+
export declare const createEditorEnabledClient: () => EditorEnabledStateProps;
|
|
11
|
+
/**
|
|
12
|
+
* Helper to install the editor wrapperEnabled state into the app
|
|
13
|
+
*/
|
|
14
|
+
export declare const installEditorEnabled: (app: App) => void;
|
|
15
|
+
export declare const useEditorEnabled: () => EditorEnabledStateProps;
|
|
16
|
+
//# sourceMappingURL=editorEnabled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorEnabled.d.ts","sourceRoot":"","sources":["../../../src/editor/editorEnabled.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAoC,GAAG,EAAE,MAAM,KAAK,CAAC;AAOjE,MAAM,MAAM,uBAAuB,GAAG;IACpC,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CACvB,CAAC;AASF;;GAEG;AACH,eAAO,MAAM,yBAAyB,+BAcrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,GAAG,SAI5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,+BAsB3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorLocale.d.ts","sourceRoot":"","sources":["../../../src/editor/editorLocale.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI9D,eAAO,MAAM,eAAe,wBAoB1B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { KeyPath } from '@intlayer/core';
|
|
2
|
+
import { App, Ref } from 'vue';
|
|
3
|
+
export type FileContent = {
|
|
4
|
+
dictionaryKey: string;
|
|
5
|
+
keyPath?: KeyPath[];
|
|
6
|
+
dictionaryPath?: string;
|
|
7
|
+
};
|
|
8
|
+
type FocusDictionaryClient = {
|
|
9
|
+
focusedContent: Ref<FileContent | null>;
|
|
10
|
+
setFocusedContent: (focussedContent: FileContent | null) => void;
|
|
11
|
+
setFocusedContentKeyPath: (keyPath: KeyPath[]) => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Creates a focus dictionary client
|
|
15
|
+
*/
|
|
16
|
+
export declare const createFocusDictionaryClient: () => FocusDictionaryClient;
|
|
17
|
+
/**
|
|
18
|
+
* Helper to install the focus dictionary into the app
|
|
19
|
+
*/
|
|
20
|
+
export declare const installFocusDictionary: (app: App) => void;
|
|
21
|
+
/** consumer */
|
|
22
|
+
export declare const useFocusDictionary: () => FocusDictionaryClient;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=focusDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusDictionary.d.ts","sourceRoot":"","sources":["../../../src/editor/focusDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,GAAG,EAAyB,GAAG,EAAS,MAAM,KAAK,CAAC;AAI7D,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,cAAc,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACxC,iBAAiB,EAAE,CAAC,eAAe,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACjE,wBAAwB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACxD,CAAC;AASF;;GAEG;AACH,eAAO,MAAM,2BAA2B,6BAqBvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,GAAG,SAI9C,CAAC;AAEF,eAAe;AACf,eAAO,MAAM,kBAAkB,6BA8B7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACjF,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Vue-side replacement for the former <IntlayerEditorProvider> React component.
|
|
4
|
+
*
|
|
5
|
+
* Call **once** in the <script setup lang="ts"> of your root component (usually App.vue):
|
|
6
|
+
*
|
|
7
|
+
* ```vue
|
|
8
|
+
* <script setup lang="ts">
|
|
9
|
+
* import { useIntlayerProviders } from 'vue-intlayer';
|
|
10
|
+
* useIntlayerProviders({ configuration, postMessage });
|
|
11
|
+
* </script>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const installIntlayerEditor: (app: App) => void;
|
|
15
|
+
//# sourceMappingURL=installIntlayerEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installIntlayerEditor.d.ts","sourceRoot":"","sources":["../../../src/editor/installIntlayerEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AA+B1B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,GAAI,KAAK,GAAG,KAAG,IAchD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MessageKey } from '@intlayer/editor';
|
|
2
|
+
/**
|
|
3
|
+
* useCrossFrameMessageListener
|
|
4
|
+
*
|
|
5
|
+
* @template S - type of the message payload
|
|
6
|
+
* @param key message type we care about
|
|
7
|
+
* @param onEventTriggered optional callback when a matching message arrives
|
|
8
|
+
* @returns postMessage(data?) helper scoped to this key
|
|
9
|
+
*/
|
|
10
|
+
export declare const useCrossFrameMessageListener: <S>(key: `${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`, onEventTriggered?: (data: S) => void) => (data?: S) => void;
|
|
11
|
+
//# sourceMappingURL=useCrossFrameMessageListener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCrossFrameMessageListener.d.ts","sourceRoot":"","sources":["../../../src/editor/useCrossFrameMessageListener.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAe,MAAM,kBAAkB,CAAC;AA0DhE;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,EAC5C,KAAK,GAAG,UAAU,EAAE,GAAG,GAAG,UAAU,OAAO,GAAG,GAAG,UAAU,MAAM,EACjE,mBAAmB,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,aAyBD,CAAC,SAKrC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MessageKey } from '@intlayer/editor';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export type CrossFrameStateOptions = {
|
|
4
|
+
/** Whether to broadcast state changes to other instances (default: true) */
|
|
5
|
+
emit?: boolean;
|
|
6
|
+
/** Whether to listen for state updates from other instances (default: true) */
|
|
7
|
+
receive?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Vue composable that mirrors the behaviour of the React `useCrossFrameState` hook.
|
|
11
|
+
* It synchronises a reactive value across frames/windows via the `postMessage` API.
|
|
12
|
+
*
|
|
13
|
+
* @template S The type of the state being synchronised.
|
|
14
|
+
* @param key Unique key identifying this state channel.
|
|
15
|
+
* @param initialState Initial value (or lazy factory) for the state.
|
|
16
|
+
* @param options Control flags for emitting/receiving updates.
|
|
17
|
+
*
|
|
18
|
+
* @returns `[stateRef, setState, postState]`
|
|
19
|
+
* - `stateRef` – Reactive `Ref<S | undefined>` holding the current state.
|
|
20
|
+
* - `setState` – Setter with the same API as React's `setState`.
|
|
21
|
+
* - `postState` – Manually broadcast the current state (useful after mutations outside `setState`).
|
|
22
|
+
*/
|
|
23
|
+
export declare const useCrossFrameState: <S>(key: `${MessageKey}`, initialState?: S | (() => S), options?: CrossFrameStateOptions) => [Ref<S | undefined>, (v: S | ((prev: S | undefined) => S)) => void, () => void];
|
|
24
|
+
//# sourceMappingURL=useCrossFrameState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCrossFrameState.d.ts","sourceRoot":"","sources":["../../../src/editor/useCrossFrameState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,GAAG,EAA2B,MAAM,KAAK,CAAC;AAInD,MAAM,MAAM,sBAAsB,GAAG;IACnC,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAkCF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAClC,KAAK,GAAG,UAAU,EAAE,EACpB,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC5B,UAAS,sBAAsD,KAC9D,CACD,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,EAClB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,SAAS,KAAK,CAAC,CAAC,KAAK,IAAI,EAC7C,MAAM,IAAI,CAyGX,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCrossFrameState } from './useCrossFrameState';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to create and manage a cross-frame synchronized URL path state
|
|
4
|
+
* @param initial - The initial URL path
|
|
5
|
+
* @param opts - Options for controlling emit and receive behavior
|
|
6
|
+
* @returns A tuple containing [state ref, setState function, forceSync function]
|
|
7
|
+
*/
|
|
8
|
+
export declare const useCrossURLPathState: (initial?: string, opts?: Parameters<typeof useCrossFrameState>[2]) => [import('vue').Ref<string | undefined, string | undefined>, (v: string | ((prev: string | undefined) => string)) => void, () => void];
|
|
9
|
+
/**
|
|
10
|
+
* Hook for host applications to push URL path changes into the shared state
|
|
11
|
+
* This also monkey patches history methods to capture navigation events
|
|
12
|
+
* @param initial - The initial URL path
|
|
13
|
+
* @returns A tuple containing [state ref, setState function]
|
|
14
|
+
*/
|
|
15
|
+
export declare const useCrossURLPathSetter: (initial?: string) => readonly [import('vue').Ref<string | undefined, string | undefined>, (v: string | ((prev: string | undefined) => string)) => void];
|
|
16
|
+
//# sourceMappingURL=useCrossURLPathState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCrossURLPathState.d.ts","sourceRoot":"","sources":["../../../src/editor/useCrossURLPathState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,MAAM,EAChB,OAAO,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,0IAC6B,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,uIAiErD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KeyPath } from '@intlayer/core';
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
|
+
export interface EditedContentActions {
|
|
4
|
+
getEditedContentValue(dictionaryKey: string, keyPath: KeyPath[]): unknown;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Mirrors the React hook one-for-one.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useEditedContentRenderer: (dictionaryKey: string, keyPath: KeyPath[], fallback: unknown) => ComputedRef<unknown>;
|
|
10
|
+
//# sourceMappingURL=useEditedContentRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditedContentRenderer.d.ts","sourceRoot":"","sources":["../../../src/editor/useEditedContentRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAGzD,MAAM,WAAW,oBAAoB;IACnC,qBAAqB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;CAC3E;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,kBAElB,MAAM,WACZ,OAAO,EAAE,YACR,OAAO,KAChB,WAAW,CAAC,OAAO,CAevB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditor.d.ts","sourceRoot":"","sources":["../../../src/editor/useEditor.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS,YASpB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook that intercepts clicks in the iframe and sends them to the parent window
|
|
3
|
+
* This allows the parent window to know when the iframe is clicked
|
|
4
|
+
*/
|
|
5
|
+
export declare const useIframeClickInterceptor: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Hook for the parent window to listen for iframe clicks and merge them
|
|
8
|
+
* This makes iframe clicks behave as if they happened in the parent window
|
|
9
|
+
*/
|
|
10
|
+
export declare const useIframeClickMerger: () => void;
|
|
11
|
+
//# sourceMappingURL=useIframeClickInterceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIframeClickInterceptor.d.ts","sourceRoot":"","sources":["../../../src/editor/useIframeClickInterceptor.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,eAAO,MAAM,yBAAyB,YAmBpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,YAO/B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Locales, LocalesValues } from '@intlayer/config/client';
|
|
2
|
+
import { Dictionary, Plugins } from '@intlayer/core';
|
|
3
|
+
import { DeepTransformContent } from './plugins';
|
|
4
|
+
export declare const getDictionary: <T extends Dictionary, L extends LocalesValues = Locales>(dictionary: T, locale?: L, additionalPlugins?: Plugins[]) => DeepTransformContent<T["content"]>;
|
|
5
|
+
//# sourceMappingURL=getDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","sourceRoot":"","sources":["../../src/getDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,UAAU,EACV,OAAO,EAER,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,oBAAoB,EAGrB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,aAAa,GACxB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,aAAa,GAAG,OAAO,EAEjC,YAAY,CAAC,EACb,SAAS,CAAC,EACV,oBAAoB,OAAO,EAAE,KAYjB,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,CAC9C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DictionaryKeys, Plugins } from '@intlayer/core';
|
|
2
|
+
import { IntlayerDictionaryTypesConnector, LocalesValues } from 'intlayer';
|
|
3
|
+
import { DeepTransformContent } from './plugins';
|
|
4
|
+
export declare const getIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: L, additionalPlugins?: Plugins[]) => DeepTransformContent<IntlayerDictionaryTypesConnector[T]["content"]>;
|
|
5
|
+
//# sourceMappingURL=getIntlayer.d.ts.map
|