@vibes.diy/prompts 0.19.6-dev → 0.19.14-dev-cli

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 CHANGED
@@ -30,18 +30,11 @@ const camera = new THREE.PerspectiveCamera(
30
30
  75, // field of view
31
31
  aspect, // aspect ratio
32
32
  0.1, // near plane
33
- 1000, // far plane
33
+ 1000 // far plane
34
34
  );
35
35
 
36
36
  // Orthographic (2D/technical)
37
- const camera = new THREE.OrthographicCamera(
38
- left,
39
- right,
40
- top,
41
- bottom,
42
- near,
43
- far,
44
- );
37
+ const camera = new THREE.OrthographicCamera(left, right, top, bottom, near, far);
45
38
 
46
39
  // Camera controls
47
40
  camera.position.set(x, y, z);
@@ -442,10 +435,7 @@ geometry.setAttribute("color", new THREE.BufferAttribute(colors, 3));
442
435
 
443
436
  // Custom attributes for shaders
444
437
  const customData = new Float32Array(vertexCount);
445
- geometry.setAttribute(
446
- "customAttribute",
447
- new THREE.BufferAttribute(customData, 1),
448
- );
438
+ geometry.setAttribute("customAttribute", new THREE.BufferAttribute(customData, 1));
449
439
  ```
450
440
 
451
441
  ## Events and Interaction
@@ -636,10 +626,7 @@ import Stats from "three/addons/libs/stats.module.js";
636
626
  import * as THREE from "three";
637
627
 
638
628
  const scene = new THREE.Scene();
639
- const camera = new THREE.PerspectiveCamera(
640
- 75,
641
- window.innerWidth / window.innerHeight,
642
- );
629
+ const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight);
643
630
  const renderer = new THREE.WebGLRenderer();
644
631
 
645
632
  renderer.setSize(window.innerWidth, window.innerHeight);
@@ -674,12 +661,7 @@ import { OrbitControls } from "three/addons/controls/OrbitControls.js";
674
661
 
675
662
  // Basic setup
676
663
  const scene = new THREE.Scene();
677
- const camera = new THREE.PerspectiveCamera(
678
- 75,
679
- window.innerWidth / window.innerHeight,
680
- 0.1,
681
- 1000,
682
- );
664
+ const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
683
665
  const renderer = new THREE.WebGLRenderer({ antialias: true });
684
666
  renderer.setSize(window.innerWidth, window.innerHeight);
685
667
  document.body.appendChild(renderer.domElement);
@@ -727,11 +709,7 @@ const colorInside = uniform(color("#ffa575"));
727
709
  const colorOutside = uniform(color("#311599"));
728
710
  material.colorNode = mix(colorInside, colorOutside, radiusRatio);
729
711
 
730
- const galaxy = new THREE.InstancedMesh(
731
- new THREE.PlaneGeometry(1, 1),
732
- material,
733
- 20000,
734
- );
712
+ const galaxy = new THREE.InstancedMesh(new THREE.PlaneGeometry(1, 1), material, 20000);
735
713
  ```
736
714
 
737
715
  ### Ocean Shaders
@@ -778,7 +756,7 @@ const bloomPass = new UnrealBloomPass(
778
756
  new THREE.Vector2(window.innerWidth, window.innerHeight),
779
757
  1.5, // strength
780
758
  0.4, // radius
781
- 0.85, // threshold
759
+ 0.85 // threshold
782
760
  );
783
761
  composer.addPass(bloomPass);
784
762
 
@@ -860,9 +838,7 @@ import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
860
838
  import { HDRLoader } from "three/addons/loaders/HDRLoader.js";
861
839
 
862
840
  // Environment setup
863
- scene.environment = new HDRLoader().load(
864
- "textures/equirectangular/venice_sunset_1k.hdr",
865
- );
841
+ scene.environment = new HDRLoader().load("textures/equirectangular/venice_sunset_1k.hdr");
866
842
  renderer.toneMapping = THREE.ACESFilmicToneMapping;
867
843
  renderer.toneMappingExposure = 0.85;
868
844
 
@@ -896,9 +872,7 @@ function generateTerrain(width, depth) {
896
872
  for (let x = 0; x < width; x++) {
897
873
  for (let z = 0; z < depth; z++) {
898
874
  // Multi-octave noise
899
- const height =
900
- noise.noise(x / 100, z / 100, 0) * 50 +
901
- noise.noise(x / 50, z / 50, 0) * 25;
875
+ const height = noise.noise(x / 100, z / 100, 0) * 50 + noise.noise(x / 50, z / 50, 0) * 25;
902
876
  data.push(Math.floor(height));
903
877
  }
904
878
  }
@@ -960,11 +934,7 @@ const vehicleDesc = world.createRigidBody({
960
934
 
961
935
  // Wheel constraints
962
936
  wheels.forEach((wheel, index) => {
963
- const wheelJoint = world.createImpulseJoint(
964
- vehicleDesc,
965
- wheel.body,
966
- wheelConstraints[index],
967
- );
937
+ const wheelJoint = world.createImpulseJoint(vehicleDesc, wheel.body, wheelConstraints[index]);
968
938
  });
969
939
  ```
970
940
 
@@ -1018,11 +988,7 @@ const instancedMesh = new THREE.InstancedMesh(geometry, material, 100000);
1018
988
  const matrix = new THREE.Matrix4();
1019
989
 
1020
990
  for (let i = 0; i < instancedMesh.count; i++) {
1021
- matrix.setPosition(
1022
- Math.random() * 2000 - 1000,
1023
- Math.random() * 2000 - 1000,
1024
- Math.random() * 2000 - 1000,
1025
- );
991
+ matrix.setPosition(Math.random() * 2000 - 1000, Math.random() * 2000 - 1000, Math.random() * 2000 - 1000);
1026
992
  instancedMesh.setMatrixAt(i, matrix);
1027
993
  }
1028
994
  ```
@@ -1128,7 +1094,7 @@ export default function SkyGlider() {
1128
1094
  timestamp: Date.now(),
1129
1095
  });
1130
1096
  },
1131
- [database],
1097
+ [database]
1132
1098
  );
1133
1099
 
1134
1100
  const createGlowEffect = useCallback((position) => {
@@ -1141,7 +1107,7 @@ export default function SkyGlider() {
1141
1107
  color: 0xffd670,
1142
1108
  transparent: true,
1143
1109
  opacity: 0.8,
1144
- }),
1110
+ })
1145
1111
  );
1146
1112
 
1147
1113
  glowSphere.position.copy(position);
@@ -1167,11 +1133,7 @@ export default function SkyGlider() {
1167
1133
  const state = gameStateRef.current;
1168
1134
  if (!state.scene) return;
1169
1135
 
1170
- const smokeGeometry = new THREE.SphereGeometry(
1171
- 0.1 + Math.random() * 0.05,
1172
- 4,
1173
- 3,
1174
- );
1136
+ const smokeGeometry = new THREE.SphereGeometry(0.1 + Math.random() * 0.05, 4, 3);
1175
1137
  const smokeMaterial = new THREE.MeshLambertMaterial({
1176
1138
  color: 0x242424,
1177
1139
  transparent: true,
@@ -1187,7 +1149,7 @@ export default function SkyGlider() {
1187
1149
  smokeCloud.position.set(
1188
1150
  position.x + offsetX + (Math.random() - 0.5) * 0.2,
1189
1151
  position.y - 0.2 + (Math.random() - 0.5) * 0.1,
1190
- position.z + offsetZ + Math.random() * 0.3,
1152
+ position.z + offsetZ + Math.random() * 0.3
1191
1153
  );
1192
1154
 
1193
1155
  state.scene.add(smokeCloud);
@@ -1236,7 +1198,7 @@ export default function SkyGlider() {
1236
1198
  map: texture,
1237
1199
  metalness: 0.8,
1238
1200
  roughness: 0.2,
1239
- }),
1201
+ })
1240
1202
  );
1241
1203
 
1242
1204
  coin.position.copy(position);
@@ -1257,12 +1219,7 @@ export default function SkyGlider() {
1257
1219
  scene.background = new THREE.Color(0x70d6ff);
1258
1220
  scene.fog = new THREE.Fog(0x70d6ff, 50, 300);
1259
1221
 
1260
- const camera = new THREE.PerspectiveCamera(
1261
- 75,
1262
- window.innerWidth / window.innerHeight,
1263
- 0.1,
1264
- 1000,
1265
- );
1222
+ const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
1266
1223
  camera.position.set(0, 10, 20);
1267
1224
 
1268
1225
  const renderer = new THREE.WebGLRenderer({
@@ -1280,10 +1237,7 @@ export default function SkyGlider() {
1280
1237
 
1281
1238
  // Glider
1282
1239
  const glider = new THREE.Group();
1283
- const body = new THREE.Mesh(
1284
- new THREE.ConeGeometry(2, 8, 3),
1285
- new THREE.MeshLambertMaterial({ color: 0xff70a6 }),
1286
- );
1240
+ const body = new THREE.Mesh(new THREE.ConeGeometry(2, 8, 3), new THREE.MeshLambertMaterial({ color: 0xff70a6 }));
1287
1241
  body.rotation.x = Math.PI / 2;
1288
1242
  glider.add(body);
1289
1243
 
@@ -1299,13 +1253,9 @@ export default function SkyGlider() {
1299
1253
  color: 0xffffff,
1300
1254
  transparent: true,
1301
1255
  opacity: 0.7,
1302
- }),
1303
- );
1304
- cloud.position.set(
1305
- (Math.random() - 0.5) * 400,
1306
- Math.random() * 30 + 10,
1307
- (Math.random() - 0.5) * 400,
1256
+ })
1308
1257
  );
1258
+ cloud.position.set((Math.random() - 0.5) * 400, Math.random() * 30 + 10, (Math.random() - 0.5) * 400);
1309
1259
  scene.add(cloud);
1310
1260
  clouds.push({
1311
1261
  mesh: cloud,
@@ -1322,11 +1272,7 @@ export default function SkyGlider() {
1322
1272
  for (let i = 0; i < 20; i++) {
1323
1273
  const coin = createTexturedCoin(
1324
1274
  scene,
1325
- new THREE.Vector3(
1326
- (Math.random() - 0.5) * 200,
1327
- Math.random() * 40 + 10,
1328
- (Math.random() - 0.5) * 200,
1329
- ),
1275
+ new THREE.Vector3((Math.random() - 0.5) * 200, Math.random() * 40 + 10, (Math.random() - 0.5) * 200)
1330
1276
  );
1331
1277
  coins.push(coin);
1332
1278
  }
@@ -1372,11 +1318,7 @@ export default function SkyGlider() {
1372
1318
 
1373
1319
  // Respawn coin at random location
1374
1320
  setTimeout(() => {
1375
- coin.mesh.position.set(
1376
- (Math.random() - 0.5) * 200,
1377
- Math.random() * 40 + 10,
1378
- (Math.random() - 0.5) * 200,
1379
- );
1321
+ coin.mesh.position.set((Math.random() - 0.5) * 200, Math.random() * 40 + 10, (Math.random() - 0.5) * 200);
1380
1322
  coin.mesh.visible = true;
1381
1323
  coin.collected = false;
1382
1324
  }, 5000);
@@ -1406,27 +1348,18 @@ export default function SkyGlider() {
1406
1348
  if (keys["ArrowRight"] || keys["KeyD"]) state.heading -= 0.03;
1407
1349
  if (keys["ArrowUp"] || keys["KeyW"]) state.pitch += 0.01;
1408
1350
  if (keys["ArrowDown"] || keys["KeyS"]) state.pitch -= 0.01;
1409
- if (keys["Space"])
1410
- state.forwardSpeed = Math.min(0.3, state.forwardSpeed + 0.005);
1351
+ if (keys["Space"]) state.forwardSpeed = Math.min(0.3, state.forwardSpeed + 0.005);
1411
1352
 
1412
1353
  // Physics
1413
1354
  state.forwardSpeed = Math.max(0.05, state.forwardSpeed * 0.995);
1414
- state.velocity.x =
1415
- Math.sin(state.heading) * Math.cos(state.pitch) * state.forwardSpeed;
1355
+ state.velocity.x = Math.sin(state.heading) * Math.cos(state.pitch) * state.forwardSpeed;
1416
1356
  state.velocity.y = Math.sin(-state.pitch) * state.forwardSpeed;
1417
- state.velocity.z =
1418
- Math.cos(state.heading) * Math.cos(state.pitch) * state.forwardSpeed;
1357
+ state.velocity.z = Math.cos(state.heading) * Math.cos(state.pitch) * state.forwardSpeed;
1419
1358
 
1420
- glider.position.add(
1421
- new THREE.Vector3(state.velocity.x, state.velocity.y, state.velocity.z),
1422
- );
1359
+ glider.position.add(new THREE.Vector3(state.velocity.x, state.velocity.y, state.velocity.z));
1423
1360
 
1424
1361
  // Point glider in thrust vector direction
1425
- const thrustDirection = new THREE.Vector3(
1426
- state.velocity.x,
1427
- state.velocity.y,
1428
- state.velocity.z,
1429
- ).normalize();
1362
+ const thrustDirection = new THREE.Vector3(state.velocity.x, state.velocity.y, state.velocity.z).normalize();
1430
1363
  if (thrustDirection.length() > 0) {
1431
1364
  glider.lookAt(glider.position.clone().add(thrustDirection));
1432
1365
  }
@@ -1436,7 +1369,7 @@ export default function SkyGlider() {
1436
1369
  state.camera.position.set(
1437
1370
  glider.position.x - Math.sin(state.heading) * cameraDistance,
1438
1371
  glider.position.y + 10,
1439
- glider.position.z - Math.cos(state.heading) * cameraDistance,
1372
+ glider.position.z - Math.cos(state.heading) * cameraDistance
1440
1373
  );
1441
1374
  state.camera.lookAt(glider.position);
1442
1375
 
@@ -1456,9 +1389,7 @@ export default function SkyGlider() {
1456
1389
  if (!coin.collected) coin.mesh.rotation.y += coin.rotation;
1457
1390
  });
1458
1391
  state.clouds.forEach((cloud) => {
1459
- cloud.mesh.position.add(
1460
- new THREE.Vector3(cloud.drift.x, cloud.drift.y, cloud.drift.z),
1461
- );
1392
+ cloud.mesh.position.add(new THREE.Vector3(cloud.drift.x, cloud.drift.y, cloud.drift.z));
1462
1393
  });
1463
1394
 
1464
1395
  // Animate glow effects
@@ -1478,8 +1409,7 @@ export default function SkyGlider() {
1478
1409
  smoke.mesh.material.opacity = 0;
1479
1410
  } else if (age > 7500) {
1480
1411
  const fadeProgress = (age - 7500) / 7500;
1481
- smoke.mesh.material.opacity =
1482
- (0.7 + Math.random() * 0.2) * (1 - fadeProgress);
1412
+ smoke.mesh.material.opacity = (0.7 + Math.random() * 0.2) * (1 - fadeProgress);
1483
1413
  }
1484
1414
  });
1485
1415
 
@@ -1578,7 +1508,7 @@ export default function HalftoneArtStudio() {
1578
1508
  timestamp: Date.now(),
1579
1509
  });
1580
1510
  },
1581
- [database],
1511
+ [database]
1582
1512
  );
1583
1513
 
1584
1514
  const savePreset = useCallback(async () => {
@@ -1652,12 +1582,7 @@ export default function HalftoneArtStudio() {
1652
1582
  const scene = new THREE.Scene();
1653
1583
  scene.background = new THREE.Color(0x242424);
1654
1584
 
1655
- const camera = new THREE.PerspectiveCamera(
1656
- 75,
1657
- window.innerWidth / window.innerHeight,
1658
- 1,
1659
- 1000,
1660
- );
1585
+ const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 1000);
1661
1586
  camera.position.z = 12;
1662
1587
 
1663
1588
  const renderer = new THREE.WebGLRenderer({
@@ -1785,8 +1710,7 @@ export default function HalftoneArtStudio() {
1785
1710
  ];
1786
1711
 
1787
1712
  for (let i = 0; i < parameters.objectCount; i++) {
1788
- const geometry =
1789
- geometries[Math.floor(Math.random() * geometries.length)];
1713
+ const geometry = geometries[Math.floor(Math.random() * geometries.length)];
1790
1714
  const basicMaterial = new THREE.MeshPhongMaterial({
1791
1715
  color: colors[Math.floor(Math.random() * colors.length)],
1792
1716
  shininess: 100,
@@ -1794,22 +1718,11 @@ export default function HalftoneArtStudio() {
1794
1718
  opacity: 0.8 + Math.random() * 0.2,
1795
1719
  });
1796
1720
 
1797
- const mesh = new THREE.Mesh(
1798
- geometry,
1799
- Math.random() > 0.3 ? basicMaterial : material,
1800
- );
1721
+ const mesh = new THREE.Mesh(geometry, Math.random() > 0.3 ? basicMaterial : material);
1801
1722
 
1802
- mesh.position.set(
1803
- (Math.random() - 0.5) * 20,
1804
- (Math.random() - 0.5) * 20,
1805
- (Math.random() - 0.5) * 20,
1806
- );
1723
+ mesh.position.set((Math.random() - 0.5) * 20, (Math.random() - 0.5) * 20, (Math.random() - 0.5) * 20);
1807
1724
 
1808
- mesh.rotation.set(
1809
- Math.random() * Math.PI * 2,
1810
- Math.random() * Math.PI * 2,
1811
- Math.random() * Math.PI * 2,
1812
- );
1725
+ mesh.rotation.set(Math.random() * Math.PI * 2, Math.random() * Math.PI * 2, Math.random() * Math.PI * 2);
1813
1726
 
1814
1727
  mesh.scale.setScalar(0.5 + Math.random() * 1.5);
1815
1728
 
@@ -1878,12 +1791,8 @@ export default function HalftoneArtStudio() {
1878
1791
  }
1879
1792
  }, [parameters]);
1880
1793
 
1881
- const shapeName =
1882
- ["", "Dot", "Ellipse", "Line", "Square"][parameters.shape] || "Dot";
1883
- const blendModeName =
1884
- ["", "Linear", "Multiply", "Add", "Lighter", "Darker"][
1885
- parameters.blendingMode
1886
- ] || "Linear";
1794
+ const shapeName = ["", "Dot", "Ellipse", "Line", "Square"][parameters.shape] || "Dot";
1795
+ const blendModeName = ["", "Linear", "Multiply", "Add", "Lighter", "Darker"][parameters.blendingMode] || "Linear";
1887
1796
  const actionNames = {
1888
1797
  "before-randomize": "🎲 Before Random",
1889
1798
  randomized: "✨ Randomized",
@@ -1907,9 +1816,7 @@ export default function HalftoneArtStudio() {
1907
1816
  <div
1908
1817
  className={`absolute top-4 left-4 max-h-[calc(100vh-2rem)] overflow-y-auto rounded-lg border-4 border-[#242424] bg-[#ffffff] p-4 shadow-lg transition-all duration-300 ${showParameters ? "w-80" : "w-64"}`}
1909
1818
  >
1910
- <h2 className="mb-4 text-lg font-bold text-[#242424]">
1911
- RGB Halftone Studio
1912
- </h2>
1819
+ <h2 className="mb-4 text-lg font-bold text-[#242424]">RGB Halftone Studio</h2>
1913
1820
 
1914
1821
  {/* Always visible controls */}
1915
1822
  <div className="mb-4 space-y-3">
@@ -1934,9 +1841,7 @@ export default function HalftoneArtStudio() {
1934
1841
  <div className="space-y-4">
1935
1842
  {/* Shape Controls */}
1936
1843
  <div>
1937
- <label className="mb-2 block text-sm font-bold text-[#242424]">
1938
- Shape: {shapeName}
1939
- </label>
1844
+ <label className="mb-2 block text-sm font-bold text-[#242424]">Shape: {shapeName}</label>
1940
1845
  <select
1941
1846
  value={parameters.shape}
1942
1847
  onChange={(e) =>
@@ -1956,9 +1861,7 @@ export default function HalftoneArtStudio() {
1956
1861
 
1957
1862
  {/* Size Controls */}
1958
1863
  <div>
1959
- <label className="mb-2 block text-sm font-bold text-[#242424]">
1960
- Size: {parameters.radius.toFixed(1)}
1961
- </label>
1864
+ <label className="mb-2 block text-sm font-bold text-[#242424]">Size: {parameters.radius.toFixed(1)}</label>
1962
1865
  <input
1963
1866
  type="range"
1964
1867
  min="1"
@@ -1978,9 +1881,7 @@ export default function HalftoneArtStudio() {
1978
1881
  {/* Color Rotation */}
1979
1882
  <div className="grid grid-cols-3 gap-2">
1980
1883
  <div>
1981
- <label className="mb-1 block text-xs font-bold text-[#ff70a6]">
1982
- Red: {parameters.rotateR.toFixed(0)}°
1983
- </label>
1884
+ <label className="mb-1 block text-xs font-bold text-[#ff70a6]">Red: {parameters.rotateR.toFixed(0)}°</label>
1984
1885
  <input
1985
1886
  type="range"
1986
1887
  min="0"
@@ -1996,9 +1897,7 @@ export default function HalftoneArtStudio() {
1996
1897
  />
1997
1898
  </div>
1998
1899
  <div>
1999
- <label className="mb-1 block text-xs font-bold text-[#e9ff70]">
2000
- Green: {parameters.rotateG.toFixed(0)}°
2001
- </label>
1900
+ <label className="mb-1 block text-xs font-bold text-[#e9ff70]">Green: {parameters.rotateG.toFixed(0)}°</label>
2002
1901
  <input
2003
1902
  type="range"
2004
1903
  min="0"
@@ -2014,9 +1913,7 @@ export default function HalftoneArtStudio() {
2014
1913
  />
2015
1914
  </div>
2016
1915
  <div>
2017
- <label className="mb-1 block text-xs font-bold text-[#70d6ff]">
2018
- Blue: {parameters.rotateB.toFixed(0)}°
2019
- </label>
1916
+ <label className="mb-1 block text-xs font-bold text-[#70d6ff]">Blue: {parameters.rotateB.toFixed(0)}°</label>
2020
1917
  <input
2021
1918
  type="range"
2022
1919
  min="0"
@@ -2075,9 +1972,7 @@ export default function HalftoneArtStudio() {
2075
1972
  </div>
2076
1973
 
2077
1974
  <div>
2078
- <label className="mb-2 block text-sm font-bold text-[#242424]">
2079
- Blend Mode: {blendModeName}
2080
- </label>
1975
+ <label className="mb-2 block text-sm font-bold text-[#242424]">Blend Mode: {blendModeName}</label>
2081
1976
  <select
2082
1977
  value={parameters.blendingMode}
2083
1978
  onChange={(e) =>
@@ -2110,9 +2005,7 @@ export default function HalftoneArtStudio() {
2110
2005
  }
2111
2006
  className="mr-2"
2112
2007
  />
2113
- <span className="text-sm font-bold text-[#242424]">
2114
- Greyscale
2115
- </span>
2008
+ <span className="text-sm font-bold text-[#242424]">Greyscale</span>
2116
2009
  </label>
2117
2010
 
2118
2011
  <label className="flex items-center">
@@ -2127,9 +2020,7 @@ export default function HalftoneArtStudio() {
2127
2020
  }
2128
2021
  className="mr-2"
2129
2022
  />
2130
- <span className="text-sm font-bold text-[#242424]">
2131
- Disable Effect
2132
- </span>
2023
+ <span className="text-sm font-bold text-[#242424]">Disable Effect</span>
2133
2024
  </label>
2134
2025
  </div>
2135
2026
 
@@ -2154,9 +2045,7 @@ export default function HalftoneArtStudio() {
2154
2045
  {/* Saved Presets */}
2155
2046
  {presets.length > 0 && (
2156
2047
  <div>
2157
- <h4 className="mb-2 text-sm font-bold text-[#242424]">
2158
- 💾 Saved Presets
2159
- </h4>
2048
+ <h4 className="mb-2 text-sm font-bold text-[#242424]">💾 Saved Presets</h4>
2160
2049
  <div className="max-h-32 space-y-2 overflow-y-auto">
2161
2050
  {presets
2162
2051
  .sort((a, b) => b.timestamp - a.timestamp)
@@ -2170,16 +2059,10 @@ export default function HalftoneArtStudio() {
2170
2059
  }`}
2171
2060
  onClick={() => loadPreset(preset)}
2172
2061
  >
2173
- <div className="text-xs font-bold text-[#242424]">
2174
- {preset.name}
2175
- </div>
2062
+ <div className="text-xs font-bold text-[#242424]">{preset.name}</div>
2176
2063
  <div className="text-xs text-[#242424] opacity-75">
2177
- {
2178
- ["", "Dot", "Ellipse", "Line", "Square"][
2179
- preset.parameters.shape
2180
- ]
2181
- }{" "}
2182
- • {preset.parameters.greyscale ? "B&W" : "Color"}
2064
+ {["", "Dot", "Ellipse", "Line", "Square"][preset.parameters.shape]} •{" "}
2065
+ {preset.parameters.greyscale ? "B&W" : "Color"}
2183
2066
  </div>
2184
2067
  </div>
2185
2068
  ))}
@@ -2190,9 +2073,7 @@ export default function HalftoneArtStudio() {
2190
2073
  {/* Parameter History */}
2191
2074
  {parameterHistory.length > 0 && (
2192
2075
  <div>
2193
- <h4 className="mb-2 text-sm font-bold text-[#242424]">
2194
- 📜 Parameter History
2195
- </h4>
2076
+ <h4 className="mb-2 text-sm font-bold text-[#242424]">📜 Parameter History</h4>
2196
2077
  <div className="max-h-40 space-y-2 overflow-y-auto">
2197
2078
  {parameterHistory
2198
2079
  .sort((a, b) => b.timestamp - a.timestamp)
@@ -2203,21 +2084,12 @@ export default function HalftoneArtStudio() {
2203
2084
  className="cursor-pointer rounded border-2 border-[#242424] p-2 transition-colors hover:bg-[#e9ff70]"
2204
2085
  onClick={() => loadParameterState(state)}
2205
2086
  >
2206
- <div className="text-xs font-bold text-[#242424]">
2207
- {actionNames[state.action] || "⚙️ Unknown"}
2208
- </div>
2087
+ <div className="text-xs font-bold text-[#242424]">{actionNames[state.action] || "⚙️ Unknown"}</div>
2209
2088
  <div className="text-xs text-[#242424] opacity-75">
2210
- {
2211
- ["", "Dot", "Ellipse", "Line", "Square"][
2212
- state.parameters.shape
2213
- ]
2214
- }{" "}
2215
- • Size: {state.parameters.radius.toFixed(1)} •{" "}
2216
- {state.parameters.greyscale ? "B&W" : "Color"}
2217
- </div>
2218
- <div className="text-xs text-[#242424] opacity-50">
2219
- {new Date(state.timestamp).toLocaleTimeString()}
2089
+ {["", "Dot", "Ellipse", "Line", "Square"][state.parameters.shape]} • Size:{" "}
2090
+ {state.parameters.radius.toFixed(1)} {state.parameters.greyscale ? "B&W" : "Color"}
2220
2091
  </div>
2092
+ <div className="text-xs text-[#242424] opacity-50">{new Date(state.timestamp).toLocaleTimeString()}</div>
2221
2093
  </div>
2222
2094
  ))}
2223
2095
  </div>
@@ -0,0 +1,16 @@
1
+ import { CoerceURI, Result } from "@adviser/cement";
2
+ import { joinUrlParts } from "call-ai";
3
+
4
+ export async function loadDocs(localPath: string, baseUrl: CoerceURI): Promise<Result<string>> {
5
+ const url = joinUrlParts(baseUrl?.toString() || "", localPath);
6
+ try {
7
+ const response = await fetch(url);
8
+ if (!response.ok) {
9
+ return Result.Err(`Failed to fetch ${url}: ${response.status} ${response.statusText}`);
10
+ }
11
+ const text = await response.text();
12
+ return Result.Ok(text);
13
+ } catch (error) {
14
+ return Result.Err(`Error fetching ${url}: ${error}`);
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/prompts",
3
- "version": "0.19.6-dev",
3
+ "version": "0.19.14-dev-cli",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "keywords": [
@@ -18,10 +18,15 @@
18
18
  ],
19
19
  "license": "Apache-2.0",
20
20
  "dependencies": {
21
- "@adviser/cement": "0.5.5",
22
- "@fireproof/core-types-base": "0.24.2-dev-clerk",
23
- "@vibes.diy/use-vibes-types": "^0.19.6-dev",
24
- "call-ai": "^0.19.6-dev"
21
+ "@adviser/cement": "~0.5.32",
22
+ "@fireproof/core": "~0.24.12",
23
+ "@fireproof/core-keybag": "~0.24.12",
24
+ "@fireproof/core-runtime": "~0.24.12",
25
+ "@fireproof/core-types-base": "~0.24.12",
26
+ "@fireproof/core-types-protocols-cloud": "~0.24.12",
27
+ "@fireproof/use-fireproof": "~0.24.12",
28
+ "@vibes.diy/call-ai-v2": "^0.19.14-dev-cli",
29
+ "@vibes.diy/use-vibes-types": "^0.19.14-dev-cli"
25
30
  },
26
31
  "peerDependencies": {
27
32
  "react": ">=19.1.0"
package/prompts.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Mocks } from "call-ai";
2
1
  import type { UserSettings } from "./settings.js";
3
- import { CoerceURI } from "@adviser/cement";
2
+ import { Result } from "@adviser/cement";
4
3
  import { LlmCatalogEntry } from "./json-docs.js";
4
+ import { ChatMessage } from "@vibes.diy/call-ai-v2";
5
5
  export declare const DEFAULT_CODING_MODEL: "anthropic/claude-opus-4.5";
6
6
  export declare function normalizeModelId(id: unknown): string | undefined;
7
7
  export declare function isPermittedModelId(id: unknown): id is string;
@@ -19,10 +19,10 @@ export interface SystemPromptResult {
19
19
  }
20
20
  interface LlmSelectionOptions {
21
21
  readonly appMode?: "test" | "production";
22
- readonly callAiEndpoint?: CoerceURI;
23
- readonly fallBackUrl?: CoerceURI;
24
- readonly getAuthToken?: () => Promise<string>;
25
- readonly mock?: Mocks;
22
+ fetch?: typeof fetch;
23
+ readonly callAi: {
24
+ ModuleAndOptionsSelection(msgs: ChatMessage[]): Promise<Result<string>>;
25
+ };
26
26
  }
27
27
  export declare function generateImportStatements(llms: LlmCatalogEntry[]): string;
28
28
  export declare function makeBaseSystemPrompt(model: string, sessionDoc: Partial<UserSettings> & LlmSelectionOptions): Promise<SystemPromptResult>;