etudes 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/lib/Accordion.d.ts +2 -2
  2. package/lib/Accordion.js.map +1 -1
  3. package/lib/BurgerButton.d.ts +2 -2
  4. package/lib/BurgerButton.js +1 -1
  5. package/lib/BurgerButton.js.map +1 -1
  6. package/lib/Conditional.d.ts +1 -1
  7. package/lib/Conditional.js.map +1 -1
  8. package/lib/DebugConsole.d.ts +1 -1
  9. package/lib/DebugConsole.js.map +1 -1
  10. package/lib/Dial.d.ts +1 -1
  11. package/lib/Dial.js.map +1 -1
  12. package/lib/Dropdown.d.ts +2 -2
  13. package/lib/Dropdown.js +1 -1
  14. package/lib/Dropdown.js.map +1 -1
  15. package/lib/Each.d.ts +1 -1
  16. package/lib/Each.js.map +1 -1
  17. package/lib/ExtractChild.d.ts +1 -1
  18. package/lib/ExtractChild.js.map +1 -1
  19. package/lib/ExtractChildren.d.ts +1 -1
  20. package/lib/ExtractChildren.js.map +1 -1
  21. package/lib/FlatSVG.d.ts +1 -1
  22. package/lib/FlatSVG.js.map +1 -1
  23. package/lib/List.d.ts +1 -1
  24. package/lib/List.js.map +1 -1
  25. package/lib/MasonryGrid.d.ts +1 -1
  26. package/lib/MasonryGrid.js +10 -10
  27. package/lib/MasonryGrid.js.map +1 -1
  28. package/lib/Panorama.d.ts +15 -15
  29. package/lib/Panorama.js.map +1 -1
  30. package/lib/PanoramaSlider.d.ts +8 -8
  31. package/lib/PanoramaSlider.js +6 -6
  32. package/lib/PanoramaSlider.js.map +1 -1
  33. package/lib/RangeSlider.d.ts +1 -1
  34. package/lib/RangeSlider.js.map +1 -1
  35. package/lib/Repeat.d.ts +1 -1
  36. package/lib/Repeat.js.map +1 -1
  37. package/lib/RotatingGallery.d.ts +5 -5
  38. package/lib/RotatingGallery.js +2 -2
  39. package/lib/RotatingGallery.js.map +1 -1
  40. package/lib/SelectableButton.d.ts +1 -1
  41. package/lib/SelectableButton.js.map +1 -1
  42. package/lib/Slider.d.ts +11 -11
  43. package/lib/Slider.js +4 -4
  44. package/lib/Slider.js.map +1 -1
  45. package/lib/StepwiseSlider.d.ts +18 -18
  46. package/lib/StepwiseSlider.js +9 -9
  47. package/lib/StepwiseSlider.js.map +1 -1
  48. package/lib/SwipeContainer.d.ts +1 -1
  49. package/lib/SwipeContainer.js.map +1 -1
  50. package/lib/TextField.d.ts +1 -1
  51. package/lib/TextField.js.map +1 -1
  52. package/lib/Video.d.ts +1 -1
  53. package/lib/Video.js.map +1 -1
  54. package/lib/WithTooltip.d.ts +1 -1
  55. package/lib/WithTooltip.js.map +1 -1
  56. package/lib/hooks/useDragEffect.d.ts +15 -15
  57. package/lib/hooks/useDragEffect.js +6 -6
  58. package/lib/hooks/useDragEffect.js.map +1 -1
  59. package/lib/hooks/useElementRect.d.ts +2 -2
  60. package/lib/hooks/useElementRect.js +1 -1
  61. package/lib/hooks/useElementRect.js.map +1 -1
  62. package/lib/hooks/useInterval.d.ts +5 -5
  63. package/lib/hooks/useInterval.js +4 -4
  64. package/lib/hooks/useInterval.js.map +1 -1
  65. package/lib/hooks/useLoadImageEffect.d.ts +6 -6
  66. package/lib/hooks/useLoadImageEffect.js +3 -3
  67. package/lib/hooks/useLoadImageEffect.js.map +1 -1
  68. package/lib/hooks/usePrevious.d.ts +1 -1
  69. package/lib/hooks/usePrevious.js +1 -1
  70. package/lib/hooks/usePrevious.js.map +1 -1
  71. package/lib/hooks/useResizeEffect.d.ts +5 -5
  72. package/lib/hooks/useResizeEffect.js +3 -3
  73. package/lib/hooks/useResizeEffect.js.map +1 -1
  74. package/lib/hooks/useSearchParamState.d.ts +7 -7
  75. package/lib/hooks/useSearchParamState.js +3 -3
  76. package/lib/hooks/useSearchParamState.js.map +1 -1
  77. package/lib/providers/ScrollPositionProvider.d.ts +1 -1
  78. package/lib/providers/ScrollPositionProvider.js.map +1 -1
  79. package/lib/utils/asComponentDict.d.ts +1 -1
  80. package/lib/utils/asComponentDict.js.map +1 -1
  81. package/lib/utils/asStyleDict.d.ts +1 -1
  82. package/lib/utils/asStyleDict.js.map +1 -1
  83. package/lib/utils/cloneStyledElement.d.ts +6 -6
  84. package/lib/utils/cloneStyledElement.js.map +1 -1
  85. package/lib/utils/styles.d.ts +1 -1
  86. package/lib/utils/styles.js.map +1 -1
  87. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'react';
1
+ import { type CSSProperties } from 'react';
2
2
  export default function asStyleDict<T>(dict: {
3
3
  [K in keyof T]: CSSProperties;
4
4
  }): { [K in keyof T]: CSSProperties; };
@@ -1 +1 @@
1
- {"version":3,"file":"asStyleDict.js","sourceRoot":"/","sources":["utils/asStyleDict.ts"],"names":[],"mappings":";;AAEA,SAAwB,WAAW,CAAI,IAAuC;IAC5E,OAAO,IAAI,CAAA;AACb,CAAC;AAFD,8BAEC","sourcesContent":["import { CSSProperties } from 'react'\n\nexport default function asStyleDict<T>(dict: { [K in keyof T]: CSSProperties }) {\n return dict\n}\n"]}
1
+ {"version":3,"file":"asStyleDict.js","sourceRoot":"/","sources":["utils/asStyleDict.ts"],"names":[],"mappings":";;AAEA,SAAwB,WAAW,CAAI,IAAuC;IAC5E,OAAO,IAAI,CAAA;AACb,CAAC;AAFD,8BAEC","sourcesContent":["import { type CSSProperties } from 'react'\n\nexport default function asStyleDict<T>(dict: { [K in keyof T]: CSSProperties }) {\n return dict\n}\n"]}
@@ -1,14 +1,14 @@
1
- import { Attributes, CElement, ClassAttributes, Component, ComponentState, FunctionComponentElement, ReactElement, ReactNode } from 'react';
1
+ import { type Attributes, type CElement, type ClassAttributes, type Component, type ComponentState, type FunctionComponentElement, type ReactElement, type ReactNode } from 'react';
2
2
  /**
3
3
  * Wrapper for {@link cloneElement} but instead of overwriting `className` and
4
4
  * `style` of the cloned element with the values specified in the `props`
5
5
  * argument, they are merged instead.
6
6
  *
7
- * @param element - The target element to clone.
8
- * @param props - The props to apply to the cloned element. Overlapping props
9
- * are overwritten with the exception of `className` and `style`,
10
- * which are merged.
11
- * @param children - Optional child elements add into the cloned element.
7
+ * @param element The target element to clone.
8
+ * @param props The props to apply to the cloned element. Overlapping props are
9
+ * overwritten with the exception of `className` and `style`, which
10
+ * are merged.
11
+ * @param children Optional child elements add into the cloned element.
12
12
  *
13
13
  * @returns The cloned element.
14
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cloneStyledElement.js","sourceRoot":"/","sources":["utils/cloneStyledElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyJ;AAkBzJ,SAAS,kBAAkB,CACzB,OAAuE,EACvE,KAAqE;;IAArE,sBAAA,EAAA,UAAqE;IACrE,kBAAwB;SAAxB,UAAwB,EAAxB,qBAAwB,EAAxB,IAAwB;QAAxB,iCAAwB;;IAExB,IAAM,KAAsC,KAAY,EAAhD,SAAS,eAAA,EAAE,KAAK,WAAA,EAAK,UAAU,cAAjC,sBAAmC,CAAe,CAAA;IACxD,IAAM,YAAY,GAAG,OAAO,CAAC,KAAY,CAAA;IAEzC,OAAO,oBAAY,8BAAC,OAAO,EAAE,WAC3B,SAAS,EAAE,UAAG,MAAA,YAAY,CAAC,SAAS,mCAAI,EAAE,cAAI,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACpG,KAAK,wBACA,MAAA,YAAY,CAAC,KAAK,mCAAI,EAAE,GACxB,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,KAEb,UAAU,CACP,UAAK,QAAQ,WAAC;AACxB,CAAC;AAED,kBAAe,kBAAkB,CAAA","sourcesContent":["import { Attributes, CElement, ClassAttributes, cloneElement, Component, ComponentState, FunctionComponentElement, ReactElement, ReactNode } from 'react'\n\n/**\n * Wrapper for {@link cloneElement} but instead of overwriting `className` and\n * `style` of the cloned element with the values specified in the `props`\n * argument, they are merged instead.\n *\n * @param element - The target element to clone.\n * @param props - The props to apply to the cloned element. Overlapping props\n * are overwritten with the exception of `className` and `style`,\n * which are merged.\n * @param children - Optional child elements add into the cloned element.\n *\n * @returns The cloned element.\n */\nfunction cloneStyledElement<P>(element: FunctionComponentElement<P>, props?: Partial<P> & Attributes, ...children: ReactNode[]): FunctionComponentElement<P>\nfunction cloneStyledElement<P, T extends Component<P, ComponentState>>(element: CElement<P, T>, props?: Partial<P> & ClassAttributes<T>, ...children: ReactNode[]): CElement<P, T>\nfunction cloneStyledElement<P>(element: ReactElement<P>, props?: Partial<P> & Attributes, ...children: ReactNode[]): ReactElement<P>\nfunction cloneStyledElement<P, T extends Component<P, ComponentState> = never>(\n element: FunctionComponentElement<P> | CElement<P, T> | ReactElement<P>,\n props: Partial<P> & Attributes | Partial<P> & ClassAttributes<T> = {},\n ...children: ReactNode[]\n) {\n const { className, style, ...otherProps } = props as any\n const elementProps = element.props as any\n\n return cloneElement(element, {\n className: `${elementProps.className ?? ''} ${className ?? ''}`.split(' ').filter(Boolean).join(' '),\n style: {\n ...elementProps.style ?? {},\n ...style ?? {},\n },\n ...otherProps,\n } as any, ...children)\n}\n\nexport default cloneStyledElement\n"]}
1
+ {"version":3,"file":"cloneStyledElement.js","sourceRoot":"/","sources":["utils/cloneStyledElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiM;AAkBjM,SAAS,kBAAkB,CACzB,OAAuE,EACvE,KAAqE;;IAArE,sBAAA,EAAA,UAAqE;IACrE,kBAAwB;SAAxB,UAAwB,EAAxB,qBAAwB,EAAxB,IAAwB;QAAxB,iCAAwB;;IAExB,IAAM,KAAsC,KAAY,EAAhD,SAAS,eAAA,EAAE,KAAK,WAAA,EAAK,UAAU,cAAjC,sBAAmC,CAAe,CAAA;IACxD,IAAM,YAAY,GAAG,OAAO,CAAC,KAAY,CAAA;IAEzC,OAAO,oBAAY,8BAAC,OAAO,EAAE,WAC3B,SAAS,EAAE,UAAG,MAAA,YAAY,CAAC,SAAS,mCAAI,EAAE,cAAI,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACpG,KAAK,wBACA,MAAA,YAAY,CAAC,KAAK,mCAAI,EAAE,GACxB,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,KAEb,UAAU,CACP,UAAK,QAAQ,WAAC;AACxB,CAAC;AAED,kBAAe,kBAAkB,CAAA","sourcesContent":["import { cloneElement, type Attributes, type CElement, type ClassAttributes, type Component, type ComponentState, type FunctionComponentElement, type ReactElement, type ReactNode } from 'react'\n\n/**\n * Wrapper for {@link cloneElement} but instead of overwriting `className` and\n * `style` of the cloned element with the values specified in the `props`\n * argument, they are merged instead.\n *\n * @param element The target element to clone.\n * @param props The props to apply to the cloned element. Overlapping props are\n * overwritten with the exception of `className` and `style`, which\n * are merged.\n * @param children Optional child elements add into the cloned element.\n *\n * @returns The cloned element.\n */\nfunction cloneStyledElement<P>(element: FunctionComponentElement<P>, props?: Partial<P> & Attributes, ...children: ReactNode[]): FunctionComponentElement<P>\nfunction cloneStyledElement<P, T extends Component<P, ComponentState>>(element: CElement<P, T>, props?: Partial<P> & ClassAttributes<T>, ...children: ReactNode[]): CElement<P, T>\nfunction cloneStyledElement<P>(element: ReactElement<P>, props?: Partial<P> & Attributes, ...children: ReactNode[]): ReactElement<P>\nfunction cloneStyledElement<P, T extends Component<P, ComponentState> = never>(\n element: FunctionComponentElement<P> | CElement<P, T> | ReactElement<P>,\n props: Partial<P> & Attributes | Partial<P> & ClassAttributes<T> = {},\n ...children: ReactNode[]\n) {\n const { className, style, ...otherProps } = props as any\n const elementProps = element.props as any\n\n return cloneElement(element, {\n className: `${elementProps.className ?? ''} ${className ?? ''}`.split(' ').filter(Boolean).join(' '),\n style: {\n ...elementProps.style ?? {},\n ...style ?? {},\n },\n ...otherProps,\n } as any, ...children)\n}\n\nexport default cloneStyledElement\n"]}
@@ -1,2 +1,2 @@
1
- import { CSSProperties } from 'react';
1
+ import { type CSSProperties } from 'react';
2
2
  export default function styles(...args: (CSSProperties | undefined | false)[]): CSSProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"/","sources":["utils/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,SAAwB,MAAM;IAAC,cAA8C;SAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;QAA9C,yBAA8C;;IAC3E,OAAO,IAAI,CAAC,MAAM,CAAgB,UAAC,GAAG,EAAE,IAAI,IAAK,OAAA,uBAC5C,GAAG,GACH,IAAI,IAAI,EAAE,EACb,EAH+C,CAG/C,EAAE,EAAE,CAAC,CAAA;AACT,CAAC;AALD,yBAKC","sourcesContent":["import { CSSProperties } from 'react'\n\nexport default function styles(...args: (CSSProperties | undefined | false)[]): CSSProperties {\n return args.reduce<CSSProperties>((out, curr) => ({\n ...out,\n ...curr || {},\n }), {})\n}\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"/","sources":["utils/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAEA,SAAwB,MAAM;IAAC,cAA8C;SAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;QAA9C,yBAA8C;;IAC3E,OAAO,IAAI,CAAC,MAAM,CAAgB,UAAC,GAAG,EAAE,IAAI,IAAK,OAAA,uBAC5C,GAAG,GACH,IAAI,IAAI,EAAE,EACb,EAH+C,CAG/C,EAAE,EAAE,CAAC,CAAA;AACT,CAAC;AALD,yBAKC","sourcesContent":["import { type CSSProperties } from 'react'\n\nexport default function styles(...args: (CSSProperties | undefined | false)[]): CSSProperties {\n return args.reduce<CSSProperties>((out, curr) => ({\n ...out,\n ...curr || {},\n }), {})\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etudes",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "A study of headless React components",
5
5
  "main": "lib",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
29
29
  "lib"
30
30
  ],
31
31
  "devDependencies": {
32
- "@babel/core": "^7.22.15",
32
+ "@babel/core": "^7.22.17",
33
33
  "@babel/plugin-transform-runtime": "^7.22.15",
34
34
  "@babel/preset-env": "^7.22.15",
35
35
  "@babel/preset-react": "^7.22.15",
@@ -50,7 +50,7 @@
50
50
  "concurrently": "^8.2.1",
51
51
  "cross-env": "^7.0.3",
52
52
  "debug": "^4.3.4",
53
- "eslint": "^8.48.0",
53
+ "eslint": "^8.49.0",
54
54
  "fast-xml-parser": "^4.2.7",
55
55
  "html-webpack-plugin": "^5.5.3",
56
56
  "react": "^18.2.0",
@@ -72,7 +72,7 @@
72
72
  "interactjs": "^1.10.18",
73
73
  "react-transition-group": "^4.4.5",
74
74
  "resize-observer-polyfill": "^1.5.1",
75
- "spase": "^6.6.0"
75
+ "spase": "^7.0.0"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": "^18.2.0"