@vibes.diy/prompts 14.1.1 → 14.1.2
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/llms/three-js.md +12 -3
- package/package.json +4 -4
- package/system-prompt-initial-oneshot.md +1 -1
- package/system-prompt-initial.md +1 -1
- package/system-prompt.md +1 -1
package/llms/three-js.md
CHANGED
|
@@ -361,12 +361,21 @@ function onPointerDown(event) {
|
|
|
361
361
|
## Importing three
|
|
362
362
|
|
|
363
363
|
A bare package name at the top of the file resolves through the platform's esm.sh
|
|
364
|
-
map, and a full esm.sh URL loads too
|
|
365
|
-
|
|
366
|
-
which moves as esm.sh publishes; a version-pinned URL such as
|
|
364
|
+
map, and a full esm.sh URL loads too. The bare form follows whatever version the
|
|
365
|
+
platform serves, which moves as esm.sh publishes; a version-pinned URL such as
|
|
367
366
|
`https://esm.sh/three@0.160.0` is the lever for holding a scene on one release of
|
|
368
367
|
the library.
|
|
369
368
|
|
|
369
|
+
`await import()` defers a library until it is needed. Give it a full esm.sh URL,
|
|
370
|
+
which the browser resolves on its own — for a third-party library like three,
|
|
371
|
+
that is the form that both resolves and defers.
|
|
372
|
+
|
|
373
|
+
A bare specifier resolves through the page's import map, which carries the
|
|
374
|
+
packages the platform serves plus the ones your files import at the top. So a
|
|
375
|
+
bare name loads on demand for a platform package; for three, a name your file
|
|
376
|
+
also imports at the top is already loaded by the time the call runs, and a name
|
|
377
|
+
that appears only inside `await import()` has nothing to resolve through.
|
|
378
|
+
|
|
370
379
|
## Animation System
|
|
371
380
|
|
|
372
381
|
### Animation Mixer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@adviser/cement": "~0.5.34",
|
|
37
|
-
"@vibes.diy/call-ai-v2": "14.1.
|
|
38
|
-
"@vibes.diy/identity": "14.1.
|
|
39
|
-
"@vibes.diy/use-vibes-types": "14.1.
|
|
37
|
+
"@vibes.diy/call-ai-v2": "14.1.2",
|
|
38
|
+
"@vibes.diy/identity": "14.1.2",
|
|
39
|
+
"@vibes.diy/use-vibes-types": "14.1.2",
|
|
40
40
|
"arktype": "~2.2.3",
|
|
41
41
|
"json-schema-faker": "~0.6.3"
|
|
42
42
|
},
|
|
@@ -25,7 +25,7 @@ You are an AI assistant tasked with creating React components. You should create
|
|
|
25
25
|
- For dynamic components, like autocomplete, don't use external libraries, implement your own
|
|
26
26
|
- Avoid using external libraries unless they are essential for the component to function
|
|
27
27
|
- Always use ES module imports at the top of the file (e.g. `import React, { useState } from "react"`). Never reference React or other libraries as globals.
|
|
28
|
-
- A bare package name at the top of the file resolves through the platform's esm.sh map, and a full esm.sh URL such as `https://esm.sh/three@0.160.0` loads too.
|
|
28
|
+
- A bare package name at the top of the file resolves through the platform's esm.sh map, and a full esm.sh URL such as `https://esm.sh/three@0.160.0` loads too. To defer a library until it is needed, `await import()` the full URL.
|
|
29
29
|
- Your file MUST use `export default function App()` — the runtime loads it as an ES module and imports the default export.
|
|
30
30
|
- Structure your component code in this order: (1) hooks and document shapes, (2) event handlers, (3) classNames object, (4) JSX return. ClassNames go right before JSX so they are close to where they are used.
|
|
31
31
|
- Use Fireproof for data persistence
|
package/system-prompt-initial.md
CHANGED
|
@@ -25,7 +25,7 @@ You are an AI assistant tasked with creating React components. You should create
|
|
|
25
25
|
- For dynamic components, like autocomplete, don't use external libraries, implement your own
|
|
26
26
|
- Avoid using external libraries unless they are essential for the component to function
|
|
27
27
|
- Always use ES module imports at the top of the file (e.g. `import React, { useState } from "react"`). Never reference React or other libraries as globals.
|
|
28
|
-
- A bare package name at the top of the file resolves through the platform's esm.sh map, and a full esm.sh URL such as `https://esm.sh/three@0.160.0` loads too.
|
|
28
|
+
- A bare package name at the top of the file resolves through the platform's esm.sh map, and a full esm.sh URL such as `https://esm.sh/three@0.160.0` loads too. To defer a library until it is needed, `await import()` the full URL.
|
|
29
29
|
- Your file MUST use `export default function App()` — the runtime loads it as an ES module and imports the default export.
|
|
30
30
|
- Structure your component code in this order: (1) hooks and document shapes, (2) event handlers, (3) classNames object, (4) JSX return. ClassNames go right before JSX so they are close to where they are used.
|
|
31
31
|
- Use Fireproof for data persistence
|
package/system-prompt.md
CHANGED
|
@@ -25,7 +25,7 @@ You are an AI assistant tasked with creating React components. You should create
|
|
|
25
25
|
- For dynamic components, like autocomplete, don't use external libraries, implement your own
|
|
26
26
|
- Avoid using external libraries unless they are essential for the component to function
|
|
27
27
|
- Always use ES module imports at the top of the file (e.g. `import React, { useState } from "react"`). Never reference React or other libraries as globals.
|
|
28
|
-
- A bare package name at the top of the file resolves through the platform's esm.sh map, and a full esm.sh URL such as `https://esm.sh/three@0.160.0` loads too.
|
|
28
|
+
- A bare package name at the top of the file resolves through the platform's esm.sh map, and a full esm.sh URL such as `https://esm.sh/three@0.160.0` loads too. To defer a library until it is needed, `await import()` the full URL.
|
|
29
29
|
- Your file MUST use `export default function App()` — the runtime loads it as an ES module and imports the default export.
|
|
30
30
|
- Structure your component code in this order: (1) hooks and document shapes, (2) event handlers, (3) classNames object, (4) JSX return. ClassNames go right before JSX so they are close to where they are used. Never define components (functions that return JSX) inside `App` or any other component — always define them at module scope and pass data as props. Components defined inside other components are recreated on every render, causing React to unmount and remount them, which breaks form focus and input state.
|
|
31
31
|
- Use Fireproof for data persistence
|