@praeko/studio-kit 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/CHANGELOG.md CHANGED
@@ -1,7 +1,17 @@
1
1
  # Changelog
2
2
 
3
- Segue [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0/) e [SemVer](https://semver.org/lang/pt-BR/).
3
+ Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [SemVer](https://semver.org/).
4
+
5
+ ## [0.2.0] - unreleased
6
+
7
+ Breaking: the whole public API is English, and the declarative components read the English `episode.spec.json` only. There are no deprecated aliases; regenerate the spec with `praeko studio compile` (or run `praeko studio migrate`). Published types are generated by `tsc`, and their relative specifiers end in `.js`.
8
+
9
+ - Parts: `PainelD` -> `Panel` (`titulo` -> `title`), `Caixa` -> `Box` (`cor` -> `color`), `Linha` -> `Line`, `Big` (`cor` -> `color`), `Balao` -> `Bubble` (`autor` -> `author`), `Codigo` -> `Code` (`titulo` -> `title`, `linhas` -> `lines`, `cor` -> `color`, `marca` -> `mark`), `Janela` -> `Window` (`duracao` -> `clipDuration`, `de` -> `from`), `Celular` -> `Phone`, `Gato` -> `Mascot` (`nome` -> `name`, `tam` -> `size`; the image path comes from the theme `mascotPath`), `Moldura` -> `Frame` (`titulo` -> `title`, `cor` -> `color`, `tam` -> `size`).
10
+ - Declarative: `EpisodioDecl` -> `EpisodeDecl` (props `spec`, `words`, `theme`, `components`; were `spec`, `palavras`, `tema`, `pecas`), `EpSpec` -> `EpisodeSpec`, `CenaSpec` -> `SceneSpec`, `epDataDeSpec` -> `episodeDataFromSpec`, `LongoDecl` -> `LongDecl`, `LongoSpec` -> `LongSpec`, `CenaLSpec` -> `LongSceneSpec`, `longoDeSpec` -> `longDataFromSpec`, `CapaLongoSpec` -> `LongCoverSpec`, `CapasLongo` -> `LongCovers`, `CapaLongo16x9` -> `LongCover16x9`, `CapaLongoVertical` -> `LongCoverVertical`.
11
+ - Long parts: `CodigoL` -> `CodeL`, `CartaoL` -> `CardL`, `TxtL` -> `TextL`, `surgeL` -> `appearL`, `LinhaCodigo` -> `CodeLine`; props `titulo` -> `title`, `cor` -> `color`.
12
+ - Spec shape: see `docs/studio-ingles.md` (4.3, 4.4, 4.7) in the repository; new `resolveColor` helper.
13
+ - Defaults: the `Mascot` card no longer defaults to a game-specific path, and the `Bubble` default author is `— someone, in the chat`. Peer dependency: `@praeko/studio-core` ^0.2.0.
4
14
 
5
15
  ## [0.1.0] - 2026-11-07
6
16
 
7
- Primeira versão publicada, extraída do projeto de divulgação onde nasceu. Publica `dist/` compilado (ESM + `.d.ts`); `react` e `remotion` são peers.
17
+ First published version, extracted from the project where it was born. Publishes compiled `dist/` (ESM + `.d.ts`); `react` and `remotion` are peers.
package/LICENSES.md CHANGED
@@ -1,38 +1,36 @@
1
- # Licenças do Praeko Studio / Licenses
1
+ # Praeko Studio licenses
2
2
 
3
- Conferido em 07/11/2026 (verified on 2026-11-07). Este arquivo não é aconselhamento jurídico; vale o texto de cada fornecedor.
3
+ Verified on 2026-11-07. This file is not legal advice; each vendor's own text prevails.
4
4
 
5
- ## O código do Praeko Studio
6
- Os pacotes `@praeko/studio`, `@praeko/studio-core` e `@praeko/studio-kit` são **MIT** (ver `LICENSE`, Copyright (c) 2026 Marcone Santos), como `@praeko/sdk` e `@praeko/cli`. Os efeitos sonoros (`pop`, `ding`, `thump`, `whoosh`) e o `avatar.png` do modelo de projeto foram criados para o Studio (sons sintetizados por `scripts/gerar-sfx.mjs`, sem amostras de terceiros) e seguem a mesma licença MIT. O pacote não traz fontes, músicas, imagens de banco nem arte de terceiros.
5
+ ## Praeko Studio's code
6
+ The packages `@praeko/studio`, `@praeko/studio-core` and `@praeko/studio-kit` are **MIT** (see `LICENSE`, Copyright (c) 2026 Marcone Santos), like `@praeko/sdk` and `@praeko/cli`. The sound effects (`pop`, `ding`, `thump`, `whoosh`) and the `avatar.png` of the project template were created for Studio (sounds synthesized by `scripts/generate-sfx.mjs`, with no third-party samples) and follow the same MIT license. The package ships no fonts, music, stock images or third-party art.
7
7
 
8
- ## Aviso que você precisa ver (Remotion NÃO é MIT)
9
- > **Remotion.** O Remotion é *source-available*, não open source. É **grátis** para pessoas físicas, organizações sem fins lucrativos, avaliação e empresas com **até 3 funcionários** (uso comercial incluído). Empresas com **4 ou mais pessoas** precisam da **Company License** (remotion.pro/license). Quem instala e roda o Remotion é **você**: a licença é sua, não do Praeko. O Remotion também vende planos para quem **automatiza renders por programa ou agente** (Creators, Automators); o FAQ deles não diz expressamente se um agente local que roda `remotion render` entra: **pergunte ao Remotion** antes de usar em escala. O Praeko Studio não copia nem modifica código do Remotion: usa-o como dependência (peer) instalada por você.
10
- >
11
- > **Remotion** is source-available, not open source. Free for individuals, non-profits, evaluation and companies of up to 3 employees (commercial use included); companies of 4+ need the Company License (remotion.pro/license). You install and run Remotion, so the license is yours. They also sell plans for programmatic/agent-driven rendering; their FAQ does not say whether a local agent running `remotion render` counts: ask Remotion before using at scale. Praeko Studio does not copy or modify Remotion code; it uses it as a dependency you install.
8
+ ## Notice you need to see (Remotion is NOT MIT)
9
+ > **Remotion.** Remotion is *source-available*, not open source. It is **free** for individuals, non-profits, evaluation and companies with **up to 3 employees** (commercial use included). Companies with **4 or more people** need the **Company License** (remotion.pro/license). You install and run Remotion, so the license is **yours**, not Praeko's. Remotion also sells plans for those who **automate renders by program or agent** (Creators, Automators); their FAQ does not expressly say whether a local agent running `remotion render` counts: **ask Remotion** before using at scale. Praeko Studio does not copy or modify Remotion code: it uses it as a dependency (peer) that you install.
12
10
 
13
- Este aviso aparece no `README`, na instalação (`praeko studio init`), em `praeko studio doctor` e em `praeko studio licencas` (`--aceitar` registra a leitura em `~/.config/praeko/studio/licencas.json`).
11
+ This notice appears in the `README`, at install time (`praeko studio init`), in `praeko studio doctor` and in `praeko studio licenses` (`--accept` records that you read it in `~/.config/praeko/studio/licenses.json`).
14
12
 
15
- **Capas** são renderizadas com `remotion still`, mesmo com `--motor hyperframes`: hoje não existe projeto 100% livre de Remotion. Uma capa sem Remotion está no roteiro de trabalho (`docs/studio-produto.md`, item 9) e não foi prometida.
13
+ **Engines.** Remotion is the default engine for videos **and** covers. With `--engine hyperframes` (or `"engine": "hyperframes"` in `brand.json`) the video **and** the cover are rendered by HyperFrames and nothing from Remotion is used, so a project that only uses HyperFrames does not need a Remotion license. Scenes or covers written as TSX (`component:`) only exist in Remotion.
16
14
 
17
- **Não prometemos "grátis para sempre":** as condições do Remotion podem mudar (a própria página avisa que a licença muda no Remotion 5.0). Reveja a licença ao subir de versão.
15
+ **We do not promise "free forever":** Remotion's conditions may change (their own page warns that the license changes in Remotion 5.0). Review the license when you upgrade.
18
16
 
19
- ## Dependências de terceiros
20
- | Componente | Onde | Licença | Fonte |
17
+ ## Third-party dependencies
18
+ | Component | Where | License | Source |
21
19
  |---|---|---|---|
22
- | `remotion`, `@remotion/cli` (4.0.539) | instalados no **projeto** do usuário (peer de core/kit) | Remotion License (ver acima), não MIT | remotion.pro/license; github.com/remotion-dev/remotion (LICENSE.md) |
23
- | `react`, `react-dom` (19.2.3) | projeto do usuário (peer) | MIT | package.json de cada pacote |
24
- | `@praeko/studio-core`, `-kit` | projeto do usuário | MIT | LICENSE |
25
- | `yaml` (2.9.1) | embutido no bundle de `@praeko/studio` | ISC | package.json |
26
- | `@elevenlabs/elevenlabs-js` (2.x) | dependência de `@praeko/studio` | MIT | package.json |
27
- | `hyperframes` (0.9.13, motor opcional) | baixado por `npx` na primeira vez que você usa `--motor hyperframes` | Apache-2.0 | github.com/heygen-com/hyperframes |
28
- | `typescript`, `esbuild`, `@types/*` | só desenvolvimento/build | Apache-2.0 / MIT | package.json |
29
- | ffmpeg / ffprobe | você instala | LGPL ou GPL, conforme a compilação | ffmpeg.org/legal.html |
30
- | Chrome Headless Shell / Chromium | o Remotion baixa no primeiro render | licenças do Chromium/Google | remotion.dev/docs/miscellaneous/chrome-headless-shell |
31
-
32
- ## Serviços e modelos (você contrata)
33
- - **ElevenLabs**: seus termos e seu plano (clonagem de voz só com direito sobre a voz). A chave é sua; o Studio nunca a imprime.
34
- - **VoiceStudio local** (opcional): o modelo OmniVoice é **CC-BY-NC (uso não comercial)**. Não é padrão em nenhuma configuração do Studio e **não deve ser usado em conteúdo monetizado**. Confira a licença de qualquer modelo local que usar.
35
- - **YouTube, Instagram, TikTok**: termos e regras de conteúdo sintético de cada rede (veja `praeko studio docs publicar`).
36
-
37
- ## Fontes e mídia
38
- Nenhuma fonte é distribuída. O modelo de projeto usa fontes do sistema (`Arial Black`, `Menlo`) que o `doctor` confere; troque-as no `marca.json` por fontes abertas (OFL) se quiser que o vídeo saia igual em todos os sistemas. Música, imagens e clipes que você adicionar são responsabilidade sua (direitos e licenças).
20
+ | `remotion`, `@remotion/cli` (4.0.539) | installed in the user's **project** (peer of core/kit) | Remotion License (see above), not MIT | remotion.pro/license; github.com/remotion-dev/remotion (LICENSE.md) |
21
+ | `react`, `react-dom` (19.2.3) | user's project (peer) | MIT | each package's package.json |
22
+ | `@praeko/studio-core`, `-kit` | user's project | MIT | LICENSE |
23
+ | `yaml` (2.9.1) | embedded in the `@praeko/studio` bundle | ISC | package.json |
24
+ | `@elevenlabs/elevenlabs-js` (2.x) | dependency of `@praeko/studio` | MIT | package.json |
25
+ | `hyperframes` (0.9.13, optional engine) | downloaded by `npx` the first time you use `--engine hyperframes` | Apache-2.0 | github.com/heygen-com/hyperframes |
26
+ | `typescript`, `esbuild`, `@types/*` | development/build only | Apache-2.0 / MIT | package.json |
27
+ | ffmpeg / ffprobe | you install | LGPL or GPL, depending on the build | ffmpeg.org/legal.html |
28
+ | Chrome Headless Shell / Chromium | Remotion downloads it on the first render | Chromium/Google licenses | remotion.dev/docs/miscellaneous/chrome-headless-shell |
29
+
30
+ ## Services and models (you sign up)
31
+ - **ElevenLabs**: its terms and your plan (voice cloning only with rights over the voice). The key is yours; Studio never prints it.
32
+ - **Local VoiceStudio** (optional): the OmniVoice model is **CC-BY-NC (non-commercial use)**. It is not the default in any Studio configuration and **must not be used in monetized content**. Check the license of any local model you use.
33
+ - **YouTube, Instagram, TikTok**: each network's terms and synthetic-content rules (see `praeko studio docs publish`).
34
+
35
+ ## Fonts and media
36
+ No font is distributed. The project template uses system fonts (`Arial Black`, `Menlo`) that `doctor` checks; swap them in `brand.json` for open fonts (OFL) if you want the video to look the same on every system. Music, images and clips you add are your responsibility (rights and licenses).
package/README.md CHANGED
@@ -1,12 +1,10 @@
1
1
  # @praeko/studio-kit
2
2
 
3
- Peças de cena do Praeko Studio (painel, caixa, linha, balão, código, janela, celular, moldura) e o episódio declarativo do episodio.yaml compilado. Biblioteca para projetos criados com [`@praeko/studio`](https://www.npmjs.com/package/@praeko/studio) (`praeko studio init` já instala e configura).
3
+ Praeko Studio scene parts (panel, box, line, bubble, code, window, phone, frame) and the declarative episode built from the compiled `episode.yaml`. A library for projects created with [`@praeko/studio`](https://www.npmjs.com/package/@praeko/studio) (`praeko studio init` installs and configures it).
4
4
 
5
- > **Licenças.** Este pacote é MIT e usa o **Remotion** como dependência (peer) que **você** instala. O Remotion **não é MIT**: grátis para pessoas, organizações sem fins lucrativos e empresas de até 3 funcionários; empresas com 4 ou mais pessoas precisam da Company License ([remotion.pro/license](https://www.remotion.pro/license)). Detalhes em [LICENSES.md](./LICENSES.md).
6
- >
7
- > **Licenses.** This package is MIT and uses **Remotion** as a peer dependency that **you** install. Remotion is **not MIT**: free for individuals, non-profits and companies of up to 3 employees; companies of 4+ need the Company License.
5
+ > **Licenses.** This package is MIT and uses **Remotion** as a peer dependency that **you** install. Remotion is **not MIT**: free for individuals, non-profits and companies of up to 3 employees; companies of 4 or more people need the Company License ([remotion.pro/license](https://www.remotion.pro/license)). Details in [LICENSES.md](./LICENSES.md).
8
6
 
9
- ## Instalar
7
+ ## Install
10
8
  ```sh
11
9
  # npm
12
10
  npm install @praeko/studio-kit remotion react
@@ -17,4 +15,4 @@ pnpm add @praeko/studio-kit remotion react
17
15
  # bun
18
16
  bun add @praeko/studio-kit remotion react
19
17
  ```
20
- Peers: `remotion` ^4.0.539 (todos os pacotes `@remotion/*` na mesma versão) e `react` ^19. Node 22 ou mais novo. Uso: `praeko studio docs episodio-yaml`.
18
+ Peers: `remotion` ^4.0.539 (all `@remotion/*` packages on the same version) and `react` ^19. Node 22 or newer. Usage: `praeko studio docs episode-yaml`.
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "@praeko/studio-core";
2
+ /** Resolves a theme color name (`accent`, `muted`, ...) or a `#hex` value to a CSS color; unknown names are returned as they are. */
3
+ export declare const resolveColor: (theme: Theme, name?: string) => string | undefined;
@@ -0,0 +1,67 @@
1
+ import type { EpisodeData, Theme, Word } from "@praeko/studio-core";
2
+ type Color = string;
3
+ export type Item = {
4
+ type: string;
5
+ when?: string | [string, number];
6
+ at?: number;
7
+ offset?: number;
8
+ pos?: {
9
+ left?: number;
10
+ right?: number;
11
+ top?: number;
12
+ bottom?: number;
13
+ w?: number;
14
+ h?: number;
15
+ };
16
+ [k: string]: any;
17
+ };
18
+ export type SceneSpec = {
19
+ start: number;
20
+ end?: number;
21
+ label?: string;
22
+ sounds?: {
23
+ at: number;
24
+ sound: "pop" | "ding" | "thump" | "whoosh";
25
+ v?: number;
26
+ }[];
27
+ layout?: "panel" | "free";
28
+ title?: string;
29
+ items?: Item[];
30
+ component?: string;
31
+ };
32
+ export type EpisodeSpec = {
33
+ id: string;
34
+ durS: number;
35
+ captionPx?: number;
36
+ voice: string;
37
+ backgroundLines?: string[];
38
+ engine?: string;
39
+ hits?: {
40
+ at: number;
41
+ type: "shake" | "zoom" | "flash" | "all";
42
+ }[];
43
+ outro: {
44
+ a: number;
45
+ cta: string;
46
+ };
47
+ scenes: SceneSpec[];
48
+ cover?: {
49
+ id: string;
50
+ component?: string;
51
+ title?: [string, string, string?];
52
+ color?: Color;
53
+ glow?: string;
54
+ size?: number;
55
+ items?: Item[];
56
+ };
57
+ };
58
+ /** Builds the EpisodeData: each scene becomes a component (declarative or, with `component`, a TSX of the project). */
59
+ export declare function episodeDataFromSpec(spec: EpisodeSpec, words: Word[], components?: Record<string, React.FC<any>>): EpisodeData;
60
+ /** `<EpisodeDecl spec words theme components />` registers the episode Composition and the cover Still. */
61
+ export declare const EpisodeDecl: React.FC<{
62
+ spec: EpisodeSpec;
63
+ words: Word[];
64
+ theme: Theme;
65
+ components?: Record<string, React.FC<any>>;
66
+ }>;
67
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export * from "./pecas";
2
- export * from "./declarativo";
3
- export * from "./longo";
4
- export * from "./longo-decl";
5
- export * from "./capa-longo";
1
+ export * from "./parts.js";
2
+ export * from "./declarative.js";
3
+ export * from "./long-parts.js";
4
+ export * from "./long-decl.js";
5
+ export * from "./long-cover.js";
6
+ export * from "./color.js";