sparkecode-devtools 0.1.47 → 0.1.48

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 (2) hide show
  1. package/next.js +8 -8
  2. package/package.json +1 -1
package/next.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import Script from 'next/script';
4
- import { useEffect, useMemo } from 'react';
4
+ import { createElement, useEffect, useMemo } from 'react';
5
5
 
6
6
  const DEFAULT_SCRIPT_URL = 'https://unpkg.com/sparkecode-devtools/sparkecode-select.js';
7
7
 
@@ -52,11 +52,11 @@ export function SparkeCodeSelect({
52
52
  }
53
53
  };
54
54
 
55
- return (
56
- <Script
57
- src={scriptUrl}
58
- strategy={strategy}
59
- onLoad={handleLoad}
60
- />
61
- );
55
+ // Use createElement instead of JSX to avoid needing transpilation
56
+ // in the distributed package file (.js without JSX transform)
57
+ return createElement(Script, {
58
+ src: scriptUrl,
59
+ strategy: strategy,
60
+ onLoad: handleLoad,
61
+ });
62
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sparkecode-devtools",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "Sparkecode Dev Tools for selecting and sharing components.",
5
5
  "type": "module",
6
6
  "main": "sparkecode-select.js",