@octanejs/animejs 0.0.13 → 0.0.15

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/package.json +4 -4
  2. package/src/internal.ts +2 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/animejs",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -49,7 +49,7 @@
49
49
  "peerDependencies": {
50
50
  "@types/three": ">=0.156.0",
51
51
  "three": ">=0.156.0",
52
- "octane": "0.1.43"
52
+ "octane": "0.1.45"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@types/three": {
@@ -63,8 +63,8 @@
63
63
  "@types/three": "0.172.0",
64
64
  "three": "0.172.0",
65
65
  "vitest": "^4.1.10",
66
- "@octanejs/three": "0.1.36",
67
- "octane": "0.1.43"
66
+ "@octanejs/three": "0.1.38",
67
+ "octane": "0.1.45"
68
68
  },
69
69
  "scripts": {
70
70
  "test": "vitest run --root ../.. --config vitest.config.js --project animejs --project animejs-ssr",
package/src/internal.ts CHANGED
@@ -1,4 +1,4 @@
1
- const subSlotCache = new Map<symbol, Map<string, symbol>>();
1
+ import { createSubSlot } from 'octane';
2
2
 
3
3
  export function splitSlot<T>(args: T[]): [T[], symbol | undefined] {
4
4
  const tail = args[args.length - 1];
@@ -6,17 +6,4 @@ export function splitSlot<T>(args: T[]): [T[], symbol | undefined] {
6
6
  return [slot === undefined ? args : args.slice(0, -1), slot];
7
7
  }
8
8
 
9
- export function subSlot(slot: symbol | undefined, tag: string): symbol | undefined {
10
- if (slot === undefined) return undefined;
11
- let slots = subSlotCache.get(slot);
12
- if (slots === undefined) {
13
- slots = new Map();
14
- subSlotCache.set(slot, slots);
15
- }
16
- let child = slots.get(tag);
17
- if (child === undefined) {
18
- child = Symbol.for(`${slot.description ?? ''}:animejs:${tag}`);
19
- slots.set(tag, child);
20
- }
21
- return child;
22
- }
9
+ export const subSlot = createSubSlot({ tagPrefix: ':animejs:' });