@xanui/core 1.2.3 → 1.2.4

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.
@@ -5,7 +5,7 @@ type useTagPropsReturn<T extends TagComponentType = "div"> = {
5
5
  props: TagProps<T>;
6
6
  style: CSSFactoryType;
7
7
  };
8
- declare const useTagProps: <T extends TagComponentType = "div">({ sxr, sx, baseClass, classNames: clses, hover, ...props }: TagPropsRoot<T>) => useTagPropsReturn<T>;
8
+ declare const useTagProps: <T extends TagComponentType = "div">({ baseClass, classNames: clses, ...props }: TagPropsRoot<T>) => useTagPropsReturn<T>;
9
9
 
10
10
  export { useTagProps as default };
11
11
  export type { useTagPropsReturn };
@@ -1,9 +1,10 @@
1
1
  'use strict';Object.defineProperty(exports,'__esModule',{value:true});var tslib=require('tslib'),cssPropList=require('./cssPropList.js'),index=require('../css/index.js'),prettyClass=require('pretty-class');const useTagProps = (_a) => {
2
- var { sxr, sx, baseClass, classNames: clses, hover } = _a, props = tslib.__rest(_a, ["sxr", "sx", "baseClass", "classNames", "hover"]);
3
- let _css = Object.assign(Object.assign(Object.assign({}, sxr), sx), props);
4
- if (hover)
5
- _css['&:hover'] = hover;
6
- const style = index.css(_css, {
2
+ var { baseClass, classNames: clses } = _a, props = tslib.__rest(_a, ["baseClass", "classNames"]);
3
+ if ('hover' in props) {
4
+ props['&:hover'] = props['hover'];
5
+ delete props['hover'];
6
+ }
7
+ const style = index.css(props, {
7
8
  skipProps: (prop, _val, dept) => dept === 1 && !cssPropList.default[prop],
8
9
  injectStyle: typeof window !== 'undefined',
9
10
  });
@@ -1 +1 @@
1
- {"version":3,"file":"useTagProps.js","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ sxr, sx, baseClass, classNames: clses, hover, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n let _css: any = { ...sxr, ...sx, ...props }\r\n if (hover) _css['&:hover'] = hover\r\n const style = css(_css, {\r\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop],\r\n injectStyle: typeof window !== 'undefined',\r\n })\r\n\r\n let skipProps = style.skiped[style.classname as any] || []\r\n const _props: any = {};\r\n for (let prop of skipProps) {\r\n _props[prop] = (props as any)[prop]\r\n }\r\n _props.className = classNames([\r\n baseClass ? \"xui-\" + baseClass : \"\",\r\n style.classname,\r\n props.className,\r\n ...(clses as any || []),\r\n ])\r\n return { props: _props, style };\r\n}\r\n\r\n\r\nexport default useTagProps"],"names":["__rest","css","cssPropList","classNames"],"mappings":"8MAWA,MAAM,WAAW,GAAG,CAAqC,EAA2E,KAA0B;AAArG,IAAA,IAAA,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAA,GAAA,EAA6B,EAAxB,KAAK,GAAAA,YAAA,CAAA,EAAA,EAAxD,iDAA0D,CAAF;IAC9G,IAAI,IAAI,iDAAa,GAAG,CAAA,EAAK,EAAE,CAAA,EAAK,KAAK,CAAE;AAC3C,IAAA,IAAI,KAAK;AAAE,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK;AAClC,IAAA,MAAM,KAAK,GAAGC,SAAG,CAAC,IAAI,EAAE;AACrB,QAAA,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAU,IAAI,KAAK,CAAC,IAAI,CAACC,mBAAW,CAAC,IAAI,CAAC;AACtE,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK,WAAW;AAC5C,KAAA,CAAC;AAEF,IAAA,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAgB,CAAC,IAAI,EAAE;IAC1D,MAAM,MAAM,GAAQ,EAAE;AACtB,IAAA,KAAK,IAAI,IAAI,IAAI,SAAS,EAAE;QACzB,MAAM,CAAC,IAAI,CAAC,GAAI,KAAa,CAAC,IAAI,CAAC;IACtC;AACA,IAAA,MAAM,CAAC,SAAS,GAAGC,sBAAU,CAAC;QAC3B,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,EAAE;AACnC,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,IAAI,KAAY,IAAI,EAAE,CAAC;AACzB,KAAA,CAAC;AACF,IAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;AAClC"}
1
+ {"version":3,"file":"useTagProps.js","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ baseClass, classNames: clses, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n\r\n if ('hover' in props) {\r\n (props as any)['&:hover'] = props['hover'];\r\n delete (props as any)['hover'];\r\n }\r\n\r\n const style = css(props, {\r\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop],\r\n injectStyle: typeof window !== 'undefined',\r\n })\r\n\r\n let skipProps = style.skiped[style.classname as any] || []\r\n const _props: any = {};\r\n for (let prop of skipProps) {\r\n _props[prop] = (props as any)[prop]\r\n }\r\n _props.className = classNames([\r\n baseClass ? \"xui-\" + baseClass : \"\",\r\n style.classname,\r\n props.className,\r\n ...(clses as any || []),\r\n ])\r\n return { props: _props, style };\r\n}\r\n\r\n\r\nexport default useTagProps"],"names":["__rest","css","cssPropList","classNames"],"mappings":"8MAWA,MAAM,WAAW,GAAG,CAAqC,EAA2D,KAA0B;QAArF,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,OAA6B,EAAxB,KAAK,GAAAA,YAAA,CAAA,EAAA,EAAxC,CAAA,WAAA,EAAA,YAAA,CAA0C,CAAF;AAE9F,IAAA,IAAI,OAAO,IAAI,KAAK,EAAE;QAClB,KAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;AAC1C,QAAA,OAAQ,KAAa,CAAC,OAAO,CAAC;IACjC;AAEA,IAAA,MAAM,KAAK,GAAGC,SAAG,CAAC,KAAK,EAAE;AACtB,QAAA,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAU,IAAI,KAAK,CAAC,IAAI,CAACC,mBAAW,CAAC,IAAI,CAAC;AACtE,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK,WAAW;AAC5C,KAAA,CAAC;AAEF,IAAA,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAgB,CAAC,IAAI,EAAE;IAC1D,MAAM,MAAM,GAAQ,EAAE;AACtB,IAAA,KAAK,IAAI,IAAI,IAAI,SAAS,EAAE;QACzB,MAAM,CAAC,IAAI,CAAC,GAAI,KAAa,CAAC,IAAI,CAAC;IACtC;AACA,IAAA,MAAM,CAAC,SAAS,GAAGC,sBAAU,CAAC;QAC3B,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,EAAE;AACnC,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,IAAI,KAAY,IAAI,EAAE,CAAC;AACzB,KAAA,CAAC;AACF,IAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;AAClC"}
@@ -1,9 +1,10 @@
1
1
  import {__rest}from'tslib';import CSS_PROP_LIST from'./cssPropList.mjs';import {css}from'../css/index.mjs';import {classNames}from'pretty-class';const useTagProps = (_a) => {
2
- var { sxr, sx, baseClass, classNames: clses, hover } = _a, props = __rest(_a, ["sxr", "sx", "baseClass", "classNames", "hover"]);
3
- let _css = Object.assign(Object.assign(Object.assign({}, sxr), sx), props);
4
- if (hover)
5
- _css['&:hover'] = hover;
6
- const style = css(_css, {
2
+ var { baseClass, classNames: clses } = _a, props = __rest(_a, ["baseClass", "classNames"]);
3
+ if ('hover' in props) {
4
+ props['&:hover'] = props['hover'];
5
+ delete props['hover'];
6
+ }
7
+ const style = css(props, {
7
8
  skipProps: (prop, _val, dept) => dept === 1 && !CSS_PROP_LIST[prop],
8
9
  injectStyle: typeof window !== 'undefined',
9
10
  });
@@ -1 +1 @@
1
- {"version":3,"file":"useTagProps.mjs","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ sxr, sx, baseClass, classNames: clses, hover, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n let _css: any = { ...sxr, ...sx, ...props }\r\n if (hover) _css['&:hover'] = hover\r\n const style = css(_css, {\r\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop],\r\n injectStyle: typeof window !== 'undefined',\r\n })\r\n\r\n let skipProps = style.skiped[style.classname as any] || []\r\n const _props: any = {};\r\n for (let prop of skipProps) {\r\n _props[prop] = (props as any)[prop]\r\n }\r\n _props.className = classNames([\r\n baseClass ? \"xui-\" + baseClass : \"\",\r\n style.classname,\r\n props.className,\r\n ...(clses as any || []),\r\n ])\r\n return { props: _props, style };\r\n}\r\n\r\n\r\nexport default useTagProps"],"names":["cssPropList"],"mappings":"iJAWA,MAAM,WAAW,GAAG,CAAqC,EAA2E,KAA0B;AAArG,IAAA,IAAA,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAA,GAAA,EAA6B,EAAxB,KAAK,GAAA,MAAA,CAAA,EAAA,EAAxD,iDAA0D,CAAF;IAC9G,IAAI,IAAI,iDAAa,GAAG,CAAA,EAAK,EAAE,CAAA,EAAK,KAAK,CAAE;AAC3C,IAAA,IAAI,KAAK;AAAE,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK;AAClC,IAAA,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,EAAE;AACrB,QAAA,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAU,IAAI,KAAK,CAAC,IAAI,CAACA,aAAW,CAAC,IAAI,CAAC;AACtE,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK,WAAW;AAC5C,KAAA,CAAC;AAEF,IAAA,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAgB,CAAC,IAAI,EAAE;IAC1D,MAAM,MAAM,GAAQ,EAAE;AACtB,IAAA,KAAK,IAAI,IAAI,IAAI,SAAS,EAAE;QACzB,MAAM,CAAC,IAAI,CAAC,GAAI,KAAa,CAAC,IAAI,CAAC;IACtC;AACA,IAAA,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC;QAC3B,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,EAAE;AACnC,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,IAAI,KAAY,IAAI,EAAE,CAAC;AACzB,KAAA,CAAC;AACF,IAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;AAClC"}
1
+ {"version":3,"file":"useTagProps.mjs","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ baseClass, classNames: clses, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n\r\n if ('hover' in props) {\r\n (props as any)['&:hover'] = props['hover'];\r\n delete (props as any)['hover'];\r\n }\r\n\r\n const style = css(props, {\r\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop],\r\n injectStyle: typeof window !== 'undefined',\r\n })\r\n\r\n let skipProps = style.skiped[style.classname as any] || []\r\n const _props: any = {};\r\n for (let prop of skipProps) {\r\n _props[prop] = (props as any)[prop]\r\n }\r\n _props.className = classNames([\r\n baseClass ? \"xui-\" + baseClass : \"\",\r\n style.classname,\r\n props.className,\r\n ...(clses as any || []),\r\n ])\r\n return { props: _props, style };\r\n}\r\n\r\n\r\nexport default useTagProps"],"names":["cssPropList"],"mappings":"iJAWA,MAAM,WAAW,GAAG,CAAqC,EAA2D,KAA0B;QAArF,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,OAA6B,EAAxB,KAAK,GAAA,MAAA,CAAA,EAAA,EAAxC,CAAA,WAAA,EAAA,YAAA,CAA0C,CAAF;AAE9F,IAAA,IAAI,OAAO,IAAI,KAAK,EAAE;QAClB,KAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;AAC1C,QAAA,OAAQ,KAAa,CAAC,OAAO,CAAC;IACjC;AAEA,IAAA,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,EAAE;AACtB,QAAA,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAU,IAAI,KAAK,CAAC,IAAI,CAACA,aAAW,CAAC,IAAI,CAAC;AACtE,QAAA,WAAW,EAAE,OAAO,MAAM,KAAK,WAAW;AAC5C,KAAA,CAAC;AAEF,IAAA,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,SAAgB,CAAC,IAAI,EAAE;IAC1D,MAAM,MAAM,GAAQ,EAAE;AACtB,IAAA,KAAK,IAAI,IAAI,IAAI,SAAS,EAAE;QACzB,MAAM,CAAC,IAAI,CAAC,GAAI,KAAa,CAAC,IAAI,CAAC;IACtC;AACA,IAAA,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC;QAC3B,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,EAAE;AACnC,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,KAAK,CAAC,SAAS;AACf,QAAA,IAAI,KAAY,IAAI,EAAE,CAAC;AACzB,KAAA,CAAC;AACF,IAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;AAClC"}
@@ -1,10 +1,9 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var jsxRuntime=require('react/jsx-runtime'),React=require('react'),isWindow=require('../isWindow.js'),index=require('../css/index.js');const BreakpointCtx = React.createContext("xs");
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var jsxRuntime=require('react/jsx-runtime'),React=require('react'),index=require('../css/index.js');const BreakpointCtx = React.createContext("xs");
2
2
  /**
3
3
  * SSR-safe breakpoint detection
4
4
  */
5
5
  const getKey = () => {
6
- if (!isWindow.default()) {
7
- // Server fallback (mobile-first)
6
+ if (typeof window === 'undefined') {
8
7
  return "xs";
9
8
  }
10
9
  const width = window.innerWidth;
@@ -1 +1 @@
1
- {"version":3,"file":"BreakpointProvider.js","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\r\nimport isWindow from \"../isWindow\";\r\nimport { breakpoints } from \"../css\";\r\nimport { BreakpointKeys } from \"../css/types\";\r\n\r\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\r\n\r\n/**\r\n * SSR-safe breakpoint detection\r\n */\r\nconst getKey = (): BreakpointKeys => {\r\n if (!isWindow()) {\r\n // Server fallback (mobile-first)\r\n return \"xs\";\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (width < breakpoints.sm) return \"xs\";\r\n if (width < breakpoints.md) return \"sm\";\r\n if (width < breakpoints.lg) return \"md\";\r\n if (width < breakpoints.xl) return \"lg\";\r\n return \"xl\";\r\n};\r\n\r\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\r\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\r\n\r\n const handler = useCallback(() => {\r\n const newKey = getKey();\r\n setCurrent(prev => (prev === newKey ? prev : newKey));\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handler);\r\n handler(); // detect on mount\r\n return () => window.removeEventListener(\"resize\", handler);\r\n }, [handler]);\r\n\r\n return (\r\n <BreakpointCtx.Provider value={current}>\r\n {children}\r\n </BreakpointCtx.Provider>\r\n );\r\n};\r\n"],"names":["isWindow","breakpoints","useState","useCallback","_jsx"],"mappings":"6MAKO,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAiB,IAAI;AAErE;;AAEG;AACH,MAAM,MAAM,GAAG,MAAqB;AAChC,IAAA,IAAI,CAACA,gBAAQ,EAAE,EAAE;;AAEb,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU;AAE/B,IAAA,IAAI,KAAK,GAAGC,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAGA,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAGA,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAGA,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,OAAO,IAAI;AACf,CAAC;MAEY,kBAAkB,GAAG,CAAC,EAAE,QAAQ,EAA4B,KAAI;IACzE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGC,cAAQ,CAAiB,IAAI,CAAC;AAE5D,IAAA,MAAM,OAAO,GAAGC,iBAAW,CAAC,MAAK;AAC7B,QAAA,MAAM,MAAM,GAAG,MAAM,EAAE;AACvB,QAAA,UAAU,CAAC,IAAI,KAAK,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;IACzD,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,KAAK,CAAC,SAAS,CAAC,MAAK;AACjB,QAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC1C,OAAO,EAAE,CAAC;QACV,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC9D,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAEb,IAAA,QACIC,cAAA,CAAC,aAAa,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,OAAO,EAAA,QAAA,EACjC,QAAQ,EAAA,CACY;AAEjC"}
1
+ {"version":3,"file":"BreakpointProvider.js","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\r\nimport { breakpoints } from \"../css\";\r\nimport { BreakpointKeys } from \"../css/types\";\r\n\r\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\r\n\r\n/**\r\n * SSR-safe breakpoint detection\r\n */\r\nconst getKey = (): BreakpointKeys => {\r\n if (typeof window === 'undefined') {\r\n return \"xs\";\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (width < breakpoints.sm) return \"xs\";\r\n if (width < breakpoints.md) return \"sm\";\r\n if (width < breakpoints.lg) return \"md\";\r\n if (width < breakpoints.xl) return \"lg\";\r\n return \"xl\";\r\n};\r\n\r\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\r\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\r\n\r\n const handler = useCallback(() => {\r\n const newKey = getKey();\r\n setCurrent(prev => (prev === newKey ? prev : newKey));\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handler);\r\n handler(); // detect on mount\r\n return () => window.removeEventListener(\"resize\", handler);\r\n }, [handler]);\r\n\r\n return (\r\n <BreakpointCtx.Provider value={current}>\r\n {children}\r\n </BreakpointCtx.Provider>\r\n );\r\n};\r\n"],"names":["breakpoints","useState","useCallback","_jsx"],"mappings":"0KAIO,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAiB,IAAI;AAErE;;AAEG;AACH,MAAM,MAAM,GAAG,MAAqB;AAChC,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAC/B,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU;AAE/B,IAAA,IAAI,KAAK,GAAGA,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAGA,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAGA,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAGA,iBAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,OAAO,IAAI;AACf,CAAC;MAEY,kBAAkB,GAAG,CAAC,EAAE,QAAQ,EAA4B,KAAI;IACzE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGC,cAAQ,CAAiB,IAAI,CAAC;AAE5D,IAAA,MAAM,OAAO,GAAGC,iBAAW,CAAC,MAAK;AAC7B,QAAA,MAAM,MAAM,GAAG,MAAM,EAAE;AACvB,QAAA,UAAU,CAAC,IAAI,KAAK,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;IACzD,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,KAAK,CAAC,SAAS,CAAC,MAAK;AACjB,QAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC1C,OAAO,EAAE,CAAC;QACV,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC9D,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAEb,IAAA,QACIC,cAAA,CAAC,aAAa,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,OAAO,EAAA,QAAA,EACjC,QAAQ,EAAA,CACY;AAEjC"}
@@ -1,10 +1,9 @@
1
- import {jsx}from'react/jsx-runtime';import React__default,{useState,useCallback}from'react';import isWindow from'../isWindow.mjs';import {breakpoints}from'../css/index.mjs';const BreakpointCtx = React__default.createContext("xs");
1
+ import {jsx}from'react/jsx-runtime';import React__default,{useState,useCallback}from'react';import {breakpoints}from'../css/index.mjs';const BreakpointCtx = React__default.createContext("xs");
2
2
  /**
3
3
  * SSR-safe breakpoint detection
4
4
  */
5
5
  const getKey = () => {
6
- if (!isWindow()) {
7
- // Server fallback (mobile-first)
6
+ if (typeof window === 'undefined') {
8
7
  return "xs";
9
8
  }
10
9
  const width = window.innerWidth;
@@ -1 +1 @@
1
- {"version":3,"file":"BreakpointProvider.mjs","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\r\nimport isWindow from \"../isWindow\";\r\nimport { breakpoints } from \"../css\";\r\nimport { BreakpointKeys } from \"../css/types\";\r\n\r\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\r\n\r\n/**\r\n * SSR-safe breakpoint detection\r\n */\r\nconst getKey = (): BreakpointKeys => {\r\n if (!isWindow()) {\r\n // Server fallback (mobile-first)\r\n return \"xs\";\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (width < breakpoints.sm) return \"xs\";\r\n if (width < breakpoints.md) return \"sm\";\r\n if (width < breakpoints.lg) return \"md\";\r\n if (width < breakpoints.xl) return \"lg\";\r\n return \"xl\";\r\n};\r\n\r\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\r\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\r\n\r\n const handler = useCallback(() => {\r\n const newKey = getKey();\r\n setCurrent(prev => (prev === newKey ? prev : newKey));\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handler);\r\n handler(); // detect on mount\r\n return () => window.removeEventListener(\"resize\", handler);\r\n }, [handler]);\r\n\r\n return (\r\n <BreakpointCtx.Provider value={current}>\r\n {children}\r\n </BreakpointCtx.Provider>\r\n );\r\n};\r\n"],"names":["React","_jsx"],"mappings":"6KAKO,MAAM,aAAa,GAAGA,cAAK,CAAC,aAAa,CAAiB,IAAI;AAErE;;AAEG;AACH,MAAM,MAAM,GAAG,MAAqB;AAChC,IAAA,IAAI,CAAC,QAAQ,EAAE,EAAE;;AAEb,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU;AAE/B,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,OAAO,IAAI;AACf,CAAC;MAEY,kBAAkB,GAAG,CAAC,EAAE,QAAQ,EAA4B,KAAI;IACzE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAiB,IAAI,CAAC;AAE5D,IAAA,MAAM,OAAO,GAAG,WAAW,CAAC,MAAK;AAC7B,QAAA,MAAM,MAAM,GAAG,MAAM,EAAE;AACvB,QAAA,UAAU,CAAC,IAAI,KAAK,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;IACzD,CAAC,EAAE,EAAE,CAAC;AAEN,IAAAA,cAAK,CAAC,SAAS,CAAC,MAAK;AACjB,QAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC1C,OAAO,EAAE,CAAC;QACV,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC9D,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAEb,IAAA,QACIC,GAAA,CAAC,aAAa,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,OAAO,EAAA,QAAA,EACjC,QAAQ,EAAA,CACY;AAEjC"}
1
+ {"version":3,"file":"BreakpointProvider.mjs","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\r\nimport { breakpoints } from \"../css\";\r\nimport { BreakpointKeys } from \"../css/types\";\r\n\r\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\r\n\r\n/**\r\n * SSR-safe breakpoint detection\r\n */\r\nconst getKey = (): BreakpointKeys => {\r\n if (typeof window === 'undefined') {\r\n return \"xs\";\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (width < breakpoints.sm) return \"xs\";\r\n if (width < breakpoints.md) return \"sm\";\r\n if (width < breakpoints.lg) return \"md\";\r\n if (width < breakpoints.xl) return \"lg\";\r\n return \"xl\";\r\n};\r\n\r\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\r\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\r\n\r\n const handler = useCallback(() => {\r\n const newKey = getKey();\r\n setCurrent(prev => (prev === newKey ? prev : newKey));\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handler);\r\n handler(); // detect on mount\r\n return () => window.removeEventListener(\"resize\", handler);\r\n }, [handler]);\r\n\r\n return (\r\n <BreakpointCtx.Provider value={current}>\r\n {children}\r\n </BreakpointCtx.Provider>\r\n );\r\n};\r\n"],"names":["React","_jsx"],"mappings":"uIAIO,MAAM,aAAa,GAAGA,cAAK,CAAC,aAAa,CAAiB,IAAI;AAErE;;AAEG;AACH,MAAM,MAAM,GAAG,MAAqB;AAChC,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAC/B,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU;AAE/B,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,KAAK,GAAG,WAAW,CAAC,EAAE;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,OAAO,IAAI;AACf,CAAC;MAEY,kBAAkB,GAAG,CAAC,EAAE,QAAQ,EAA4B,KAAI;IACzE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAiB,IAAI,CAAC;AAE5D,IAAA,MAAM,OAAO,GAAG,WAAW,CAAC,MAAK;AAC7B,QAAA,MAAM,MAAM,GAAG,MAAM,EAAE;AACvB,QAAA,UAAU,CAAC,IAAI,KAAK,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;IACzD,CAAC,EAAE,EAAE,CAAC;AAEN,IAAAA,cAAK,CAAC,SAAS,CAAC,MAAK;AACjB,QAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC1C,OAAO,EAAE,CAAC;QACV,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC9D,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;AAEb,IAAA,QACIC,GAAA,CAAC,aAAa,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,OAAO,EAAA,QAAA,EACjC,QAAQ,EAAA,CACY;AAEjC"}
@@ -1,6 +1,6 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var React=require('react'),BreakpointProvider=require('./BreakpointProvider.js'),isWindow=require('../isWindow.js'),index=require('../css/index.js');const useBreakpoint = () => {
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var React=require('react'),BreakpointProvider=require('./BreakpointProvider.js'),index=require('../css/index.js');const useBreakpoint = () => {
2
2
  const value = React.useContext(BreakpointProvider.BreakpointCtx);
3
- const getWidth = () => isWindow.default() ? window.innerWidth : 99999;
3
+ const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999;
4
4
  const is = (key) => value === key;
5
5
  const isUp = (key) => getWidth() >= index.breakpoints[key];
6
6
  const isDown = (key) => getWidth() < index.breakpoints[key];
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpoint.js","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\r\nimport { BreakpointCtx } from \"./BreakpointProvider\"\r\nimport isWindow from \"../isWindow\"\r\nimport { breakpoints } from \"../css\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nconst useBreakpoint = () => {\r\n const value = useContext(BreakpointCtx)\r\n const getWidth = () => isWindow() ? window.innerWidth : 99999\r\n const is = (key: BreakpointKeys) => value === key\r\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\r\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\r\n\r\n return {\r\n value,\r\n is,\r\n isUp,\r\n isDown,\r\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\r\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\r\n }\r\n}\r\n\r\nexport default useBreakpoint\r\n"],"names":["useContext","BreakpointCtx","isWindow","breakpoints"],"mappings":"2NAMA,MAAM,aAAa,GAAG,MAAK;AACxB,IAAA,MAAM,KAAK,GAAGA,gBAAU,CAACC,gCAAa,CAAC;AACvC,IAAA,MAAM,QAAQ,GAAG,MAAMC,gBAAQ,EAAE,GAAG,MAAM,CAAC,UAAU,GAAG,KAAK;IAC7D,MAAM,EAAE,GAAG,CAAC,GAAmB,KAAK,KAAK,KAAK,GAAG;AACjD,IAAA,MAAM,IAAI,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,IAAIC,iBAAW,CAAC,GAAG,CAAC;AACpE,IAAA,MAAM,MAAM,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,GAAGA,iBAAW,CAAC,GAAG,CAAC;IAErE,OAAO;QACJ,KAAK;QACL,EAAE;QACF,IAAI;QACJ,MAAM;AACN,QAAA,MAAM,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC;AACrD,QAAA,QAAQ,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG;KAC1D;AACJ"}
1
+ {"version":3,"file":"useBreakpoint.js","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\r\nimport { BreakpointCtx } from \"./BreakpointProvider\"\r\nimport { breakpoints } from \"../css\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nconst useBreakpoint = () => {\r\n const value = useContext(BreakpointCtx)\r\n const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999\r\n const is = (key: BreakpointKeys) => value === key\r\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\r\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\r\n\r\n return {\r\n value,\r\n is,\r\n isUp,\r\n isDown,\r\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\r\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\r\n }\r\n}\r\n\r\nexport default useBreakpoint\r\n"],"names":["useContext","BreakpointCtx","breakpoints"],"mappings":"wLAKA,MAAM,aAAa,GAAG,MAAK;AACxB,IAAA,MAAM,KAAK,GAAGA,gBAAU,CAACC,gCAAa,CAAC;AACvC,IAAA,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,UAAU,GAAG,KAAK;IAChF,MAAM,EAAE,GAAG,CAAC,GAAmB,KAAK,KAAK,KAAK,GAAG;AACjD,IAAA,MAAM,IAAI,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,IAAIC,iBAAW,CAAC,GAAG,CAAC;AACpE,IAAA,MAAM,MAAM,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,GAAGA,iBAAW,CAAC,GAAG,CAAC;IAErE,OAAO;QACJ,KAAK;QACL,EAAE;QACF,IAAI;QACJ,MAAM;AACN,QAAA,MAAM,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC;AACrD,QAAA,QAAQ,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG;KAC1D;AACJ"}
@@ -1,6 +1,6 @@
1
- import {useContext}from'react';import {BreakpointCtx}from'./BreakpointProvider.mjs';import isWindow from'../isWindow.mjs';import {breakpoints}from'../css/index.mjs';const useBreakpoint = () => {
1
+ import {useContext}from'react';import {BreakpointCtx}from'./BreakpointProvider.mjs';import {breakpoints}from'../css/index.mjs';const useBreakpoint = () => {
2
2
  const value = useContext(BreakpointCtx);
3
- const getWidth = () => isWindow() ? window.innerWidth : 99999;
3
+ const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999;
4
4
  const is = (key) => value === key;
5
5
  const isUp = (key) => getWidth() >= breakpoints[key];
6
6
  const isDown = (key) => getWidth() < breakpoints[key];
@@ -1 +1 @@
1
- {"version":3,"file":"useBreakpoint.mjs","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\r\nimport { BreakpointCtx } from \"./BreakpointProvider\"\r\nimport isWindow from \"../isWindow\"\r\nimport { breakpoints } from \"../css\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nconst useBreakpoint = () => {\r\n const value = useContext(BreakpointCtx)\r\n const getWidth = () => isWindow() ? window.innerWidth : 99999\r\n const is = (key: BreakpointKeys) => value === key\r\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\r\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\r\n\r\n return {\r\n value,\r\n is,\r\n isUp,\r\n isDown,\r\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\r\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\r\n }\r\n}\r\n\r\nexport default useBreakpoint\r\n"],"names":[],"mappings":"qKAMA,MAAM,aAAa,GAAG,MAAK;AACxB,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC;AACvC,IAAA,MAAM,QAAQ,GAAG,MAAM,QAAQ,EAAE,GAAG,MAAM,CAAC,UAAU,GAAG,KAAK;IAC7D,MAAM,EAAE,GAAG,CAAC,GAAmB,KAAK,KAAK,KAAK,GAAG;AACjD,IAAA,MAAM,IAAI,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;AACpE,IAAA,MAAM,MAAM,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,GAAG,WAAW,CAAC,GAAG,CAAC;IAErE,OAAO;QACJ,KAAK;QACL,EAAE;QACF,IAAI;QACJ,MAAM;AACN,QAAA,MAAM,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC;AACrD,QAAA,QAAQ,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG;KAC1D;AACJ"}
1
+ {"version":3,"file":"useBreakpoint.mjs","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\r\nimport { BreakpointCtx } from \"./BreakpointProvider\"\r\nimport { breakpoints } from \"../css\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nconst useBreakpoint = () => {\r\n const value = useContext(BreakpointCtx)\r\n const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999\r\n const is = (key: BreakpointKeys) => value === key\r\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\r\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\r\n\r\n return {\r\n value,\r\n is,\r\n isUp,\r\n isDown,\r\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\r\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\r\n }\r\n}\r\n\r\nexport default useBreakpoint\r\n"],"names":[],"mappings":"+HAKA,MAAM,aAAa,GAAG,MAAK;AACxB,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC;AACvC,IAAA,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,UAAU,GAAG,KAAK;IAChF,MAAM,EAAE,GAAG,CAAC,GAAmB,KAAK,KAAK,KAAK,GAAG;AACjD,IAAA,MAAM,IAAI,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;AACpE,IAAA,MAAM,MAAM,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,GAAG,WAAW,CAAC,GAAG,CAAC;IAErE,OAAO;QACJ,KAAK;QACL,EAAE;QACF,IAAI;QACJ,MAAM;AACN,QAAA,MAAM,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC;AACrD,QAAA,QAAQ,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG;KAC1D;AACJ"}
package/index.d.ts CHANGED
@@ -4,8 +4,6 @@ export { UseAnimationProps, animationEases, default as useAnimation } from './ho
4
4
  export { UseColorTemplateType, default as useColorTemplate } from './hooks/useColorTemplate.js';
5
5
  export { default as useBreakpoint } from './breakpoint/useBreakpoint.js';
6
6
  export { default as useBreakpointProps, useBreakpointPropsType } from './breakpoint/useBreakpointProps.js';
7
- export { default as RenderServerStyles } from './RenderServerStyles.js';
8
- export { default as isWindow } from './isWindow.js';
9
7
  export { default as useInterface } from './hooks/useInterface.js';
10
8
  export { default as Transition, TransitionElementProps, TransitionProps, TransitionState, TransitionVariantTypes } from './Transition/index.js';
11
9
  export { default as useScrollbar } from './hooks/useScrollbar.js';
package/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var index$1=require('./Tag/index.js'),useTagProps=require('./Tag/useTagProps.js'),useAnimation=require('./hooks/useAnimation.js'),useColorTemplate=require('./hooks/useColorTemplate.js'),useBreakpoint=require('./breakpoint/useBreakpoint.js'),useBreakpointProps=require('./breakpoint/useBreakpointProps.js'),RenderServerStyles=require('./RenderServerStyles.js'),isWindow=require('./isWindow.js'),useInterface=require('./hooks/useInterface.js'),index$2=require('./Transition/index.js'),useScrollbar=require('./hooks/useScrollbar.js'),index=require('./AppRoot/index.js'),usePortal=require('./hooks/usePortal.js'),Renderar=require('./AppRoot/Renderar.js'),index$3=require('./css/index.js'),index$4=require('./theme/index.js'),getValue=require('./css/getValue.js'),getProps=require('./css/getProps.js'),ThemeProvider=require('./theme/ThemeProvider.js'),createThemeSwitcher=require('./theme/createThemeSwitcher.js'),createTheme=require('./theme/createTheme.js'),core=require('./theme/core.js');exports.Tag=index$1.default;exports.useTagProps=useTagProps.default;exports.animationEases=useAnimation.animationEases;exports.useAnimation=useAnimation.default;exports.useColorTemplate=useColorTemplate.default;exports.useBreakpoint=useBreakpoint.default;exports.useBreakpointProps=useBreakpointProps.default;exports.RenderServerStyles=RenderServerStyles.default;exports.isWindow=isWindow.default;exports.useInterface=useInterface.default;exports.Transition=index$2.default;exports.useScrollbar=useScrollbar.default;exports.AppRoot=index.default;exports.appRootElement=index.appRootElement;exports.usePortal=usePortal.usePortal;exports.Renderar=Renderar.Renderar;exports.adjustColor=index$3.adjustColor;exports.adjustTextContrast=index$3.adjustTextContrast;exports.alpha=index$3.alpha;exports.breakpoints=index$3.breakpoints;exports.css=index$3.css;exports.themeRootClass=index$4.themeRootClass;exports.getValue=getValue.default;exports.getProps=getProps.default;exports.ThemeProvider=ThemeProvider.default;exports.createThemeSwitcher=createThemeSwitcher.default;exports.createTheme=createTheme.createTheme;exports.getTheme=core.getTheme;exports.useTheme=core.useTheme;//# sourceMappingURL=index.js.map
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var index$1=require('./Tag/index.js'),useTagProps=require('./Tag/useTagProps.js'),useAnimation=require('./hooks/useAnimation.js'),useColorTemplate=require('./hooks/useColorTemplate.js'),useBreakpoint=require('./breakpoint/useBreakpoint.js'),useBreakpointProps=require('./breakpoint/useBreakpointProps.js'),useInterface=require('./hooks/useInterface.js'),index$2=require('./Transition/index.js'),useScrollbar=require('./hooks/useScrollbar.js'),index=require('./AppRoot/index.js'),usePortal=require('./hooks/usePortal.js'),Renderar=require('./AppRoot/Renderar.js'),index$3=require('./css/index.js'),index$4=require('./theme/index.js'),getValue=require('./css/getValue.js'),getProps=require('./css/getProps.js'),ThemeProvider=require('./theme/ThemeProvider.js'),createThemeSwitcher=require('./theme/createThemeSwitcher.js'),createTheme=require('./theme/createTheme.js'),core=require('./theme/core.js');exports.Tag=index$1.default;exports.useTagProps=useTagProps.default;exports.animationEases=useAnimation.animationEases;exports.useAnimation=useAnimation.default;exports.useColorTemplate=useColorTemplate.default;exports.useBreakpoint=useBreakpoint.default;exports.useBreakpointProps=useBreakpointProps.default;exports.useInterface=useInterface.default;exports.Transition=index$2.default;exports.useScrollbar=useScrollbar.default;exports.AppRoot=index.default;exports.appRootElement=index.appRootElement;exports.usePortal=usePortal.usePortal;exports.Renderar=Renderar.Renderar;exports.adjustColor=index$3.adjustColor;exports.adjustTextContrast=index$3.adjustTextContrast;exports.alpha=index$3.alpha;exports.breakpoints=index$3.breakpoints;exports.css=index$3.css;exports.themeRootClass=index$4.themeRootClass;exports.getValue=getValue.default;exports.getProps=getProps.default;exports.ThemeProvider=ThemeProvider.default;exports.createThemeSwitcher=createThemeSwitcher.default;exports.createTheme=createTheme.createTheme;exports.getTheme=core.getTheme;exports.useTheme=core.useTheme;//# sourceMappingURL=index.js.map
package/index.mjs CHANGED
@@ -1 +1 @@
1
- export{default as Tag}from'./Tag/index.mjs';export{default as useTagProps}from'./Tag/useTagProps.mjs';export{animationEases,default as useAnimation}from'./hooks/useAnimation.mjs';export{default as useColorTemplate}from'./hooks/useColorTemplate.mjs';export{default as useBreakpoint}from'./breakpoint/useBreakpoint.mjs';export{default as useBreakpointProps}from'./breakpoint/useBreakpointProps.mjs';export{default as RenderServerStyles}from'./RenderServerStyles.mjs';export{default as isWindow}from'./isWindow.mjs';export{default as useInterface}from'./hooks/useInterface.mjs';export{default as Transition}from'./Transition/index.mjs';export{default as useScrollbar}from'./hooks/useScrollbar.mjs';export{default as AppRoot,appRootElement}from'./AppRoot/index.mjs';export{usePortal}from'./hooks/usePortal.mjs';export{Renderar}from'./AppRoot/Renderar.mjs';export{adjustColor,adjustTextContrast,alpha,breakpoints,css}from'./css/index.mjs';export{themeRootClass}from'./theme/index.mjs';export{default as getValue}from'./css/getValue.mjs';export{default as getProps}from'./css/getProps.mjs';export{default as ThemeProvider}from'./theme/ThemeProvider.mjs';export{default as createThemeSwitcher}from'./theme/createThemeSwitcher.mjs';export{createTheme}from'./theme/createTheme.mjs';export{getTheme,useTheme}from'./theme/core.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{default as Tag}from'./Tag/index.mjs';export{default as useTagProps}from'./Tag/useTagProps.mjs';export{animationEases,default as useAnimation}from'./hooks/useAnimation.mjs';export{default as useColorTemplate}from'./hooks/useColorTemplate.mjs';export{default as useBreakpoint}from'./breakpoint/useBreakpoint.mjs';export{default as useBreakpointProps}from'./breakpoint/useBreakpointProps.mjs';export{default as useInterface}from'./hooks/useInterface.mjs';export{default as Transition}from'./Transition/index.mjs';export{default as useScrollbar}from'./hooks/useScrollbar.mjs';export{default as AppRoot,appRootElement}from'./AppRoot/index.mjs';export{usePortal}from'./hooks/usePortal.mjs';export{Renderar}from'./AppRoot/Renderar.mjs';export{adjustColor,adjustTextContrast,alpha,breakpoints,css}from'./css/index.mjs';export{themeRootClass}from'./theme/index.mjs';export{default as getValue}from'./css/getValue.mjs';export{default as getProps}from'./css/getProps.mjs';export{default as ThemeProvider}from'./theme/ThemeProvider.mjs';export{default as createThemeSwitcher}from'./theme/createThemeSwitcher.mjs';export{createTheme}from'./theme/createTheme.mjs';export{getTheme,useTheme}from'./theme/core.mjs';//# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xanui/core",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "main": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "oncss": "^1.2.4",
12
12
  "pretty-class": "^1.0.8",
13
- "react-state-bucket": "^1.2.4"
13
+ "react-state-bucket": "^1.2.5"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/react": "^19.2.7",
@@ -1,11 +1,12 @@
1
1
  import { ThemeOptions } from './types.js';
2
+ import { BucketOptions } from 'react-state-bucket/Bucket';
2
3
 
3
4
  type ThemeSwitcherOption = {
4
- store?: "memory" | "session" | "local";
5
+ store?: BucketOptions['store'];
5
6
  onChange?: (theme: string) => void;
6
7
  };
7
8
  declare const createThemeSwitcher: (defaultTheme: string, option?: ThemeSwitcherOption) => () => {
8
- name: string;
9
+ name: any;
9
10
  theme: ThemeOptions | undefined;
10
11
  change: (theme: string) => void;
11
12
  };
@@ -1,7 +1,7 @@
1
1
  'use strict';Object.defineProperty(exports,'__esModule',{value:true});var reactStateBucket=require('react-state-bucket'),core=require('./core.js');const createThemeSwitcher = (defaultTheme, option) => {
2
- const useThemeState = reactStateBucket.createBucket({ name: defaultTheme }, {
2
+ const useThemeState = reactStateBucket.createBucket({ name: reactStateBucket.xv.string().default(defaultTheme) }, {
3
3
  store: (option === null || option === void 0 ? void 0 : option.store) || "memory",
4
- onChange: (key, value) => {
4
+ onChange: (_key, value) => {
5
5
  (option === null || option === void 0 ? void 0 : option.onChange) && (option === null || option === void 0 ? void 0 : option.onChange(value));
6
6
  }
7
7
  });
@@ -1 +1 @@
1
- {"version":3,"file":"createThemeSwitcher.js","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["import { createBucket } from \"react-state-bucket\"\r\nimport { getTheme } from \"./core\"\r\n\r\nexport type ThemeSwitcherOption = {\r\n store?: \"memory\" | \"session\" | \"local\",\r\n onChange?: (theme: string) => void\r\n}\r\n\r\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\r\n\r\n const useThemeState = createBucket({ name: defaultTheme }, {\r\n store: option?.store || \"memory\",\r\n onChange: (key, value) => {\r\n option?.onChange && option?.onChange(value)\r\n }\r\n })\r\n\r\n const useThemeSwitcher = () => {\r\n const state = useThemeState()\r\n return {\r\n name: state.get(\"name\"),\r\n theme: getTheme(state.get(\"name\")),\r\n change: (theme: string) => state.set(\"name\", theme)\r\n }\r\n }\r\n return useThemeSwitcher\r\n}\r\n\r\n\r\nexport default createThemeSwitcher"],"names":["createBucket","getTheme"],"mappings":"mJAQA,MAAM,mBAAmB,GAAG,CAAC,YAAoB,EAAE,MAA4B,KAAI;IAEhF,MAAM,aAAa,GAAGA,6BAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE;QACxD,KAAK,EAAE,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,QAAQ;AAChC,QAAA,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAI;AACtB,YAAA,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,MAAI,MAAM,aAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC9C;AACF,KAAA,CAAC;IAEF,MAAM,gBAAgB,GAAG,MAAK;AAC3B,QAAA,MAAM,KAAK,GAAG,aAAa,EAAE;QAC7B,OAAO;AACJ,YAAA,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;YACvB,KAAK,EAAEC,aAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClC,YAAA,MAAM,EAAE,CAAC,KAAa,KAAK,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK;SACpD;AACJ,IAAA,CAAC;AACD,IAAA,OAAO,gBAAgB;AAC1B"}
1
+ {"version":3,"file":"createThemeSwitcher.js","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["import { createBucket, xv } from \"react-state-bucket\"\r\nimport { getTheme } from \"./core\"\r\nimport { BucketOptions } from \"react-state-bucket/Bucket\"\r\n\r\nexport type ThemeSwitcherOption = {\r\n store?: BucketOptions['store'],\r\n onChange?: (theme: string) => void\r\n}\r\n\r\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\r\n\r\n const useThemeState = createBucket({ name: xv.string().default(defaultTheme) }, {\r\n store: option?.store || \"memory\",\r\n onChange: (_key, value) => {\r\n option?.onChange && option?.onChange(value)\r\n }\r\n })\r\n\r\n const useThemeSwitcher = () => {\r\n const state = useThemeState()\r\n return {\r\n name: state.get(\"name\"),\r\n theme: getTheme(state.get(\"name\")),\r\n change: (theme: string) => state.set(\"name\", theme)\r\n }\r\n }\r\n return useThemeSwitcher\r\n}\r\n\r\nexport default createThemeSwitcher"],"names":["createBucket","xv","getTheme"],"mappings":"mJASA,MAAM,mBAAmB,GAAG,CAAC,YAAoB,EAAE,MAA4B,KAAI;AAEhF,IAAA,MAAM,aAAa,GAAGA,6BAAY,CAAC,EAAE,IAAI,EAAEC,mBAAE,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE;QAC7E,KAAK,EAAE,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,QAAQ;AAChC,QAAA,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,KAAI;AACvB,YAAA,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,MAAI,MAAM,aAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC9C;AACF,KAAA,CAAC;IAEF,MAAM,gBAAgB,GAAG,MAAK;AAC3B,QAAA,MAAM,KAAK,GAAG,aAAa,EAAE;QAC7B,OAAO;AACJ,YAAA,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;YACvB,KAAK,EAAEC,aAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClC,YAAA,MAAM,EAAE,CAAC,KAAa,KAAK,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK;SACpD;AACJ,IAAA,CAAC;AACD,IAAA,OAAO,gBAAgB;AAC1B"}
@@ -1,7 +1,7 @@
1
- import {createBucket}from'react-state-bucket';import {getTheme}from'./core.mjs';const createThemeSwitcher = (defaultTheme, option) => {
2
- const useThemeState = createBucket({ name: defaultTheme }, {
1
+ import {createBucket,xv}from'react-state-bucket';import {getTheme}from'./core.mjs';const createThemeSwitcher = (defaultTheme, option) => {
2
+ const useThemeState = createBucket({ name: xv.string().default(defaultTheme) }, {
3
3
  store: (option === null || option === void 0 ? void 0 : option.store) || "memory",
4
- onChange: (key, value) => {
4
+ onChange: (_key, value) => {
5
5
  (option === null || option === void 0 ? void 0 : option.onChange) && (option === null || option === void 0 ? void 0 : option.onChange(value));
6
6
  }
7
7
  });
@@ -1 +1 @@
1
- {"version":3,"file":"createThemeSwitcher.mjs","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["import { createBucket } from \"react-state-bucket\"\r\nimport { getTheme } from \"./core\"\r\n\r\nexport type ThemeSwitcherOption = {\r\n store?: \"memory\" | \"session\" | \"local\",\r\n onChange?: (theme: string) => void\r\n}\r\n\r\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\r\n\r\n const useThemeState = createBucket({ name: defaultTheme }, {\r\n store: option?.store || \"memory\",\r\n onChange: (key, value) => {\r\n option?.onChange && option?.onChange(value)\r\n }\r\n })\r\n\r\n const useThemeSwitcher = () => {\r\n const state = useThemeState()\r\n return {\r\n name: state.get(\"name\"),\r\n theme: getTheme(state.get(\"name\")),\r\n change: (theme: string) => state.set(\"name\", theme)\r\n }\r\n }\r\n return useThemeSwitcher\r\n}\r\n\r\n\r\nexport default createThemeSwitcher"],"names":[],"mappings":"gFAQA,MAAM,mBAAmB,GAAG,CAAC,YAAoB,EAAE,MAA4B,KAAI;IAEhF,MAAM,aAAa,GAAG,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE;QACxD,KAAK,EAAE,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,QAAQ;AAChC,QAAA,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAI;AACtB,YAAA,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,MAAI,MAAM,aAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC9C;AACF,KAAA,CAAC;IAEF,MAAM,gBAAgB,GAAG,MAAK;AAC3B,QAAA,MAAM,KAAK,GAAG,aAAa,EAAE;QAC7B,OAAO;AACJ,YAAA,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;YACvB,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClC,YAAA,MAAM,EAAE,CAAC,KAAa,KAAK,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK;SACpD;AACJ,IAAA,CAAC;AACD,IAAA,OAAO,gBAAgB;AAC1B"}
1
+ {"version":3,"file":"createThemeSwitcher.mjs","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["import { createBucket, xv } from \"react-state-bucket\"\r\nimport { getTheme } from \"./core\"\r\nimport { BucketOptions } from \"react-state-bucket/Bucket\"\r\n\r\nexport type ThemeSwitcherOption = {\r\n store?: BucketOptions['store'],\r\n onChange?: (theme: string) => void\r\n}\r\n\r\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\r\n\r\n const useThemeState = createBucket({ name: xv.string().default(defaultTheme) }, {\r\n store: option?.store || \"memory\",\r\n onChange: (_key, value) => {\r\n option?.onChange && option?.onChange(value)\r\n }\r\n })\r\n\r\n const useThemeSwitcher = () => {\r\n const state = useThemeState()\r\n return {\r\n name: state.get(\"name\"),\r\n theme: getTheme(state.get(\"name\")),\r\n change: (theme: string) => state.set(\"name\", theme)\r\n }\r\n }\r\n return useThemeSwitcher\r\n}\r\n\r\nexport default createThemeSwitcher"],"names":[],"mappings":"mFASA,MAAM,mBAAmB,GAAG,CAAC,YAAoB,EAAE,MAA4B,KAAI;AAEhF,IAAA,MAAM,aAAa,GAAG,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE;QAC7E,KAAK,EAAE,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,QAAQ;AAChC,QAAA,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,KAAI;AACvB,YAAA,CAAA,MAAM,KAAA,IAAA,IAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,MAAI,MAAM,aAAN,MAAM,KAAA,MAAA,GAAA,MAAA,GAAN,MAAM,CAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC9C;AACF,KAAA,CAAC;IAEF,MAAM,gBAAgB,GAAG,MAAK;AAC3B,QAAA,MAAM,KAAK,GAAG,aAAa,EAAE;QAC7B,OAAO;AACJ,YAAA,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;YACvB,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAClC,YAAA,MAAM,EAAE,CAAC,KAAa,KAAK,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK;SACpD;AACJ,IAAA,CAAC;AACD,IAAA,OAAO,gBAAgB;AAC1B"}
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
-
3
- declare const ServerStyleTags: () => React.JSX.Element[];
4
-
5
- export { ServerStyleTags as default };
@@ -1,3 +0,0 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var jsxRuntime=require('react/jsx-runtime'),oncss=require('oncss');const ServerStyleTags = () => {
2
- return Array.from(oncss.CSSFactory.values()).map((c, idx) => jsxRuntime.jsx("style", { "data-oncss": c.classname, dangerouslySetInnerHTML: { __html: c.css } }, c.classname + idx));
3
- };exports.default=ServerStyleTags;//# sourceMappingURL=RenderServerStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderServerStyles.js","sources":["../src/RenderServerStyles.tsx"],"sourcesContent":["import * as React from 'react'\r\nimport { CSSFactory } from 'oncss'\r\n\r\nconst ServerStyleTags = () => {\r\n return Array.from(CSSFactory.values()).map((c, idx) => <style\r\n key={c.classname + idx}\r\n data-oncss={c.classname}\r\n dangerouslySetInnerHTML={{ __html: c.css }}\r\n />)\r\n}\r\n\r\nexport default ServerStyleTags"],"names":["CSSFactory","_jsx"],"mappings":"yIAGA,MAAM,eAAe,GAAG,MAAK;AACzB,IAAA,OAAO,KAAK,CAAC,IAAI,CAACA,gBAAU,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KAAKC,cAAA,CAAA,OAAA,EAAA,EAAA,YAAA,EAEvC,CAAC,CAAC,SAAS,EACvB,uBAAuB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,EAAA,EAFrC,CAAC,CAAC,SAAS,GAAG,GAAG,CAGxB,CAAC;AACP"}
@@ -1,3 +0,0 @@
1
- import {jsx}from'react/jsx-runtime';import {CSSFactory}from'oncss';const ServerStyleTags = () => {
2
- return Array.from(CSSFactory.values()).map((c, idx) => jsx("style", { "data-oncss": c.classname, dangerouslySetInnerHTML: { __html: c.css } }, c.classname + idx));
3
- };export{ServerStyleTags as default};//# sourceMappingURL=RenderServerStyles.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderServerStyles.mjs","sources":["../src/RenderServerStyles.tsx"],"sourcesContent":["import * as React from 'react'\r\nimport { CSSFactory } from 'oncss'\r\n\r\nconst ServerStyleTags = () => {\r\n return Array.from(CSSFactory.values()).map((c, idx) => <style\r\n key={c.classname + idx}\r\n data-oncss={c.classname}\r\n dangerouslySetInnerHTML={{ __html: c.css }}\r\n />)\r\n}\r\n\r\nexport default ServerStyleTags"],"names":["_jsx"],"mappings":"mEAGA,MAAM,eAAe,GAAG,MAAK;AACzB,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KAAKA,GAAA,CAAA,OAAA,EAAA,EAAA,YAAA,EAEvC,CAAC,CAAC,SAAS,EACvB,uBAAuB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,EAAA,EAFrC,CAAC,CAAC,SAAS,GAAG,GAAG,CAGxB,CAAC;AACP"}
package/isWindow.d.ts DELETED
@@ -1,3 +0,0 @@
1
- declare const isWindow: () => boolean;
2
-
3
- export { isWindow as default };
package/isWindow.js DELETED
@@ -1 +0,0 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});const isWindow = () => typeof window !== 'undefined';exports.default=isWindow;//# sourceMappingURL=isWindow.js.map
package/isWindow.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"isWindow.js","sources":["../src/isWindow.ts"],"sourcesContent":["\r\nconst isWindow = () => typeof window !== 'undefined'\r\nexport default isWindow"],"names":[],"mappings":"sEACA,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,KAAK"}
package/isWindow.mjs DELETED
@@ -1 +0,0 @@
1
- const isWindow = () => typeof window !== 'undefined';export{isWindow as default};//# sourceMappingURL=isWindow.mjs.map
package/isWindow.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"isWindow.mjs","sources":["../src/isWindow.ts"],"sourcesContent":["\r\nconst isWindow = () => typeof window !== 'undefined'\r\nexport default isWindow"],"names":[],"mappings":"AACA,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,KAAK"}