@intlayer/design-system 2.0.2
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/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/.vite/manifest.json +953 -0
- package/dist/MarkDownRender-BeQGOIow.cjs +14 -0
- package/dist/MarkDownRender-gURA8GAt.js +315 -0
- package/dist/StringWrapper-CW70GPXq.js +28 -0
- package/dist/StringWrapper-DUDqtkwz.cjs +1 -0
- package/dist/check-BLEiR8OY.js +12 -0
- package/dist/check-rhNgx2ZQ.cjs +6 -0
- package/dist/components/Accordion/Accordion.cjs.js +8 -0
- package/dist/components/Accordion/Accordion.d.ts +10 -0
- package/dist/components/Accordion/Accordion.es.js +48 -0
- package/dist/components/Accordion/index.cjs.js +1 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.es.js +5 -0
- package/dist/components/Avatar/index.cjs.js +6 -0
- package/dist/components/Avatar/index.d.ts +9 -0
- package/dist/components/Avatar/index.es.js +71 -0
- package/dist/components/Button/index.cjs.js +6 -0
- package/dist/components/Button/index.d.ts +22 -0
- package/dist/components/Button/index.es.js +306 -0
- package/dist/components/Container/index.cjs.js +7 -0
- package/dist/components/Container/index.d.ts +23 -0
- package/dist/components/Container/index.es.js +152 -0
- package/dist/components/ContentEditor/ContentEditor.cjs.js +5 -0
- package/dist/components/ContentEditor/ContentEditor.d.ts +8 -0
- package/dist/components/ContentEditor/ContentEditor.es.js +75 -0
- package/dist/components/ContentEditor/index.cjs.js +1 -0
- package/dist/components/ContentEditor/index.d.ts +1 -0
- package/dist/components/ContentEditor/index.es.js +5 -0
- package/dist/components/ContentSelector/ContentSelector.cjs.js +1 -0
- package/dist/components/ContentSelector/ContentSelector.d.ts +11 -0
- package/dist/components/ContentSelector/ContentSelector.es.js +14 -0
- package/dist/components/ContentSelector/index.cjs.js +1 -0
- package/dist/components/ContentSelector/index.d.ts +1 -0
- package/dist/components/ContentSelector/index.es.js +5 -0
- package/dist/components/DictionaryEditor/DictionaryEditor.cjs.js +1 -0
- package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +20 -0
- package/dist/components/DictionaryEditor/DictionaryEditor.es.js +25 -0
- package/dist/components/DictionaryEditor/ItemLayout.cjs.js +1 -0
- package/dist/components/DictionaryEditor/ItemLayout.d.ts +16 -0
- package/dist/components/DictionaryEditor/ItemLayout.es.js +81 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs.js +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.es.js +10 -0
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs.js +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.es.js +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs.js +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.es.js +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.js +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts +8 -0
- package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.es.js +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs.js +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.d.ts +9 -0
- package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.es.js +7 -0
- package/dist/components/DictionaryEditor/NodeWrapper/index.cjs.js +1 -0
- package/dist/components/DictionaryEditor/NodeWrapper/index.d.ts +19 -0
- package/dist/components/DictionaryEditor/NodeWrapper/index.es.js +9 -0
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.js +1 -0
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts +10 -0
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.es.js +40 -0
- package/dist/components/DictionaryEditor/index.cjs.js +1 -0
- package/dist/components/DictionaryEditor/index.d.ts +1 -0
- package/dist/components/DictionaryEditor/index.es.js +5 -0
- package/dist/components/DropDown/index.cjs.js +5 -0
- package/dist/components/DropDown/index.d.ts +3 -0
- package/dist/components/DropDown/index.es.js +50 -0
- package/dist/components/DropDown/types.cjs.js +1 -0
- package/dist/components/DropDown/types.d.ts +15 -0
- package/dist/components/DropDown/types.es.js +1 -0
- package/dist/components/Footer/index.cjs.js +1 -0
- package/dist/components/Footer/index.d.ts +17 -0
- package/dist/components/Footer/index.es.js +64 -0
- package/dist/components/Headers/index.cjs.js +1 -0
- package/dist/components/Headers/index.d.ts +5 -0
- package/dist/components/Headers/index.es.js +35 -0
- package/dist/components/IDE/CodeRender.cjs.js +11 -0
- package/dist/components/IDE/CodeRender.d.ts +10 -0
- package/dist/components/IDE/CodeRender.es.js +833 -0
- package/dist/components/IDE/IDE.cjs.js +1 -0
- package/dist/components/IDE/IDE.d.ts +10 -0
- package/dist/components/IDE/IDE.es.js +124 -0
- package/dist/components/IDE/MarkDownRender.cjs.js +1 -0
- package/dist/components/IDE/MarkDownRender.d.ts +8 -0
- package/dist/components/IDE/MarkDownRender.es.js +7 -0
- package/dist/components/IDE/index.cjs.js +1 -0
- package/dist/components/IDE/index.d.ts +2 -0
- package/dist/components/IDE/index.es.js +7 -0
- package/dist/components/Loader/index.cjs.js +1 -0
- package/dist/components/Loader/index.d.ts +6 -0
- package/dist/components/Loader/index.es.js +21 -0
- package/dist/components/Loader/spinner.cjs.js +1 -0
- package/dist/components/Loader/spinner.d.ts +7 -0
- package/dist/components/Loader/spinner.es.js +22 -0
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.js +6 -0
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +11 -0
- package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.es.js +571 -0
- package/dist/components/LocaleSwitcherDropDown/index.cjs.js +1 -0
- package/dist/components/LocaleSwitcherDropDown/index.d.ts +1 -0
- package/dist/components/LocaleSwitcherDropDown/index.es.js +5 -0
- package/dist/components/Logo/LogoCircle.cjs.js +1 -0
- package/dist/components/Logo/LogoCircle.d.ts +4 -0
- package/dist/components/Logo/LogoCircle.es.js +12 -0
- package/dist/components/Logo/LogoNoFrame.cjs.js +1 -0
- package/dist/components/Logo/LogoNoFrame.d.ts +4 -0
- package/dist/components/Logo/LogoNoFrame.es.js +28 -0
- package/dist/components/Logo/LogoSquare.cjs.js +1 -0
- package/dist/components/Logo/LogoSquare.d.ts +4 -0
- package/dist/components/Logo/LogoSquare.es.js +12 -0
- package/dist/components/Logo/LogoSquircle.cjs.js +1 -0
- package/dist/components/Logo/LogoSquircle.d.ts +4 -0
- package/dist/components/Logo/LogoSquircle.es.js +17 -0
- package/dist/components/Logo/LogoTextOnly.cjs.js +1 -0
- package/dist/components/Logo/LogoTextOnly.d.ts +4 -0
- package/dist/components/Logo/LogoTextOnly.es.js +28 -0
- package/dist/components/Logo/LogoWithTextBelowCircle.cjs.js +1 -0
- package/dist/components/Logo/LogoWithTextBelowCircle.d.ts +4 -0
- package/dist/components/Logo/LogoWithTextBelowCircle.es.js +30 -0
- package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs.js +1 -0
- package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts +4 -0
- package/dist/components/Logo/LogoWithTextBelowNoFrame.es.js +28 -0
- package/dist/components/Logo/LogoWithTextBelowSquircle.cjs.js +1 -0
- package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts +4 -0
- package/dist/components/Logo/LogoWithTextBelowSquircle.es.js +17 -0
- package/dist/components/Logo/LogoWithTextCircle.cjs.js +1 -0
- package/dist/components/Logo/LogoWithTextCircle.d.ts +4 -0
- package/dist/components/Logo/LogoWithTextCircle.es.js +51 -0
- package/dist/components/Logo/LogoWithTextNoFrame.cjs.js +1 -0
- package/dist/components/Logo/LogoWithTextNoFrame.d.ts +4 -0
- package/dist/components/Logo/LogoWithTextNoFrame.es.js +28 -0
- package/dist/components/Logo/LogoWithTextSquircle.cjs.js +1 -0
- package/dist/components/Logo/LogoWithTextSquircle.d.ts +4 -0
- package/dist/components/Logo/LogoWithTextSquircle.es.js +17 -0
- package/dist/components/Logo/index.cjs.js +1 -0
- package/dist/components/Logo/index.d.ts +20 -0
- package/dist/components/Logo/index.es.js +65 -0
- package/dist/components/MarkDownRender/index.cjs.js +1 -0
- package/dist/components/MarkDownRender/index.d.ts +8 -0
- package/dist/components/MarkDownRender/index.es.js +84 -0
- package/dist/components/MaxHeightSmoother/index.cjs.js +6 -0
- package/dist/components/MaxHeightSmoother/index.d.ts +11 -0
- package/dist/components/MaxHeightSmoother/index.es.js +52 -0
- package/dist/components/MaxWidthSmoother/index.cjs.js +6 -0
- package/dist/components/MaxWidthSmoother/index.d.ts +11 -0
- package/dist/components/MaxWidthSmoother/index.es.js +39 -0
- package/dist/components/Modal/index.cjs.js +1 -0
- package/dist/components/Modal/index.d.ts +9 -0
- package/dist/components/Modal/index.es.js +64 -0
- package/dist/components/Navbar/Burger.cjs.js +1 -0
- package/dist/components/Navbar/Burger.d.ts +7 -0
- package/dist/components/Navbar/Burger.es.js +84 -0
- package/dist/components/Navbar/DesktopNavbar.cjs.js +7 -0
- package/dist/components/Navbar/DesktopNavbar.d.ts +10 -0
- package/dist/components/Navbar/DesktopNavbar.es.js +76 -0
- package/dist/components/Navbar/MobileNavbar.cjs.js +9 -0
- package/dist/components/Navbar/MobileNavbar.d.ts +12 -0
- package/dist/components/Navbar/MobileNavbar.es.js +199 -0
- package/dist/components/Navbar/index.cjs.js +1 -0
- package/dist/components/Navbar/index.d.ts +20 -0
- package/dist/components/Navbar/index.es.js +25 -0
- package/dist/components/Navbar/useNavigation.cjs.js +1 -0
- package/dist/components/Navbar/useNavigation.d.ts +5 -0
- package/dist/components/Navbar/useNavigation.es.js +39 -0
- package/dist/components/Popover/index.cjs.js +1 -0
- package/dist/components/Popover/index.d.ts +8 -0
- package/dist/components/Popover/index.es.js +48 -0
- package/dist/components/PressableDiv/PressableDiv.cjs.js +1 -0
- package/dist/components/PressableDiv/PressableDiv.d.ts +10 -0
- package/dist/components/PressableDiv/PressableDiv.es.js +62 -0
- package/dist/components/PressableDiv/index.cjs.js +1 -0
- package/dist/components/PressableDiv/index.d.ts +1 -0
- package/dist/components/PressableDiv/index.es.js +5 -0
- package/dist/components/ProfileDropDown/index.cjs.js +6 -0
- package/dist/components/ProfileDropDown/index.d.ts +6 -0
- package/dist/components/ProfileDropDown/index.es.js +37 -0
- package/dist/components/RedirectionButton/RedirectionButton.cjs.js +6 -0
- package/dist/components/RedirectionButton/RedirectionButton.d.ts +8 -0
- package/dist/components/RedirectionButton/RedirectionButton.es.js +42 -0
- package/dist/components/RedirectionButton/index.cjs.js +1 -0
- package/dist/components/RedirectionButton/index.d.ts +1 -0
- package/dist/components/RedirectionButton/index.es.js +5 -0
- package/dist/components/RightDrawer/RightDrawer.cjs.js +8 -0
- package/dist/components/RightDrawer/RightDrawer.d.ts +16 -0
- package/dist/components/RightDrawer/RightDrawer.es.js +118 -0
- package/dist/components/RightDrawer/index.cjs.js +1 -0
- package/dist/components/RightDrawer/index.d.ts +2 -0
- package/dist/components/RightDrawer/index.es.js +8 -0
- package/dist/components/RightDrawer/useRightDrawerStore.cjs.js +1 -0
- package/dist/components/RightDrawer/useRightDrawerStore.d.ts +8 -0
- package/dist/components/RightDrawer/useRightDrawerStore.es.js +15 -0
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.js +1 -0
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.d.ts +10 -0
- package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.es.js +69 -0
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.js +1 -0
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.d.ts +10 -0
- package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.es.js +65 -0
- package/dist/components/ThemeSwitcherDropDown/index.cjs.js +1 -0
- package/dist/components/ThemeSwitcherDropDown/index.d.ts +3 -0
- package/dist/components/ThemeSwitcherDropDown/index.es.js +9 -0
- package/dist/components/ThemeSwitcherDropDown/types.cjs.js +1 -0
- package/dist/components/ThemeSwitcherDropDown/types.d.ts +5 -0
- package/dist/components/ThemeSwitcherDropDown/types.es.js +5 -0
- package/dist/components/index.cjs.js +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.es.js +61 -0
- package/dist/createLucideIcon-DlZEiEGq.js +80 -0
- package/dist/createLucideIcon-ZOnO-fn6.cjs +21 -0
- package/dist/hooks/index.cjs.js +1 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.es.js +13 -0
- package/dist/hooks/useDevice.cjs.js +1 -0
- package/dist/hooks/useDevice.d.ts +8 -0
- package/dist/hooks/useDevice.es.js +48 -0
- package/dist/hooks/useGetElementOrWindow.cjs.js +1 -0
- package/dist/hooks/useGetElementOrWindow.d.ts +1 -0
- package/dist/hooks/useGetElementOrWindow.es.js +11 -0
- package/dist/hooks/useIsMounted.cjs.js +1 -0
- package/dist/hooks/useIsMounted.d.ts +1 -0
- package/dist/hooks/useIsMounted.es.js +11 -0
- package/dist/hooks/useScrollBlockage/index.cjs.js +1 -0
- package/dist/hooks/useScrollBlockage/index.d.ts +14 -0
- package/dist/hooks/useScrollBlockage/index.es.js +24 -0
- package/dist/hooks/useScrollBlockage/useScrollBlockageStore.cjs.js +1 -0
- package/dist/hooks/useScrollBlockage/useScrollBlockageStore.d.ts +12 -0
- package/dist/hooks/useScrollBlockage/useScrollBlockageStore.es.js +40 -0
- package/dist/hooks/useScrollDetection.cjs.js +1 -0
- package/dist/hooks/useScrollDetection.d.ts +13 -0
- package/dist/hooks/useScrollDetection.es.js +41 -0
- package/dist/index-B2ncVbtX.cjs +1 -0
- package/dist/index-D-PWvdb-.js +91 -0
- package/dist/intlayer-editor/src/client/renderContentEditor.d.ts +14 -0
- package/dist/jsx-runtime-D6agescH.cjs +30 -0
- package/dist/jsx-runtime-Tw_Kw2GZ.js +638 -0
- package/dist/localeList-CaRF-907.js +300 -0
- package/dist/localeList-DlUgKn8J.cjs +1 -0
- package/dist/motion-BuKul-u9.cjs +1 -0
- package/dist/motion-CP5YERk7.js +4517 -0
- package/dist/styled-components.browser.esm-D6kkzXl4.js +1085 -0
- package/dist/styled-components.browser.esm-GqWwDlfY.cjs +58 -0
- package/dist/sun-BQYZHcpc.cjs +16 -0
- package/dist/sun-BrKC5Qwg.js +49 -0
- package/dist/utils/capitalize.cjs.js +1 -0
- package/dist/utils/capitalize.d.ts +1 -0
- package/dist/utils/capitalize.es.js +5 -0
- package/dist/utils/cn.cjs.js +1 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.es.js +2338 -0
- package/dist/x-BKwnSvvj.js +15 -0
- package/dist/x-DIXoN4xe.cjs +6 -0
- package/package.json +84 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";"use strict";const s=require("react");/**
|
|
2
|
+
* @license lucide-react v0.376.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const w=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c=(...e)=>e.filter((r,t,o)=>!!r&&o.indexOf(r)===t).join(" ");/**
|
|
7
|
+
* @license lucide-react v0.376.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.376.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const g=s.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:a="",children:n,iconNode:i,...u},l)=>s.createElement("svg",{ref:l,...f,width:r,height:r,stroke:e,strokeWidth:o?Number(t)*24/Number(r):t,className:c("lucide",a),...u},[...i.map(([d,m])=>s.createElement(d,m)),...Array.isArray(n)?n:[n]]));/**
|
|
17
|
+
* @license lucide-react v0.376.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const h=(e,r)=>{const t=s.forwardRef(({className:o,...a},n)=>s.createElement(g,{ref:n,iconNode:r,className:c(`lucide-${w(e)}`,o),...a}));return t.displayName=`${e}`,t};exports.createLucideIcon=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useDevice.cjs.js"),o=require("./useGetElementOrWindow.cjs.js"),s=require("./useScrollBlockage/index.cjs.js"),t=require("./useIsMounted.cjs.js"),u=require("./useScrollDetection.cjs.js");exports.useDevice=e.useDevice;exports.useGetElementOrWindow=o.useGetElementOrWindow;exports.useScrollBlockage=s.useScrollBlockage;exports.useIsMounted=t.useIsMounted;exports.useScrollDetection=u.useScrollDetection;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useDevice as r } from "./useDevice.es.js";
|
|
3
|
+
import { useGetElementOrWindow as l } from "./useGetElementOrWindow.es.js";
|
|
4
|
+
import { useScrollBlockage as u } from "./useScrollBlockage/index.es.js";
|
|
5
|
+
import { useIsMounted as m } from "./useIsMounted.es.js";
|
|
6
|
+
import { useScrollDetection as n } from "./useScrollDetection.es.js";
|
|
7
|
+
export {
|
|
8
|
+
r as useDevice,
|
|
9
|
+
l as useGetElementOrWindow,
|
|
10
|
+
m as useIsMounted,
|
|
11
|
+
u as useScrollBlockage,
|
|
12
|
+
n as useScrollDetection
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),s=e=>{switch(e){case"sm":return 640;case"md":return 768;case"lg":return 1024;case"xl":return 1280;case"2xl":return 1536;default:return e}},c=()=>{var n;if(typeof window>"u")return;const e=(n=window.navigator)==null?void 0:n.userAgent;if(!(typeof e>"u"))return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},u=e=>{if(!(typeof window>"u"))return((window==null?void 0:window.innerWidth)??0)<=e},o=e=>{const n=s(e),i=c(),t=u(n);return{isMobileScreen:t,isMobileUserAgent:i,isMobile:t??i}},d=(e="md")=>{const[n,i]=r.useState(o(e));return r.useEffect(()=>{const t=()=>{i(o(e))};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[e]),n};exports.useDevice=d;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type SizeType = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
2
|
+
type UseDeviceState = {
|
|
3
|
+
isMobileScreen: boolean | undefined;
|
|
4
|
+
isMobileUserAgent: boolean | undefined;
|
|
5
|
+
isMobile: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const useDevice: (breakpoint?: SizeType | number) => UseDeviceState;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as o, useEffect as s } from "react";
|
|
3
|
+
const c = (e) => {
|
|
4
|
+
switch (e) {
|
|
5
|
+
case "sm":
|
|
6
|
+
return 640;
|
|
7
|
+
case "md":
|
|
8
|
+
return 768;
|
|
9
|
+
case "lg":
|
|
10
|
+
return 1024;
|
|
11
|
+
case "xl":
|
|
12
|
+
return 1280;
|
|
13
|
+
case "2xl":
|
|
14
|
+
return 1536;
|
|
15
|
+
default:
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
18
|
+
}, d = () => {
|
|
19
|
+
var n;
|
|
20
|
+
if (typeof window > "u") return;
|
|
21
|
+
const e = (n = window.navigator) == null ? void 0 : n.userAgent;
|
|
22
|
+
if (!(typeof e > "u"))
|
|
23
|
+
return /android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e);
|
|
24
|
+
}, a = (e) => {
|
|
25
|
+
if (!(typeof window > "u"))
|
|
26
|
+
return ((window == null ? void 0 : window.innerWidth) ?? 0) <= e;
|
|
27
|
+
}, r = (e) => {
|
|
28
|
+
const n = c(e), i = d(), t = a(n);
|
|
29
|
+
return {
|
|
30
|
+
isMobileScreen: t,
|
|
31
|
+
// Is the screen width within a mobile breakpoint.
|
|
32
|
+
isMobileUserAgent: i,
|
|
33
|
+
// Is the user agent indicative of a mobile device.
|
|
34
|
+
isMobile: t ?? i
|
|
35
|
+
// Combines both checks to determine if the device is mobile.
|
|
36
|
+
};
|
|
37
|
+
}, p = (e = "md") => {
|
|
38
|
+
const [n, i] = o(r(e));
|
|
39
|
+
return s(() => {
|
|
40
|
+
const t = () => {
|
|
41
|
+
i(r(e));
|
|
42
|
+
};
|
|
43
|
+
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
44
|
+
}, [e]), n;
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
p as useDevice
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),s=e=>{const[n,o]=t.useState(e);return t.useEffect(()=>{o(e??window.document.body)},[e]),n};exports.useGetElementOrWindow=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGetElementOrWindow: (container?: HTMLElement) => HTMLElement | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),u=()=>{const[t,s]=e.useState(!1);return e.useEffect(()=>{s(!0)},[]),t};exports.useIsMounted=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsMounted: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),a=require("../useGetElementOrWindow.cjs.js"),d=require("./useScrollBlockageStore.cjs.js"),k=n=>{const{disableScroll:l=!1,element:e,key:o="unnamed_blocker"}=n??{},{isElementScrollBlocked:u,addBlockage:c,removeBlockage:s}=d.useScrollBlockageStore(),t=a.useGetElementOrWindow(e);return i.useEffect(()=>{const r=e??window.document.body;l?c(o,r):s(o,r)},[c,l,e,o,s]),{isScrollBlocked:t?u(t):!1}};exports.useScrollBlockage=k;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type useScrollBlockagePropsReadOnly = {
|
|
2
|
+
disableScroll: undefined;
|
|
3
|
+
key: undefined;
|
|
4
|
+
element?: HTMLElement;
|
|
5
|
+
};
|
|
6
|
+
type useScrollBlockageProps = {
|
|
7
|
+
disableScroll: boolean;
|
|
8
|
+
key: string;
|
|
9
|
+
element?: HTMLElement;
|
|
10
|
+
};
|
|
11
|
+
export declare const useScrollBlockage: (props?: useScrollBlockageProps | useScrollBlockagePropsReadOnly) => {
|
|
12
|
+
isScrollBlocked: boolean;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect as i } from "react";
|
|
3
|
+
import { useGetElementOrWindow as d } from "../useGetElementOrWindow.es.js";
|
|
4
|
+
import { useScrollBlockageStore as a } from "./useScrollBlockageStore.es.js";
|
|
5
|
+
const S = (s) => {
|
|
6
|
+
const {
|
|
7
|
+
disableScroll: l = !1,
|
|
8
|
+
element: e,
|
|
9
|
+
key: o = "unnamed_blocker"
|
|
10
|
+
} = s ?? {}, {
|
|
11
|
+
isElementScrollBlocked: m,
|
|
12
|
+
addBlockage: c,
|
|
13
|
+
removeBlockage: t
|
|
14
|
+
} = a(), r = d(e);
|
|
15
|
+
return i(() => {
|
|
16
|
+
const n = e ?? window.document.body;
|
|
17
|
+
l ? c(o, n) : t(o, n);
|
|
18
|
+
}, [c, l, e, o, t]), {
|
|
19
|
+
isScrollBlocked: r ? m(r) : !1
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
S as useScrollBlockage
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("zustand"),u=B.create((k,i)=>({scrollBlockers:[],addBlockage:(r,l)=>k(c=>{const o=c.scrollBlockers,s=o.find(e=>e.element===l);if(s){const t=s.blockers.includes(r)?s.blockers:[...s.blockers,r];return{scrollBlockers:o.map(n=>n.element===l?{...n,blockers:t}:n)}}return l.style.overflowY="hidden",{scrollBlockers:[...o,{element:l,blockers:[r]}]}}),removeBlockage:(r,l)=>k(c=>{const o=c.scrollBlockers,s=o.find(e=>e.element===l);return s?s.blockers.length>1?{scrollBlockers:o.map(e=>e.element===l?{...e,blockers:e.blockers.filter(t=>t!==r)}:e)}:(l.style.overflowY="auto",{scrollBlockers:o.filter(e=>e.element!==l)}):{scrollBlockers:o}}),isElementScrollBlocked:r=>i().scrollBlockers.some(l=>l.element===r)}));exports.useScrollBlockageStore=u;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Blocker = {
|
|
2
|
+
element: Element;
|
|
3
|
+
blockers: string[];
|
|
4
|
+
};
|
|
5
|
+
type ScrollBlockageStore = {
|
|
6
|
+
scrollBlockers: Blocker[];
|
|
7
|
+
addBlockage: (blockerName: string, element: HTMLElement) => void;
|
|
8
|
+
removeBlockage: (blockerName: string, element: HTMLElement) => void;
|
|
9
|
+
isElementScrollBlocked: (element: HTMLElement) => boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const useScrollBlockageStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ScrollBlockageStore>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { create as i } from "zustand";
|
|
3
|
+
const u = i((k, B) => ({
|
|
4
|
+
scrollBlockers: [],
|
|
5
|
+
addBlockage: (r, l) => k((c) => {
|
|
6
|
+
const e = c.scrollBlockers, s = e.find((o) => o.element === l);
|
|
7
|
+
if (s) {
|
|
8
|
+
const t = s.blockers.includes(r) ? s.blockers : [...s.blockers, r];
|
|
9
|
+
return {
|
|
10
|
+
scrollBlockers: e.map((n) => n.element === l ? {
|
|
11
|
+
...n,
|
|
12
|
+
blockers: t
|
|
13
|
+
} : n)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return l.style.overflowY = "hidden", {
|
|
17
|
+
scrollBlockers: [...e, {
|
|
18
|
+
element: l,
|
|
19
|
+
blockers: [r]
|
|
20
|
+
}]
|
|
21
|
+
};
|
|
22
|
+
}),
|
|
23
|
+
removeBlockage: (r, l) => k((c) => {
|
|
24
|
+
const e = c.scrollBlockers, s = e.find((o) => o.element === l);
|
|
25
|
+
return s ? s.blockers.length > 1 ? {
|
|
26
|
+
scrollBlockers: e.map((o) => o.element === l ? {
|
|
27
|
+
...o,
|
|
28
|
+
blockers: o.blockers.filter((t) => t !== r)
|
|
29
|
+
} : o)
|
|
30
|
+
} : (l.style.overflowY = "auto", {
|
|
31
|
+
scrollBlockers: e.filter((o) => o.element !== l)
|
|
32
|
+
}) : {
|
|
33
|
+
scrollBlockers: e
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
36
|
+
isElementScrollBlocked: (r) => B().scrollBlockers.some((l) => l.element === r)
|
|
37
|
+
}));
|
|
38
|
+
export {
|
|
39
|
+
u as useScrollBlockageStore
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),y=require("./useGetElementOrWindow.cjs.js"),B=require("./useScrollBlockage/index.cjs.js"),O=w=>{const{isEnabled:t=!0,delta:Y=5,deltaFromTop:k=0,onScrollDown:l,onScrollUp:c,element:g}=w??{},[L,r]=o.useState(!1),[u,M]=o.useState(!1),{isScrollBlocked:h}=B.useScrollBlockage(),e=y.useGetElementOrWindow(g),i=o.useCallback(s=>{var v,S;const a=((S=(v=s.touches)==null?void 0:v[0])==null?void 0:S.clientY)??0,n=D=>{var f,b;if(t){const T=((b=(f=D.touches)==null?void 0:f[0])==null?void 0:b.clientY)??0,q=a-T;r(q>0),e==null||e.removeEventListener("touchmove",n)}};e==null||e.addEventListener("touchmove",n)},[t,e]),d=o.useCallback(s=>{const a=s.deltaY>0;t&&!h&&u&&(Math.abs(s.deltaY)>Math.abs(Y)&&(a?l==null||l(s):c==null||c(s)),r(window.scrollY>k))},[t,h,u]);return o.useEffect(()=>(t?(e==null||e.addEventListener("wheel",d),e==null||e.addEventListener("touchstart",i)):r(!1),()=>{e==null||e.removeEventListener("wheel",d),e==null||e.removeEventListener("touchstart",i)}),[t,d,i,e]),o.useEffect(()=>{const s=window.innerHeight<window.document.body.scrollHeight;M(s)},[]),{isScrolled:L,isScrollable:u}};exports.useScrollDetection=O;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type useScrollDetectionProps = {
|
|
2
|
+
isEnabled?: boolean;
|
|
3
|
+
delta?: number;
|
|
4
|
+
deltaFromTop?: number;
|
|
5
|
+
onScrollDown?: (e: WheelEvent) => void;
|
|
6
|
+
onScrollUp?: (e: WheelEvent) => void;
|
|
7
|
+
element?: HTMLElement;
|
|
8
|
+
};
|
|
9
|
+
export declare const useScrollDetection: (props?: useScrollDetectionProps) => {
|
|
10
|
+
isScrolled: boolean;
|
|
11
|
+
isScrollable: boolean;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as w, useCallback as S, useEffect as Y } from "react";
|
|
3
|
+
import { useGetElementOrWindow as H } from "./useGetElementOrWindow.es.js";
|
|
4
|
+
import { useScrollBlockage as I } from "./useScrollBlockage/index.es.js";
|
|
5
|
+
const F = (L) => {
|
|
6
|
+
const {
|
|
7
|
+
isEnabled: t = !0,
|
|
8
|
+
delta: M = 5,
|
|
9
|
+
deltaFromTop: m = 0,
|
|
10
|
+
onScrollDown: o,
|
|
11
|
+
onScrollUp: l,
|
|
12
|
+
element: p
|
|
13
|
+
} = L ?? {}, [g, c] = w(!1), [r, k] = w(!1), {
|
|
14
|
+
isScrollBlocked: f
|
|
15
|
+
} = I(), e = H(p), d = S((s) => {
|
|
16
|
+
var v, h;
|
|
17
|
+
const u = ((h = (v = s.touches) == null ? void 0 : v[0]) == null ? void 0 : h.clientY) ?? 0, a = (D) => {
|
|
18
|
+
var n, b;
|
|
19
|
+
if (t) {
|
|
20
|
+
const T = ((b = (n = D.touches) == null ? void 0 : n[0]) == null ? void 0 : b.clientY) ?? 0, B = u - T;
|
|
21
|
+
c(B > 0), e == null || e.removeEventListener("touchmove", a);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
e == null || e.addEventListener("touchmove", a);
|
|
25
|
+
}, [t, e]), i = S((s) => {
|
|
26
|
+
const u = s.deltaY > 0;
|
|
27
|
+
t && !f && r && (Math.abs(s.deltaY) > Math.abs(M) && (u ? o == null || o(s) : l == null || l(s)), c(window.scrollY > m));
|
|
28
|
+
}, [t, f, r]);
|
|
29
|
+
return Y(() => (t ? (e == null || e.addEventListener("wheel", i), e == null || e.addEventListener("touchstart", d)) : c(!1), () => {
|
|
30
|
+
e == null || e.removeEventListener("wheel", i), e == null || e.removeEventListener("touchstart", d);
|
|
31
|
+
}), [t, i, d, e]), Y(() => {
|
|
32
|
+
const s = window.innerHeight < window.document.body.scrollHeight;
|
|
33
|
+
k(s);
|
|
34
|
+
}, []), {
|
|
35
|
+
isScrolled: g,
|
|
36
|
+
isScrollable: r
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
F as useScrollDetection
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const r=require("./jsx-runtime-D6agescH.cjs");require("./localeList-DlUgKn8J.cjs");const y=require("react"),m=require("./StringWrapper-DUDqtkwz.cjs"),j=require("./components/DictionaryEditor/ItemLayout.cjs.js"),d=require("./styled-components.browser.esm-GqWwDlfY.cjs");var p=(e=>(e.Translation="translation",e.Enumeration="enumeration",e))(p||{});const h=e=>{const{keyPath:t,section:i,onFocusKeyPath:n,focusedKeyPath:a=[]}=e;return i.map((s,o)=>{const c={key:o,type:"ArrayExpression"},u=[...t,c];return r.jsxRuntimeExports.jsx(j.ItemLayout,{level:t.length,title:`${o}`,description:"",isSelected:m.isSameKeyPath(u,a),onClick:f=>{f.stopPropagation(),n(u)},children:y.createElement(l,{...e,key:o,keyPath:u,section:s})},o)})},W=d.pt.div({marginLeft:"0.5rem",display:"grid",gridTemplateColumns:"auto 1fr",gap:"0.5rem"}),g=d.pt.span({display:"flex",alignItems:"center",fontWeight:"700"}),E=e=>{const{keyPath:t,section:i}=e;return r.jsxRuntimeExports.jsx(W,{children:Object.keys(i).filter(n=>!x.includes(n)).map(n=>{const a={type:p.Enumeration,key:n},s=[...t,a],o=i.enumeration[n];return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[r.jsxRuntimeExports.jsx(g,{children:n}),y.createElement(l,{...e,key:n,keyPath:s,section:o})]})})})},P=e=>{const{keyPath:t,section:i,focusedKeyPath:n=[],onFocusKeyPath:a}=e;return Object.keys(i).filter(s=>!x.includes(s)).map(s=>{const o={key:s,type:"ObjectExpression"},c=[...t,o];return r.jsxRuntimeExports.jsx(j.ItemLayout,{level:t.length,title:s,description:"",isSelected:m.isSameKeyPath(c,n),onClick:u=>{u.stopPropagation(),a(c)},children:r.jsxRuntimeExports.jsx(l,{...e,keyPath:c,section:i[s]})},s)})},K=e=>{const{keyPath:t,section:i,locale:n}=e,a={type:p.Translation,key:n},s=[...t,a],o=i.translation[n];return r.jsxRuntimeExports.jsx(l,{...e,keyPath:s,section:o})},x=["filePath","id","nodeType"],l=e=>{const{section:t}=e;if(typeof t=="object")return t.nodeType===p.Translation?r.jsxRuntimeExports.jsx(K,{...e,section:t}):t.nodeType===p.Enumeration?r.jsxRuntimeExports.jsx(E,{...e,section:t}):Array.isArray(t)?r.jsxRuntimeExports.jsx(h,{...e,section:t}):r.jsxRuntimeExports.jsx(P,{...e,section:t});if(typeof t=="string")return r.jsxRuntimeExports.jsx(m.StringWrapper,{...e,section:t})};exports.ArrayWrapper=h;exports.EnumerationWrapper=E;exports.NestedObjectWrapper=P;exports.NodeWrapper=l;exports.TranslationWrapper=K;exports.traceKeys=x;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "./jsx-runtime-Tw_Kw2GZ.js";
|
|
3
|
+
import "./localeList-CaRF-907.js";
|
|
4
|
+
import { createElement as m } from "react";
|
|
5
|
+
import { i as h, S as j } from "./StringWrapper-CW70GPXq.js";
|
|
6
|
+
import { ItemLayout as p } from "./components/DictionaryEditor/ItemLayout.es.js";
|
|
7
|
+
import { p as d } from "./styled-components.browser.esm-D6kkzXl4.js";
|
|
8
|
+
var y = /* @__PURE__ */ ((t) => (t.Translation = "translation", t.Enumeration = "enumeration", t))(y || {});
|
|
9
|
+
const x = (t) => {
|
|
10
|
+
const {
|
|
11
|
+
keyPath: e,
|
|
12
|
+
section: o,
|
|
13
|
+
onFocusKeyPath: n,
|
|
14
|
+
focusedKeyPath: i = []
|
|
15
|
+
} = t;
|
|
16
|
+
return o.map((a, s) => {
|
|
17
|
+
const c = {
|
|
18
|
+
key: s,
|
|
19
|
+
type: "ArrayExpression"
|
|
20
|
+
}, l = [...e, c];
|
|
21
|
+
return /* @__PURE__ */ r.jsx(p, { level: e.length, title: `${s}`, description: "", isSelected: h(l, i), onClick: (f) => {
|
|
22
|
+
f.stopPropagation(), n(l);
|
|
23
|
+
}, children: /* @__PURE__ */ m(u, { ...t, key: s, keyPath: l, section: a }) }, s);
|
|
24
|
+
});
|
|
25
|
+
}, K = d.div({
|
|
26
|
+
marginLeft: "0.5rem",
|
|
27
|
+
display: "grid",
|
|
28
|
+
gridTemplateColumns: "auto 1fr",
|
|
29
|
+
gap: "0.5rem"
|
|
30
|
+
}), E = d.span({
|
|
31
|
+
display: "flex",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
fontWeight: "700"
|
|
34
|
+
}), g = (t) => {
|
|
35
|
+
const {
|
|
36
|
+
keyPath: e,
|
|
37
|
+
section: o
|
|
38
|
+
} = t;
|
|
39
|
+
return /* @__PURE__ */ r.jsx(K, { children: Object.keys(o).filter((n) => !P.includes(n)).map((n) => {
|
|
40
|
+
const i = {
|
|
41
|
+
type: y.Enumeration,
|
|
42
|
+
key: n
|
|
43
|
+
}, a = [...e, i], s = o.enumeration[n];
|
|
44
|
+
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
45
|
+
/* @__PURE__ */ r.jsx(E, { children: n }),
|
|
46
|
+
/* @__PURE__ */ m(u, { ...t, key: n, keyPath: a, section: s })
|
|
47
|
+
] });
|
|
48
|
+
}) });
|
|
49
|
+
}, S = (t) => {
|
|
50
|
+
const {
|
|
51
|
+
keyPath: e,
|
|
52
|
+
section: o,
|
|
53
|
+
focusedKeyPath: n = [],
|
|
54
|
+
onFocusKeyPath: i
|
|
55
|
+
} = t;
|
|
56
|
+
return Object.keys(o).filter((a) => !P.includes(a)).map((a) => {
|
|
57
|
+
const s = {
|
|
58
|
+
key: a,
|
|
59
|
+
type: "ObjectExpression"
|
|
60
|
+
}, c = [...e, s];
|
|
61
|
+
return /* @__PURE__ */ r.jsx(p, { level: e.length, title: a, description: "", isSelected: h(c, n), onClick: (l) => {
|
|
62
|
+
l.stopPropagation(), i(c);
|
|
63
|
+
}, children: /* @__PURE__ */ r.jsx(u, { ...t, keyPath: c, section: o[a] }) }, a);
|
|
64
|
+
});
|
|
65
|
+
}, w = (t) => {
|
|
66
|
+
const {
|
|
67
|
+
keyPath: e,
|
|
68
|
+
section: o,
|
|
69
|
+
locale: n
|
|
70
|
+
} = t, i = {
|
|
71
|
+
type: y.Translation,
|
|
72
|
+
key: n
|
|
73
|
+
}, a = [...e, i], s = o.translation[n];
|
|
74
|
+
return /* @__PURE__ */ r.jsx(u, { ...t, keyPath: a, section: s });
|
|
75
|
+
}, P = ["filePath", "id", "nodeType"], u = (t) => {
|
|
76
|
+
const {
|
|
77
|
+
section: e
|
|
78
|
+
} = t;
|
|
79
|
+
if (typeof e == "object")
|
|
80
|
+
return e.nodeType === y.Translation ? /* @__PURE__ */ r.jsx(w, { ...t, section: e }) : e.nodeType === y.Enumeration ? /* @__PURE__ */ r.jsx(g, { ...t, section: e }) : Array.isArray(e) ? /* @__PURE__ */ r.jsx(x, { ...t, section: e }) : /* @__PURE__ */ r.jsx(S, { ...t, section: e });
|
|
81
|
+
if (typeof e == "string")
|
|
82
|
+
return /* @__PURE__ */ r.jsx(j, { ...t, section: e });
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
x as A,
|
|
86
|
+
g as E,
|
|
87
|
+
u as N,
|
|
88
|
+
w as T,
|
|
89
|
+
S as a,
|
|
90
|
+
P as t
|
|
91
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KeyPath } from '@intlayer/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export type IntlayerEditorElementProps = {
|
|
5
|
+
content: string;
|
|
6
|
+
dictionaryId: string;
|
|
7
|
+
dictionaryPath: string;
|
|
8
|
+
keyPath: KeyPath[];
|
|
9
|
+
};
|
|
10
|
+
type RenderIntlayerEditorResult = ReactNode & {
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const renderIntlayerEditor: (data: IntlayerEditorElementProps) => RenderIntlayerEditorResult;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";"use strict";const we=require("react");var Z={exports:{}},F={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Oe;function cr(){if(Oe)return F;Oe=1;var V=we,M=Symbol.for("react.element"),P=Symbol.for("react.fragment"),U=Object.prototype.hasOwnProperty,T=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,I={key:!0,ref:!0,__self:!0,__source:!0};function j(h,d,E){var p,y={},b=null,O=null;E!==void 0&&(b=""+E),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(O=d.ref);for(p in d)U.call(d,p)&&!I.hasOwnProperty(p)&&(y[p]=d[p]);if(h&&h.defaultProps)for(p in d=h.defaultProps,d)y[p]===void 0&&(y[p]=d[p]);return{$$typeof:M,type:h,key:b,ref:O,props:y,_owner:T.current}}return F.Fragment=P,F.jsx=j,F.jsxs=j,F}var A={},Se;function vr(){if(Se)return A;Se=1;var V={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/return V.NODE_ENV!=="production"&&function(){var M=we,P=Symbol.for("react.element"),U=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),d=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),Ce=Symbol.for("react.offscreen"),Q=Symbol.iterator,Pe="@@iterator";function je(e){if(e===null||typeof e!="object")return null;var r=Q&&e[Q]||e[Pe];return typeof r=="function"?r:null}var S=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];xe("error",e,t)}}function xe(e,r,t){{var n=S.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var ke=!1,De=!1,Fe=!1,Ae=!1,Ie=!1,ee;ee=Symbol.for("react.module.reference");function We(e){return!!(typeof e=="string"||typeof e=="function"||e===T||e===j||Ie||e===I||e===p||e===y||Ae||e===Ce||ke||De||Fe||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===b||e.$$typeof===h||e.$$typeof===d||e.$$typeof===E||e.$$typeof===ee||e.getModuleId!==void 0))}function Ye(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function re(e){return e.displayName||"Context"}function _(e){if(e==null)return null;if(typeof e.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case U:return"Portal";case j:return"Profiler";case I:return"StrictMode";case p:return"Suspense";case y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d:var r=e;return re(r)+".Consumer";case h:var t=e;return re(t._context)+".Provider";case E:return Ye(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:_(e.type)||"Memo";case O:{var i=e,u=i._payload,o=i._init;try{return _(o(u))}catch{return null}}}return null}var R=Object.assign,x=0,te,ne,ae,oe,ie,ue,se;function le(){}le.__reactDisabledLog=!0;function $e(){{if(x===0){te=console.log,ne=console.info,ae=console.warn,oe=console.error,ie=console.group,ue=console.groupCollapsed,se=console.groupEnd;var e={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}x++}}function Le(){{if(x--,x===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:R({},e,{value:te}),info:R({},e,{value:ne}),warn:R({},e,{value:ae}),error:R({},e,{value:oe}),group:R({},e,{value:ie}),groupCollapsed:R({},e,{value:ue}),groupEnd:R({},e,{value:se})})}x<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var N=S.ReactCurrentDispatcher,B;function W(e,r,t){{if(B===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return`
|
|
18
|
+
`+B+e}}var J=!1,Y;{var Ve=typeof WeakMap=="function"?WeakMap:Map;Y=new Ve}function fe(e,r){if(!e||J)return"";{var t=Y.get(e);if(t!==void 0)return t}var n;J=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=N.current,N.current=null,$e();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(v){n=v}Reflect.construct(e,[],o)}else{try{o.call()}catch(v){n=v}e.call(o.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
|
|
19
|
+
`),c=n.stack.split(`
|
|
20
|
+
`),s=a.length-1,l=c.length-1;s>=1&&l>=0&&a[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==c[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==c[l]){var g=`
|
|
21
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,g),g}while(s>=1&&l>=0);break}}}finally{J=!1,N.current=u,Le(),Error.prepareStackTrace=i}var C=e?e.displayName||e.name:"",m=C?W(C):"";return typeof e=="function"&&Y.set(e,m),m}function Me(e,r,t){return fe(e,!1)}function Ue(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function $(e,r,t){if(e==null)return"";if(typeof e=="function")return fe(e,Ue(e));if(typeof e=="string")return W(e);switch(e){case p:return W("Suspense");case y:return W("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case E:return Me(e.render);case b:return $(e.type,r,t);case O:{var n=e,i=n._payload,u=n._init;try{return $(u(i),r,t)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,ce={},ve=S.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,t=$(e.type,e._source,r?r.type:null);ve.setExtraStackFrame(t)}else ve.setExtraStackFrame(null)}function Ne(e,r,t,n,i){{var u=Function.call.bind(k);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var c=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(L(i),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),L(null)),a instanceof Error&&!(a.message in ce)&&(ce[a.message]=!0,L(i),f("Failed %s type: %s",t,a.message),L(null))}}}var Be=Array.isArray;function q(e){return Be(e)}function Je(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function qe(e){try{return de(e),!1}catch{return!0}}function de(e){return""+e}function pe(e){if(qe(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(e)),de(e)}var D=S.ReactCurrentOwner,Ke={key:!0,ref:!0,__self:!0,__source:!0},ge,_e,K;K={};function Ge(e){if(k.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ze(e){if(k.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Xe(e,r){if(typeof e.ref=="string"&&D.current&&r&&D.current.stateNode!==r){var t=_(D.current.type);K[t]||(f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',_(D.current.type),e.ref),K[t]=!0)}}function He(e,r){{var t=function(){ge||(ge=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Ze(e,r){{var t=function(){_e||(_e=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Qe=function(e,r,t,n,i,u,o){var a={$$typeof:P,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function er(e,r,t,n,i){{var u,o={},a=null,c=null;t!==void 0&&(pe(t),a=""+t),ze(r)&&(pe(r.key),a=""+r.key),Ge(r)&&(c=r.ref,Xe(r,i));for(u in r)k.call(r,u)&&!Ke.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||c){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&He(o,l),c&&Ze(o,l)}return Qe(e,a,c,i,n,D.current,o)}}var G=S.ReactCurrentOwner,ye=S.ReactDebugCurrentFrame;function w(e){if(e){var r=e._owner,t=$(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}var z;z=!1;function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===P}function be(){{if(G.current){var e=_(G.current.type);if(e)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function rr(e){return""}var he={};function tr(e){{var r=be();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ee(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=tr(r);if(he[t])return;he[t]=!0;var n="";e&&e._owner&&e._owner!==G.current&&(n=" It was passed a child from "+_(e._owner.type)+"."),w(e),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),w(null)}}function Re(e,r){{if(typeof e!="object")return;if(q(e))for(var t=0;t<e.length;t++){var n=e[t];X(n)&&Ee(n,r)}else if(X(e))e._store&&(e._store.validated=!0);else if(e){var i=je(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)X(o.value)&&Ee(o.value,r)}}}function nr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===E||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=_(r);Ne(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!z){z=!0;var i=_(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){w(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),w(null);break}}e.ref!==null&&(w(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),w(null))}}var me={};function Te(e,r,t,n,i,u){{var o=We(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var c=rr();c?a+=c:a+=be();var s;e===null?s="null":q(e)?s="array":e!==void 0&&e.$$typeof===P?(s="<"+(_(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=er(e,r,t,i,u);if(l==null)return l;if(o){var g=r.children;if(g!==void 0)if(n)if(q(g)){for(var C=0;C<g.length;C++)Re(g[C],e);Object.freeze&&Object.freeze(g)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Re(g,e)}if(k.call(r,"key")){var m=_(e),v=Object.keys(r).filter(function(fr){return fr!=="key"}),H=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!me[m+H]){var lr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,H,m,lr,m),me[m+H]=!0}}return e===T?ar(l):nr(l),l}}function or(e,r,t){return Te(e,r,t,!0)}function ir(e,r,t){return Te(e,r,t,!1)}var ur=ir,sr=or;A.Fragment=T,A.jsx=ur,A.jsxs=sr}(),A}var dr={};dr.NODE_ENV==="production"?Z.exports=cr():Z.exports=vr();var pr=Z.exports;exports.jsxRuntimeExports=pr;
|