@digo-labs/ui 0.1.20 → 0.1.21
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/dist/aws/aws-block-group.d.ts +1 -0
- package/dist/aws/aws-pattern.d.ts +11 -0
- package/dist/aws/aws-texture.d.ts +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6269 -5665
- package/dist/index.js.map +1 -1
- package/dist/other/animations.d.ts +4 -0
- package/dist/styles/aws-pattern.d.ts +37 -0
- package/dist/styles/aws-texture.d.ts +45 -0
- package/dist/styles/index.d.ts +2 -0
- package/dist/utils/aws/aws-texture-helpers.d.ts +44 -0
- package/dist/utils/aws/aws-texture-nodes.d.ts +40 -0
- package/dist/utils/brick-grid-helpers.d.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const awsPattern: import('tailwind-variants').TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
4
|
+
root?: import('tailwind-variants').ClassValue;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
} | {
|
|
8
|
+
[x: string]: {
|
|
9
|
+
[x: string]: import('tailwind-variants').ClassValue | {
|
|
10
|
+
root?: import('tailwind-variants').ClassValue;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
} | {}, {
|
|
14
|
+
root: string;
|
|
15
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<unknown, {
|
|
16
|
+
[key: string]: {
|
|
17
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
18
|
+
root?: import('tailwind-variants').ClassValue;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} | {}>, {
|
|
22
|
+
[key: string]: {
|
|
23
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
24
|
+
root?: import('tailwind-variants').ClassValue;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
} | {}, {
|
|
28
|
+
root: string;
|
|
29
|
+
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
30
|
+
root: string;
|
|
31
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<unknown, {
|
|
32
|
+
[key: string]: {
|
|
33
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
34
|
+
root?: import('tailwind-variants').ClassValue;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const awsTexture: import('tailwind-variants').TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
4
|
+
root?: import('tailwind-variants').ClassValue;
|
|
5
|
+
canvas?: import('tailwind-variants').ClassValue;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
} | {
|
|
9
|
+
[x: string]: {
|
|
10
|
+
[x: string]: import('tailwind-variants').ClassValue | {
|
|
11
|
+
root?: import('tailwind-variants').ClassValue;
|
|
12
|
+
canvas?: import('tailwind-variants').ClassValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | {}, {
|
|
16
|
+
root: string;
|
|
17
|
+
canvas: string;
|
|
18
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<unknown, {
|
|
19
|
+
[key: string]: {
|
|
20
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
21
|
+
root?: import('tailwind-variants').ClassValue;
|
|
22
|
+
canvas?: import('tailwind-variants').ClassValue;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
} | {}>, {
|
|
26
|
+
[key: string]: {
|
|
27
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
28
|
+
root?: import('tailwind-variants').ClassValue;
|
|
29
|
+
canvas?: import('tailwind-variants').ClassValue;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
} | {}, {
|
|
33
|
+
root: string;
|
|
34
|
+
canvas: string;
|
|
35
|
+
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
36
|
+
root: string;
|
|
37
|
+
canvas: string;
|
|
38
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<unknown, {
|
|
39
|
+
[key: string]: {
|
|
40
|
+
[key: string]: import('tailwind-variants').ClassValue | {
|
|
41
|
+
root?: import('tailwind-variants').ClassValue;
|
|
42
|
+
canvas?: import('tailwind-variants').ClassValue;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
} | {}>, unknown, unknown, undefined>>;
|
package/dist/styles/index.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ export * from './autocomplete';
|
|
|
5
5
|
export * from './avatar';
|
|
6
6
|
export * from './aws-block';
|
|
7
7
|
export * from './aws-block-group';
|
|
8
|
+
export * from './aws-pattern';
|
|
8
9
|
export * from './aws-shape';
|
|
10
|
+
export * from './aws-texture';
|
|
9
11
|
export * from './badge';
|
|
10
12
|
export * from './breadcrumb';
|
|
11
13
|
export * from './breadcrumb-nav';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AwsPaletteColor, Bounds, Position, Size } from '@digo-labs/common';
|
|
2
|
+
import { CanvasTexture, DataTexture, RenderTarget, Texture, TypedArray, Vector3, VideoTexture } from 'three';
|
|
3
|
+
import { AwsTextureFlow, AwsTextureLayerNodes } from './aws-texture-nodes';
|
|
4
|
+
export interface AwsTextureGrid {
|
|
5
|
+
cols: number;
|
|
6
|
+
rows: number;
|
|
7
|
+
cell: number;
|
|
8
|
+
offset: Position;
|
|
9
|
+
}
|
|
10
|
+
export interface AwsTextureLayer {
|
|
11
|
+
key: number;
|
|
12
|
+
grid: AwsTextureGrid;
|
|
13
|
+
cells: Uint8Array;
|
|
14
|
+
texture: DataTexture;
|
|
15
|
+
nodes: AwsTextureLayerNodes;
|
|
16
|
+
builtAt: number;
|
|
17
|
+
unbuiltAt: number;
|
|
18
|
+
isSampled: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class AwsTextureHelpers {
|
|
21
|
+
static getGrid(size: Size, cell: number): AwsTextureGrid;
|
|
22
|
+
static getBounds(image: Size, grid: AwsTextureGrid): Bounds;
|
|
23
|
+
static getDistance(size: Vector3, aspect: number, fov: number): number;
|
|
24
|
+
static isVideo(source: string): boolean;
|
|
25
|
+
static createVideo(source: string): HTMLVideoElement;
|
|
26
|
+
static createVideoTexture(video: HTMLVideoElement): VideoTexture;
|
|
27
|
+
static createRenderTarget(width: number, height: number): RenderTarget;
|
|
28
|
+
static unpackReadback(data: TypedArray, cols: number, rows: number, isBottomUp: boolean): Uint8Array;
|
|
29
|
+
static loadImage(source: string): Promise<HTMLImageElement>;
|
|
30
|
+
static createSampler(): CanvasRenderingContext2D | null;
|
|
31
|
+
static samplePixels(sampler: CanvasRenderingContext2D, image: CanvasImageSource, bounds: Bounds, grid: AwsTextureGrid): Uint8ClampedArray;
|
|
32
|
+
static createLayer(grid: AwsTextureGrid, palette: Texture, atlas: Texture, flow: AwsTextureFlow, key: number): AwsTextureLayer;
|
|
33
|
+
static placeLayer(layer: AwsTextureLayer, grid: AwsTextureGrid, key: number): void;
|
|
34
|
+
static spanLayer(layer: AwsTextureLayer): void;
|
|
35
|
+
static timeLayer(layer: AwsTextureLayer, builtAt: number, unbuiltAt: number): void;
|
|
36
|
+
static isGone(layer: AwsTextureLayer, now: number, sweep: number, grow: number): boolean;
|
|
37
|
+
static disposeLayer(layer: AwsTextureLayer): void;
|
|
38
|
+
static createSourceTexture(image: HTMLImageElement): Texture;
|
|
39
|
+
static createDataTexture(data: Uint8Array, cols: number, rows: number): DataTexture;
|
|
40
|
+
static createPaletteTexture(tones: AwsPaletteColor[]): DataTexture;
|
|
41
|
+
static createAtlasTexture(): CanvasTexture;
|
|
42
|
+
private static toByte;
|
|
43
|
+
private static writeColor;
|
|
44
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { MeshBasicNodeMaterial, TextureNode, UniformNode } from 'three/webgpu';
|
|
2
|
+
import { Vector2, Vector4, Texture } from 'three';
|
|
3
|
+
import { ShaderNodeObject } from 'three/tsl';
|
|
4
|
+
type Uniform<T> = ShaderNodeObject<UniformNode<T>>;
|
|
5
|
+
export declare const AWS_TEXTURE_ATLAS_COLUMNS = 4;
|
|
6
|
+
export interface AwsTextureFlow {
|
|
7
|
+
axis: Uniform<number>;
|
|
8
|
+
flip: Uniform<number>;
|
|
9
|
+
show: Uniform<number>;
|
|
10
|
+
now: Uniform<number>;
|
|
11
|
+
sweep: Uniform<number>;
|
|
12
|
+
grow: Uniform<number>;
|
|
13
|
+
}
|
|
14
|
+
export interface AwsTextureLayerNodes {
|
|
15
|
+
material: MeshBasicNodeMaterial;
|
|
16
|
+
cells: TextureNode;
|
|
17
|
+
palette: TextureNode[];
|
|
18
|
+
cols: Uniform<number>;
|
|
19
|
+
rows: Uniform<number>;
|
|
20
|
+
tones: Uniform<number>;
|
|
21
|
+
cell: Uniform<number>;
|
|
22
|
+
offset: Uniform<Vector2>;
|
|
23
|
+
span: Uniform<Vector4>;
|
|
24
|
+
builtAt: Uniform<number>;
|
|
25
|
+
unbuiltAt: Uniform<number>;
|
|
26
|
+
}
|
|
27
|
+
interface AwsTextureReveal {
|
|
28
|
+
material: MeshBasicNodeMaterial;
|
|
29
|
+
source: TextureNode;
|
|
30
|
+
bounds: Uniform<Vector4>;
|
|
31
|
+
flip: Uniform<number>;
|
|
32
|
+
}
|
|
33
|
+
export declare class AwsTextureNodes {
|
|
34
|
+
static createFlow(): AwsTextureFlow;
|
|
35
|
+
static createLayer(cellsTexture: Texture, paletteTexture: Texture, atlasTexture: Texture, flow: AwsTextureFlow): AwsTextureLayerNodes;
|
|
36
|
+
static createReveal(sourceTexture: Texture, flow: AwsTextureFlow): AwsTextureReveal;
|
|
37
|
+
static setTextures(nodes: AwsTextureLayerNodes, cells: Texture, palette: Texture): void;
|
|
38
|
+
private static getEased;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BrickGlyph, BrickColor, Position } from '@digo-labs/common';
|
|
1
|
+
import { BrickGlyph, BrickColor, Position, Random } from '@digo-labs/common';
|
|
2
2
|
import { BrickOrigin } from '../effects/brick';
|
|
3
3
|
import { BrickGridWave } from '../effects/brick-grid';
|
|
4
|
-
export type BrickRandom =
|
|
4
|
+
export type BrickRandom = Random;
|
|
5
5
|
export interface GridBrick {
|
|
6
6
|
id: number;
|
|
7
7
|
col: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digo-labs/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"preview": "vite preview"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@digo-labs/common": "^0.1.
|
|
38
|
+
"@digo-labs/common": "^0.1.21",
|
|
39
39
|
"react": "^19.0.0",
|
|
40
40
|
"react-dom": "^19.0.0",
|
|
41
41
|
"tailwindcss": "^4.1.4"
|