@kbach/react 0.6.11 → 0.6.12

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.
@@ -23,7 +23,7 @@ import {
23
23
  transformToWebProps,
24
24
  useConditionalWidth,
25
25
  useGlobalDarkMode
26
- } from "./chunk-OWJUMH2V.mjs";
26
+ } from "./chunk-WYOKBFSK.mjs";
27
27
 
28
28
  // src/jsx-runtime.tsx
29
29
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1793,6 +1793,16 @@ var RESOLVERS = {
1793
1793
  };
1794
1794
  return offsets[value] ? { textUnderlineOffset: offsets[value] } : null;
1795
1795
  },
1796
+ // ── Content (web-only — for before:/after: pseudo-elements, which don't exist on native) ──
1797
+ // Arbitrary value carries its own quotes from the bracket syntax (content-['*'] parses to
1798
+ // the literal string 'you can see it' quotes included), so it passes straight through as a
1799
+ // valid `content: '*'` CSS value with no extra wrapping needed.
1800
+ content: ({ value, isArbitrary }) => {
1801
+ if (!getEffectiveIsWeb()) return null;
1802
+ if (isArbitrary) return { content: value };
1803
+ const presets = { none: "none" };
1804
+ return value in presets ? { content: presets[value] } : null;
1805
+ },
1796
1806
  // ── Outline extended (web-only) ───────────────────────────────────────────
1797
1807
  outline: ({ value, isArbitrary }, { colors }) => {
1798
1808
  if (!getEffectiveIsWeb()) return null;
package/dist/index.js CHANGED
@@ -1954,6 +1954,16 @@ var RESOLVERS = {
1954
1954
  };
1955
1955
  return offsets[value] ? { textUnderlineOffset: offsets[value] } : null;
1956
1956
  },
1957
+ // ── Content (web-only — for before:/after: pseudo-elements, which don't exist on native) ──
1958
+ // Arbitrary value carries its own quotes from the bracket syntax (content-['*'] parses to
1959
+ // the literal string 'you can see it' quotes included), so it passes straight through as a
1960
+ // valid `content: '*'` CSS value with no extra wrapping needed.
1961
+ content: ({ value, isArbitrary }) => {
1962
+ if (!getEffectiveIsWeb()) return null;
1963
+ if (isArbitrary) return { content: value };
1964
+ const presets = { none: "none" };
1965
+ return value in presets ? { content: presets[value] } : null;
1966
+ },
1957
1967
  // ── Outline extended (web-only) ───────────────────────────────────────────
1958
1968
  outline: ({ value, isArbitrary }, { colors }) => {
1959
1969
  if (!getEffectiveIsWeb()) return null;
package/dist/index.mjs CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  useGlobalDarkMode,
40
40
  useGlobalWidth,
41
41
  useSyncExternalStore
42
- } from "./chunk-OWJUMH2V.mjs";
42
+ } from "./chunk-WYOKBFSK.mjs";
43
43
 
44
44
  // src/context.tsx
45
45
  import { createContext, useContext } from "react";
@@ -1912,6 +1912,16 @@ var RESOLVERS = {
1912
1912
  };
1913
1913
  return offsets[value] ? { textUnderlineOffset: offsets[value] } : null;
1914
1914
  },
1915
+ // ── Content (web-only — for before:/after: pseudo-elements, which don't exist on native) ──
1916
+ // Arbitrary value carries its own quotes from the bracket syntax (content-['*'] parses to
1917
+ // the literal string 'you can see it' quotes included), so it passes straight through as a
1918
+ // valid `content: '*'` CSS value with no extra wrapping needed.
1919
+ content: ({ value, isArbitrary }) => {
1920
+ if (!getEffectiveIsWeb()) return null;
1921
+ if (isArbitrary) return { content: value };
1922
+ const presets = { none: "none" };
1923
+ return value in presets ? { content: presets[value] } : null;
1924
+ },
1915
1925
  // ── Outline extended (web-only) ───────────────────────────────────────────
1916
1926
  outline: ({ value, isArbitrary }, { colors }) => {
1917
1927
  if (!getEffectiveIsWeb()) return null;
@@ -3,8 +3,8 @@ import {
3
3
  Fragment,
4
4
  jsx,
5
5
  jsxs
6
- } from "./chunk-Z5SUFJ53.mjs";
7
- import "./chunk-OWJUMH2V.mjs";
6
+ } from "./chunk-GTDMKS7C.mjs";
7
+ import "./chunk-WYOKBFSK.mjs";
8
8
 
9
9
  // src/jsx-dev-runtime.tsx
10
10
  function jsxDEV(type, props, key, isStaticChildren, source, self) {
@@ -1913,6 +1913,16 @@ var RESOLVERS = {
1913
1913
  };
1914
1914
  return offsets[value] ? { textUnderlineOffset: offsets[value] } : null;
1915
1915
  },
1916
+ // ── Content (web-only — for before:/after: pseudo-elements, which don't exist on native) ──
1917
+ // Arbitrary value carries its own quotes from the bracket syntax (content-['*'] parses to
1918
+ // the literal string 'you can see it' quotes included), so it passes straight through as a
1919
+ // valid `content: '*'` CSS value with no extra wrapping needed.
1920
+ content: ({ value, isArbitrary }) => {
1921
+ if (!getEffectiveIsWeb()) return null;
1922
+ if (isArbitrary) return { content: value };
1923
+ const presets = { none: "none" };
1924
+ return value in presets ? { content: presets[value] } : null;
1925
+ },
1916
1926
  // ── Outline extended (web-only) ───────────────────────────────────────────
1917
1927
  outline: ({ value, isArbitrary }, { colors }) => {
1918
1928
  if (!getEffectiveIsWeb()) return null;
@@ -4,10 +4,10 @@ import {
4
4
  _invalidateDefaultFontCache,
5
5
  jsx,
6
6
  jsxs
7
- } from "./chunk-Z5SUFJ53.mjs";
7
+ } from "./chunk-GTDMKS7C.mjs";
8
8
  import {
9
9
  registerWebElement
10
- } from "./chunk-OWJUMH2V.mjs";
10
+ } from "./chunk-WYOKBFSK.mjs";
11
11
  export {
12
12
  Fragment,
13
13
  _invalidateDefaultFontCache,
@@ -1727,6 +1727,16 @@ var RESOLVERS = {
1727
1727
  };
1728
1728
  return offsets[value] ? { textUnderlineOffset: offsets[value] } : null;
1729
1729
  },
1730
+ // ── Content (web-only — for before:/after: pseudo-elements, which don't exist on native) ──
1731
+ // Arbitrary value carries its own quotes from the bracket syntax (content-['*'] parses to
1732
+ // the literal string 'you can see it' quotes included), so it passes straight through as a
1733
+ // valid `content: '*'` CSS value with no extra wrapping needed.
1734
+ content: ({ value, isArbitrary }) => {
1735
+ if (!getEffectiveIsWeb()) return null;
1736
+ if (isArbitrary) return { content: value };
1737
+ const presets = { none: "none" };
1738
+ return value in presets ? { content: presets[value] } : null;
1739
+ },
1730
1740
  // ── Outline extended (web-only) ───────────────────────────────────────────
1731
1741
  outline: ({ value, isArbitrary }, { colors }) => {
1732
1742
  if (!getEffectiveIsWeb()) return null;
@@ -3232,7 +3242,7 @@ function pushTemplateLiteralBody(body, into) {
3232
3242
  while ((im = interpolationRe.exec(body)) !== null) {
3233
3243
  pushClassLikeStrings(im[0], into);
3234
3244
  }
3235
- pushTokens(body.replace(/\$\{(?:[^{}]|\{[^{}]*\})*\}/g, " "), into);
3245
+ pushTokens(body.replace(/\$\{(?:[^{}]|\{[^{}]*\})*\}/g, () => "$"), into);
3236
3246
  }
3237
3247
  function pushClassLikeStrings(text, into) {
3238
3248
  const quotedStringRe = /(["'`])((?:(?!\1).)*)\1/g;
@@ -3245,9 +3255,9 @@ function pushClassLikeStrings(text, into) {
3245
3255
  }
3246
3256
  function extractClassStrings(code) {
3247
3257
  const found = /* @__PURE__ */ new Set();
3248
- const simpleRe = /(?:className|kb)=["']([^"']+)["']/g;
3258
+ const simpleRe = /(?:className|kb)=(["'])((?:(?!\1).)*)\1/g;
3249
3259
  let m;
3250
- while ((m = simpleRe.exec(code)) !== null) pushTokens(m[1], found);
3260
+ while ((m = simpleRe.exec(code)) !== null) pushTokens(m[2], found);
3251
3261
  const jsxExprRe = /(?:className|kb)=\{/g;
3252
3262
  while ((m = jsxExprRe.exec(code)) !== null) {
3253
3263
  let depth = 1;
@@ -1693,6 +1693,16 @@ var RESOLVERS = {
1693
1693
  };
1694
1694
  return offsets[value] ? { textUnderlineOffset: offsets[value] } : null;
1695
1695
  },
1696
+ // ── Content (web-only — for before:/after: pseudo-elements, which don't exist on native) ──
1697
+ // Arbitrary value carries its own quotes from the bracket syntax (content-['*'] parses to
1698
+ // the literal string 'you can see it' quotes included), so it passes straight through as a
1699
+ // valid `content: '*'` CSS value with no extra wrapping needed.
1700
+ content: ({ value, isArbitrary }) => {
1701
+ if (!getEffectiveIsWeb()) return null;
1702
+ if (isArbitrary) return { content: value };
1703
+ const presets = { none: "none" };
1704
+ return value in presets ? { content: presets[value] } : null;
1705
+ },
1696
1706
  // ── Outline extended (web-only) ───────────────────────────────────────────
1697
1707
  outline: ({ value, isArbitrary }, { colors }) => {
1698
1708
  if (!getEffectiveIsWeb()) return null;
@@ -3198,7 +3208,7 @@ function pushTemplateLiteralBody(body, into) {
3198
3208
  while ((im = interpolationRe.exec(body)) !== null) {
3199
3209
  pushClassLikeStrings(im[0], into);
3200
3210
  }
3201
- pushTokens(body.replace(/\$\{(?:[^{}]|\{[^{}]*\})*\}/g, " "), into);
3211
+ pushTokens(body.replace(/\$\{(?:[^{}]|\{[^{}]*\})*\}/g, () => "$"), into);
3202
3212
  }
3203
3213
  function pushClassLikeStrings(text, into) {
3204
3214
  const quotedStringRe = /(["'`])((?:(?!\1).)*)\1/g;
@@ -3211,9 +3221,9 @@ function pushClassLikeStrings(text, into) {
3211
3221
  }
3212
3222
  function extractClassStrings(code) {
3213
3223
  const found = /* @__PURE__ */ new Set();
3214
- const simpleRe = /(?:className|kb)=["']([^"']+)["']/g;
3224
+ const simpleRe = /(?:className|kb)=(["'])((?:(?!\1).)*)\1/g;
3215
3225
  let m;
3216
- while ((m = simpleRe.exec(code)) !== null) pushTokens(m[1], found);
3226
+ while ((m = simpleRe.exec(code)) !== null) pushTokens(m[2], found);
3217
3227
  const jsxExprRe = /(?:className|kb)=\{/g;
3218
3228
  while ((m = jsxExprRe.exec(code)) !== null) {
3219
3229
  let depth = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "description": "React / React Native components and hooks for the Kbach framework",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",