loopwind 0.20.1 → 0.20.4

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.
@@ -15,8 +15,22 @@
15
15
  "@astrojs/check": "^0.9.3",
16
16
  "@astrojs/cloudflare": "^11.1.0",
17
17
  "@astrojs/mdx": "^3.1.7",
18
+ "@astrojs/react": "^4.4.2",
19
+ "@babel/runtime": "^7.28.4",
20
+ "@codemirror/autocomplete": "^6.20.0",
21
+ "@codemirror/commands": "^6.10.0",
22
+ "@codemirror/lang-javascript": "^6.2.4",
23
+ "@codemirror/lang-json": "^6.0.2",
24
+ "@codemirror/state": "^6.5.2",
25
+ "@codemirror/theme-one-dark": "^6.1.3",
26
+ "@codemirror/view": "^6.38.8",
27
+ "@uiw/codemirror-theme-github": "^4.25.3",
18
28
  "astro": "^4.15.11",
29
+ "codemirror": "^6.0.2",
19
30
  "loopwind": "file:..",
31
+ "prettier": "^3.6.2",
32
+ "react": "^19.2.0",
33
+ "react-dom": "^19.2.0",
20
34
  "typescript": "^5.6.2"
21
35
  },
22
36
  "devDependencies": {
@@ -1,45 +0,0 @@
1
- const testData = {
2
- templateCode: `export const meta = {
3
- name: 'test',
4
- type: 'image',
5
- size: { width: 400, height: 400 },
6
- props: { title: 'string' }
7
- };
8
-
9
- export default function Test({ tw, title }) {
10
- return (
11
- <div style={tw('flex items-center justify-center w-full h-full bg-blue-500')}>
12
- <h1 style={tw('text-white text-4xl')}>{title}</h1>
13
- </div>
14
- );
15
- }`,
16
- props: { title: 'Hello Playground!' },
17
- format: 'svg'
18
- };
19
-
20
- console.log('Testing playground API...');
21
- console.log('Request body:', JSON.stringify(testData, null, 2));
22
-
23
- try {
24
- const response = await fetch('http://localhost:4323/api/playground/render', {
25
- method: 'POST',
26
- headers: {
27
- 'Content-Type': 'application/json',
28
- },
29
- body: JSON.stringify(testData)
30
- });
31
-
32
- console.log('Response status:', response.status);
33
- console.log('Response headers:', Object.fromEntries(response.headers));
34
-
35
- const data = await response.json();
36
-
37
- if (data.type === 'image') {
38
- console.log('✅ Success! Image rendered');
39
- console.log('Data URL length:', data.data.length);
40
- } else {
41
- console.log('❌ Error:', data);
42
- }
43
- } catch (error) {
44
- console.error('❌ Failed:', error.message);
45
- }