@shopify/klint 0.3.0 → 0.4.0
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/README.md +86 -62
- package/dist/{Klint-CsVzll4n.d.cts → Klint-DqYL-aGU.d.cts} +204 -332
- package/dist/{Klint-CsVzll4n.d.ts → Klint-DqYL-aGU.d.ts} +204 -332
- package/dist/index.cjs +872 -1184
- package/dist/index.d.cts +3 -29
- package/dist/index.d.ts +3 -29
- package/dist/index.js +868 -1184
- package/dist/plugins/index.cjs +606 -466
- package/dist/plugins/index.d.cts +440 -154
- package/dist/plugins/index.d.ts +440 -154
- package/dist/plugins/index.js +593 -466
- package/package.json +1 -1
- package/dist/chunk-3RG5ZIWI.js +0 -10
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as KlintContext, a as KlintCanvasOptions
|
|
2
|
-
export { C as CONFIG_PROPS,
|
|
1
|
+
import { K as KlintContext, a as KlintCanvasOptions } from './Klint-DqYL-aGU.cjs';
|
|
2
|
+
export { C as CONFIG_PROPS, b as Color, c as CurveVertex, E as EPSILON, d as Easing, G as Grid, H as Hotspot, e as Klint, f as KlintConfig, g as KlintContextWrapper, h as KlintContexts, i as KlintCoreFunctions, j as KlintElements, k as KlintFunctions, l as KlintOffscreenContext, m as KlintProps, N as Noise, P as Pixels, Q as Quadtree, n as QuadtreePoint, R as Rectangle, S as Strip, T as Text, o as Timeline, V as Vector } from './Klint-DqYL-aGU.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
interface KlintMouse {
|
|
@@ -100,32 +100,6 @@ declare function useKlint(): {
|
|
|
100
100
|
hasImage: (key: string) => boolean;
|
|
101
101
|
clearImages: () => void;
|
|
102
102
|
};
|
|
103
|
-
KlintTimeline: () => {
|
|
104
|
-
Timeline: {
|
|
105
|
-
create: <T extends Record<string, any>>(setup: (timeline: any) => T, options?: {
|
|
106
|
-
defaultEasing?: (t: number) => number;
|
|
107
|
-
defaultLoop?: number;
|
|
108
|
-
}) => T & {
|
|
109
|
-
update: (progress: number) => void;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
onStart: (fn: () => void) => number;
|
|
113
|
-
onEnd: (fn: () => void) => number;
|
|
114
|
-
onLoop: (fn: () => void) => number;
|
|
115
|
-
};
|
|
116
|
-
KlintPerformance: () => {
|
|
117
|
-
metrics: {
|
|
118
|
-
fps: number;
|
|
119
|
-
frameTime: number;
|
|
120
|
-
averageFrameTime: number;
|
|
121
|
-
minFrameTime: number;
|
|
122
|
-
maxFrameTime: number;
|
|
123
|
-
droppedFrames: number;
|
|
124
|
-
memoryUsage?: number;
|
|
125
|
-
} | null;
|
|
126
|
-
getMetrics: () => KlintPerformanceMetrics | null;
|
|
127
|
-
reset: () => void;
|
|
128
|
-
};
|
|
129
103
|
togglePlay: (playing?: boolean) => void;
|
|
130
104
|
useDev: () => void;
|
|
131
105
|
};
|
|
@@ -142,4 +116,4 @@ declare const useStorage: <T extends object = Record<string, unknown>>(initialPr
|
|
|
142
116
|
store: T;
|
|
143
117
|
};
|
|
144
118
|
|
|
145
|
-
export { KlintCanvasOptions, KlintContext, type KlintMouse,
|
|
119
|
+
export { KlintCanvasOptions, KlintContext, type KlintMouse, type KlintScroll, useKlint, useProps, useStorage };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as KlintContext, a as KlintCanvasOptions
|
|
2
|
-
export { C as CONFIG_PROPS,
|
|
1
|
+
import { K as KlintContext, a as KlintCanvasOptions } from './Klint-DqYL-aGU.js';
|
|
2
|
+
export { C as CONFIG_PROPS, b as Color, c as CurveVertex, E as EPSILON, d as Easing, G as Grid, H as Hotspot, e as Klint, f as KlintConfig, g as KlintContextWrapper, h as KlintContexts, i as KlintCoreFunctions, j as KlintElements, k as KlintFunctions, l as KlintOffscreenContext, m as KlintProps, N as Noise, P as Pixels, Q as Quadtree, n as QuadtreePoint, R as Rectangle, S as Strip, T as Text, o as Timeline, V as Vector } from './Klint-DqYL-aGU.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
5
|
interface KlintMouse {
|
|
@@ -100,32 +100,6 @@ declare function useKlint(): {
|
|
|
100
100
|
hasImage: (key: string) => boolean;
|
|
101
101
|
clearImages: () => void;
|
|
102
102
|
};
|
|
103
|
-
KlintTimeline: () => {
|
|
104
|
-
Timeline: {
|
|
105
|
-
create: <T extends Record<string, any>>(setup: (timeline: any) => T, options?: {
|
|
106
|
-
defaultEasing?: (t: number) => number;
|
|
107
|
-
defaultLoop?: number;
|
|
108
|
-
}) => T & {
|
|
109
|
-
update: (progress: number) => void;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
onStart: (fn: () => void) => number;
|
|
113
|
-
onEnd: (fn: () => void) => number;
|
|
114
|
-
onLoop: (fn: () => void) => number;
|
|
115
|
-
};
|
|
116
|
-
KlintPerformance: () => {
|
|
117
|
-
metrics: {
|
|
118
|
-
fps: number;
|
|
119
|
-
frameTime: number;
|
|
120
|
-
averageFrameTime: number;
|
|
121
|
-
minFrameTime: number;
|
|
122
|
-
maxFrameTime: number;
|
|
123
|
-
droppedFrames: number;
|
|
124
|
-
memoryUsage?: number;
|
|
125
|
-
} | null;
|
|
126
|
-
getMetrics: () => KlintPerformanceMetrics | null;
|
|
127
|
-
reset: () => void;
|
|
128
|
-
};
|
|
129
103
|
togglePlay: (playing?: boolean) => void;
|
|
130
104
|
useDev: () => void;
|
|
131
105
|
};
|
|
@@ -142,4 +116,4 @@ declare const useStorage: <T extends object = Record<string, unknown>>(initialPr
|
|
|
142
116
|
store: T;
|
|
143
117
|
};
|
|
144
118
|
|
|
145
|
-
export { KlintCanvasOptions, KlintContext, type KlintMouse,
|
|
119
|
+
export { KlintCanvasOptions, KlintContext, type KlintMouse, type KlintScroll, useKlint, useProps, useStorage };
|