@spark-ui/internal-utils 10.10.0 → 10.11.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [10.11.0](https://github.com/leboncoin/spark-web/compare/v10.10.0...v10.11.0) (2025-07-10)
7
+
8
+ ### Features
9
+
10
+ - **components:** added surfaceInverse intent to button ([331b724](https://github.com/leboncoin/spark-web/commit/331b724dfafc33bcfdaee178b3bff07de48462b4))
11
+
6
12
  # [10.10.0](https://github.com/leboncoin/spark-web/compare/v10.9.0...v10.10.0) (2025-07-03)
7
13
 
8
14
  **Note:** Version bump only for package @spark-ui/internal-utils
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),l=Object.freeze(Object.defineProperty({__proto__:null,designs:["filled","outlined","tinted","ghost","contrast","dashed"],intents:["current","main","support","success","error","info","alert","danger","neutral","surface","accent","basic"],shapes:["rounded","square","pill"],sizes:["current","sm","md","lg","xl"]},Symbol.toStringTag,{value:"Module"}));function a(n){return s.isValidElement(n)&&function(t){return s.isValidElement(t)&&!!t.props.children}(n)&&s.Children.toArray(n.props.children).reduce((t,r)=>t||s.isValidElement(r),!1)}exports.VariantTypes=c,exports.createSplitProps=()=>(n,t)=>t.reduce((r,o)=>{const[e,i]=r,u=o;return i[u]!==void 0&&(e[u]=i[u]),delete i[u],[e,i]},[{},{...n}]),exports.deepFind=function n(t,r){let o;return s.Children.toArray(t).find((e,i,u)=>r(e,i,u)?(o=e,!0):!(!s.isValidElement(e)||!a(e))&&(o=n(e.props.children,r),o!==void 0)),o},exports.makeVariants=function(n){return n},exports.omit=function(n,t){const r={};return Object.keys(n).forEach(o=>{const e=o;t.includes(e)||(r[e]=n[e])}),r},exports.tw=function(n){return n},exports.useEvent=function(n,t={}){const{sync:r=!1}=t,o=function(e){const i=s.useRef(e);return i.current=e,i}(n);return s.useCallback((...e)=>r?queueMicrotask(()=>o.current?.(...e)):o.current?.(...e),[r,o])},exports.variantConstants=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),l=Object.freeze(Object.defineProperty({__proto__:null,designs:["filled","outlined","tinted","ghost","contrast","dashed"],intents:["current","main","support","success","error","info","alert","danger","neutral","surface","surfaceInverse","accent","basic"],shapes:["rounded","square","pill"],sizes:["current","sm","md","lg","xl"]},Symbol.toStringTag,{value:"Module"}));function a(n){return s.isValidElement(n)&&function(r){return s.isValidElement(r)&&!!r.props.children}(n)&&s.Children.toArray(n.props.children).reduce((r,t)=>r||s.isValidElement(t),!1)}exports.VariantTypes=c,exports.createSplitProps=()=>(n,r)=>r.reduce((t,o)=>{const[e,i]=t,u=o;return i[u]!==void 0&&(e[u]=i[u]),delete i[u],[e,i]},[{},{...n}]),exports.deepFind=function n(r,t){let o;return s.Children.toArray(r).find((e,i,u)=>t(e,i,u)?(o=e,!0):!(!s.isValidElement(e)||!a(e))&&(o=n(e.props.children,t),o!==void 0)),o},exports.makeVariants=function(n){return n},exports.omit=function(n,r){const t={};return Object.keys(n).forEach(o=>{const e=o;r.includes(e)||(t[e]=n[e])}),t},exports.tw=function(n){return n},exports.useEvent=function(n,r={}){const{sync:t=!1}=r,o=function(e){const i=s.useRef(e);return i.current=e,i}(n);return s.useCallback((...e)=>t?queueMicrotask(()=>o.current?.(...e)):o.current?.(...e),[t,o])},exports.variantConstants=l;
package/dist/index.mjs CHANGED
@@ -5,33 +5,33 @@ function m(e) {
5
5
  function b(e) {
6
6
  return e;
7
7
  }
8
- const y = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), g = Object.freeze(Object.defineProperty({ __proto__: null, designs: ["filled", "outlined", "tinted", "ghost", "contrast", "dashed"], intents: ["current", "main", "support", "success", "error", "info", "alert", "danger", "neutral", "surface", "accent", "basic"], shapes: ["rounded", "square", "pill"], sizes: ["current", "sm", "md", "lg", "xl"] }, Symbol.toStringTag, { value: "Module" }));
8
+ const y = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), g = Object.freeze(Object.defineProperty({ __proto__: null, designs: ["filled", "outlined", "tinted", "ghost", "contrast", "dashed"], intents: ["current", "main", "support", "success", "error", "info", "alert", "danger", "neutral", "surface", "surfaceInverse", "accent", "basic"], shapes: ["rounded", "square", "pill"], sizes: ["current", "sm", "md", "lg", "xl"] }, Symbol.toStringTag, { value: "Module" }));
9
9
  function d(e) {
10
10
  return c(e) && function(r) {
11
11
  return c(r) && !!r.props.children;
12
- }(e) && u.toArray(e.props.children).reduce((r, t) => r || c(t), !1);
12
+ }(e) && u.toArray(e.props.children).reduce((r, n) => r || c(n), !1);
13
13
  }
14
14
  function f(e, r) {
15
- let t;
16
- return u.toArray(e).find((o, n, s) => r(o, n, s) ? (t = o, !0) : !(!c(o) || !d(o)) && (t = f(o.props.children, r), t !== void 0)), t;
15
+ let n;
16
+ return u.toArray(e).find((o, t, s) => r(o, t, s) ? (n = o, !0) : !(!c(o) || !d(o)) && (n = f(o.props.children, r), n !== void 0)), n;
17
17
  }
18
- const h = () => (e, r) => r.reduce((t, o) => {
19
- const [n, s] = t, a = o;
20
- return s[a] !== void 0 && (n[a] = s[a]), delete s[a], [n, s];
18
+ const h = () => (e, r) => r.reduce((n, o) => {
19
+ const [t, s] = n, a = o;
20
+ return s[a] !== void 0 && (t[a] = s[a]), delete s[a], [t, s];
21
21
  }, [{}, { ...e }]);
22
22
  function _(e, r) {
23
- const t = {};
23
+ const n = {};
24
24
  return Object.keys(e).forEach((o) => {
25
- const n = o;
26
- r.includes(n) || (t[n] = e[n]);
27
- }), t;
25
+ const t = o;
26
+ r.includes(t) || (n[t] = e[t]);
27
+ }), n;
28
28
  }
29
29
  function v(e, r = {}) {
30
- const { sync: t = !1 } = r, o = function(n) {
31
- const s = l(n);
32
- return s.current = n, s;
30
+ const { sync: n = !1 } = r, o = function(t) {
31
+ const s = l(t);
32
+ return s.current = t, s;
33
33
  }(e);
34
- return i((...n) => t ? queueMicrotask(() => o.current?.(...n)) : o.current?.(...n), [t, o]);
34
+ return i((...t) => n ? queueMicrotask(() => o.current?.(...t)) : o.current?.(...t), [n, o]);
35
35
  }
36
36
  export {
37
37
  y as VariantTypes,
@@ -1,5 +1,5 @@
1
1
  declare const sizes: readonly ["current", "sm", "md", "lg", "xl"];
2
- declare const intents: readonly ["current", "main", "support", "success", "error", "info", "alert", "danger", "neutral", "surface", "accent", "basic"];
2
+ declare const intents: readonly ["current", "main", "support", "success", "error", "info", "alert", "danger", "neutral", "surface", "surfaceInverse", "accent", "basic"];
3
3
  declare const designs: readonly ["filled", "outlined", "tinted", "ghost", "contrast", "dashed"];
4
4
  declare const shapes: readonly ["rounded", "square", "pill"];
5
5
  export { sizes, intents, designs, shapes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/internal-utils",
3
- "version": "10.10.0",
3
+ "version": "10.11.0",
4
4
  "description": "package for sharing reusable code and resources across the codebase",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,5 +34,5 @@
34
34
  },
35
35
  "homepage": "https://sparkui.vercel.app",
36
36
  "license": "MIT",
37
- "gitHead": "15beb1b7b4c85542e622984cc8385f45e32e56d0"
37
+ "gitHead": "d4f0a5daf427ffc24953b431f9975369adbbbc06"
38
38
  }