Files
raea/tools/effects-catalog.sh
shaneandshinyobjectz 2563c183e7 The component library: 609 open-source effects sorted by use, searched and copied by raea make component (#281)
* The component library: 609 open-source effects sorted by use, searched by `raea make component list WORDS` and copied by `add NAME`

sdk/raea/library/components holds 475 pieces from remocn, 79 from the React Video Editor templates and 55 from snapcn,
ported to raea's composition API and sorted by what they're for (text, numbers, transitions, screens, HUDs and more),
not by who made them. catalog.json lists each piece's category, type, what it does, its files, the shared helpers it
needs, its fonts and npm packages and its source; CREDITS.md holds the licences and every file's first line names its
source.

- `raea make component list` ends with the library's categories; `list WORDS` searches by category, category/type or
  words (catalog.ts). `add NAME` copies the piece into components/CATEGORY/NAME/ with its helpers under
  components/_lib/, and installs its npm packages through the engine.
- The native host reads the library beside the binary (share/raea, which tools/release.sh already packs from
  sdk/raea/library), in RAEA_HOME, or in the tree a built raea runs from.
- tools/effects-catalog.sh writes the cut-down catalogue raea cloud's dashboard imports (Libraries › Effects).
- tools/size.sh leaves the library out: it's other people's code, kept as they wrote it but for imports.
- conformance/catalog.test.ts: every listed file exists, imports stay inside what a piece copies, none imports another
  video framework, and search finds by use.

* raea help's line for make component says list WORDS searches the library

* no-void leaves the component library out: its gradient shader's own name is void

---------

Co-authored-by: shinyobjectz <[email protected]>
2026-11-30 18:27:08 -08:00

15 lines
983 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# The effects library's catalogue for raea cloud's dashboard (Libraries › Effects, board-simple/effects.js): the
# library's catalog.json cut to what the page shows (name, category, type, what it does, source), as an ES module the
# dashboard imports. The clips it links are on media.raea.io/effects/v1 (NAME.mp4, NAME.jpg).
# tools/effects-catalog.sh OUT.js e.g. ~/raea-platform/apps/site/cloud/board-simple/effectscatalog.js
set -eu
out=${1:?usage: tools/effects-catalog.sh OUT.js}
cat=$(cd "$(dirname "$0")/.." && pwd)/sdk/raea/library/components/catalog.json
{
echo "// generated by raea's tools/effects-catalog.sh from sdk/raea/library/components/catalog.json: don't edit"
printf 'export default '
jq -c '{media: "https://media.raea.io/effects/v1", sources: (.sources | map_values({name, url, licence})), items: [.items[] | {n: .name, c: .category, t: .type, s: .says, f: .from}]}' "$cat"
} > "$out"
echo "$out: $(jq '.items | length' "$cat") effects"