familiar-vue 0.1.0 → 0.2.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 +8 -3
- package/dist/blocks/bots/engine/plastic.d.ts +5 -0
- package/dist/blocks/bots/engine/types.d.ts +5 -3
- package/dist/blocks/bots/types-1.d.ts +2 -2
- package/dist/blocks/bots/types.d.ts +2 -2
- package/dist/blocks/gallery/GalleryGrid.vue.d.ts +46 -0
- package/dist/blocks/gallery/MusicPlayer.vue.d.ts +34 -0
- package/dist/blocks/gallery/VideoPlayer.vue.d.ts +34 -0
- package/dist/blocks/gallery/icons.d.ts +49 -0
- package/dist/blocks/gallery/index.d.ts +141 -0
- package/dist/blocks/gallery/styles.d.ts +1 -0
- package/dist/blocks/gallery/support.d.ts +38 -0
- package/dist/blocks/gallery/types.d.ts +132 -0
- package/dist/blocks/image/studio/ImageStudio.vue.d.ts +1 -1
- package/dist/blocks/jelly/JellySurface.vue.d.ts +43 -0
- package/dist/blocks/jelly/engine/color.d.ts +12 -0
- package/dist/blocks/jelly/engine/environment.d.ts +2 -0
- package/dist/blocks/jelly/engine/frosted.d.ts +25 -0
- package/dist/blocks/jelly/engine/geometry.d.ts +13 -0
- package/dist/blocks/jelly/engine/icons.d.ts +16 -0
- package/dist/blocks/jelly/engine/renderer.d.ts +39 -0
- package/dist/blocks/jelly/engine/sound.d.ts +9 -0
- package/dist/blocks/jelly/engine/textures.d.ts +5 -0
- package/dist/blocks/jelly/index.d.ts +23 -0
- package/dist/blocks/jelly/types.d.ts +68 -0
- package/dist/blocks/loading/BreathingRing.vue.d.ts +25 -0
- package/dist/blocks/loading/index.d.ts +54 -1
- package/dist/blocks/loading/types.d.ts +22 -0
- package/dist/blocks/metal/MetalBadge.vue.d.ts +2 -2
- package/dist/bots.cjs +1 -1
- package/dist/bots.js +1 -1
- package/dist/familiar-vue.css +1 -1
- package/dist/gallery.cjs +2 -0
- package/dist/gallery.cjs.map +1 -0
- package/dist/gallery.d.ts +1 -0
- package/dist/gallery.js +8 -0
- package/dist/gallery.js.map +1 -0
- package/dist/index-Bb3rhhZY.cjs +221 -0
- package/dist/index-Bb3rhhZY.cjs.map +1 -0
- package/dist/index-C96O9k0x.cjs +289 -0
- package/dist/index-C96O9k0x.cjs.map +1 -0
- package/dist/index-CgkG0Pah.js +2580 -0
- package/dist/index-CgkG0Pah.js.map +1 -0
- package/dist/index-CjA5aaxl.js +934 -0
- package/dist/index-CjA5aaxl.js.map +1 -0
- package/dist/index-CpPZg7s9.js +476 -0
- package/dist/index-CpPZg7s9.js.map +1 -0
- package/dist/{index-CQIOTNIw.js → index-Da5OgBHn.js} +1269 -1239
- package/dist/index-Da5OgBHn.js.map +1 -0
- package/dist/index-Dc4JnH_g.cjs +80 -0
- package/dist/index-Dc4JnH_g.cjs.map +1 -0
- package/dist/index-U59nAOr-.cjs +1096 -0
- package/dist/index-U59nAOr-.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +58 -49
- package/dist/index.js.map +1 -1
- package/dist/jelly.cjs +2 -0
- package/dist/jelly.cjs.map +1 -0
- package/dist/jelly.d.ts +2 -0
- package/dist/jelly.js +9 -0
- package/dist/jelly.js.map +1 -0
- package/dist/loading.cjs +1 -1
- package/dist/loading.js +4 -3
- package/package.json +11 -1
- package/dist/index-BAZi5af3.cjs +0 -221
- package/dist/index-BAZi5af3.cjs.map +0 -1
- package/dist/index-BmMsid7x.js +0 -422
- package/dist/index-BmMsid7x.js.map +0 -1
- package/dist/index-CQIOTNIw.js.map +0 -1
- package/dist/index-DZJ-MNwi.cjs +0 -80
- package/dist/index-DZJ-MNwi.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -11,13 +11,15 @@ import { BotAvatar, BotList } from 'familiar-vue/bots'
|
|
|
11
11
|
import { ThinkingOrb } from 'familiar-vue/orbs'
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The `image` and `jelly` families render with three.js, and `metal` uses a shader package. Install the one you import:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install three # familiar-vue/image
|
|
17
|
+
npm install three # familiar-vue/image, familiar-vue/jelly
|
|
18
18
|
npm install @paper-design/shaders # familiar-vue/metal
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
`JellySurface` shares one WebGL renderer across every instance on the page. It has two finishes: `clear` (default) is real `MeshPhysicalMaterial` transmission — bevel geometry, a PMREM studio environment, an aspect-correct refracted backing and a rim highlight — while `finish="frosted"` is the analytic SDF material with a soft-diffused pigment body, Snell dispersion, bevel caustic and studio rim tubes. The default slot or `label`/`icon` overlay stays real DOM inside a native button in both.
|
|
22
|
+
|
|
21
23
|
The `cards`, `text-stream` and `loading` families ship their styles as a stylesheet; import it once in your app entry. The other families inject their own styles at runtime.
|
|
22
24
|
|
|
23
25
|
```ts
|
|
@@ -40,9 +42,12 @@ import { BotAvatar } from 'familiar-vue/bots'
|
|
|
40
42
|
| --- | --- |
|
|
41
43
|
| `familiar-vue/bots` | `BotAvatar`, `BotList` |
|
|
42
44
|
| `familiar-vue/cards` | `CardDeck` |
|
|
45
|
+
| `familiar-vue/gallery` | `GalleryGrid`, `MusicPlayer`, `VideoPlayer` |
|
|
43
46
|
| `familiar-vue/gooey` | `Liquid`, `LiquidItem` |
|
|
44
47
|
| `familiar-vue/image` | `ImageStudio` |
|
|
45
48
|
| `familiar-vue/inputs` | `InputField` |
|
|
49
|
+
| `familiar-vue/jelly` | `JellySurface` |
|
|
50
|
+
| `familiar-vue/loading` | `Loading`, `BreathingRing`, `CloudLoading` |
|
|
46
51
|
| `familiar-vue/message-actions` | `MessageActions` |
|
|
47
52
|
| `familiar-vue/metal` | `MetalFx`, `MetalText`, `MetalBadge` |
|
|
48
53
|
| `familiar-vue/navigation` | `NavigationBar` |
|
|
@@ -119,7 +124,7 @@ import { ThemeReveal } from 'familiar-vue/theme-reveal'
|
|
|
119
124
|
|
|
120
125
|
`ThemeReveal` swaps a surface's palette inside a circle clipped to the surface's own snapshot, so the page around it never repaints. `origin` picks the pointer, centre or a corner; `direction` grows the incoming theme in or pulls the outgoing one out; `duration` and `easing` shape the circle. Bind `v-model:theme` to the current theme and write your palettes with `[data-theme]`; with reduced motion or no View Transitions, the swap is instant.
|
|
121
126
|
|
|
122
|
-
`vue` is a required peer dependency. `three` and `@paper-design/shaders` are optional peers: install them only if you import the image or metal family. The bots, cards, gooey, inputs, message-actions, navigation, orbs, panels, sliders, theme-reveal and toast-stack families have no runtime dependency beyond Vue.
|
|
127
|
+
`vue` is a required peer dependency. `three` and `@paper-design/shaders` are optional peers: install them only if you import the image, jelly or metal family. The bots, cards, gallery, gooey, inputs, message-actions, navigation, orbs, panels, sliders, theme-reveal and toast-stack families have no runtime dependency beyond Vue.
|
|
123
128
|
|
|
124
129
|
## License and attribution
|
|
125
130
|
|
|
@@ -258,6 +258,11 @@ export declare function buildMetalMatcap(out: Float32Array, c: V3, f: Frame, p:
|
|
|
258
258
|
inside a bright Fresnel rim, the key window and a hot spot on top. It
|
|
259
259
|
is drawn opaque here and laid over the page translucent by draw(). */
|
|
260
260
|
export declare function buildGlassMatcap(out: Float32Array, c: V3, f: Frame, p: Material): void;
|
|
261
|
+
/** Jelly: a thick acrylic gel — a saturated, near-opaque body with a
|
|
262
|
+
bright bevelled rim, a glow of its own colour suspended inside it, a
|
|
263
|
+
caustic gathered under the underside and a crisp window across the
|
|
264
|
+
crown. Drawn opaque; the slab reads as translucent through its depth. */
|
|
265
|
+
export declare function buildJellyMatcap(out: Float32Array, c: V3, f: Frame, p: Material): void;
|
|
261
266
|
/** Neon: an emissive shell — a deep, barely lit core in the body colour
|
|
262
267
|
and a tube's light along the rim, white-hot at the very edge. The side
|
|
263
268
|
toward the back light takes the colour's rotation (blue → pink,
|
|
@@ -25,10 +25,12 @@ export type BotAvatarSquashEase = 'sharp' | 'pulse' | 'soft' | 'bouncy';
|
|
|
25
25
|
* a clean edge round the front, vector-style. `smooth`: no edge, a soft
|
|
26
26
|
* shadow and highlight across the whole form. `flat`: the depth alone, no
|
|
27
27
|
* lighting. `metal`: liquid-style hard reflections over a dark chrome body.
|
|
28
|
-
* `glass`: a translucent, refractive volume with chromatic rims.
|
|
29
|
-
*
|
|
28
|
+
* `glass`: a translucent, refractive volume with chromatic rims.
|
|
29
|
+
* `jelly`: a thick acrylic gel — a saturated body under a bright bevelled
|
|
30
|
+
* rim, with a suspended glow and a crisp window. `neon`: an emissive
|
|
31
|
+
* cyberpunk body with a coloured halo and mosaic flicker.
|
|
30
32
|
*/
|
|
31
|
-
export type BotAvatarShading = 'crisp' | 'smooth' | 'plastic' | 'flat' | 'fabric' | 'metal' | 'glass' | 'neon';
|
|
33
|
+
export type BotAvatarShading = 'crisp' | 'smooth' | 'plastic' | 'flat' | 'fabric' | 'metal' | 'glass' | 'jelly' | 'neon';
|
|
32
34
|
/** Something to wear on the head. */
|
|
33
35
|
export type BotAvatarHat = 'none' | 'beret' | 'beanie' | 'party' | 'crown' | 'tophat' | 'wizard' | 'halo' | 'flower';
|
|
34
36
|
/** Something to wear over the eyes. */
|
|
@@ -54,8 +54,8 @@ export interface BotAvatarProps {
|
|
|
54
54
|
*/
|
|
55
55
|
seed?: number;
|
|
56
56
|
/** How the body is lit: `fabric` (default), `plastic`, `crisp`, `smooth`,
|
|
57
|
-
* `flat`, `metal`, `glass` or `neon`. `true` and `false` mean
|
|
58
|
-
* flat. */
|
|
57
|
+
* `flat`, `metal`, `glass`, `jelly` or `neon`. `true` and `false` mean
|
|
58
|
+
* crisp and flat. */
|
|
59
59
|
shading?: BotAvatarShading | boolean;
|
|
60
60
|
/** A hat, sitting on the top of the head and turning with it: `beret`,
|
|
61
61
|
* `beanie`, `party`, `crown`, `tophat`, `wizard`, `halo` or `flower`.
|
|
@@ -59,8 +59,8 @@ export interface BotAvatarProps {
|
|
|
59
59
|
*/
|
|
60
60
|
seed?: number;
|
|
61
61
|
/** How the body is lit: `fabric` (default), `plastic`, `crisp`, `smooth`,
|
|
62
|
-
* `flat`, `metal`, `glass` or `neon`. `true` and `false` mean
|
|
63
|
-
* flat. */
|
|
62
|
+
* `flat`, `metal`, `glass`, `jelly` or `neon`. `true` and `false` mean
|
|
63
|
+
* crisp and flat. */
|
|
64
64
|
shading?: BotAvatarShading | boolean;
|
|
65
65
|
/** A hat, sitting on the top of the head and turning with it: `beret`,
|
|
66
66
|
* `beanie`, `party`, `crown`, `tophat`, `wizard`, `halo` or `flower`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { GalleryGridProps, GalleryItem } from './types';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** Video and music details: the media column. Host a player here to play
|
|
4
|
+
* in place; the built-in poster and play button step aside. */
|
|
5
|
+
stage(props: {
|
|
6
|
+
item: GalleryItem;
|
|
7
|
+
close: () => void;
|
|
8
|
+
}): unknown;
|
|
9
|
+
/** Side column of the detail, under the heading. */
|
|
10
|
+
detail(props: {
|
|
11
|
+
item: GalleryItem;
|
|
12
|
+
close: () => void;
|
|
13
|
+
}): unknown;
|
|
14
|
+
/** Shown instead of the empty state. */
|
|
15
|
+
empty(): unknown;
|
|
16
|
+
};
|
|
17
|
+
declare function open(item: GalleryItem, event?: Event): void;
|
|
18
|
+
declare function close(): void;
|
|
19
|
+
declare const __VLS_base: import("vue").DefineComponent<GalleryGridProps, {
|
|
20
|
+
close: typeof close;
|
|
21
|
+
open: typeof open;
|
|
22
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
close: () => any;
|
|
24
|
+
play: (item: GalleryItem) => any;
|
|
25
|
+
open: (item: GalleryItem) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<GalleryGridProps> & Readonly<{
|
|
27
|
+
onClose?: (() => any) | undefined;
|
|
28
|
+
onPlay?: ((item: GalleryItem) => any) | undefined;
|
|
29
|
+
onOpen?: ((item: GalleryItem) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
label: string;
|
|
32
|
+
size: import("./types").GallerySize;
|
|
33
|
+
items: GalleryItem[];
|
|
34
|
+
gap: number;
|
|
35
|
+
corner: number;
|
|
36
|
+
palette: import("./types").GalleryPalette;
|
|
37
|
+
columns: number;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { MusicPlayerProps } from './types';
|
|
2
|
+
declare function start(): void;
|
|
3
|
+
declare function toggle(): void;
|
|
4
|
+
/** Play from a handed-over second, used when a player takes over from the
|
|
5
|
+
* embedded stage of a detail dialog. */
|
|
6
|
+
declare function startAt(time: number): void;
|
|
7
|
+
declare function expand(): void;
|
|
8
|
+
declare function collapse(): void;
|
|
9
|
+
declare function closePlayer(): void;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<MusicPlayerProps, {
|
|
11
|
+
expand: typeof expand;
|
|
12
|
+
collapse: typeof collapse;
|
|
13
|
+
toggle: typeof toggle;
|
|
14
|
+
start: typeof start;
|
|
15
|
+
startAt: typeof startAt;
|
|
16
|
+
close: typeof closePlayer;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
close: () => any;
|
|
19
|
+
collapse: (time: number) => any;
|
|
20
|
+
expand: (open: boolean) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<MusicPlayerProps> & Readonly<{
|
|
22
|
+
onClose?: (() => any) | undefined;
|
|
23
|
+
onCollapse?: ((time: number) => any) | undefined;
|
|
24
|
+
onExpand?: ((open: boolean) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
track: import("./types").MusicTrack | null;
|
|
27
|
+
size: import("./types").GallerySize;
|
|
28
|
+
corner: number;
|
|
29
|
+
palette: import("./types").GalleryPalette;
|
|
30
|
+
embedded: boolean;
|
|
31
|
+
autoplay: boolean;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { VideoPlayerProps } from './types';
|
|
2
|
+
declare function start(): void;
|
|
3
|
+
declare function toggle(): void;
|
|
4
|
+
/** Play from a handed-over second, used when the floating window takes over
|
|
5
|
+
* from an embedded stage. */
|
|
6
|
+
declare function startAt(time: number): void;
|
|
7
|
+
declare function expand(): void;
|
|
8
|
+
declare function collapse(): void;
|
|
9
|
+
declare function closePlayer(): void;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<VideoPlayerProps, {
|
|
11
|
+
expand: typeof expand;
|
|
12
|
+
collapse: typeof collapse;
|
|
13
|
+
toggle: typeof toggle;
|
|
14
|
+
start: typeof start;
|
|
15
|
+
startAt: typeof startAt;
|
|
16
|
+
close: typeof closePlayer;
|
|
17
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
close: () => any;
|
|
19
|
+
collapse: (time: number) => any;
|
|
20
|
+
expand: (open: boolean) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<VideoPlayerProps> & Readonly<{
|
|
22
|
+
onClose?: (() => any) | undefined;
|
|
23
|
+
onCollapse?: ((time: number) => any) | undefined;
|
|
24
|
+
onExpand?: ((open: boolean) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
size: import("./types").GallerySize;
|
|
27
|
+
corner: number;
|
|
28
|
+
palette: import("./types").GalleryPalette;
|
|
29
|
+
embedded: boolean;
|
|
30
|
+
autoplay: boolean;
|
|
31
|
+
media: import("./types").VideoMedia | null;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type VNode } from 'vue';
|
|
2
|
+
export declare function ImageGlyph(props: {
|
|
3
|
+
size?: number;
|
|
4
|
+
}): VNode;
|
|
5
|
+
export declare function VideoGlyph(props: {
|
|
6
|
+
size?: number;
|
|
7
|
+
}): VNode;
|
|
8
|
+
export declare function MusicGlyph(props: {
|
|
9
|
+
size?: number;
|
|
10
|
+
}): VNode;
|
|
11
|
+
export declare function PlayGlyph(props: {
|
|
12
|
+
size?: number;
|
|
13
|
+
}): VNode;
|
|
14
|
+
export declare function PauseGlyph(props: {
|
|
15
|
+
size?: number;
|
|
16
|
+
}): VNode;
|
|
17
|
+
export declare function CloseGlyph(props: {
|
|
18
|
+
size?: number;
|
|
19
|
+
}): VNode;
|
|
20
|
+
export declare function VolumeOnGlyph(props: {
|
|
21
|
+
size?: number;
|
|
22
|
+
}): VNode;
|
|
23
|
+
export declare function VolumeOffGlyph(props: {
|
|
24
|
+
size?: number;
|
|
25
|
+
}): VNode;
|
|
26
|
+
export declare function MaximizeGlyph(props: {
|
|
27
|
+
size?: number;
|
|
28
|
+
}): VNode;
|
|
29
|
+
export declare function MinimizeGlyph(props: {
|
|
30
|
+
size?: number;
|
|
31
|
+
}): VNode;
|
|
32
|
+
export declare function PipGlyph(props: {
|
|
33
|
+
size?: number;
|
|
34
|
+
}): VNode;
|
|
35
|
+
export declare function RewindGlyph(props: {
|
|
36
|
+
size?: number;
|
|
37
|
+
}): VNode;
|
|
38
|
+
export declare function ForwardGlyph(props: {
|
|
39
|
+
size?: number;
|
|
40
|
+
}): VNode;
|
|
41
|
+
export declare function CopyGlyph(props: {
|
|
42
|
+
size?: number;
|
|
43
|
+
}): VNode;
|
|
44
|
+
export declare function CheckGlyph(props: {
|
|
45
|
+
size?: number;
|
|
46
|
+
}): VNode;
|
|
47
|
+
export declare function ArrowUpRightGlyph(props: {
|
|
48
|
+
size?: number;
|
|
49
|
+
}): VNode;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/** A masonry wall of works. Clicking a card grows its detail panel out of
|
|
2
|
+
* the card's own rect and folds it back on close. Video and music cards
|
|
3
|
+
* open a poster stage whose play call to action emits `play`, ready to be
|
|
4
|
+
* handed to the players below.
|
|
5
|
+
*
|
|
6
|
+
* ```
|
|
7
|
+
* <GalleryGrid :items="works" @play="openMedia" />
|
|
8
|
+
* <MusicPlayer ref="music" :track="track" />
|
|
9
|
+
* <VideoPlayer ref="video" :media="video" />
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare const GalleryGrid: {
|
|
13
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./types").GalleryGridProps> & Readonly<{
|
|
14
|
+
onClose?: (() => any) | undefined;
|
|
15
|
+
onPlay?: ((item: import("./types").GalleryItem) => any) | undefined;
|
|
16
|
+
onOpen?: ((item: import("./types").GalleryItem) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
close: () => void;
|
|
19
|
+
open: (item: import("./types").GalleryItem, event?: Event) => void;
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
close: () => any;
|
|
22
|
+
play: (item: import("./types").GalleryItem) => any;
|
|
23
|
+
open: (item: import("./types").GalleryItem) => any;
|
|
24
|
+
}, import("vue").PublicProps, {
|
|
25
|
+
label: string;
|
|
26
|
+
size: import("./types").GallerySize;
|
|
27
|
+
items: import("./types").GalleryItem[];
|
|
28
|
+
gap: number;
|
|
29
|
+
corner: number;
|
|
30
|
+
palette: import("./types").GalleryPalette;
|
|
31
|
+
columns: number;
|
|
32
|
+
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
33
|
+
P: {};
|
|
34
|
+
B: {};
|
|
35
|
+
D: {};
|
|
36
|
+
C: {};
|
|
37
|
+
M: {};
|
|
38
|
+
Defaults: {};
|
|
39
|
+
}, Readonly<import("./types").GalleryGridProps> & Readonly<{
|
|
40
|
+
onClose?: (() => any) | undefined;
|
|
41
|
+
onPlay?: ((item: import("./types").GalleryItem) => any) | undefined;
|
|
42
|
+
onOpen?: ((item: import("./types").GalleryItem) => any) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
close: () => void;
|
|
45
|
+
open: (item: import("./types").GalleryItem, event?: Event) => void;
|
|
46
|
+
}, {}, {}, {}, {
|
|
47
|
+
label: string;
|
|
48
|
+
size: import("./types").GallerySize;
|
|
49
|
+
items: import("./types").GalleryItem[];
|
|
50
|
+
gap: number;
|
|
51
|
+
corner: number;
|
|
52
|
+
palette: import("./types").GalleryPalette;
|
|
53
|
+
columns: number;
|
|
54
|
+
}>;
|
|
55
|
+
__isFragment?: never;
|
|
56
|
+
__isTeleport?: never;
|
|
57
|
+
__isSuspense?: never;
|
|
58
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("./types").GalleryGridProps> & Readonly<{
|
|
59
|
+
onClose?: (() => any) | undefined;
|
|
60
|
+
onPlay?: ((item: import("./types").GalleryItem) => any) | undefined;
|
|
61
|
+
onOpen?: ((item: import("./types").GalleryItem) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
close: () => void;
|
|
64
|
+
open: (item: import("./types").GalleryItem, event?: Event) => void;
|
|
65
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
66
|
+
close: () => any;
|
|
67
|
+
play: (item: import("./types").GalleryItem) => any;
|
|
68
|
+
open: (item: import("./types").GalleryItem) => any;
|
|
69
|
+
}, string, {
|
|
70
|
+
label: string;
|
|
71
|
+
size: import("./types").GallerySize;
|
|
72
|
+
items: import("./types").GalleryItem[];
|
|
73
|
+
gap: number;
|
|
74
|
+
corner: number;
|
|
75
|
+
palette: import("./types").GalleryPalette;
|
|
76
|
+
columns: number;
|
|
77
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
78
|
+
$slots: {
|
|
79
|
+
stage(props: {
|
|
80
|
+
item: import("./types").GalleryItem;
|
|
81
|
+
close: () => void;
|
|
82
|
+
}): unknown;
|
|
83
|
+
detail(props: {
|
|
84
|
+
item: import("./types").GalleryItem;
|
|
85
|
+
close: () => void;
|
|
86
|
+
}): unknown;
|
|
87
|
+
empty(): unknown;
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
/** A compact audio disc — artwork, progress ring, hover controls — that
|
|
91
|
+
* expands into a now-playing panel with lyrics and transport. */
|
|
92
|
+
export declare const MusicPlayer: import("vue").DefineComponent<import("./types").MusicPlayerProps, {
|
|
93
|
+
expand: () => void;
|
|
94
|
+
collapse: () => void;
|
|
95
|
+
toggle: () => void;
|
|
96
|
+
start: () => void;
|
|
97
|
+
startAt: (time: number) => void;
|
|
98
|
+
close: () => void;
|
|
99
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
100
|
+
close: () => any;
|
|
101
|
+
collapse: (time: number) => any;
|
|
102
|
+
expand: (open: boolean) => any;
|
|
103
|
+
}, string, import("vue").PublicProps, Readonly<import("./types").MusicPlayerProps> & Readonly<{
|
|
104
|
+
onClose?: (() => any) | undefined;
|
|
105
|
+
onCollapse?: ((time: number) => any) | undefined;
|
|
106
|
+
onExpand?: ((open: boolean) => any) | undefined;
|
|
107
|
+
}>, {
|
|
108
|
+
track: import("./types").MusicTrack | null;
|
|
109
|
+
size: import("./types").GallerySize;
|
|
110
|
+
corner: number;
|
|
111
|
+
palette: import("./types").GalleryPalette;
|
|
112
|
+
embedded: boolean;
|
|
113
|
+
autoplay: boolean;
|
|
114
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
115
|
+
/** A floating video window that becomes a theater, keeping the same video
|
|
116
|
+
* element; picture-in-picture and fullscreen included. */
|
|
117
|
+
export declare const VideoPlayer: import("vue").DefineComponent<import("./types").VideoPlayerProps, {
|
|
118
|
+
expand: () => void;
|
|
119
|
+
collapse: () => void;
|
|
120
|
+
toggle: () => void;
|
|
121
|
+
start: () => void;
|
|
122
|
+
startAt: (time: number) => void;
|
|
123
|
+
close: () => void;
|
|
124
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
125
|
+
close: () => any;
|
|
126
|
+
collapse: (time: number) => any;
|
|
127
|
+
expand: (open: boolean) => any;
|
|
128
|
+
}, string, import("vue").PublicProps, Readonly<import("./types").VideoPlayerProps> & Readonly<{
|
|
129
|
+
onClose?: (() => any) | undefined;
|
|
130
|
+
onCollapse?: ((time: number) => any) | undefined;
|
|
131
|
+
onExpand?: ((open: boolean) => any) | undefined;
|
|
132
|
+
}>, {
|
|
133
|
+
size: import("./types").GallerySize;
|
|
134
|
+
corner: number;
|
|
135
|
+
palette: import("./types").GalleryPalette;
|
|
136
|
+
embedded: boolean;
|
|
137
|
+
autoplay: boolean;
|
|
138
|
+
media: import("./types").VideoMedia | null;
|
|
139
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
140
|
+
export type { GalleryGridProps, GalleryItem, GalleryKind, GalleryPalette, GallerySize, MusicPlayerProps, MusicTrack, VideoMedia, VideoPlayerProps, } from './types';
|
|
141
|
+
export { ensureGalleryStyles } from './styles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ensureGalleryStyles(): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CSSProperties, type Ref } from 'vue';
|
|
2
|
+
import type { GalleryPalette, GallerySize } from './types';
|
|
3
|
+
/** The three dialog width steps, in px. Every panel also shrinks to the
|
|
4
|
+
* viewport, so these are the widest each step will ever get. */
|
|
5
|
+
export declare const DIALOG_WIDTHS: Record<GallerySize, string>;
|
|
6
|
+
/** Follow the host page's theme: an explicit `data-theme` wins, else the OS. */
|
|
7
|
+
export declare function useGalleryTheme(): Ref<'light' | 'dark'>;
|
|
8
|
+
/** Turn a palette into the family's CSS custom properties. Only the keys the
|
|
9
|
+
* caller set are emitted, so the theme defaults keep the rest. */
|
|
10
|
+
export declare function paletteStyle(palette?: GalleryPalette): CSSProperties;
|
|
11
|
+
export declare function reducedMotion(): boolean;
|
|
12
|
+
export declare function formatTime(seconds: number): string;
|
|
13
|
+
/** Lock the page behind a modal; returns the release. The scrollbar's width
|
|
14
|
+
* is paid back as padding so hiding it does not reflow the page at the same
|
|
15
|
+
* moment the panel starts travelling. */
|
|
16
|
+
export declare function lockScroll(): () => void;
|
|
17
|
+
/** Wait for one painted frame. Starting a layer animation only after the
|
|
18
|
+
* panel has painted keeps the first frame from stalling. */
|
|
19
|
+
export declare function nextFrame(): Promise<void>;
|
|
20
|
+
/** Read LRC lines — `[mm:ss.xx]text` — ignoring metadata tags. */
|
|
21
|
+
export declare function parseLrc(text: string | undefined): {
|
|
22
|
+
time: number;
|
|
23
|
+
text: string;
|
|
24
|
+
}[];
|
|
25
|
+
/** The shared-element tween: start where the source rect sat, end where the
|
|
26
|
+
* panel now sits. Only transform and opacity are animated — border radius
|
|
27
|
+
* stays put, so the panel never repaints its contents mid-flight. */
|
|
28
|
+
export declare function animateFromRect(element: HTMLElement, source: DOMRect | null, options: {
|
|
29
|
+
opacity: number;
|
|
30
|
+
duration: number;
|
|
31
|
+
}): Animation | null;
|
|
32
|
+
/** The reverse tween, pinned on the final frame until the caller unmounts. */
|
|
33
|
+
export declare function animateToRect(element: HTMLElement, source: DOMRect | null, options: {
|
|
34
|
+
opacity: number;
|
|
35
|
+
duration: number;
|
|
36
|
+
}): Animation | null;
|
|
37
|
+
/** Keep Tab inside a dialog. */
|
|
38
|
+
export declare function trapTab(event: KeyboardEvent, root: HTMLElement | null): void;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/** Gallery — a masonry wall of works whose cards open into a detail stage,
|
|
2
|
+
* plus the two floating players the stage hands its media to: a compact
|
|
3
|
+
* audio disc that becomes a now-playing panel, and a video window that
|
|
4
|
+
* becomes a theater. The card, the disc and the video frame all travel to
|
|
5
|
+
* their expanded place with one shared-element animation, and travel back
|
|
6
|
+
* to the exact rect they came from when they close.
|
|
7
|
+
*/
|
|
8
|
+
/** What a gallery item holds. Default `image`. */
|
|
9
|
+
export type GalleryKind = 'image' | 'video' | 'music';
|
|
10
|
+
/** Expanded width of the three dialogs, in three steps: `sm` 760px,
|
|
11
|
+
* `md` 1020px, `lg` 1280px. Every one still shrinks to the viewport.
|
|
12
|
+
* Default `md`. */
|
|
13
|
+
export type GallerySize = 'sm' | 'md' | 'lg';
|
|
14
|
+
/** One card in the wall. */
|
|
15
|
+
export interface GalleryItem {
|
|
16
|
+
/** Stable key; also passed back on every event. */
|
|
17
|
+
id: string;
|
|
18
|
+
/** Caption, detail heading and media accessible name. */
|
|
19
|
+
title: string;
|
|
20
|
+
/** Media family. Default `image`. */
|
|
21
|
+
kind?: GalleryKind;
|
|
22
|
+
/** Full-size media URL: the image, the video, or the audio track. */
|
|
23
|
+
src?: string;
|
|
24
|
+
/** Grid thumbnail for an image. Falls back to `src`. */
|
|
25
|
+
thumbnail?: string;
|
|
26
|
+
/** Cover art for music, or the poster of a video when `poster` is absent. */
|
|
27
|
+
cover?: string;
|
|
28
|
+
/** Explicit video poster, ahead of `cover` and `thumbnail`. */
|
|
29
|
+
poster?: string;
|
|
30
|
+
/** One line under the caption in the grid and beside the kind in detail. */
|
|
31
|
+
meta?: string;
|
|
32
|
+
/** Body copy shown in the detail panel. */
|
|
33
|
+
description?: string;
|
|
34
|
+
/** Prompt / recipe shown in the detail panel's first block. */
|
|
35
|
+
prompt?: string;
|
|
36
|
+
/** Intrinsic width, used with `height` to keep the card's aspect ratio. */
|
|
37
|
+
width?: number;
|
|
38
|
+
/** Intrinsic height, used with `width` to keep the card's aspect ratio. */
|
|
39
|
+
height?: number;
|
|
40
|
+
/** Music style line, shown in the detail and handed to the music player. */
|
|
41
|
+
style?: string;
|
|
42
|
+
/** LRC-formatted lyrics for music, handed to the music player. */
|
|
43
|
+
lyrics?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Appearance tokens shared by the three gallery pieces. Any CSS color
|
|
46
|
+
* works; `var()` is welcome. Omitted values keep the light/dark defaults. */
|
|
47
|
+
export interface GalleryPalette {
|
|
48
|
+
/** Text ink. */
|
|
49
|
+
ink?: string;
|
|
50
|
+
/** Secondary text. */
|
|
51
|
+
muted?: string;
|
|
52
|
+
/** Card and panel surface. */
|
|
53
|
+
surface?: string;
|
|
54
|
+
/** Media wells and the detail stage. */
|
|
55
|
+
sunken?: string;
|
|
56
|
+
/** Selection, rings and the play call to action. */
|
|
57
|
+
accent?: string;
|
|
58
|
+
/** Detail and theater backdrop. */
|
|
59
|
+
backdrop?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface GalleryGridProps {
|
|
62
|
+
/** The works to show. */
|
|
63
|
+
items?: GalleryItem[];
|
|
64
|
+
/** Masonry column count. Default 3. */
|
|
65
|
+
columns?: number;
|
|
66
|
+
/** Gap between cards, in px. Default 14. */
|
|
67
|
+
gap?: number;
|
|
68
|
+
/** Media corner radius, in px. Default 20. */
|
|
69
|
+
corner?: number;
|
|
70
|
+
/** Accessible name of the detail dialog. Default `Gallery`. */
|
|
71
|
+
label?: string;
|
|
72
|
+
/** Width step of the detail dialog: `sm` / `md` / `lg`. Default `md`. */
|
|
73
|
+
size?: GallerySize;
|
|
74
|
+
/** Ink, surface and accent overrides. */
|
|
75
|
+
palette?: GalleryPalette;
|
|
76
|
+
}
|
|
77
|
+
/** A track the music player can open. */
|
|
78
|
+
export interface MusicTrack {
|
|
79
|
+
/** Audio URL. */
|
|
80
|
+
src: string;
|
|
81
|
+
/** Now-playing title. */
|
|
82
|
+
title: string;
|
|
83
|
+
/** Cover art URL; without it the disc shows a music glyph. */
|
|
84
|
+
cover?: string;
|
|
85
|
+
/** Style / genre line under the title. */
|
|
86
|
+
style?: string;
|
|
87
|
+
/** Artist line, shown under the title when `style` is absent. */
|
|
88
|
+
artist?: string;
|
|
89
|
+
/** LRC-formatted lyrics. Clicking a line seeks to it. */
|
|
90
|
+
lyrics?: string;
|
|
91
|
+
}
|
|
92
|
+
export interface MusicPlayerProps {
|
|
93
|
+
/** The track to show. Setting it mounts the compact disc. */
|
|
94
|
+
track?: MusicTrack | null;
|
|
95
|
+
/** Corner radius of the expanded panel, in px. Default 28. */
|
|
96
|
+
corner?: number;
|
|
97
|
+
/** Width step of the now-playing panel: `sm` / `md` / `lg`. Default `md`. */
|
|
98
|
+
size?: GallerySize;
|
|
99
|
+
/** Render the now-playing panel in place, inside the host, instead of the
|
|
100
|
+
* floating disc. The header's collapse button then emits `collapse`
|
|
101
|
+
* instead of closing. Default false. */
|
|
102
|
+
embedded?: boolean;
|
|
103
|
+
/** Start playback as soon as a track arrives. Default false. */
|
|
104
|
+
autoplay?: boolean;
|
|
105
|
+
/** Ink, surface and accent overrides. */
|
|
106
|
+
palette?: GalleryPalette;
|
|
107
|
+
}
|
|
108
|
+
/** A video the player can show. */
|
|
109
|
+
export interface VideoMedia {
|
|
110
|
+
/** Video URL. */
|
|
111
|
+
src: string;
|
|
112
|
+
/** Title shown in the window header. */
|
|
113
|
+
title?: string;
|
|
114
|
+
/** Poster URL, shown until the first frame paints. */
|
|
115
|
+
poster?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface VideoPlayerProps {
|
|
118
|
+
/** The video to show. Setting it mounts the floating window. */
|
|
119
|
+
media?: VideoMedia | null;
|
|
120
|
+
/** Corner radius, in px. Default 18. */
|
|
121
|
+
corner?: number;
|
|
122
|
+
/** Width step of the theater: `sm` / `md` / `lg`. Default `md`. */
|
|
123
|
+
size?: GallerySize;
|
|
124
|
+
/** Render the player in place, inside the host, instead of the floating
|
|
125
|
+
* window. The header's collapse button then emits `collapse` instead of
|
|
126
|
+
* closing. Default false. */
|
|
127
|
+
embedded?: boolean;
|
|
128
|
+
/** Start playback as soon as a video arrives. Default false. */
|
|
129
|
+
autoplay?: boolean;
|
|
130
|
+
/** Ink, surface and accent overrides. */
|
|
131
|
+
palette?: GalleryPalette;
|
|
132
|
+
}
|
|
@@ -23,13 +23,13 @@ declare const __VLS_export: import("vue").DefineComponent<ImageStudioProps, Imag
|
|
|
23
23
|
speed: number;
|
|
24
24
|
theme: import("./studio-types").ImageStudioTheme;
|
|
25
25
|
corner: number;
|
|
26
|
+
autoplay: boolean;
|
|
26
27
|
melt: import("../index.ts").ImageMeltOptions;
|
|
27
28
|
overlap: number;
|
|
28
29
|
compare: number;
|
|
29
30
|
variant: ImageStudioVariant;
|
|
30
31
|
pace: number;
|
|
31
32
|
ripple: number;
|
|
32
|
-
autoplay: boolean;
|
|
33
33
|
generateLabel: string;
|
|
34
34
|
beforeSrc: string;
|
|
35
35
|
labels: boolean;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { JellySurfaceProps } from './types';
|
|
2
|
+
declare function pulse(): void;
|
|
3
|
+
declare const __VLS_template: () => {
|
|
4
|
+
__VLS_Slots: {
|
|
5
|
+
default?: (props: {}) => any;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<JellySurfaceProps, {
|
|
10
|
+
pulse: typeof pulse;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
press: () => any;
|
|
13
|
+
release: () => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<JellySurfaceProps> & Readonly<{
|
|
15
|
+
onPress?: (() => any) | undefined;
|
|
16
|
+
onRelease?: (() => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
height: string | number;
|
|
19
|
+
label: string;
|
|
20
|
+
color: string;
|
|
21
|
+
width: string | number;
|
|
22
|
+
interactive: boolean;
|
|
23
|
+
ariaLabel: string;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
icon: import("./types").JellyIcon;
|
|
26
|
+
radius: number;
|
|
27
|
+
gradient: string;
|
|
28
|
+
crystal: boolean;
|
|
29
|
+
textColor: string;
|
|
30
|
+
ior: number;
|
|
31
|
+
thickness: number;
|
|
32
|
+
roughness: number;
|
|
33
|
+
finish: import("./types").JellyFinish;
|
|
34
|
+
sound: boolean;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare function srgbToLinear(c: number): number;
|
|
3
|
+
export declare function linearToSrgb(c: number): number;
|
|
4
|
+
/** Parses a CSS colour and returns it in the renderer's linear working space. */
|
|
5
|
+
export declare function colorFromCss(css: string): THREE.Color;
|
|
6
|
+
/**
|
|
7
|
+
* Parses a CSS colour as plain sRGB components, for shaders that composite
|
|
8
|
+
* outside three's colour pipeline (the analytic frosted material).
|
|
9
|
+
*/
|
|
10
|
+
export declare function cssToSrgbTuple(css: string): [number, number, number];
|
|
11
|
+
/** CSS hex for a linear working-space colour, as r160's getHexString() gives. */
|
|
12
|
+
export declare function linearToHex(color: THREE.Color): string;
|