@tongue-core/templates 0.1.0-rc.1 → 0.1.0-rc.10
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/LICENSE +21 -0
- package/README.md +4 -0
- package/package.json +6 -4
- package/templates/blank/README.md +6 -1
- package/templates/blank/assets.ts +4 -0
- package/templates/promo/assets.ts +4 -0
- package/templates/social-post/assets.ts +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Backpine
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -27,6 +27,10 @@ Reading templates uses the file system (Bun or Node). The format itself (`templa
|
|
|
27
27
|
`TemplateSource`, `projectFromTemplate`) is `@tongue-core/project/template`'s, so other sources (an app's
|
|
28
28
|
own catalog, a URL) implement the same interface.
|
|
29
29
|
|
|
30
|
+
Templates ship local, generated media for offline use. Applications should normally declare
|
|
31
|
+
hosted footage by URL in `assets.ts`, with an immutable SHA-256 when available. The SDK's media
|
|
32
|
+
store prepares and hosts previews outside the project; builds retain only their references.
|
|
33
|
+
|
|
30
34
|
## A template
|
|
31
35
|
|
|
32
36
|
```
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tongue-core/templates",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.10",
|
|
4
4
|
"description": "The film projects `tongue init` starts from: a blank film, a vertical social post, a promo with footage. Each is a complete project that builds as it is.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"author": "Backpine",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -25,8 +25,10 @@
|
|
|
25
25
|
"README.md"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tongue-core/project": "0.1.0-rc.
|
|
29
|
-
|
|
28
|
+
"@tongue-core/project": "0.1.0-rc.10"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"effect": "^4.0.6"
|
|
30
32
|
},
|
|
31
33
|
"publishConfig": {
|
|
32
34
|
"access": "public"
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
- `film.tsx` is the timeline: which scenes play, for how long, and how they join.
|
|
4
4
|
- `scenes/` has one scene per file, named for its id (`scenes/title.tsx` is scene `title`).
|
|
5
|
-
- `assets.ts` declares
|
|
5
|
+
- `assets.ts` declares media at module scope. Application footage normally uses hosted URLs;
|
|
6
|
+
the template's local fonts live in `assets/` so it also works offline.
|
|
7
|
+
|
|
8
|
+
For hosted footage, declare `video("https://…/screen.mp4", { name: "screen", sha256: "<64 hex digits>" })`.
|
|
9
|
+
Set `TONGUE_MEDIA_DIR` and `TONGUE_MEDIA_URL` to the host's prepared-media store for portable builds,
|
|
10
|
+
or supply a hosted `prepared` manifest on the asset. Studio serves a local media store automatically.
|
|
6
11
|
|
|
7
12
|
```bash
|
|
8
13
|
tongue check . # does it build? (layout, code, timeline)
|
|
@@ -3,3 +3,7 @@ import { font } from "@tongue-core/film";
|
|
|
3
3
|
// Every file the film uses, declared once. Paths are relative to the project.
|
|
4
4
|
|
|
5
5
|
export const inter = font("assets/fonts/Inter.woff2");
|
|
6
|
+
|
|
7
|
+
// Application media normally uses hosted URLs, declared here before rendering.
|
|
8
|
+
// Example: video("https://cdn.example/screen.mp4", { name: "screen", sha256: "<64 hex digits>" }).
|
|
9
|
+
// A portable build uses the host media store or an asset's prepared manifest URL.
|
|
@@ -8,3 +8,7 @@ export const inter = font("assets/fonts/Inter.woff2");
|
|
|
8
8
|
export const aurora = video("assets/video/aurora.mp4");
|
|
9
9
|
/** A generated dusk landscape. */
|
|
10
10
|
export const dusk = image("assets/images/dusk.jpg", { maxSize: 2000 });
|
|
11
|
+
|
|
12
|
+
// Application media normally uses hosted URLs, declared here before rendering.
|
|
13
|
+
// Example: video("https://cdn.example/screen.mp4", { name: "screen", sha256: "<64 hex digits>" }).
|
|
14
|
+
// A portable build uses the host media store or an asset's prepared manifest URL.
|
|
@@ -6,3 +6,7 @@ export const fraunces = font("assets/fonts/Fraunces.woff2");
|
|
|
6
6
|
export const figtree = font("assets/fonts/Figtree.woff2");
|
|
7
7
|
/** A generated dusk landscape; swap in a photo of your own. */
|
|
8
8
|
export const dusk = image("assets/images/dusk.jpg", { maxSize: 2000 });
|
|
9
|
+
|
|
10
|
+
// Application media normally uses hosted URLs, declared here before rendering.
|
|
11
|
+
// Example: video("https://cdn.example/screen.mp4", { name: "screen", sha256: "<64 hex digits>" }).
|
|
12
|
+
// A portable build uses the host media store or an asset's prepared manifest URL.
|