@kbach/react 0.5.28 → 0.5.29

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.
@@ -3448,8 +3448,9 @@ function writeKbachToFile(filePath, css) {
3448
3448
  const block = `${KBACH_START}
3449
3449
  ${css}
3450
3450
  ${KBACH_END}`;
3451
- const re = new RegExp(`${KBACH_START}[\\s\\S]*?${KBACH_END}`);
3452
- const next = existing.includes(KBACH_START) ? existing.replace(re, block) : existing ? `${existing}
3451
+ const start = existing.indexOf(KBACH_START);
3452
+ const end = existing.indexOf(KBACH_END);
3453
+ const next = start !== -1 && end !== -1 ? existing.slice(0, start) + block + existing.slice(end + KBACH_END.length) : existing ? `${existing}
3453
3454
 
3454
3455
  ${block}` : block;
3455
3456
  if (next !== existing) (0, import_fs.writeFileSync)(filePath, next, "utf-8");
@@ -106,8 +106,9 @@ function writeKbachToFile(filePath, css) {
106
106
  const block = `${KBACH_START}
107
107
  ${css}
108
108
  ${KBACH_END}`;
109
- const re = new RegExp(`${KBACH_START}[\\s\\S]*?${KBACH_END}`);
110
- const next = existing.includes(KBACH_START) ? existing.replace(re, block) : existing ? `${existing}
109
+ const start = existing.indexOf(KBACH_START);
110
+ const end = existing.indexOf(KBACH_END);
111
+ const next = start !== -1 && end !== -1 ? existing.slice(0, start) + block + existing.slice(end + KBACH_END.length) : existing ? `${existing}
111
112
 
112
113
  ${block}` : block;
113
114
  if (next !== existing) writeFileSync(filePath, next, "utf-8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbach/react",
3
- "version": "0.5.28",
3
+ "version": "0.5.29",
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",