@dfosco/storyboard-core 3.1.1 → 3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfosco/storyboard-core",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
"./styles/tailwind.css": "./dist/tailwind.css"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
+
"@lucide/svelte": "^1.7.0",
|
|
40
41
|
"@primer/octicons": "^19.22.0",
|
|
41
42
|
"bits-ui": "^2.16.4",
|
|
42
43
|
"clsx": "^2.1.1",
|
|
43
44
|
"feather-icons": "^4.29.2",
|
|
44
45
|
"iconoir": "^7.11.0",
|
|
45
46
|
"jsonc-parser": "^3.3.1",
|
|
46
|
-
"
|
|
47
|
+
"marked": "^17.0.5",
|
|
47
48
|
"tailwind-merge": "^3.5.0",
|
|
48
49
|
"tailwind-variants": "^3.2.2"
|
|
49
50
|
},
|
|
@@ -12,11 +12,15 @@
|
|
|
12
12
|
<script module>
|
|
13
13
|
import { cn } from "../../../utils/index.js";
|
|
14
14
|
|
|
15
|
-
// Register CSS Houdini paint worklet for superellipse masks
|
|
15
|
+
// Register CSS Houdini paint worklet for superellipse masks.
|
|
16
|
+
// Inlined from smooth-corners (MIT) to avoid Vite-specific ?url import
|
|
17
|
+
// that breaks when this source is consumed from node_modules.
|
|
16
18
|
if (typeof CSS !== 'undefined' && 'paintWorklet' in CSS) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
try {
|
|
20
|
+
const worklet = `class P{static get inputProperties(){return["--smooth-corners"]}superellipse(a,b,nX=4,nY){if(Number.isNaN(nX))nX=4;if(typeof nY==="undefined"||Number.isNaN(nY))nY=nX;if(nX>100)nX=100;if(nY>100)nY=100;if(nX<1e-11)nX=1e-11;if(nY<1e-11)nY=1e-11;const nX2=2/nX,nY2=nY?2/nY:nX2,steps=360,step=(2*Math.PI)/steps;return Array.from({length:steps},(_,i)=>{const t=i*step,cosT=Math.cos(t),sinT=Math.sin(t);return{x:Math.abs(cosT)**nX2*a*Math.sign(cosT),y:Math.abs(sinT)**nY2*b*Math.sign(sinT)}})}paint(ctx,geom,props){const[nX,nY]=props.get("--smooth-corners").toString().replace(/ /g,"").split(",");const w=geom.width/2,h=geom.height/2,s=this.superellipse(w,h,parseFloat(nX),parseFloat(nY));ctx.fillStyle="#000";ctx.setTransform(1,0,0,1,w,h);ctx.beginPath();for(let i=0;i<s.length;i++){const{x,y}=s[i];i===0?ctx.moveTo(x,y):ctx.lineTo(x,y)}ctx.closePath();ctx.fill()}}registerPaint("smooth-corners",P);`;
|
|
21
|
+
const blob = new Blob([worklet], { type: 'application/javascript' });
|
|
22
|
+
CSS.paintWorklet.addModule(URL.createObjectURL(blob));
|
|
23
|
+
} catch {}
|
|
20
24
|
}
|
|
21
25
|
</script>
|
|
22
26
|
|