frameyard 0.8.0 → 0.10.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 +177 -14
- package/GLOSSARY.md +112 -2
- package/README.md +302 -265
- package/dist/assets/integrations.d.ts +8 -4
- package/dist/assets/integrations.d.ts.map +1 -1
- package/dist/assets/integrations.js +8 -4
- package/dist/assets/integrations.js.map +1 -1
- package/dist/assets/provenance.d.ts +2 -2
- package/dist/assets/provenance.d.ts.map +1 -1
- package/dist/assets/provenance.js +5 -3
- package/dist/assets/provenance.js.map +1 -1
- package/dist/assets/tts-supertonic.d.ts +28 -0
- package/dist/assets/tts-supertonic.d.ts.map +1 -0
- package/dist/assets/tts-supertonic.js +156 -0
- package/dist/assets/tts-supertonic.js.map +1 -0
- package/dist/assets/tts.d.ts +18 -6
- package/dist/assets/tts.d.ts.map +1 -1
- package/dist/assets/tts.js +219 -97
- package/dist/assets/tts.js.map +1 -1
- package/dist/cli.js +1685 -93
- package/dist/cli.js.map +1 -1
- package/dist/composition/format.d.ts +1 -1
- package/dist/composition/format.d.ts.map +1 -1
- package/dist/composition/format.js +1 -1
- package/dist/composition/format.js.map +1 -1
- package/dist/context.d.ts +82 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +277 -0
- package/dist/context.js.map +1 -0
- package/dist/contracts.d.ts +25 -0
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/doctor.d.ts +14 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +166 -7
- package/dist/doctor.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/fonts/add.d.ts +41 -0
- package/dist/fonts/add.d.ts.map +1 -0
- package/dist/fonts/add.js +259 -0
- package/dist/fonts/add.js.map +1 -0
- package/dist/fonts/binary.d.ts +4 -0
- package/dist/fonts/binary.d.ts.map +1 -0
- package/dist/fonts/binary.js +21 -0
- package/dist/fonts/binary.js.map +1 -0
- package/dist/fonts/css.d.ts +4 -0
- package/dist/fonts/css.d.ts.map +1 -0
- package/dist/fonts/css.js +50 -0
- package/dist/fonts/css.js.map +1 -0
- package/dist/fonts/fontsource.d.ts +107 -0
- package/dist/fonts/fontsource.d.ts.map +1 -0
- package/dist/fonts/fontsource.js +565 -0
- package/dist/fonts/fontsource.js.map +1 -0
- package/dist/fonts/index.d.ts +11 -0
- package/dist/fonts/index.d.ts.map +1 -0
- package/dist/fonts/index.js +11 -0
- package/dist/fonts/index.js.map +1 -0
- package/dist/fonts/install.d.ts +24 -0
- package/dist/fonts/install.d.ts.map +1 -0
- package/dist/fonts/install.js +145 -0
- package/dist/fonts/install.js.map +1 -0
- package/dist/fonts/manifest.d.ts +21 -0
- package/dist/fonts/manifest.d.ts.map +1 -0
- package/dist/fonts/manifest.js +96 -0
- package/dist/fonts/manifest.js.map +1 -0
- package/dist/fonts/options.d.ts +9 -0
- package/dist/fonts/options.d.ts.map +1 -0
- package/dist/fonts/options.js +66 -0
- package/dist/fonts/options.js.map +1 -0
- package/dist/fonts/schema.d.ts +4 -0
- package/dist/fonts/schema.d.ts.map +1 -0
- package/dist/fonts/schema.js +316 -0
- package/dist/fonts/schema.js.map +1 -0
- package/dist/fonts/summary.d.ts +16 -0
- package/dist/fonts/summary.d.ts.map +1 -0
- package/dist/fonts/summary.js +22 -0
- package/dist/fonts/summary.js.map +1 -0
- package/dist/fonts/types.d.ts +56 -0
- package/dist/fonts/types.d.ts.map +1 -0
- package/dist/fonts/types.js +8 -0
- package/dist/fonts/types.js.map +1 -0
- package/dist/fonts/verify.d.ts +33 -0
- package/dist/fonts/verify.d.ts.map +1 -0
- package/dist/fonts/verify.js +200 -0
- package/dist/fonts/verify.js.map +1 -0
- package/dist/html/validate.d.ts.map +1 -1
- package/dist/html/validate.js +59 -0
- package/dist/html/validate.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +61 -0
- package/dist/inspect.d.ts.map +1 -0
- package/dist/inspect.js +325 -0
- package/dist/inspect.js.map +1 -0
- package/dist/lint.d.ts +63 -0
- package/dist/lint.d.ts.map +1 -0
- package/dist/lint.js +265 -0
- package/dist/lint.js.map +1 -0
- package/dist/policy.d.ts +69 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +361 -0
- package/dist/policy.js.map +1 -0
- package/dist/preview/fonts/LICENSE-figtree.txt +93 -0
- package/dist/preview/fonts/LICENSE-space-mono.txt +93 -0
- package/dist/preview/fonts/README.md +23 -0
- package/dist/preview/fonts/figtree-latin-wght-normal.woff2 +0 -0
- package/dist/preview/fonts/space-mono-latin-400-normal.woff2 +0 -0
- package/dist/preview/fonts/space-mono-latin-700-normal.woff2 +0 -0
- package/dist/preview/main.js +5 -2
- package/dist/preview/main.js.map +1 -1
- package/dist/preview/timeline-data.d.ts +17 -69
- package/dist/preview/timeline-data.d.ts.map +1 -1
- package/dist/preview/timeline-host.d.ts.map +1 -1
- package/dist/preview/timeline-host.js +70 -45
- package/dist/preview/timeline-host.js.map +1 -1
- package/dist/preview/timeline-main.d.ts.map +1 -1
- package/dist/preview/timeline-main.js +88 -27
- package/dist/preview/timeline-main.js.map +1 -1
- package/dist/project.d.ts +10 -3
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +20 -17
- package/dist/project.js.map +1 -1
- package/dist/renderer/audio.d.ts +6 -0
- package/dist/renderer/audio.d.ts.map +1 -1
- package/dist/renderer/audio.js +3 -1
- package/dist/renderer/audio.js.map +1 -1
- package/dist/renderer/browser.d.ts.map +1 -1
- package/dist/renderer/browser.js +13 -0
- package/dist/renderer/browser.js.map +1 -1
- package/dist/renderer/concurrency.d.ts +6 -0
- package/dist/renderer/concurrency.d.ts.map +1 -0
- package/dist/renderer/concurrency.js +27 -0
- package/dist/renderer/concurrency.js.map +1 -0
- package/dist/renderer/ffmpeg.d.ts +104 -5
- package/dist/renderer/ffmpeg.d.ts.map +1 -1
- package/dist/renderer/ffmpeg.js +580 -67
- package/dist/renderer/ffmpeg.js.map +1 -1
- package/dist/renderer/index.js +1 -1
- package/dist/renderer/index.js.map +1 -1
- package/dist/renderer/keyframe-expressions.d.ts +39 -0
- package/dist/renderer/keyframe-expressions.d.ts.map +1 -0
- package/dist/renderer/keyframe-expressions.js +180 -0
- package/dist/renderer/keyframe-expressions.js.map +1 -0
- package/dist/renderer/session-pool.d.ts +28 -0
- package/dist/renderer/session-pool.d.ts.map +1 -0
- package/dist/renderer/session-pool.js +91 -0
- package/dist/renderer/session-pool.js.map +1 -0
- package/dist/renderer/timeline.d.ts +2 -0
- package/dist/renderer/timeline.d.ts.map +1 -1
- package/dist/renderer/timeline.js +600 -147
- package/dist/renderer/timeline.js.map +1 -1
- package/dist/renderer/timings.d.ts +13 -0
- package/dist/renderer/timings.d.ts.map +1 -0
- package/dist/renderer/timings.js +29 -0
- package/dist/renderer/timings.js.map +1 -0
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/host.js +4 -0
- package/dist/runtime/host.js.map +1 -1
- package/dist/scaffold.d.ts +3 -0
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +48 -320
- package/dist/scaffold.js.map +1 -1
- package/dist/server/composition-html.d.ts +2 -0
- package/dist/server/composition-html.d.ts.map +1 -1
- package/dist/server/composition-html.js +7 -0
- package/dist/server/composition-html.js.map +1 -1
- package/dist/server/preview-html.d.ts.map +1 -1
- package/dist/server/preview-html.js +74 -188
- package/dist/server/preview-html.js.map +1 -1
- package/dist/server/preview-style.d.ts +11 -0
- package/dist/server/preview-style.d.ts.map +1 -0
- package/dist/server/preview-style.js +298 -0
- package/dist/server/preview-style.js.map +1 -0
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +31 -1
- package/dist/server/server.js.map +1 -1
- package/dist/server/timeline-preview-data.d.ts.map +1 -1
- package/dist/server/timeline-preview-data.js +12 -34
- package/dist/server/timeline-preview-data.js.map +1 -1
- package/dist/server/timeline-preview-html.d.ts.map +1 -1
- package/dist/server/timeline-preview-html.js +140 -148
- package/dist/server/timeline-preview-html.js.map +1 -1
- package/dist/templates.d.ts +16 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +186 -0
- package/dist/templates.js.map +1 -0
- package/dist/timeline/easing.d.ts +36 -0
- package/dist/timeline/easing.d.ts.map +1 -0
- package/dist/timeline/easing.js +225 -0
- package/dist/timeline/easing.js.map +1 -0
- package/dist/timeline/keyframes.d.ts +23 -0
- package/dist/timeline/keyframes.d.ts.map +1 -0
- package/dist/timeline/keyframes.js +95 -0
- package/dist/timeline/keyframes.js.map +1 -0
- package/dist/timeline/plan.d.ts +6 -12
- package/dist/timeline/plan.d.ts.map +1 -1
- package/dist/timeline/plan.js +17 -30
- package/dist/timeline/plan.js.map +1 -1
- package/dist/timeline/resolve.d.ts +12 -0
- package/dist/timeline/resolve.d.ts.map +1 -1
- package/dist/timeline/resolve.js +105 -9
- package/dist/timeline/resolve.js.map +1 -1
- package/dist/timeline/scene.d.ts +126 -0
- package/dist/timeline/scene.d.ts.map +1 -0
- package/dist/timeline/scene.js +109 -0
- package/dist/timeline/scene.js.map +1 -0
- package/dist/timeline/schema.d.ts +31 -0
- package/dist/timeline/schema.d.ts.map +1 -1
- package/dist/timeline/schema.js +240 -9
- package/dist/timeline/schema.js.map +1 -1
- package/dist/timeline/transitions.d.ts +21 -0
- package/dist/timeline/transitions.d.ts.map +1 -0
- package/dist/timeline/transitions.js +23 -0
- package/dist/timeline/transitions.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/docs/adr/0007-make-html-documents-the-composition-unit.md +1 -1
- package/docs/adr/0010-make-timelines-the-render-unit.md +3 -2
- package/docs/adr/0012-render-timelines-with-segmented-lossless-clip-intermediates.md +1 -1
- package/docs/adr/0014-compose-timeline-clips-with-css-blend-modes.md +2 -1
- package/docs/adr/0015-inherit-composition-format-from-the-project.md +2 -2
- package/docs/adr/0016-author-compositions-as-html-fragments.md +1 -1
- package/docs/adr/0018-animate-timeline-clips-with-keyframes.md +35 -0
- package/docs/adr/0019-make-same-track-overlap-the-transition-window.md +36 -0
- package/docs/adr/0020-crossfade-audio-clips-on-audio-tracks.md +27 -0
- package/docs/adr/0021-project-timeline-scenes-once.md +32 -0
- package/docs/adr/0022-gate-heavy-operations-with-a-workspace-resource-policy.md +35 -0
- package/docs/adr/0023-pin-fonts-as-project-assets.md +98 -0
- package/docs/adr/0024-stream-composition-captures-and-skip-trivial-composites.md +86 -0
- package/docs/adr/0025-capture-timeline-layers-in-parallel-with-a-global-limit.md +67 -0
- package/docs/adr/0026-reuse-loaded-composition-sessions-across-segments.md +70 -0
- package/docs/adr/0027-encode-two-full-frame-layers-through-dual-pipes.md +76 -0
- package/docs/adr/0028-encode-full-frame-video-segments-directly.md +65 -0
- package/docs/migration-0.4.md +2 -2
- package/docs/preview-testing.md +27 -6
- package/docs/{v0.1-design.md → v0.x-design.md} +57 -32
- package/examples/blend/README.md +3 -3
- package/examples/demo/README.md +2 -2
- package/examples/intro/README.md +71 -0
- package/examples/intro/assets/fonts/figtree/LICENSE.txt +93 -0
- package/examples/intro/assets/fonts/figtree/figtree-latin-wght-normal.woff2 +0 -0
- package/examples/intro/assets/fonts/instrument-serif/LICENSE.txt +93 -0
- package/examples/intro/assets/fonts/instrument-serif/instrument-serif-latin-400-italic.woff2 +0 -0
- package/examples/intro/assets/fonts/space-mono/LICENSE.txt +93 -0
- package/examples/intro/assets/fonts/space-mono/space-mono-latin-400-normal.woff2 +0 -0
- package/examples/intro/assets/fonts/space-mono/space-mono-latin-700-normal.woff2 +0 -0
- package/examples/intro/assets/grain.png +0 -0
- package/examples/intro/assets/score.ogg +0 -0
- package/examples/intro/compositions/brand.html +412 -0
- package/examples/intro/compositions/chrome.controller.js +63 -0
- package/examples/intro/compositions/chrome.html +256 -0
- package/examples/intro/compositions/lattice.controller.js +148 -0
- package/examples/intro/compositions/lattice.html +308 -0
- package/examples/intro/compositions/opening.html +504 -0
- package/examples/intro/compositions/studio.html +930 -0
- package/examples/intro/compositions/theme.css +218 -0
- package/examples/intro/fy.config.js +13 -0
- package/examples/intro/fy.fonts.json +100 -0
- package/examples/intro/scripts/make-grain.mjs +79 -0
- package/examples/intro/scripts/make-score.mjs +702 -0
- package/examples/intro/timelines/intro.timeline.json +60 -0
- package/examples/keyframes/README.md +76 -0
- package/examples/keyframes/compositions/backdrop.html +60 -0
- package/examples/keyframes/compositions/card.html +99 -0
- package/examples/keyframes/fy.config.js +10 -0
- package/examples/keyframes/timelines/keyframes.timeline.json +60 -0
- package/examples/nested/README.md +112 -0
- package/examples/nested/assets/pulse.wav +0 -0
- package/examples/nested/compositions/backdrop.html +84 -0
- package/examples/nested/compositions/card.html +275 -0
- package/examples/nested/compositions/overlay.html +307 -0
- package/examples/nested/fy.config.js +13 -0
- package/examples/nested/scripts/make-pulse.sh +20 -0
- package/examples/nested/timelines/chapter-a.timeline.json +39 -0
- package/examples/nested/timelines/chapter-b.timeline.json +39 -0
- package/examples/nested/timelines/nested-reel.timeline.json +52 -0
- package/examples/static/README.md +2 -2
- package/examples/transitions/README.md +128 -0
- package/examples/transitions/assets/alpha.wav +0 -0
- package/examples/transitions/assets/beta.wav +0 -0
- package/examples/transitions/assets/gamma.wav +0 -0
- package/examples/transitions/compositions/alpha.html +56 -0
- package/examples/transitions/compositions/beta.html +56 -0
- package/examples/transitions/compositions/gamma.html +56 -0
- package/examples/transitions/fy.config.js +12 -0
- package/examples/transitions/timelines/audio-crossfade.timeline.json +44 -0
- package/examples/transitions/timelines/transitions.timeline.json +31 -0
- package/examples/video/README.md +4 -4
- package/examples/webgl/README.md +1 -1
- package/package.json +13 -6
- package/scaffolds/init/AGENTS.md +131 -0
- package/scaffolds/init/README.md +56 -0
- package/scaffolds/init/compositions/hello.html +79 -0
- package/scaffolds/init/fy.config.js +9 -0
- package/scaffolds/init/gitignore.template +1 -0
- package/scaffolds/init/package.json +11 -0
- package/scaffolds/init/props/hello.json +4 -0
- package/scaffolds/init/props/main.json +6 -0
- package/scaffolds/init/timelines/main.timeline.json +20 -0
- package/scaffolds/local-models/LOCAL-MODELS.md +77 -0
- package/scaffolds/local-models/fy.policy.json +5 -0
- package/scaffolds/local-models/opencode/opencode.jsonc +17 -0
- package/scaffolds/local-models/pi/APPEND_SYSTEM.md +21 -0
- package/scaffolds/local-models/pi/sandbox.json +15 -0
- package/scaffolds/local-models/pi/settings.json +15 -0
- package/skills/frameyard/README.md +1 -0
- package/skills/frameyard/SKILL.md +59 -61
- package/skills/frameyard/references/audio-assets.md +32 -3
- package/skills/frameyard/references/common-mistakes.md +53 -2
- package/skills/frameyard/references/deterministic-authoring.md +10 -3
- package/skills/frameyard/references/diagnostics.md +31 -1
- package/skills/frameyard/references/failure-recovery.md +32 -6
- package/skills/frameyard/references/fonts.md +132 -0
- package/skills/frameyard/references/json-results.md +119 -6
- package/skills/frameyard/references/quick-reference.md +222 -0
- package/skills/frameyard/references/timelines.md +97 -7
- /package/examples/blend/{video.config.js → fy.config.js} +0 -0
- /package/examples/demo/{video.config.js → fy.config.js} +0 -0
- /package/examples/static/{video.config.js → fy.config.js} +0 -0
- /package/examples/video/{video.config.js → fy.config.js} +0 -0
- /package/examples/webgl/{video.config.js → fy.config.js} +0 -0
package/dist/policy.js
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { readFile, stat } from "node:fs/promises";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { isPlainObject } from "./contracts.js";
|
|
5
|
+
import { FrameyardError } from "./errors.js";
|
|
6
|
+
/** Project-local resource policy file discovered from the working directory upward. */
|
|
7
|
+
export const POLICY_FILE_NAME = "fy.policy.json";
|
|
8
|
+
export const POLICY_TIERS = ["light", "authoring", "full"];
|
|
9
|
+
export const RESOURCE_PROFILES = ["shared-cpu"];
|
|
10
|
+
export const MAX_STILL_FRAMES = 32;
|
|
11
|
+
export const SHARED_CPU_MAX_WORKERS = 2;
|
|
12
|
+
export const SHARED_CPU_MAX_CONCURRENCY = 1;
|
|
13
|
+
const POLICY_VERSION = 1;
|
|
14
|
+
const POLICY_FIELDS = new Set(["version", "policy", "profile", "maxStillFrames", "allowOverwrite"]);
|
|
15
|
+
export const TIER_DEFAULTS = {
|
|
16
|
+
light: { maxStillFrames: 1, allowOverwrite: false },
|
|
17
|
+
authoring: { maxStillFrames: 4, allowOverwrite: false },
|
|
18
|
+
full: { maxStillFrames: MAX_STILL_FRAMES, allowOverwrite: true },
|
|
19
|
+
};
|
|
20
|
+
function isPolicyTier(value) {
|
|
21
|
+
return typeof value === "string" && POLICY_TIERS.includes(value);
|
|
22
|
+
}
|
|
23
|
+
function isResourceProfile(value) {
|
|
24
|
+
return typeof value === "string" && RESOURCE_PROFILES.includes(value);
|
|
25
|
+
}
|
|
26
|
+
function policyError(message, details) {
|
|
27
|
+
throw new FrameyardError("POLICY_INVALID", message, { details });
|
|
28
|
+
}
|
|
29
|
+
async function isFile(filePath) {
|
|
30
|
+
try {
|
|
31
|
+
return (await stat(filePath)).isFile();
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** Walks up from a directory until it finds fy.policy.json. */
|
|
38
|
+
export async function findPolicyFile(start = process.cwd()) {
|
|
39
|
+
let current = path.resolve(start);
|
|
40
|
+
try {
|
|
41
|
+
if (!(await stat(current)).isDirectory()) {
|
|
42
|
+
current = path.dirname(current);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
while (true) {
|
|
49
|
+
const candidate = path.join(current, POLICY_FILE_NAME);
|
|
50
|
+
if (await isFile(candidate)) {
|
|
51
|
+
return candidate;
|
|
52
|
+
}
|
|
53
|
+
const parent = path.dirname(current);
|
|
54
|
+
if (parent === current) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
current = parent;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function validatePolicyFile(value, filePath) {
|
|
61
|
+
if (!isPlainObject(value)) {
|
|
62
|
+
policyError(`${POLICY_FILE_NAME} must contain a JSON object.`, {
|
|
63
|
+
path: filePath,
|
|
64
|
+
suggestion: `Write a policy file such as { "version": 1, "policy": "authoring" }.`,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
for (const key of Object.keys(value)) {
|
|
68
|
+
if (!POLICY_FIELDS.has(key)) {
|
|
69
|
+
policyError(`${POLICY_FILE_NAME} contains an unknown field "${key}".`, {
|
|
70
|
+
path: filePath,
|
|
71
|
+
jsonPath: `$.${key}`,
|
|
72
|
+
allowed: [...POLICY_FIELDS],
|
|
73
|
+
suggestion: "Remove the field or use one of the documented policy fields.",
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (value.version !== POLICY_VERSION) {
|
|
78
|
+
policyError(`${POLICY_FILE_NAME} must declare "version": ${POLICY_VERSION}.`, {
|
|
79
|
+
path: filePath,
|
|
80
|
+
jsonPath: "$.version",
|
|
81
|
+
value: value.version,
|
|
82
|
+
allowed: [POLICY_VERSION],
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (!isPolicyTier(value.policy)) {
|
|
86
|
+
policyError(`${POLICY_FILE_NAME} must declare policy as "light", "authoring", or "full".`, {
|
|
87
|
+
path: filePath,
|
|
88
|
+
jsonPath: "$.policy",
|
|
89
|
+
value: value.policy,
|
|
90
|
+
allowed: [...POLICY_TIERS],
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const tier = value.policy;
|
|
94
|
+
const defaults = TIER_DEFAULTS[tier];
|
|
95
|
+
if (value.profile !== undefined && !isResourceProfile(value.profile)) {
|
|
96
|
+
policyError(`${POLICY_FILE_NAME} profile must be "shared-cpu".`, {
|
|
97
|
+
path: filePath,
|
|
98
|
+
jsonPath: "$.profile",
|
|
99
|
+
value: value.profile,
|
|
100
|
+
allowed: [...RESOURCE_PROFILES],
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
let maxStillFrames = defaults.maxStillFrames;
|
|
104
|
+
if (value.maxStillFrames !== undefined) {
|
|
105
|
+
if (!Number.isInteger(value.maxStillFrames) ||
|
|
106
|
+
value.maxStillFrames < 1 ||
|
|
107
|
+
value.maxStillFrames > MAX_STILL_FRAMES) {
|
|
108
|
+
policyError(`${POLICY_FILE_NAME} maxStillFrames must be an integer from 1 to ${MAX_STILL_FRAMES}.`, {
|
|
109
|
+
path: filePath,
|
|
110
|
+
jsonPath: "$.maxStillFrames",
|
|
111
|
+
value: value.maxStillFrames,
|
|
112
|
+
allowed: { min: 1, max: MAX_STILL_FRAMES },
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (value.maxStillFrames > defaults.maxStillFrames) {
|
|
116
|
+
policyError(`${POLICY_FILE_NAME} maxStillFrames cannot exceed the ${tier} default of ${defaults.maxStillFrames}.`, {
|
|
117
|
+
path: filePath,
|
|
118
|
+
jsonPath: "$.maxStillFrames",
|
|
119
|
+
value: value.maxStillFrames,
|
|
120
|
+
limit: defaults.maxStillFrames,
|
|
121
|
+
suggestion: "A policy file can only tighten the tier limits.",
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
maxStillFrames = value.maxStillFrames;
|
|
125
|
+
}
|
|
126
|
+
let allowOverwrite = defaults.allowOverwrite;
|
|
127
|
+
if (value.allowOverwrite !== undefined) {
|
|
128
|
+
if (typeof value.allowOverwrite !== "boolean") {
|
|
129
|
+
policyError(`${POLICY_FILE_NAME} allowOverwrite must be a boolean.`, {
|
|
130
|
+
path: filePath,
|
|
131
|
+
jsonPath: "$.allowOverwrite",
|
|
132
|
+
value: value.allowOverwrite,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
if (value.allowOverwrite === true && !defaults.allowOverwrite) {
|
|
136
|
+
policyError(`${POLICY_FILE_NAME} allowOverwrite cannot be true in the ${tier} tier.`, {
|
|
137
|
+
path: filePath,
|
|
138
|
+
jsonPath: "$.allowOverwrite",
|
|
139
|
+
value: value.allowOverwrite,
|
|
140
|
+
suggestion: "A policy file can only tighten the tier limits; use FRAMEYARD_POLICY=full to allow overwrites.",
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
allowOverwrite = value.allowOverwrite;
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
tier,
|
|
147
|
+
...(value.profile !== undefined ? { profile: value.profile } : {}),
|
|
148
|
+
maxStillFrames,
|
|
149
|
+
allowOverwrite,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
async function loadPolicyFile(filePath) {
|
|
153
|
+
let text;
|
|
154
|
+
try {
|
|
155
|
+
text = await readFile(filePath, "utf8");
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
throw new FrameyardError("POLICY_INVALID", `Could not read ${filePath}.`, {
|
|
159
|
+
cause: error,
|
|
160
|
+
details: { path: filePath },
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
let value;
|
|
164
|
+
try {
|
|
165
|
+
value = JSON.parse(text);
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
policyError(`${filePath} is not valid JSON: ${error instanceof Error ? error.message : String(error)}`, {
|
|
169
|
+
path: filePath,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
...validatePolicyFile(value, filePath),
|
|
174
|
+
source: "file",
|
|
175
|
+
path: filePath,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Loads the resource policy for the current workspace.
|
|
180
|
+
*
|
|
181
|
+
* `FRAMEYARD_POLICY` replaces the policy file entirely, so an explicit human
|
|
182
|
+
* override also resets the file's profile and tightened limits. Without the
|
|
183
|
+
* variable, the nearest `fy.policy.json` from `cwd` upward wins; without
|
|
184
|
+
* a file, the default is `full`.
|
|
185
|
+
*/
|
|
186
|
+
export async function loadResourcePolicy(options = {}) {
|
|
187
|
+
const env = options.env ?? process.env;
|
|
188
|
+
const requested = env.FRAMEYARD_POLICY;
|
|
189
|
+
if (requested !== undefined) {
|
|
190
|
+
const value = requested.trim();
|
|
191
|
+
if (!isPolicyTier(value)) {
|
|
192
|
+
policyError(`FRAMEYARD_POLICY must be "light", "authoring", or "full"; received "${requested}".`, {
|
|
193
|
+
source: "env",
|
|
194
|
+
value: requested,
|
|
195
|
+
allowed: [...POLICY_TIERS],
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
const defaults = TIER_DEFAULTS[value];
|
|
199
|
+
return {
|
|
200
|
+
tier: value,
|
|
201
|
+
...defaults,
|
|
202
|
+
source: "env",
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const filePath = await findPolicyFile(options.cwd ?? process.cwd());
|
|
206
|
+
if (filePath === undefined) {
|
|
207
|
+
const defaults = TIER_DEFAULTS.full;
|
|
208
|
+
return {
|
|
209
|
+
tier: "full",
|
|
210
|
+
...defaults,
|
|
211
|
+
source: "default",
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
return loadPolicyFile(filePath);
|
|
215
|
+
}
|
|
216
|
+
/** Resolves the effective profile from the CLI flag and the policy file. */
|
|
217
|
+
export function resolveProfile(policy, requested) {
|
|
218
|
+
if (requested === undefined) {
|
|
219
|
+
return policy.profile;
|
|
220
|
+
}
|
|
221
|
+
if (!isResourceProfile(requested)) {
|
|
222
|
+
throw new FrameyardError("USAGE", `--profile must be "shared-cpu"; received "${requested}".`);
|
|
223
|
+
}
|
|
224
|
+
return requested;
|
|
225
|
+
}
|
|
226
|
+
/** Returns the operation allowlist for a tier. */
|
|
227
|
+
export function allowedOperations(tier) {
|
|
228
|
+
const operations = ["lint", "context", "doctor", "init", "dev", "still", "font"];
|
|
229
|
+
if (tier !== "light") {
|
|
230
|
+
operations.push("check");
|
|
231
|
+
}
|
|
232
|
+
if (tier === "full") {
|
|
233
|
+
operations.push("tts", "transcribe", "render");
|
|
234
|
+
}
|
|
235
|
+
return operations;
|
|
236
|
+
}
|
|
237
|
+
export function operationAllowed(tier, operation) {
|
|
238
|
+
return allowedOperations(tier).includes(operation);
|
|
239
|
+
}
|
|
240
|
+
function operationSuggestion(operation, tier) {
|
|
241
|
+
if (operation === "check") {
|
|
242
|
+
return "Use lint and still in the light tier, or run check from authoring or full.";
|
|
243
|
+
}
|
|
244
|
+
if (operation === "render" || operation === "tts" || operation === "transcribe") {
|
|
245
|
+
return `Run the command with --dry-run to produce a handoff plan, or set FRAMEYARD_POLICY=full when the user explicitly asks for the heavy operation.`;
|
|
246
|
+
}
|
|
247
|
+
if (operation === "font") {
|
|
248
|
+
return `Font list and verify are available in every tier; adding fonts requires authoring or full.`;
|
|
249
|
+
}
|
|
250
|
+
return `The ${tier} policy does not allow ${operation}.`;
|
|
251
|
+
}
|
|
252
|
+
export function assertOperationAllowed(policy, operation, options = {}) {
|
|
253
|
+
if (options.dryRun === true) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
if (operationAllowed(policy.tier, operation)) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
throw new FrameyardError("RESOURCE_POLICY_BLOCKED", `"${operation}" is blocked by the ${policy.tier} resource policy.`, {
|
|
260
|
+
details: {
|
|
261
|
+
policy: policy.tier,
|
|
262
|
+
operation,
|
|
263
|
+
allowed: allowedOperations(policy.tier),
|
|
264
|
+
suggestion: operationSuggestion(operation, policy.tier),
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
const TIER_ORDER = { light: 0, authoring: 1, full: 2 };
|
|
269
|
+
/** Requires a minimum tier for subcommands that share one policy operation. */
|
|
270
|
+
export function assertPolicyTier(policy, required, operation) {
|
|
271
|
+
if (TIER_ORDER[policy.tier] >= TIER_ORDER[required]) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
throw new FrameyardError("RESOURCE_POLICY_BLOCKED", `"${operation}" requires the ${required} resource policy; the active policy is ${policy.tier}.`, {
|
|
275
|
+
details: {
|
|
276
|
+
policy: policy.tier,
|
|
277
|
+
required,
|
|
278
|
+
operation,
|
|
279
|
+
allowed: allowedOperations(policy.tier),
|
|
280
|
+
suggestion: `Ask the user to run the command with FRAMEYARD_POLICY=${required} when it is intended.`,
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
export function assertStillFrameLimit(policy, requested) {
|
|
285
|
+
if (requested <= policy.maxStillFrames) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
throw new FrameyardError("RESOURCE_POLICY_LIMIT", `Still requested ${requested} frames; the ${policy.tier} policy allows at most ${policy.maxStillFrames}.`, {
|
|
289
|
+
details: {
|
|
290
|
+
policy: policy.tier,
|
|
291
|
+
limit: policy.maxStillFrames,
|
|
292
|
+
requested,
|
|
293
|
+
suggestion: `Capture at most ${policy.maxStillFrames} frames per invocation, or use FRAMEYARD_POLICY=full for a larger inspection batch.`,
|
|
294
|
+
},
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
export function assertOverwriteAllowed(policy, operation) {
|
|
298
|
+
if (policy.allowOverwrite) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
throw new FrameyardError("RESOURCE_POLICY_BLOCKED", `--${operation} is blocked by the ${policy.tier} resource policy.`, {
|
|
302
|
+
details: {
|
|
303
|
+
policy: policy.tier,
|
|
304
|
+
operation,
|
|
305
|
+
allowed: false,
|
|
306
|
+
suggestion: "Use a new output path, or ask the user to run the command with FRAMEYARD_POLICY=full when replacement is intended.",
|
|
307
|
+
},
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
export function assertProfileLimit(profile, option, requested, limit) {
|
|
311
|
+
if (requested <= limit) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
throw new FrameyardError("RESOURCE_PROFILE_CONFLICT", `--${option} ${requested} exceeds the ${profile} profile limit of ${limit}.`, {
|
|
315
|
+
details: {
|
|
316
|
+
profile,
|
|
317
|
+
option,
|
|
318
|
+
requested,
|
|
319
|
+
limit,
|
|
320
|
+
suggestion: "Lower the value, or omit --profile when the machine is not shared with a local model.",
|
|
321
|
+
},
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
export function shouldLowerPriority(policy, profile, requested) {
|
|
325
|
+
return requested || profile === "shared-cpu" || policy.tier === "authoring" || policy.tier === "light";
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Lowers the current process priority so it yields to a local model. Children
|
|
329
|
+
* inherit the nice value on Unix. This is best effort on platforms that do not
|
|
330
|
+
* expose process priorities.
|
|
331
|
+
*/
|
|
332
|
+
export function lowerProcessPriority() {
|
|
333
|
+
try {
|
|
334
|
+
const priority = process.platform === "win32" ? os.constants.priority.PRIORITY_BELOW_NORMAL : os.constants.priority.PRIORITY_LOW;
|
|
335
|
+
os.setPriority(0, priority);
|
|
336
|
+
}
|
|
337
|
+
catch {
|
|
338
|
+
// Priority changes are advisory; rendering still proceeds when unsupported.
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/** Serializable policy details for JSON results and diagnostics. */
|
|
342
|
+
export function policyDetails(policy) {
|
|
343
|
+
return {
|
|
344
|
+
policy: policy.tier,
|
|
345
|
+
...(policy.profile !== undefined ? { profile: policy.profile } : {}),
|
|
346
|
+
maxStillFrames: policy.maxStillFrames,
|
|
347
|
+
allowOverwrite: policy.allowOverwrite,
|
|
348
|
+
source: policy.source,
|
|
349
|
+
...(policy.path !== undefined ? { path: policy.path } : {}),
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
export function describePolicy(policy) {
|
|
353
|
+
const parts = [policy.tier];
|
|
354
|
+
if (policy.profile !== undefined) {
|
|
355
|
+
parts.push(policy.profile);
|
|
356
|
+
}
|
|
357
|
+
parts.push(`still ≤${policy.maxStillFrames}`);
|
|
358
|
+
parts.push(policy.allowOverwrite ? "overwrite allowed" : "overwrite blocked");
|
|
359
|
+
return parts.join(", ");
|
|
360
|
+
}
|
|
361
|
+
//# sourceMappingURL=policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,uFAAuF;AACvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAU,CAAC;AAGpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,YAAY,CAAU,CAAC;AAGzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEpG,MAAM,CAAC,MAAM,aAAa,GAMtB;IACF,KAAK,EAAE,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE;IACnD,SAAS,EAAE,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE;IACvD,IAAI,EAAE,EAAE,cA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KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpE,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,GAAG,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAA4B;IACzD,MAAM,KAAK,GAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;IAC9C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAC9E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree) Figtree-Italic[wght].ttf: Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Space Mono Project Authors (https://github.com/googlefonts/spacemono) SpaceMono-Italic.ttf: Copyright 2016 The Space Mono Project Authors (https://github.com/googlefonts/spacemono) SpaceMono-Bold.ttf: Copyright 2016 The Space Mono Project Authors (https://github.com/googlefonts/spacemono) SpaceMono-BoldItalic.ttf: Copyright 2016 The Space Mono Project Authors (https://github.com/googlefonts/spacemono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Preview chrome fonts
|
|
2
|
+
|
|
3
|
+
These faces are bundled with the framework so the composition and timeline
|
|
4
|
+
preview pages render in a stable type system regardless of the project's own
|
|
5
|
+
font manifest. They are served from
|
|
6
|
+
`/__frameyard/framework/preview/fonts/` and are not exposed to compositions;
|
|
7
|
+
compositions keep using the project font sheet injected into their document
|
|
8
|
+
shell.
|
|
9
|
+
|
|
10
|
+
| Family | File | Weight | SHA-256 |
|
|
11
|
+
| --- | --- | --- | --- |
|
|
12
|
+
| Figtree | `figtree-latin-wght-normal.woff2` | 300–900 (variable) | `4ba7d3d096695818fe0686be4f1e82c6b05134e18a22260336130335027462dd` |
|
|
13
|
+
| Space Mono | `space-mono-latin-400-normal.woff2` | 400 | `fb4a81a2d0a893e5c38c394a7e716a1cef0b24610a0af49c96f6d529bd66bf2b` |
|
|
14
|
+
| Space Mono | `space-mono-latin-700-normal.woff2` | 700 | `2d46bd159b53f55c41167a4f1540a074649464194fd1e416f5b4694a6c0f282c` |
|
|
15
|
+
|
|
16
|
+
Sources (Fontsource 5.3.0):
|
|
17
|
+
|
|
18
|
+
- `https://cdn.jsdelivr.net/fontsource/fonts/figtree:vf@5.3.0/latin-wght-normal.woff2`
|
|
19
|
+
- `https://cdn.jsdelivr.net/fontsource/fonts/space-mono@5.3.0/latin-400-normal.woff2`
|
|
20
|
+
- `https://cdn.jsdelivr.net/fontsource/fonts/space-mono@5.3.0/latin-700-normal.woff2`
|
|
21
|
+
|
|
22
|
+
Both families are licensed under the SIL Open Font License 1.1; the license
|
|
23
|
+
texts are `LICENSE-figtree.txt` and `LICENSE-space-mono.txt`.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/preview/main.js
CHANGED
|
@@ -80,13 +80,16 @@ function updateTransport() {
|
|
|
80
80
|
clockLabel.textContent = "0.00s";
|
|
81
81
|
scrubber.max = "0";
|
|
82
82
|
scrubber.value = "0";
|
|
83
|
+
scrubber.style.setProperty("--progress", "0%");
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
86
|
+
const lastFrame = Math.max(0, metadata.durationInFrames - 1);
|
|
85
87
|
frameLabel.textContent = String(currentFrame);
|
|
86
|
-
durationLabel.textContent = String(
|
|
88
|
+
durationLabel.textContent = String(lastFrame);
|
|
87
89
|
clockLabel.textContent = `${(currentFrame / metadata.fps).toFixed(2)}s`;
|
|
88
|
-
scrubber.max = String(
|
|
90
|
+
scrubber.max = String(lastFrame);
|
|
89
91
|
scrubber.value = String(currentFrame);
|
|
92
|
+
scrubber.style.setProperty("--progress", `${lastFrame > 0 ? (currentFrame / lastFrame) * 100 : 0}%`);
|
|
90
93
|
}
|
|
91
94
|
function setTransportEnabled(enabled) {
|
|
92
95
|
playButton.disabled = !enabled;
|