@xanui/core 1.2.59 → 1.2.60

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/index.cjs CHANGED
@@ -33,14 +33,15 @@ const AppRoot = React.forwardRef((_a, ref) => {
33
33
  const mergeRef = useMergeRefs(rootRef, ref);
34
34
  React.useLayoutEffect(() => {
35
35
  !disableFlashing && setVisibility("");
36
- // move oncss style tags to head
37
- if (typeof _document === 'undefined')
38
- return;
39
- const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));
40
- styles.forEach((style) => {
41
- _document.head.appendChild(style);
42
- });
43
36
  }, []);
37
+ // useEffect(() => {
38
+ // // move oncss style tags to head
39
+ // if (typeof _document === 'undefined') return;
40
+ // const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));
41
+ // styles.forEach((style) => {
42
+ // _document.head.appendChild(style);
43
+ // });
44
+ // }, [])
44
45
  let selection = {};
45
46
  if (selectionColor && selectionColor !== 'default') {
46
47
  selection = {
@@ -1 +1 @@
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;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, 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\n // useEffect(() => {\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;;;;;;;;;;;AAaH;AACG;AACG;;;AAGC;;;;AA4BV;;"}
package/AppRoot/index.js CHANGED
@@ -31,14 +31,15 @@ const AppRoot = React__default.forwardRef((_a, ref) => {
31
31
  const mergeRef = useMergeRefs(rootRef, ref);
32
32
  useLayoutEffect(() => {
33
33
  !disableFlashing && setVisibility("");
34
- // move oncss style tags to head
35
- if (typeof _document === 'undefined')
36
- return;
37
- const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));
38
- styles.forEach((style) => {
39
- _document.head.appendChild(style);
40
- });
41
34
  }, []);
35
+ // useEffect(() => {
36
+ // // move oncss style tags to head
37
+ // if (typeof _document === 'undefined') return;
38
+ // const styles = Array.from(_document.querySelectorAll('body style[data-oncss]'));
39
+ // styles.forEach((style) => {
40
+ // _document.head.appendChild(style);
41
+ // });
42
+ // }, [])
42
43
  let selection = {};
43
44
  if (selectionColor && selectionColor !== 'default') {
44
45
  selection = {
@@ -1 +1 @@
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;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, 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\n // useEffect(() => {\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;;;;;;;;;;;AAaH;AACG;AACG;;;AAGC;;;;AA4BV;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xanui/core",
3
- "version": "1.2.59",
3
+ "version": "1.2.60",
4
4
  "description": "Xanui Core Library",
5
5
  "private": false,
6
6
  "main": "./index.cjs",