@xanui/core 1.2.57 → 1.2.59
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/AppRoot/AppRootProvider.cjs.map +1 -1
- package/AppRoot/AppRootProvider.js.map +1 -1
- package/AppRoot/Renderar.cjs.map +1 -1
- package/AppRoot/Renderar.js.map +1 -1
- package/AppRoot/index.cjs +6 -5
- package/AppRoot/index.cjs.map +1 -1
- package/AppRoot/index.d.ts +1 -0
- package/AppRoot/index.js +7 -6
- package/AppRoot/index.js.map +1 -1
- package/Document/index.cjs.map +1 -1
- package/Document/index.js.map +1 -1
- package/Iframe/index.cjs.map +1 -1
- package/Iframe/index.js.map +1 -1
- package/Portal/index.cjs.map +1 -1
- package/Portal/index.js.map +1 -1
- package/Tag/ServerStyleTag.cjs.map +1 -1
- package/Tag/ServerStyleTag.js.map +1 -1
- package/Tag/cssPropList.cjs.map +1 -1
- package/Tag/cssPropList.js.map +1 -1
- package/Tag/index.cjs.map +1 -1
- package/Tag/index.js.map +1 -1
- package/Tag/useTagProps.cjs.map +1 -1
- package/Tag/useTagProps.js.map +1 -1
- package/Transition/index.cjs.map +1 -1
- package/Transition/index.js.map +1 -1
- package/breakpoint/BreakpointProvider.cjs +37 -39
- package/breakpoint/BreakpointProvider.cjs.map +1 -1
- package/breakpoint/BreakpointProvider.js +37 -39
- package/breakpoint/BreakpointProvider.js.map +1 -1
- package/breakpoint/useBreakpoint.cjs +10 -9
- package/breakpoint/useBreakpoint.cjs.map +1 -1
- package/breakpoint/useBreakpoint.d.ts +4 -5
- package/breakpoint/useBreakpoint.js +10 -9
- package/breakpoint/useBreakpoint.js.map +1 -1
- package/breakpoint/useBreakpointProps.cjs.map +1 -1
- package/breakpoint/useBreakpointProps.js.map +1 -1
- package/css/CSSCacheProvider.cjs.map +1 -1
- package/css/CSSCacheProvider.js.map +1 -1
- package/css/aliases.cjs.map +1 -1
- package/css/aliases.js.map +1 -1
- package/css/getProps.cjs.map +1 -1
- package/css/getProps.js.map +1 -1
- package/css/getValue.cjs.map +1 -1
- package/css/getValue.js.map +1 -1
- package/css/index.cjs.map +1 -1
- package/css/index.js.map +1 -1
- package/hooks/useAnimation.cjs.map +1 -1
- package/hooks/useAnimation.js.map +1 -1
- package/hooks/useColorTemplate.cjs.map +1 -1
- package/hooks/useColorTemplate.js.map +1 -1
- package/hooks/useInterface.cjs.map +1 -1
- package/hooks/useInterface.js.map +1 -1
- package/hooks/useMergeRefs.cjs.map +1 -1
- package/hooks/useMergeRefs.js.map +1 -1
- package/hooks/useTransition/index.cjs +1 -1
- package/hooks/useTransition/index.cjs.map +1 -1
- package/hooks/useTransition/index.js +2 -2
- package/hooks/useTransition/index.js.map +1 -1
- package/hooks/useTransition/variants.cjs.map +1 -1
- package/hooks/useTransition/variants.js.map +1 -1
- package/index.cjs +3 -0
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +109 -109
- package/theme/ThemeCssVars.cjs.map +1 -1
- package/theme/ThemeCssVars.js.map +1 -1
- package/theme/ThemeDefaultOptions.cjs +54 -47
- package/theme/ThemeDefaultOptions.cjs.map +1 -1
- package/theme/ThemeDefaultOptions.d.ts +6 -0
- package/theme/ThemeDefaultOptions.js +54 -48
- package/theme/ThemeDefaultOptions.js.map +1 -1
- package/theme/ThemeProvider.cjs.map +1 -1
- package/theme/ThemeProvider.js.map +1 -1
- package/theme/core.cjs.map +1 -1
- package/theme/core.js.map +1 -1
- package/theme/createTheme.cjs +3 -2
- package/theme/createTheme.cjs.map +1 -1
- package/theme/createTheme.d.ts +1 -1
- package/theme/createTheme.js +4 -3
- package/theme/createTheme.js.map +1 -1
- package/theme/createThemeSwitcher.cjs.map +1 -1
- package/theme/createThemeSwitcher.js.map +1 -1
- package/theme/index.cjs.map +1 -1
- package/theme/index.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRootProvider.cjs","sources":["../../src/AppRoot/AppRootProvider.tsx"],"sourcesContent":["\"use client\"\
|
|
1
|
+
{"version":3,"file":"AppRootProvider.cjs","sources":["../../src/AppRoot/AppRootProvider.tsx"],"sourcesContent":["\"use client\"\nimport React from \"react\";\n\nconst AppRootContext = React.createContext<(() => HTMLElement | null) | null>(null);\n\nexport const AppRootProvider: React.FC<{ element: () => HTMLElement | null; children: React.ReactNode }> = ({ element, children }) => {\n return (\n <AppRootContext.Provider value={element}>\n {children}\n </AppRootContext.Provider>\n );\n}\n\nexport const useAppRootElement = (): HTMLElement => {\n const context = React.useContext(AppRootContext);\n if (typeof window === 'undefined') {\n return null as any;\n }\n\n return context!() as HTMLElement\n}\n"],"names":[],"mappings":";;;;;;AAGA;AAEO;AACJ;AAKH;AAEO;;AAEJ;AACG;;;AAIN;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRootProvider.js","sources":["../../src/AppRoot/AppRootProvider.tsx"],"sourcesContent":["\"use client\"\
|
|
1
|
+
{"version":3,"file":"AppRootProvider.js","sources":["../../src/AppRoot/AppRootProvider.tsx"],"sourcesContent":["\"use client\"\nimport React from \"react\";\n\nconst AppRootContext = React.createContext<(() => HTMLElement | null) | null>(null);\n\nexport const AppRootProvider: React.FC<{ element: () => HTMLElement | null; children: React.ReactNode }> = ({ element, children }) => {\n return (\n <AppRootContext.Provider value={element}>\n {children}\n </AppRootContext.Provider>\n );\n}\n\nexport const useAppRootElement = (): HTMLElement => {\n const context = React.useContext(AppRootContext);\n if (typeof window === 'undefined') {\n return null as any;\n }\n\n return context!() as HTMLElement\n}\n"],"names":[],"mappings":";;;;AAGA;AAEO;AACJ;AAKH;AAEO;;AAEJ;AACG;;;AAIN;;"}
|
package/AppRoot/Renderar.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Renderar.cjs","sources":["../../src/AppRoot/Renderar.tsx"],"sourcesContent":["// Renderar.tsx\
|
|
1
|
+
{"version":3,"file":"Renderar.cjs","sources":["../../src/AppRoot/Renderar.tsx"],"sourcesContent":["// Renderar.tsx\nimport React, { useState } from \"react\";\n\ntype StoredComponent = {\n component: React.FC<any>;\n props: any;\n};\n\nconst Components: StoredComponent[] = [];\nlet dispatch: (() => void) | null = null;\n\nexport class Renderar {\n static render(component: React.FC, props?: any) {\n Components.push({ component, props });\n if (dispatch) dispatch();\n return {\n unrender: () => this.unrender(component),\n updateProps: (newProps: any) => this.updateProps(component, newProps),\n };\n }\n\n static unrender(component: React.FC) {\n const index = Components.findIndex((c) => c.component === component);\n if (index > -1) {\n Components.splice(index, 1);\n if (dispatch) dispatch();\n }\n }\n\n static updateProps(component: React.FC, props: any) {\n const stored = Components.find((c) => c.component === component);\n if (stored) stored.props = { ...stored.props, ...props };\n if (dispatch) dispatch();\n }\n}\n\nexport const RenderRenderar = () => {\n const [, setState] = useState(0);\n dispatch = () => setState((prev) => prev + 1);\n\n return (\n <>\n {Components.map(({ component: Component, props }, i) => (\n <Component key={i} {...props} />\n ))}\n </>\n );\n};"],"names":["useState","_jsx","_Fragment"],"mappings":";;;;;AAQA,MAAM,UAAU,GAAsB,EAAE;AACxC,IAAI,QAAQ,GAAwB,IAAI;MAE3B,QAAQ,CAAA;AAClB,IAAA,OAAO,MAAM,CAAC,SAAmB,EAAE,KAAW,EAAA;QAC3C,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACrC,QAAA,IAAI,QAAQ;AAAE,YAAA,QAAQ,EAAE;QACxB,OAAO;YACJ,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;AACxC,YAAA,WAAW,EAAE,CAAC,QAAa,KAAK,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC;SACvE;IACJ;IAEA,OAAO,QAAQ,CAAC,SAAmB,EAAA;AAChC,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC;AACpE,QAAA,IAAI,KAAK,GAAG,EAAE,EAAE;AACb,YAAA,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC3B,YAAA,IAAI,QAAQ;AAAE,gBAAA,QAAQ,EAAE;QAC3B;IACH;AAEA,IAAA,OAAO,WAAW,CAAC,SAAmB,EAAE,KAAU,EAAA;AAC/C,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC;AAChE,QAAA,IAAI,MAAM;YAAE,MAAM,CAAC,KAAK,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,MAAM,CAAC,KAAK,CAAA,EAAK,KAAK,CAAE;AACxD,QAAA,IAAI,QAAQ;AAAE,YAAA,QAAQ,EAAE;IAC3B;AACF;AAEM,MAAM,cAAc,GAAG,MAAK;IAChC,MAAM,GAAG,QAAQ,CAAC,GAAGA,cAAQ,CAAC,CAAC,CAAC;AAChC,IAAA,QAAQ,GAAG,MAAM,QAAQ,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,CAAC;AAE7C,IAAA,QACGC,cAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EACI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,MAChDD,cAAA,CAAC,SAAS,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAa,KAAK,CAAA,EAAZ,CAAC,CAAe,CAClC,CAAC,EAAA,CACF;AAET;;;;;"}
|
package/AppRoot/Renderar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Renderar.js","sources":["../../src/AppRoot/Renderar.tsx"],"sourcesContent":["// Renderar.tsx\
|
|
1
|
+
{"version":3,"file":"Renderar.js","sources":["../../src/AppRoot/Renderar.tsx"],"sourcesContent":["// Renderar.tsx\nimport React, { useState } from \"react\";\n\ntype StoredComponent = {\n component: React.FC<any>;\n props: any;\n};\n\nconst Components: StoredComponent[] = [];\nlet dispatch: (() => void) | null = null;\n\nexport class Renderar {\n static render(component: React.FC, props?: any) {\n Components.push({ component, props });\n if (dispatch) dispatch();\n return {\n unrender: () => this.unrender(component),\n updateProps: (newProps: any) => this.updateProps(component, newProps),\n };\n }\n\n static unrender(component: React.FC) {\n const index = Components.findIndex((c) => c.component === component);\n if (index > -1) {\n Components.splice(index, 1);\n if (dispatch) dispatch();\n }\n }\n\n static updateProps(component: React.FC, props: any) {\n const stored = Components.find((c) => c.component === component);\n if (stored) stored.props = { ...stored.props, ...props };\n if (dispatch) dispatch();\n }\n}\n\nexport const RenderRenderar = () => {\n const [, setState] = useState(0);\n dispatch = () => setState((prev) => prev + 1);\n\n return (\n <>\n {Components.map(({ component: Component, props }, i) => (\n <Component key={i} {...props} />\n ))}\n </>\n );\n};"],"names":["_jsx","_Fragment"],"mappings":";;;AAQA,MAAM,UAAU,GAAsB,EAAE;AACxC,IAAI,QAAQ,GAAwB,IAAI;MAE3B,QAAQ,CAAA;AAClB,IAAA,OAAO,MAAM,CAAC,SAAmB,EAAE,KAAW,EAAA;QAC3C,UAAU,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACrC,QAAA,IAAI,QAAQ;AAAE,YAAA,QAAQ,EAAE;QACxB,OAAO;YACJ,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;AACxC,YAAA,WAAW,EAAE,CAAC,QAAa,KAAK,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC;SACvE;IACJ;IAEA,OAAO,QAAQ,CAAC,SAAmB,EAAA;AAChC,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC;AACpE,QAAA,IAAI,KAAK,GAAG,EAAE,EAAE;AACb,YAAA,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC3B,YAAA,IAAI,QAAQ;AAAE,gBAAA,QAAQ,EAAE;QAC3B;IACH;AAEA,IAAA,OAAO,WAAW,CAAC,SAAmB,EAAE,KAAU,EAAA;AAC/C,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC;AAChE,QAAA,IAAI,MAAM;YAAE,MAAM,CAAC,KAAK,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,MAAM,CAAC,KAAK,CAAA,EAAK,KAAK,CAAE;AACxD,QAAA,IAAI,QAAQ;AAAE,YAAA,QAAQ,EAAE;IAC3B;AACF;AAEM,MAAM,cAAc,GAAG,MAAK;IAChC,MAAM,GAAG,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AAChC,IAAA,QAAQ,GAAG,MAAM,QAAQ,CAAC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,CAAC;AAE7C,IAAA,QACGA,GAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EACI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,MAChDD,GAAA,CAAC,SAAS,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAa,KAAK,CAAA,EAAZ,CAAC,CAAe,CAClC,CAAC,EAAA,CACF;AAET;;;;"}
|
package/AppRoot/index.cjs
CHANGED
|
@@ -17,7 +17,8 @@ var useMergeRefs = require('../hooks/useMergeRefs.cjs');
|
|
|
17
17
|
var CSSCacheProvider = require('../css/CSSCacheProvider.cjs');
|
|
18
18
|
|
|
19
19
|
const AppRoot = React.forwardRef((_a, ref) => {
|
|
20
|
-
var { children, noScrollbarCss, CSSCacheId, theme, disableRenderar, selectionColor, document: _document } = _a, props = tslib.__rest(_a, ["children", "noScrollbarCss", "CSSCacheId", "theme", "disableRenderar", "selectionColor", "document"]);
|
|
20
|
+
var { children, disableFlashing, noScrollbarCss, CSSCacheId, theme, disableRenderar, selectionColor, document: _document } = _a, props = tslib.__rest(_a, ["children", "disableFlashing", "noScrollbarCss", "CSSCacheId", "theme", "disableRenderar", "selectionColor", "document"]);
|
|
21
|
+
disableFlashing !== null && disableFlashing !== void 0 ? disableFlashing : (disableFlashing = false);
|
|
21
22
|
noScrollbarCss !== null && noScrollbarCss !== void 0 ? noScrollbarCss : (noScrollbarCss = false);
|
|
22
23
|
selectionColor !== null && selectionColor !== void 0 ? selectionColor : (selectionColor = "brand");
|
|
23
24
|
if (typeof window !== "undefined") {
|
|
@@ -27,11 +28,11 @@ const AppRoot = React.forwardRef((_a, ref) => {
|
|
|
27
28
|
const docid = React.useId();
|
|
28
29
|
const csscacheId = React.useId();
|
|
29
30
|
CSSCacheId !== null && CSSCacheId !== void 0 ? CSSCacheId : (CSSCacheId = csscacheId);
|
|
30
|
-
|
|
31
|
+
const [visibility, setVisibility] = React.useState(!disableFlashing ? "hidden" : "");
|
|
31
32
|
const rootRef = React.useRef(null);
|
|
32
33
|
const mergeRef = useMergeRefs(rootRef, ref);
|
|
33
|
-
React.
|
|
34
|
-
|
|
34
|
+
React.useLayoutEffect(() => {
|
|
35
|
+
!disableFlashing && setVisibility("");
|
|
35
36
|
// move oncss style tags to head
|
|
36
37
|
if (typeof _document === 'undefined')
|
|
37
38
|
return;
|
|
@@ -49,7 +50,7 @@ const AppRoot = React.forwardRef((_a, ref) => {
|
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
return (jsxRuntime.jsx(index.DocumentProvider, { value: _document ? { document: _document, id: docid } : undefined, children: jsxRuntime.jsx(CSSCacheProvider.CSSCacheProvider, { cacheId: CSSCacheId, children: jsxRuntime.jsx(AppRootProvider.AppRootProvider, { element: () => rootRef.current, children: jsxRuntime.jsx(ThemeProvider, Object.assign({ theme: theme }, props, { ref: mergeRef, isRoot: true, sx: Object.assign(Object.assign({}, props.sx), selection), children: jsxRuntime.jsxs(BreakpointProvider.BreakpointProvider, { children: [children, !disableRenderar && jsxRuntime.jsx(Renderar.RenderRenderar, {})] }) })) }) }) }));
|
|
53
|
+
return (jsxRuntime.jsx(index.DocumentProvider, { value: _document ? { document: _document, id: docid } : undefined, children: jsxRuntime.jsx(CSSCacheProvider.CSSCacheProvider, { cacheId: CSSCacheId, children: jsxRuntime.jsx(AppRootProvider.AppRootProvider, { element: () => rootRef.current, children: jsxRuntime.jsx(ThemeProvider, Object.assign({ theme: theme }, props, { ref: mergeRef, isRoot: true, sx: Object.assign(Object.assign(Object.assign({}, props.sx), (visibility === "hidden" ? { visibility: "hidden" } : {})), selection), children: jsxRuntime.jsxs(BreakpointProvider.BreakpointProvider, { children: [children, !disableRenderar && jsxRuntime.jsx(Renderar.RenderRenderar, {})] }) })) }) }) }));
|
|
53
54
|
});
|
|
54
55
|
|
|
55
56
|
module.exports = AppRoot;
|
package/AppRoot/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useId, useLayoutEffect, useRef } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { ThemeProvider, ThemeProviderProps } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport { RenderRenderar } from './Renderar';\nimport { DocumentProvider } from '../Document';\nimport { AppRootProvider } from './AppRootProvider';\nimport useMergeRefs from '../hooks/useMergeRefs';\nimport { CSSCacheProvider } from '../css/CSSCacheProvider';\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n document?: Document;\n CSSCacheId?: string;\n disableRenderar?: boolean;\n disableFlashing?: boolean;\n selectionColor?: \"default\" | \"brand\" | \"accent\" | \"success\" | \"info\" | \"warning\" | \"danger\";\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, disableFlashing, noScrollbarCss, CSSCacheId, theme, disableRenderar, selectionColor, document: _document, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n disableFlashing ??= false\n noScrollbarCss ??= false\n selectionColor ??= \"brand\"\n if (typeof window !== \"undefined\") {\n _document ??= document\n }\n disableRenderar ??= false\n const docid = useId()\n const csscacheId = useId()\n CSSCacheId ??= csscacheId\n\n const [visibility, setVisibility] = React.useState<string>(!disableFlashing ? \"hidden\" : \"\");\n const rootRef = useRef(null)\n const mergeRef = useMergeRefs(rootRef, ref)\n\n useLayoutEffect(() => {\n !disableFlashing && setVisibility(\"\");\n\n // move oncss style tags to head\n if (typeof _document === 'undefined') return;\n const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n _document.head.appendChild(style);\n });\n }, [])\n\n let selection: any = {}\n if (selectionColor && selectionColor !== 'default') {\n selection = {\n \"&::selection\": {\n bgcolor: `${selectionColor}.primary`,\n color: `${selectionColor}.text`\n }\n }\n }\n\n return (\n <DocumentProvider value={_document ? { document: _document, id: docid } : undefined}>\n <CSSCacheProvider cacheId={CSSCacheId}>\n <AppRootProvider element={() => rootRef.current}>\n <ThemeProvider\n theme={theme}\n {...props}\n ref={mergeRef}\n isRoot\n sx={{\n ...props.sx,\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {}),\n ...selection\n }}\n >\n <BreakpointProvider>\n {children}\n {!disableRenderar && <RenderRenderar />}\n </BreakpointProvider>\n </ThemeProvider>\n </AppRootProvider>\n </CSSCacheProvider>\n </DocumentProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAoBA;;;;;AAIG;;;;AAIA;AACA;;;AAIA;;;AAIG;;;;AAIA;AACA;AACG;AACH;;;AAIH;AACG;AACG;;;AAGC;;;;AA4BV;;"}
|
package/AppRoot/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ type AppRootProps<T extends TagComponentType = "div"> = ThemeProviderProps<T> &
|
|
|
7
7
|
document?: Document;
|
|
8
8
|
CSSCacheId?: string;
|
|
9
9
|
disableRenderar?: boolean;
|
|
10
|
+
disableFlashing?: boolean;
|
|
10
11
|
selectionColor?: "default" | "brand" | "accent" | "success" | "info" | "warning" | "danger";
|
|
11
12
|
};
|
|
12
13
|
declare const AppRoot: React__default.ForwardRefExoticComponent<Omit<AppRootProps<TagComponentType>, "ref"> & React__default.RefAttributes<any>>;
|
package/AppRoot/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __rest } from 'tslib';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
-
import React__default, { useId, useRef,
|
|
4
|
+
import React__default, { useId, useRef, useLayoutEffect } from 'react';
|
|
5
5
|
import '../theme/core.js';
|
|
6
6
|
import '../css/getValue.js';
|
|
7
7
|
import 'oncss';
|
|
@@ -15,7 +15,8 @@ import useMergeRefs from '../hooks/useMergeRefs.js';
|
|
|
15
15
|
import { CSSCacheProvider } from '../css/CSSCacheProvider.js';
|
|
16
16
|
|
|
17
17
|
const AppRoot = React__default.forwardRef((_a, ref) => {
|
|
18
|
-
var { children, noScrollbarCss, CSSCacheId, theme, disableRenderar, selectionColor, document: _document } = _a, props = __rest(_a, ["children", "noScrollbarCss", "CSSCacheId", "theme", "disableRenderar", "selectionColor", "document"]);
|
|
18
|
+
var { children, disableFlashing, noScrollbarCss, CSSCacheId, theme, disableRenderar, selectionColor, document: _document } = _a, props = __rest(_a, ["children", "disableFlashing", "noScrollbarCss", "CSSCacheId", "theme", "disableRenderar", "selectionColor", "document"]);
|
|
19
|
+
disableFlashing !== null && disableFlashing !== void 0 ? disableFlashing : (disableFlashing = false);
|
|
19
20
|
noScrollbarCss !== null && noScrollbarCss !== void 0 ? noScrollbarCss : (noScrollbarCss = false);
|
|
20
21
|
selectionColor !== null && selectionColor !== void 0 ? selectionColor : (selectionColor = "brand");
|
|
21
22
|
if (typeof window !== "undefined") {
|
|
@@ -25,11 +26,11 @@ const AppRoot = React__default.forwardRef((_a, ref) => {
|
|
|
25
26
|
const docid = useId();
|
|
26
27
|
const csscacheId = useId();
|
|
27
28
|
CSSCacheId !== null && CSSCacheId !== void 0 ? CSSCacheId : (CSSCacheId = csscacheId);
|
|
28
|
-
|
|
29
|
+
const [visibility, setVisibility] = React__default.useState(!disableFlashing ? "hidden" : "");
|
|
29
30
|
const rootRef = useRef(null);
|
|
30
31
|
const mergeRef = useMergeRefs(rootRef, ref);
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
useLayoutEffect(() => {
|
|
33
|
+
!disableFlashing && setVisibility("");
|
|
33
34
|
// move oncss style tags to head
|
|
34
35
|
if (typeof _document === 'undefined')
|
|
35
36
|
return;
|
|
@@ -47,7 +48,7 @@ const AppRoot = React__default.forwardRef((_a, ref) => {
|
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
return (jsx(DocumentProvider, { value: _document ? { document: _document, id: docid } : undefined, children: jsx(CSSCacheProvider, { cacheId: CSSCacheId, children: jsx(AppRootProvider, { element: () => rootRef.current, children: jsx(ThemeProvider, Object.assign({ theme: theme }, props, { ref: mergeRef, isRoot: true, sx: Object.assign(Object.assign({}, props.sx), selection), children: jsxs(BreakpointProvider, { children: [children, !disableRenderar && jsx(RenderRenderar, {})] }) })) }) }) }));
|
|
51
|
+
return (jsx(DocumentProvider, { value: _document ? { document: _document, id: docid } : undefined, children: jsx(CSSCacheProvider, { cacheId: CSSCacheId, children: jsx(AppRootProvider, { element: () => rootRef.current, children: jsx(ThemeProvider, Object.assign({ theme: theme }, props, { ref: mergeRef, isRoot: true, sx: Object.assign(Object.assign(Object.assign({}, props.sx), (visibility === "hidden" ? { visibility: "hidden" } : {})), selection), children: jsxs(BreakpointProvider, { children: [children, !disableRenderar && jsx(RenderRenderar, {})] }) })) }) }) }));
|
|
51
52
|
});
|
|
52
53
|
|
|
53
54
|
export { AppRoot as default };
|
package/AppRoot/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useId, useLayoutEffect, useRef } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { ThemeProvider, ThemeProviderProps } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport { RenderRenderar } from './Renderar';\nimport { DocumentProvider } from '../Document';\nimport { AppRootProvider } from './AppRootProvider';\nimport useMergeRefs from '../hooks/useMergeRefs';\nimport { CSSCacheProvider } from '../css/CSSCacheProvider';\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n document?: Document;\n CSSCacheId?: string;\n disableRenderar?: boolean;\n disableFlashing?: boolean;\n selectionColor?: \"default\" | \"brand\" | \"accent\" | \"success\" | \"info\" | \"warning\" | \"danger\";\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, disableFlashing, noScrollbarCss, CSSCacheId, theme, disableRenderar, selectionColor, document: _document, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n disableFlashing ??= false\n noScrollbarCss ??= false\n selectionColor ??= \"brand\"\n if (typeof window !== \"undefined\") {\n _document ??= document\n }\n disableRenderar ??= false\n const docid = useId()\n const csscacheId = useId()\n CSSCacheId ??= csscacheId\n\n const [visibility, setVisibility] = React.useState<string>(!disableFlashing ? \"hidden\" : \"\");\n const rootRef = useRef(null)\n const mergeRef = useMergeRefs(rootRef, ref)\n\n useLayoutEffect(() => {\n !disableFlashing && setVisibility(\"\");\n\n // move oncss style tags to head\n if (typeof _document === 'undefined') return;\n const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n _document.head.appendChild(style);\n });\n }, [])\n\n let selection: any = {}\n if (selectionColor && selectionColor !== 'default') {\n selection = {\n \"&::selection\": {\n bgcolor: `${selectionColor}.primary`,\n color: `${selectionColor}.text`\n }\n }\n }\n\n return (\n <DocumentProvider value={_document ? { document: _document, id: docid } : undefined}>\n <CSSCacheProvider cacheId={CSSCacheId}>\n <AppRootProvider element={() => rootRef.current}>\n <ThemeProvider\n theme={theme}\n {...props}\n ref={mergeRef}\n isRoot\n sx={{\n ...props.sx,\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {}),\n ...selection\n }}\n >\n <BreakpointProvider>\n {children}\n {!disableRenderar && <RenderRenderar />}\n </BreakpointProvider>\n </ThemeProvider>\n </AppRootProvider>\n </CSSCacheProvider>\n </DocumentProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA;;;;;AAIG;;;;AAIA;AACA;;;AAIA;;;AAIG;;;;AAIA;AACA;AACG;AACH;;;AAIH;AACG;AACG;;;AAGC;;;;AA4BV;;"}
|
package/Document/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Document/index.tsx"],"sourcesContent":["'use client'\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Document/index.tsx"],"sourcesContent":["'use client'\nimport React, { useContext, createContext } from \"react\";\n\nexport type DocumentID = string\nexport type DocumentContextValue = { document: Document; id: DocumentID } | undefined\nconst DocumentContext = createContext<DocumentContextValue>(undefined);\nexport const DocumentProvider: React.FC<{ children: React.ReactNode, value?: DocumentContextValue }> = ({ value, children }) => {\n return (\n <DocumentContext.Provider value={value}>\n {children}\n </DocumentContext.Provider>\n );\n}\n\nexport const useDocument = () => useContext(DocumentContext)"],"names":[],"mappings":";;;;;;AAKA;AACO;AACJ;AAKH;AAEO;;;"}
|
package/Document/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Document/index.tsx"],"sourcesContent":["'use client'\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Document/index.tsx"],"sourcesContent":["'use client'\nimport React, { useContext, createContext } from \"react\";\n\nexport type DocumentID = string\nexport type DocumentContextValue = { document: Document; id: DocumentID } | undefined\nconst DocumentContext = createContext<DocumentContextValue>(undefined);\nexport const DocumentProvider: React.FC<{ children: React.ReactNode, value?: DocumentContextValue }> = ({ value, children }) => {\n return (\n <DocumentContext.Provider value={value}>\n {children}\n </DocumentContext.Provider>\n );\n}\n\nexport const useDocument = () => useContext(DocumentContext)"],"names":[],"mappings":";;;;AAKA;AACO;AACJ;AAKH;AAEO;;"}
|
package/Iframe/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Iframe/index.tsx"],"sourcesContent":["'use client'\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Iframe/index.tsx"],"sourcesContent":["'use client'\nimport React, { createContext, useEffect, useRef, useState } from \"react\";\nimport { useTheme } from \"../theme\";\nimport Tag from \"../Tag\";\nimport { createPortal } from \"react-dom\";\nimport AppRoot from \"../AppRoot\";\nimport { TagPropsRoot } from \"../Tag/types\";\nimport useMergeRefs from \"../hooks/useMergeRefs\";\n\nconst IframeContext = createContext<{ document: Document | null; window: Window | null; }>({\n document: null,\n window: null,\n});\n\n\nexport type IframeProps = Omit<TagPropsRoot<\"iframe\">, \"component\"> & {\n theme?: string;\n CSSCacheId?: string;\n}\n\nconst Iframe = ({ children, sxr, theme, CSSCacheId, ...props }: IframeProps, ref: React.Ref<HTMLIFrameElement>) => {\n const [doc, setDoc] = useState<Document | null>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const _ref = useMergeRefs(iframeRef, ref)\n const parentTheme = useTheme()\n theme ??= parentTheme.name\n\n useEffect(() => {\n if (!iframeRef.current) return;\n const iframe = iframeRef.current;\n const onLoad = () => setDoc(iframe.contentDocument);\n iframe.addEventListener(\"load\", onLoad);\n return () => iframe.removeEventListener(\"load\", onLoad);\n }, []);\n\n return (\n <>\n <Tag\n {...props}\n component={\"iframe\"}\n sxr={{\n border: 'none',\n width: \"100%\",\n height: \"100%\",\n p: 0,\n m: 0,\n ...sxr\n }}\n ref={_ref}\n srcDoc={\"<!DOCTYPE html><html><head></head><body></body></html>\"}\n />\n {doc &&\n createPortal(\n <IframeContext.Provider\n value={{\n document: doc,\n window: doc.defaultView,\n }}\n >\n <AppRoot disableRenderar theme={theme} document={doc as Document} CSSCacheId={CSSCacheId}>\n {children}\n </AppRoot>\n </IframeContext.Provider>,\n doc.body\n )}\n </>\n );\n}\n\nexport default React.forwardRef(Iframe)"],"names":[],"mappings":";;;;;;;;;;;;;;;;AASA;AACG;AACA;AACF;AAQD;AAAgB;;AAEb;;AAEA;;;;;AAKG;;AAEA;;;;AAqBM;AAGS;;;AAYrB;AAEA;;"}
|
package/Iframe/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Iframe/index.tsx"],"sourcesContent":["'use client'\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Iframe/index.tsx"],"sourcesContent":["'use client'\nimport React, { createContext, useEffect, useRef, useState } from \"react\";\nimport { useTheme } from \"../theme\";\nimport Tag from \"../Tag\";\nimport { createPortal } from \"react-dom\";\nimport AppRoot from \"../AppRoot\";\nimport { TagPropsRoot } from \"../Tag/types\";\nimport useMergeRefs from \"../hooks/useMergeRefs\";\n\nconst IframeContext = createContext<{ document: Document | null; window: Window | null; }>({\n document: null,\n window: null,\n});\n\n\nexport type IframeProps = Omit<TagPropsRoot<\"iframe\">, \"component\"> & {\n theme?: string;\n CSSCacheId?: string;\n}\n\nconst Iframe = ({ children, sxr, theme, CSSCacheId, ...props }: IframeProps, ref: React.Ref<HTMLIFrameElement>) => {\n const [doc, setDoc] = useState<Document | null>(null);\n const iframeRef = useRef<HTMLIFrameElement>(null);\n const _ref = useMergeRefs(iframeRef, ref)\n const parentTheme = useTheme()\n theme ??= parentTheme.name\n\n useEffect(() => {\n if (!iframeRef.current) return;\n const iframe = iframeRef.current;\n const onLoad = () => setDoc(iframe.contentDocument);\n iframe.addEventListener(\"load\", onLoad);\n return () => iframe.removeEventListener(\"load\", onLoad);\n }, []);\n\n return (\n <>\n <Tag\n {...props}\n component={\"iframe\"}\n sxr={{\n border: 'none',\n width: \"100%\",\n height: \"100%\",\n p: 0,\n m: 0,\n ...sxr\n }}\n ref={_ref}\n srcDoc={\"<!DOCTYPE html><html><head></head><body></body></html>\"}\n />\n {doc &&\n createPortal(\n <IframeContext.Provider\n value={{\n document: doc,\n window: doc.defaultView,\n }}\n >\n <AppRoot disableRenderar theme={theme} document={doc as Document} CSSCacheId={CSSCacheId}>\n {children}\n </AppRoot>\n </IframeContext.Provider>,\n doc.body\n )}\n </>\n );\n}\n\nexport default React.forwardRef(Iframe)"],"names":[],"mappings":";;;;;;;;;;;;;;AASA;AACG;AACA;AACF;AAQD;AAAgB;;AAEb;;AAEA;;;;;AAKG;;AAEA;;;;AAqBM;AAGS;;;AAYrB;AAEA;;"}
|
package/Portal/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Portal/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Portal/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { ReactNode, useMemo } from \"react\";\nimport { createPortal } from \"react-dom\";\n\nexport type PortalProps = {\n children: ReactNode;\n container?: HTMLElement | string; // HTMLElement or querySelector string\n}\n\n/**\n * SSR-safe Portal component\n * - container: HTMLElement or querySelector string\n * - if not provided, creates a unique div automatically\n */\nconst Portal: React.FC<PortalProps> = ({ children, container }) => {\n const portalNode = useMemo<HTMLElement | null>(() => {\n if (typeof document === \"undefined\") return null; // SSR\n\n // Use container if provided\n if (container instanceof HTMLElement) return container;\n if (typeof container === \"string\") {\n const element = document.querySelector<HTMLElement>(container);\n if (element) return element;\n }\n\n // Auto-create a unique div\n const element = document.createElement(\"div\");\n element.dataset.portal = Math.random().toString(36).substring(2, 9); // unique id\n document.body.appendChild(element);\n\n return element;\n }, [container]);\n\n if (!portalNode) return null;\n\n return createPortal(children, portalNode);\n};\n\nexport default Portal;"],"names":[],"mappings":";;;;;;AAUA;;;;AAIG;AACH;AACG;;;;;AAIyC;AACtC;;AAEG;AAAa;;;;;AAMhB;AAEA;AACH;AAEA;AAAiB;AAEjB;AACH;;"}
|
package/Portal/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Portal/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Portal/index.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { ReactNode, useMemo } from \"react\";\nimport { createPortal } from \"react-dom\";\n\nexport type PortalProps = {\n children: ReactNode;\n container?: HTMLElement | string; // HTMLElement or querySelector string\n}\n\n/**\n * SSR-safe Portal component\n * - container: HTMLElement or querySelector string\n * - if not provided, creates a unique div automatically\n */\nconst Portal: React.FC<PortalProps> = ({ children, container }) => {\n const portalNode = useMemo<HTMLElement | null>(() => {\n if (typeof document === \"undefined\") return null; // SSR\n\n // Use container if provided\n if (container instanceof HTMLElement) return container;\n if (typeof container === \"string\") {\n const element = document.querySelector<HTMLElement>(container);\n if (element) return element;\n }\n\n // Auto-create a unique div\n const element = document.createElement(\"div\");\n element.dataset.portal = Math.random().toString(36).substring(2, 9); // unique id\n document.body.appendChild(element);\n\n return element;\n }, [container]);\n\n if (!portalNode) return null;\n\n return createPortal(children, portalNode);\n};\n\nexport default Portal;"],"names":[],"mappings":";;;;AAUA;;;;AAIG;AACH;AACG;;;;;AAIyC;AACtC;;AAEG;AAAa;;;;;AAMhB;AAEA;AACH;AAEA;AAAiB;AAEjB;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerStyleTag.cjs","sources":["../../src/Tag/ServerStyleTag.tsx"],"sourcesContent":["import { CSSFactoryType } from 'oncss'\
|
|
1
|
+
{"version":3,"file":"ServerStyleTag.cjs","sources":["../../src/Tag/ServerStyleTag.tsx"],"sourcesContent":["import { CSSFactoryType } from 'oncss'\nimport React from 'react'\n\nconst ServerStyleTag = ({ factory }: { factory: CSSFactoryType }) => {\n if (typeof window === 'undefined') {\n return <style\n dangerouslySetInnerHTML={{ __html: factory.css }}\n precedence={factory.classname}\n href={factory.classname}\n />\n }\n return null\n}\n\nexport default ServerStyleTag\n"],"names":["_jsx"],"mappings":";;;;AAGA,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAA+B,KAAI;AACjE,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAChC,OAAOA,cAAA,CAAA,OAAA,EAAA,EACJ,uBAAuB,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,EAChD,UAAU,EAAE,OAAO,CAAC,SAAS,EAC7B,IAAI,EAAE,OAAO,CAAC,SAAS,EAAA,CACxB;IACL;AACA,IAAA,OAAO,IAAI;AACd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerStyleTag.js","sources":["../../src/Tag/ServerStyleTag.tsx"],"sourcesContent":["import { CSSFactoryType } from 'oncss'\
|
|
1
|
+
{"version":3,"file":"ServerStyleTag.js","sources":["../../src/Tag/ServerStyleTag.tsx"],"sourcesContent":["import { CSSFactoryType } from 'oncss'\nimport React from 'react'\n\nconst ServerStyleTag = ({ factory }: { factory: CSSFactoryType }) => {\n if (typeof window === 'undefined') {\n return <style\n dangerouslySetInnerHTML={{ __html: factory.css }}\n precedence={factory.classname}\n href={factory.classname}\n />\n }\n return null\n}\n\nexport default ServerStyleTag\n"],"names":["_jsx"],"mappings":";;AAGA,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAA+B,KAAI;AACjE,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAChC,OAAOA,GAAA,CAAA,OAAA,EAAA,EACJ,uBAAuB,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,EAChD,UAAU,EAAE,OAAO,CAAC,SAAS,EAC7B,IAAI,EAAE,OAAO,CAAC,SAAS,EAAA,CACxB;IACL;AACA,IAAA,OAAO,IAAI;AACd;;;;"}
|
package/Tag/cssPropList.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cssPropList.cjs","sources":["../../src/Tag/cssPropList.ts"],"sourcesContent":["\
|
|
1
|
+
{"version":3,"file":"cssPropList.cjs","sources":["../../src/Tag/cssPropList.ts"],"sourcesContent":["\nconst CSS_PROP_LIST: any = {\n typography: 1,\n bgcolor: 1,\n bgimage: 1,\n bg: 1,\n p: 1,\n pt: 1,\n pr: 1,\n pb: 1,\n pl: 1,\n px: 1,\n py: 1,\n m: 1,\n mt: 1,\n mr: 1,\n mb: 1,\n ml: 1,\n mx: 1,\n my: 1,\n radius: 1,\n shadow: 1,\n flexBox: 1,\n flexRow: 1,\n flexColumn: 1,\n flexWraped: 1,\n disabled: 1,\n spacing: 1,\n\n gradient: 1,\n\n // CSS Props\n alignContent: 1,\n alignItems: 1,\n alignSelf: 1,\n animation: 1,\n animationComposition: 1,\n animationDelay: 1,\n animationDirection: 1,\n animationDuration: 1,\n animationFillMode: 1,\n animationIterationCount: 1,\n animationName: 1,\n animationTimingFunction: 1,\n backdropFilter: 1,\n background: 1,\n backgroundAttachment: 1,\n backgroundColor: 1,\n backgroundImage: 1,\n backgroundOrigin: 1,\n backgroundPosition: 1,\n backgroundRepeat: 1,\n backgroundSize: 1,\n border: 1,\n borderBottom: 1,\n borderBottomColor: 1,\n borderBottomStyle: 1,\n borderBottomWidth: 1,\n borderColor: 1,\n borderImage: 1,\n borderLeft: 1,\n borderLeftColor: 1,\n borderLeftStyle: 1,\n borderLeftWidth: 1,\n borderRadius: 1,\n borderRight: 1,\n borderRightColor: 1,\n borderRightStyle: 1,\n borderRightWidth: 1,\n borderStyle: 1,\n borderTop: 1,\n borderTopColor: 1,\n borderTopLeftRadius: 1,\n borderTopRightRadius: 1,\n borderTopStyle: 1,\n borderTopWidth: 1,\n borderWidth: 1,\n bottom: 1,\n boxShadow: 1,\n boxSizing: 1,\n cursor: 1,\n color: 1,\n display: 1,\n direction: 1,\n filter: 1,\n flex: 1,\n flexBasis: 1,\n flexDirection: 1,\n flexFlow: 1,\n flexGrow: 1,\n flexShrink: 1,\n flexWrap: 1,\n float: 1,\n fontFamily: 1,\n fontSize: 1,\n fontStyle: 1,\n fontWeight: 1,\n font: 1,\n gap: 1,\n grid: 1,\n gridArea: 1,\n gridAutoColumns: 1,\n gridAutoFlow: 1,\n gridAutoRows: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnGap: 1,\n gridColumnStart: 1,\n gridGap: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowGap: 1,\n gridRowStart: 1,\n gridTemplate: 1,\n gridTemplateAreas: 1,\n gridTemplateColumns: 1,\n gridTemplateRows: 1,\n height: 1,\n justifyContent: 1,\n justifyItems: 1,\n justifySelf: 1,\n left: 1,\n letterSpacing: 1,\n lineBreak: 1,\n lineHeight: 1,\n listStyle: 1,\n margin: 1,\n marginBlock: 1,\n marginBlockEnd: 1,\n marginBlockStart: 1,\n marginBottom: 1,\n marginInline: 1,\n marginInlineEnd: 1,\n marginInlineStart: 1,\n marginLeft: 1,\n marginRight: 1,\n marginTop: 1,\n maxHeight: 1,\n maxWidth: 1,\n minHeight: 1,\n minWidth: 1,\n objectFit: 1,\n objectPosition: 1,\n opacity: 1,\n order: 1,\n outline: 1,\n overflow: 1,\n overflowX: 1,\n overflowY: 1,\n padding: 1,\n paddingBlock: 1,\n paddingBlockEnd: 1,\n paddingBlockStart: 1,\n paddingBottom: 1,\n paddingInline: 1,\n paddingInlineEnd: 1,\n paddingInlineStart: 1,\n paddingLeft: 1,\n paddingRight: 1,\n paddingTop: 1,\n perspective: 1,\n perspectiveOrigin: 1,\n pointerEvents: 1,\n position: 1,\n resize: 1,\n right: 1,\n textAlign: 1,\n textDecoration: 1,\n textShadow: 1,\n textTransform: 1,\n top: 1,\n transform: 1,\n transformOrigin: 1,\n transformStyle: 1,\n transition: 1,\n transitionDelay: 1,\n transitionDuration: 1,\n transitionProperty: 1,\n transitionTimingFunction: 1,\n userSelect: 1,\n verticalAlign: 1,\n visibility: 1,\n whiteSpace: 1,\n width: 1,\n wordBreak: 1,\n wordSpacing: 1,\n wordWrap: 1,\n zIndex: 1,\n}\n\nexport default CSS_PROP_LIST"],"names":[],"mappings":";;AACA,MAAM,aAAa,GAAQ;AACvB,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,CAAC,EAAE,CAAC;AACJ,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,CAAC,EAAE,CAAC;AACJ,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,UAAU,EAAE,CAAC;AACb,IAA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":["\
|
|
1
|
+
{"version":3,"file":"cssPropList.js","sources":["../../src/Tag/cssPropList.ts"],"sourcesContent":["\nconst CSS_PROP_LIST: any = {\n typography: 1,\n bgcolor: 1,\n bgimage: 1,\n bg: 1,\n p: 1,\n pt: 1,\n pr: 1,\n pb: 1,\n pl: 1,\n px: 1,\n py: 1,\n m: 1,\n mt: 1,\n mr: 1,\n mb: 1,\n ml: 1,\n mx: 1,\n my: 1,\n radius: 1,\n shadow: 1,\n flexBox: 1,\n flexRow: 1,\n flexColumn: 1,\n flexWraped: 1,\n disabled: 1,\n spacing: 1,\n\n gradient: 1,\n\n // CSS Props\n alignContent: 1,\n alignItems: 1,\n alignSelf: 1,\n animation: 1,\n animationComposition: 1,\n animationDelay: 1,\n animationDirection: 1,\n animationDuration: 1,\n animationFillMode: 1,\n animationIterationCount: 1,\n animationName: 1,\n animationTimingFunction: 1,\n backdropFilter: 1,\n background: 1,\n backgroundAttachment: 1,\n backgroundColor: 1,\n backgroundImage: 1,\n backgroundOrigin: 1,\n backgroundPosition: 1,\n backgroundRepeat: 1,\n backgroundSize: 1,\n border: 1,\n borderBottom: 1,\n borderBottomColor: 1,\n borderBottomStyle: 1,\n borderBottomWidth: 1,\n borderColor: 1,\n borderImage: 1,\n borderLeft: 1,\n borderLeftColor: 1,\n borderLeftStyle: 1,\n borderLeftWidth: 1,\n borderRadius: 1,\n borderRight: 1,\n borderRightColor: 1,\n borderRightStyle: 1,\n borderRightWidth: 1,\n borderStyle: 1,\n borderTop: 1,\n borderTopColor: 1,\n borderTopLeftRadius: 1,\n borderTopRightRadius: 1,\n borderTopStyle: 1,\n borderTopWidth: 1,\n borderWidth: 1,\n bottom: 1,\n boxShadow: 1,\n boxSizing: 1,\n cursor: 1,\n color: 1,\n display: 1,\n direction: 1,\n filter: 1,\n flex: 1,\n flexBasis: 1,\n flexDirection: 1,\n flexFlow: 1,\n flexGrow: 1,\n flexShrink: 1,\n flexWrap: 1,\n float: 1,\n fontFamily: 1,\n fontSize: 1,\n fontStyle: 1,\n fontWeight: 1,\n font: 1,\n gap: 1,\n grid: 1,\n gridArea: 1,\n gridAutoColumns: 1,\n gridAutoFlow: 1,\n gridAutoRows: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnGap: 1,\n gridColumnStart: 1,\n gridGap: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowGap: 1,\n gridRowStart: 1,\n gridTemplate: 1,\n gridTemplateAreas: 1,\n gridTemplateColumns: 1,\n gridTemplateRows: 1,\n height: 1,\n justifyContent: 1,\n justifyItems: 1,\n justifySelf: 1,\n left: 1,\n letterSpacing: 1,\n lineBreak: 1,\n lineHeight: 1,\n listStyle: 1,\n margin: 1,\n marginBlock: 1,\n marginBlockEnd: 1,\n marginBlockStart: 1,\n marginBottom: 1,\n marginInline: 1,\n marginInlineEnd: 1,\n marginInlineStart: 1,\n marginLeft: 1,\n marginRight: 1,\n marginTop: 1,\n maxHeight: 1,\n maxWidth: 1,\n minHeight: 1,\n minWidth: 1,\n objectFit: 1,\n objectPosition: 1,\n opacity: 1,\n order: 1,\n outline: 1,\n overflow: 1,\n overflowX: 1,\n overflowY: 1,\n padding: 1,\n paddingBlock: 1,\n paddingBlockEnd: 1,\n paddingBlockStart: 1,\n paddingBottom: 1,\n paddingInline: 1,\n paddingInlineEnd: 1,\n paddingInlineStart: 1,\n paddingLeft: 1,\n paddingRight: 1,\n paddingTop: 1,\n perspective: 1,\n perspectiveOrigin: 1,\n pointerEvents: 1,\n position: 1,\n resize: 1,\n right: 1,\n textAlign: 1,\n textDecoration: 1,\n textShadow: 1,\n textTransform: 1,\n top: 1,\n transform: 1,\n transformOrigin: 1,\n transformStyle: 1,\n transition: 1,\n transitionDelay: 1,\n transitionDuration: 1,\n transitionProperty: 1,\n transitionTimingFunction: 1,\n userSelect: 1,\n verticalAlign: 1,\n visibility: 1,\n whiteSpace: 1,\n width: 1,\n wordBreak: 1,\n wordSpacing: 1,\n wordWrap: 1,\n zIndex: 1,\n}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EAAE,CAAC;AACjB,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,aAAa,EAAE,CAAC;AAChB,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,eAAe,EAAE,CAAC;AAClB,IAAA,cAAc,EAAE,CAAC;AACjB,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,eAAe,EAAE,CAAC;AAClB,IAAA,kBAAkB,EAAE,CAAC;AACrB,IAAA,kBAAkB,EAAE,CAAC;AACrB,IAAA,wBAAwB,EAAE,CAAC;AAC3B,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,aAAa,EAAE,CAAC;AAChB,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,UAAU,EAAE,CAAC;AACb,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,WAAW,EAAE,CAAC;AACd,IAAA,QAAQ,EAAE,CAAC;AACX,IAAA,MAAM,EAAE,CAAC;;;;;"}
|
package/Tag/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Tag/index.tsx"],"sourcesContent":["import * as React from 'react'\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Tag/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport { TagComponentType, TagPropsRoot } from './types';\nimport useTagProps from './useTagProps';\nimport ServerStyleTag from './ServerStyleTag';\n\nconst Tag = React.forwardRef(<T extends TagComponentType = 'div'>({ component, children, ...rest }: TagPropsRoot<T>, ref: React.Ref<any>) => {\n const { props, style }: any = useTagProps(rest)\n props.ref = ref\n const ele = React.createElement(component || \"div\", props, children)\n if (typeof window === 'undefined') {\n return (\n <>\n <ServerStyleTag factory={style} />\n {ele}\n </>\n )\n }\n return ele\n})\n\nexport default Tag"],"names":["React","__rest","_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,GAAG,GAAGA,gBAAK,CAAC,UAAU,CAAC,CAAqC,EAAiD,EAAE,GAAmB,KAAI;QAA1E,EAAE,SAAS,EAAE,QAAQ,EAAA,GAAA,EAA4B,EAAvB,IAAI,GAAAC,YAAA,CAAA,EAAA,EAA9B,yBAAgC,CAAF;IAC5F,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAQ,WAAW,CAAC,IAAI,CAAC;AAC/C,IAAA,KAAK,CAAC,GAAG,GAAG,GAAG;AACf,IAAA,MAAM,GAAG,GAAGD,gBAAK,CAAC,aAAa,CAAC,SAAS,IAAI,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;AACpE,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAC/B,QAAA,QACIE,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CACIC,cAAA,CAAC,cAAc,EAAA,EAAC,OAAO,EAAE,KAAK,EAAA,CAAI,EACjC,GAAG,CAAA,EAAA,CACL;IAEX;AACA,IAAA,OAAO,GAAG;AACd,CAAC;;;;"}
|
package/Tag/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Tag/index.tsx"],"sourcesContent":["import * as React from 'react'\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Tag/index.tsx"],"sourcesContent":["import * as React from 'react'\nimport { TagComponentType, TagPropsRoot } from './types';\nimport useTagProps from './useTagProps';\nimport ServerStyleTag from './ServerStyleTag';\n\nconst Tag = React.forwardRef(<T extends TagComponentType = 'div'>({ component, children, ...rest }: TagPropsRoot<T>, ref: React.Ref<any>) => {\n const { props, style }: any = useTagProps(rest)\n props.ref = ref\n const ele = React.createElement(component || \"div\", props, children)\n if (typeof window === 'undefined') {\n return (\n <>\n <ServerStyleTag factory={style} />\n {ele}\n </>\n )\n }\n return ele\n})\n\nexport default Tag"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;AAKA,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAAiD,EAAE,GAAmB,KAAI;QAA1E,EAAE,SAAS,EAAE,QAAQ,EAAA,GAAA,EAA4B,EAAvB,IAAI,GAAA,MAAA,CAAA,EAAA,EAA9B,yBAAgC,CAAF;IAC5F,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAQ,WAAW,CAAC,IAAI,CAAC;AAC/C,IAAA,KAAK,CAAC,GAAG,GAAG,GAAG;AACf,IAAA,MAAM,GAAG,GAAG,KAAK,CAAC,aAAa,CAAC,SAAS,IAAI,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;AACpE,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAC/B,QAAA,QACIA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACIC,GAAA,CAAC,cAAc,EAAA,EAAC,OAAO,EAAE,KAAK,EAAA,CAAI,EACjC,GAAG,CAAA,EAAA,CACL;IAEX;AACA,IAAA,OAAO,GAAG;AACd,CAAC;;;;"}
|
package/Tag/useTagProps.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTagProps.cjs","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\
|
|
1
|
+
{"version":3,"file":"useTagProps.cjs","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\nimport cssPropList from './cssPropList';\nimport { css } from '../css';\nimport { classNames } from 'pretty-class';\nimport { CSSFactoryType } from 'oncss';\nimport { useMemo } from 'react';\nimport { useDocument } from '../Document';\nimport { useCSSCacheId } from '../css/CSSCacheProvider';\n\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\n props: TagProps<T>,\n style: CSSFactoryType\n}\n\nconst useTagProps = <T extends TagComponentType = \"div\">(props: TagPropsRoot<T>): useTagPropsReturn<T> => {\n const cachekey = JSON.stringify(props, (key, value) => {\n return key === '_owner' || key === '_store' ? undefined : value;\n }, 2);\n\n const doc = useDocument();\n const cacheId = useCSSCacheId()\n\n const parsed = useMemo(() => {\n let _props: any = {}\n let _css: any = {}\n\n if (props.hover && Object.keys(props.hover).length > 0) {\n _css['&:hover'] = {\n ...props.hover\n }\n }\n\n for (let key in props) {\n const keys = [\"sx\", \"sxr\", \"style\", \"hover\", \"className\", \"classNames\", \"baseClass\"];\n if (keys.includes(key)) {\n continue;\n }\n let val = (props as any)[key];\n if (!cssPropList[key]) {\n _props[key] = val\n } else {\n _css[key] = val\n }\n }\n\n const styles = css({ ...props.sxr, ..._css, ...props.sx, ...props.style }, {\n injectStyle: typeof window !== 'undefined',\n container: doc?.document,\n cacheId\n })\n\n return {\n props: _props,\n styles,\n className: classNames(\n props.baseClass ? \"xui-\" + props.baseClass : undefined,\n props.classNames,\n props.className,\n styles.classname\n )\n }\n }, [cachekey])\n\n const _props: any = {};\n for (let prop in parsed.props) {\n _props[prop] = (props as any)[prop]\n }\n _props.className = parsed.className;\n\n return { props: _props, style: parsed.styles };\n}\n\n\nexport default useTagProps"],"names":["useDocument","useCSSCacheId","useMemo","css","classNames"],"mappings":";;;;;;;;;AAcA,MAAM,WAAW,GAAG,CAAqC,KAAsB,KAA0B;AACtG,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,KAAI;AACnD,QAAA,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,QAAQ,GAAG,SAAS,GAAG,KAAK;IAClE,CAAC,EAAE,CAAC,CAAC;AAEL,IAAA,MAAM,GAAG,GAAGA,iBAAW,EAAE;AACzB,IAAA,MAAM,OAAO,GAAGC,8BAAa,EAAE;AAE/B,IAAA,MAAM,MAAM,GAAGC,aAAO,CAAC,MAAK;QACzB,IAAI,MAAM,GAAQ,EAAE;QACpB,IAAI,IAAI,GAAQ,EAAE;AAElB,QAAA,IAAI,KAAK,CAAC,KAAK,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GAAG,SAAS,EACtD,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,SAAS,EACf,MAAM,CAAC,SAAS;SAErB;AACJ,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAEd,MAAM,MAAM,GAAQ,EAAE;AACtB,IAAA,KAAK,IAAI,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE;QAC5B,MAAM,CAAC,IAAI,CAAC,GAAI,KAAa,CAAC,IAAI,CAAC;IACtC;AACA,IAAA,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS;IAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;AACjD;;;;"}
|
package/Tag/useTagProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTagProps.js","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\
|
|
1
|
+
{"version":3,"file":"useTagProps.js","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\nimport cssPropList from './cssPropList';\nimport { css } from '../css';\nimport { classNames } from 'pretty-class';\nimport { CSSFactoryType } from 'oncss';\nimport { useMemo } from 'react';\nimport { useDocument } from '../Document';\nimport { useCSSCacheId } from '../css/CSSCacheProvider';\n\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\n props: TagProps<T>,\n style: CSSFactoryType\n}\n\nconst useTagProps = <T extends TagComponentType = \"div\">(props: TagPropsRoot<T>): useTagPropsReturn<T> => {\n const cachekey = JSON.stringify(props, (key, value) => {\n return key === '_owner' || key === '_store' ? undefined : value;\n }, 2);\n\n const doc = useDocument();\n const cacheId = useCSSCacheId()\n\n const parsed = useMemo(() => {\n let _props: any = {}\n let _css: any = {}\n\n if (props.hover && Object.keys(props.hover).length > 0) {\n _css['&:hover'] = {\n ...props.hover\n }\n }\n\n for (let key in props) {\n const keys = [\"sx\", \"sxr\", \"style\", \"hover\", \"className\", \"classNames\", \"baseClass\"];\n if (keys.includes(key)) {\n continue;\n }\n let val = (props as any)[key];\n if (!cssPropList[key]) {\n _props[key] = val\n } else {\n _css[key] = val\n }\n }\n\n const styles = css({ ...props.sxr, ..._css, ...props.sx, ...props.style }, {\n injectStyle: typeof window !== 'undefined',\n container: doc?.document,\n cacheId\n })\n\n return {\n props: _props,\n styles,\n className: classNames(\n props.baseClass ? \"xui-\" + props.baseClass : undefined,\n props.classNames,\n props.className,\n styles.classname\n )\n }\n }, [cachekey])\n\n const _props: any = {};\n for (let prop in parsed.props) {\n _props[prop] = (props as any)[prop]\n }\n _props.className = parsed.className;\n\n return { props: _props, style: parsed.styles };\n}\n\n\nexport default useTagProps"],"names":["cssPropList"],"mappings":";;;;;;;AAcA,MAAM,WAAW,GAAG,CAAqC,KAAsB,KAA0B;AACtG,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,KAAI;AACnD,QAAA,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,QAAQ,GAAG,SAAS,GAAG,KAAK;IAClE,CAAC,EAAE,CAAC,CAAC;AAEL,IAAA,MAAM,GAAG,GAAG,WAAW,EAAE;AACzB,IAAA,MAAM,OAAO,GAAG,aAAa,EAAE;AAE/B,IAAA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAK;QACzB,IAAI,MAAM,GAAQ,EAAE;QACpB,IAAI,IAAI,GAAQ,EAAE;AAElB,QAAA,IAAI,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YACrD,IAAI,CAAC,SAAS,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACT,KAAK,CAAC,KAAK,CAChB;QACJ;AAEA,QAAA,KAAK,IAAI,GAAG,IAAI,KAAK,EAAE;A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AAM,CAAC,IAAI,CAAC,GAAI,KAAa,CAAC,IAAI,CAAC;IACtC;AACA,IAAA,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS;IAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;AACjD;;;;"}
|
package/Transition/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Transition/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Transition/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { cloneElement, Children, useEffect, useState } from 'react';\nimport useTransition, { UseTransitionProps } from '../hooks/useTransition';\n\nexport type TransitionProps = UseTransitionProps & {\n children: React.ReactElement;\n}\n\nconst TransitionBase = ({ children, ...options }: TransitionProps) => {\n const { props, exited } = useTransition(options);\n if (exited) return null;\n const clone: any = Children.only(children);\n return cloneElement(clone, props);\n}\n\nfunction Transition({ children, ...options }: TransitionProps) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return <TransitionBase {...options} >{children}</TransitionBase>\n}\n\n\nexport default Transition"],"names":[],"mappings":";;;;;;;;AAQA;AAAwB;;AAEpB;AAAY;;AAEZ;AACJ;AAEA;AAAoB;;;;;AAOhB;AAAc;AACd;AACJ;;"}
|
package/Transition/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Transition/index.tsx"],"sourcesContent":["\"use client\";\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Transition/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { cloneElement, Children, useEffect, useState } from 'react';\nimport useTransition, { UseTransitionProps } from '../hooks/useTransition';\n\nexport type TransitionProps = UseTransitionProps & {\n children: React.ReactElement;\n}\n\nconst TransitionBase = ({ children, ...options }: TransitionProps) => {\n const { props, exited } = useTransition(options);\n if (exited) return null;\n const clone: any = Children.only(children);\n return cloneElement(clone, props);\n}\n\nfunction Transition({ children, ...options }: TransitionProps) {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) return null;\n return <TransitionBase {...options} >{children}</TransitionBase>\n}\n\n\nexport default Transition"],"names":[],"mappings":";;;;;;AAQA;AAAwB;;AAEpB;AAAY;;AAEZ;AACJ;AAEA;AAAoB;;;;;AAOhB;AAAc;AACd;AACJ;;"}
|
|
@@ -3,49 +3,47 @@
|
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var index
|
|
7
|
-
var index = require('../Document/index.cjs');
|
|
6
|
+
var index = require('../css/index.cjs');
|
|
8
7
|
|
|
9
|
-
const BreakpointCtx = React.createContext(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const BreakpointCtx = React.createContext("xl");
|
|
9
|
+
const queries = {
|
|
10
|
+
xs: `(max-width:${index.breakpoints.sm - 0.02}px)`,
|
|
11
|
+
sm: `(min-width:${index.breakpoints.sm}px) and (max-width:${index.breakpoints.md - 0.02}px)`,
|
|
12
|
+
md: `(min-width:${index.breakpoints.md}px) and (max-width:${index.breakpoints.lg - 0.02}px)`,
|
|
13
|
+
lg: `(min-width:${index.breakpoints.lg}px) and (max-width:${index.breakpoints.xl - 0.02}px)`,
|
|
14
|
+
xl: `(min-width:${index.breakpoints.xl}px)`
|
|
15
|
+
};
|
|
16
|
+
const getCurrent = () => {
|
|
17
|
+
if (typeof window === "undefined")
|
|
18
18
|
return "xs";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return "
|
|
19
|
+
const entries = Object.entries(queries);
|
|
20
|
+
for (const [key, query] of entries) {
|
|
21
|
+
if (window.matchMedia(query).matches) {
|
|
22
|
+
return key;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return "xs";
|
|
26
26
|
};
|
|
27
27
|
const BreakpointProvider = ({ children }) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, [handler]);
|
|
48
|
-
return jsxRuntime.jsx(BreakpointCtx.Provider, { value: state, children: children });
|
|
28
|
+
const [current, setCurrent] = React.useState(() => getCurrent());
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
if (typeof window === "undefined")
|
|
31
|
+
return;
|
|
32
|
+
const mqls = Object.entries(queries).map(([key, query]) => {
|
|
33
|
+
const mql = window.matchMedia(query);
|
|
34
|
+
const handler = () => {
|
|
35
|
+
if (mql.matches) {
|
|
36
|
+
setCurrent(key);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
mql.addEventListener("change", handler);
|
|
40
|
+
return () => mql.removeEventListener("change", handler);
|
|
41
|
+
});
|
|
42
|
+
return () => {
|
|
43
|
+
mqls.forEach(fn => fn());
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
return (jsxRuntime.jsx(BreakpointCtx.Provider, { value: current, children: children }));
|
|
49
47
|
};
|
|
50
48
|
|
|
51
49
|
exports.BreakpointCtx = BreakpointCtx;
|