@pixerate/flair 0.33.0 → 0.34.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/CHANGELOG.md +6 -0
- package/README.md +3 -3
- package/dist/catalog/index.d.ts +4 -2
- package/dist/catalog/index.js +5 -1
- package/dist/{chunk-ARYM5VEJ.js → chunk-2O3RMSOE.js} +2 -2
- package/dist/{chunk-4FFBIVPI.js → chunk-IHUNCBMF.js} +17 -1
- package/dist/chunk-IHUNCBMF.js.map +1 -0
- package/dist/{chunk-6ZG2RIWA.js → chunk-UU4PHRVF.js} +3 -3
- package/dist/cli.js +2 -2
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +9 -2
- package/dist/editor/index.js.map +1 -1
- package/dist/{effect-6PRVCU55.js → effect-6VQS2CA5.js} +4 -4
- package/dist/embed/index.d.ts +1 -1
- package/dist/embed/index.js +2 -2
- package/dist/node.d.ts +1 -1
- package/dist/node.js +3 -3
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +2 -2
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.js +2 -2
- package/dist/{types-c8cnPzuE.d.ts → types-B4Wjzde0.d.ts} +10 -1
- package/package.json +1 -1
- package/dist/chunk-4FFBIVPI.js.map +0 -1
- /package/dist/{chunk-ARYM5VEJ.js.map → chunk-2O3RMSOE.js.map} +0 -0
- /package/dist/{chunk-6ZG2RIWA.js.map → chunk-UU4PHRVF.js.map} +0 -0
- /package/dist/{effect-6PRVCU55.js.map → effect-6VQS2CA5.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @pixerate/flair
|
|
2
2
|
|
|
3
|
+
## 0.34.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a3be887: Catalog: `EFFECT_CATEGORY_GROUPS` sorts the 40 categories into 8 groups (Backgrounds, Light, Pictures, Particles & FX, Type & titles, Inputs, Interface, Transitions). `categoryGroup(category)` gives a category's group, and `findEffects({ group })` and the `catalog.search` command filter by group. The demo gallery browses by group, then by category. Editor documents for vector effects now get the effect's own length (its motion plus `hold`) as their timeline instead of a fixed 5 s.
|
|
8
|
+
|
|
3
9
|
## 0.33.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Flair gives products a library of good-looking, configurable visual effects (her
|
|
|
19
19
|
|
|
20
20
|
### Core Capabilities
|
|
21
21
|
|
|
22
|
-
- 🎨 **Effect catalog (`@pixerate/flair/catalog`)**:
|
|
22
|
+
- 🎨 **Effect catalog (`@pixerate/flair/catalog`)**: 401 effects, each with controls and presets, in 40 categories browsed in 8 groups. There are 264 WebGL2 shaders (gradients, organic textures and growth, patterns, light, lighting that relights pictures, space, 3D objects and globes, weather, water, atmosphere, retro and pixel art, image treatments, transparent overlays, text fills, image morphs, pointer interactions, sound- and scroll-driven effects, pyrotechnics, time warps, melting, electricity, splatters, bubbles, stickers, pointer trails, particles, debris, impacts, comic looks, glows, shadows, distortions, web UI flourishes and backgrounds, transitions) and 137 animated SVG effects (loaders and progress bars, status and animated icons, a logo marquee, a number ticker, animated titles, broadcast graphics and lower thirds, scroll-driven drawing, counters and steps, annotations and product-demo callouts, shape morphs, UI micro-interactions, pixel sprites, stickers, cartoon effects, glowing and lifting UI, a lamp switch, charts, counters, node graphs and other data viz). [Browse them live](https://pixerate.github.io/flair/).
|
|
23
23
|
- ⚡ **Shader engine**:
|
|
24
24
|
- Shadertoy-style GLSL ES 3.00 fragment shaders, with controls declared in the source (`// @control`), including image inputs.
|
|
25
25
|
- Compile errors come back with line numbers that match the source.
|
|
@@ -61,7 +61,7 @@ The `flair` CLI inspects shaders, writes standalone pages and directs scenes (se
|
|
|
61
61
|
```mermaid
|
|
62
62
|
graph TD
|
|
63
63
|
subgraph Effects["Effects (no dependencies)"]
|
|
64
|
-
Catalog["catalog:
|
|
64
|
+
Catalog["catalog: 401 effects + presets"]
|
|
65
65
|
Shader["shader engine: controls, compile, render, GIF, HTML"]
|
|
66
66
|
Vector["vector motion: SvgMotion, SvgPlayer"]
|
|
67
67
|
Time["time: clocks, easing, keyframes, noise"]
|
|
@@ -151,7 +151,7 @@ Object.assign(host.style, { display: "inline-block", height: "0.72em", aspectRat
|
|
|
151
151
|
new SvgPlayer(host, motion, { loop: false });
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
Find effects with `findEffects({ text: "glow", category: "light", kind: "shader" })
|
|
154
|
+
Find effects with `findEffects({ text: "glow", category: "light", kind: "shader" })`, or by a group of related categories with `findEffects({ group: "Backgrounds" })` (`EFFECT_CATEGORY_GROUPS` lists them, and `categoryGroup(category)` gives a category's group). Each effect has an `id`, `name`, `description`, `category`, `tags` and optional `presets`. Image effects default to built-in sample pictures, so they look right before you set `uImage` to your own URL.
|
|
155
155
|
|
|
156
156
|
#### What an effect takes
|
|
157
157
|
|
package/dist/catalog/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ControlDef, C as ControlValue } from '../controls-Ec6P0Vpy.js';
|
|
2
2
|
import { a as SvgTrigger } from '../svg-DaKRPA9v.js';
|
|
3
|
-
import { a as VideoUse, E as EffectDefinition, b as EffectCategory, S as ShaderEffect } from '../types-
|
|
4
|
-
export { C as CURRENT_COLOR, c as EFFECT_CATEGORIES, d as
|
|
3
|
+
import { a as VideoUse, E as EffectDefinition, b as EffectCategory, S as ShaderEffect } from '../types-B4Wjzde0.js';
|
|
4
|
+
export { C as CURRENT_COLOR, c as EFFECT_CATEGORIES, d as EFFECT_CATEGORY_GROUPS, e as EffectCategoryGroup, f as EffectPreset, g as VECTOR_CONTROL_TYPES, h as VIDEO_USES, i as VectorControl, V as VectorEffect, j as categoryGroup, k as colorControl, l as isCurrentColor, n as numberControl, r as renderVectorEffect, v as vectorControlDef, m as vectorControlIssues, o as vectorControls, p as vectorEffectControls } from '../types-B4Wjzde0.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* What an effect takes and how it answers the pointer, worked out from the
|
|
@@ -173,6 +173,8 @@ interface EffectQuery {
|
|
|
173
173
|
/** Words to look for in the name, description, tags and id (all must match). */
|
|
174
174
|
text?: string;
|
|
175
175
|
category?: EffectCategory;
|
|
176
|
+
/** Effects in any category of the group with this name (`EFFECT_CATEGORY_GROUPS`, any case). */
|
|
177
|
+
group?: string;
|
|
176
178
|
kind?: EffectDefinition["kind"];
|
|
177
179
|
/** Effects with every one of these tags. */
|
|
178
180
|
tags?: readonly string[];
|
package/dist/catalog/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
CURRENT_COLOR,
|
|
3
3
|
EFFECTS,
|
|
4
4
|
EFFECT_CATEGORIES,
|
|
5
|
+
EFFECT_CATEGORY_GROUPS,
|
|
5
6
|
EFFECT_INPUTS,
|
|
6
7
|
EFFECT_INTERACTIONS,
|
|
7
8
|
FBM,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
SHADER_EFFECTS,
|
|
15
16
|
VECTOR_CONTROL_TYPES,
|
|
16
17
|
VIDEO_USES,
|
|
18
|
+
categoryGroup,
|
|
17
19
|
colorControl,
|
|
18
20
|
effectControls,
|
|
19
21
|
effectDefaults,
|
|
@@ -30,7 +32,7 @@ import {
|
|
|
30
32
|
vectorControlIssues,
|
|
31
33
|
vectorControls,
|
|
32
34
|
vectorEffectControls
|
|
33
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-IHUNCBMF.js";
|
|
34
36
|
import "../chunk-EHDJ3CPJ.js";
|
|
35
37
|
import "../chunk-VYOMXE6I.js";
|
|
36
38
|
import "../chunk-VKIDRHBG.js";
|
|
@@ -38,6 +40,7 @@ export {
|
|
|
38
40
|
CURRENT_COLOR,
|
|
39
41
|
EFFECTS,
|
|
40
42
|
EFFECT_CATEGORIES,
|
|
43
|
+
EFFECT_CATEGORY_GROUPS,
|
|
41
44
|
EFFECT_INPUTS,
|
|
42
45
|
EFFECT_INTERACTIONS,
|
|
43
46
|
FBM,
|
|
@@ -50,6 +53,7 @@ export {
|
|
|
50
53
|
SHADER_EFFECTS,
|
|
51
54
|
VECTOR_CONTROL_TYPES,
|
|
52
55
|
VIDEO_USES,
|
|
56
|
+
categoryGroup,
|
|
53
57
|
colorControl,
|
|
54
58
|
effectControls,
|
|
55
59
|
effectDefaults,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getEffect,
|
|
13
13
|
renderVectorEffect,
|
|
14
14
|
textImage
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IHUNCBMF.js";
|
|
16
16
|
import {
|
|
17
17
|
parseColor
|
|
18
18
|
} from "./chunk-VYOMXE6I.js";
|
|
@@ -1126,4 +1126,4 @@ export {
|
|
|
1126
1126
|
subjectValues,
|
|
1127
1127
|
mountEffect
|
|
1128
1128
|
};
|
|
1129
|
-
//# sourceMappingURL=chunk-
|
|
1129
|
+
//# sourceMappingURL=chunk-2O3RMSOE.js.map
|
|
@@ -1681,6 +1681,19 @@ var EFFECT_CATEGORIES = [
|
|
|
1681
1681
|
"data",
|
|
1682
1682
|
"icon"
|
|
1683
1683
|
];
|
|
1684
|
+
var EFFECT_CATEGORY_GROUPS = [
|
|
1685
|
+
{ name: "Backgrounds", categories: ["gradient", "organic", "pattern", "space", "3d", "weather", "water", "atmosphere"] },
|
|
1686
|
+
{ name: "Light", categories: ["light", "lighting", "glow", "shadow", "electric"] },
|
|
1687
|
+
{ name: "Pictures", categories: ["image", "distortion", "retro", "comic", "timewarp", "melt"] },
|
|
1688
|
+
{ name: "Particles & FX", categories: ["overlay", "splatter", "bubble", "particles", "trail", "debris", "impact", "pyrotechnics"] },
|
|
1689
|
+
{ name: "Type & titles", categories: ["text", "morph", "broadcast", "annotation", "sticker"] },
|
|
1690
|
+
{ name: "Inputs", categories: ["interaction", "audio", "scroll"] },
|
|
1691
|
+
{ name: "Interface", categories: ["ui", "loader", "icon", "data"] },
|
|
1692
|
+
{ name: "Transitions", categories: ["transition"] }
|
|
1693
|
+
];
|
|
1694
|
+
function categoryGroup(category) {
|
|
1695
|
+
return EFFECT_CATEGORY_GROUPS.find((g) => g.categories.includes(category));
|
|
1696
|
+
}
|
|
1684
1697
|
var VIDEO_USES = ["filter", "transition", "interactive", "stills", "none"];
|
|
1685
1698
|
var VECTOR_CONTROL_TYPES = ["float", "int", "bool", "color", "text"];
|
|
1686
1699
|
var PLACEHOLDER = /\{\{\s*([A-Za-z_]\w*)\s*(?::\s*([A-Za-z0-9]*)([^}]*))?\}\}/g;
|
|
@@ -28473,6 +28486,7 @@ function findEffects(query = {}) {
|
|
|
28473
28486
|
const words = (query.text ?? "").toLowerCase().split(/\s+/).filter(Boolean);
|
|
28474
28487
|
return EFFECTS.filter((e) => {
|
|
28475
28488
|
if (query.category && e.category !== query.category) return false;
|
|
28489
|
+
if (query.group && !EFFECT_CATEGORY_GROUPS.find((g) => g.name.toLowerCase() === query.group.toLowerCase())?.categories.includes(e.category)) return false;
|
|
28476
28490
|
if (query.kind && e.kind !== query.kind) return false;
|
|
28477
28491
|
if (query.tags && !query.tags.every((t) => e.tags.includes(t))) return false;
|
|
28478
28492
|
if (query.video && !(e.kind === "shader" && e.video && query.video.includes(e.video))) return false;
|
|
@@ -28513,6 +28527,8 @@ export {
|
|
|
28513
28527
|
SAMPLE_IMAGES,
|
|
28514
28528
|
textImage,
|
|
28515
28529
|
EFFECT_CATEGORIES,
|
|
28530
|
+
EFFECT_CATEGORY_GROUPS,
|
|
28531
|
+
categoryGroup,
|
|
28516
28532
|
VIDEO_USES,
|
|
28517
28533
|
VECTOR_CONTROL_TYPES,
|
|
28518
28534
|
vectorControls,
|
|
@@ -28532,4 +28548,4 @@ export {
|
|
|
28532
28548
|
effectControls,
|
|
28533
28549
|
effectDefaults
|
|
28534
28550
|
};
|
|
28535
|
-
//# sourceMappingURL=chunk-
|
|
28551
|
+
//# sourceMappingURL=chunk-IHUNCBMF.js.map
|