@hraness/slopcamera 3.2.4
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/NOTICE.md +60 -0
- package/PRIVACY.md +46 -0
- package/README.md +311 -0
- package/SECURITY.md +21 -0
- package/apps/desktop/README.md +966 -0
- package/apps/desktop/analysis/protocol.ts +223 -0
- package/apps/desktop/application/capability-binding.ts +594 -0
- package/apps/desktop/application/context.ts +97 -0
- package/apps/desktop/application/creative-iteration.ts +1385 -0
- package/apps/desktop/application/default-registry.ts +146 -0
- package/apps/desktop/application/directing-contract.ts +218 -0
- package/apps/desktop/application/directing-plan.ts +178 -0
- package/apps/desktop/application/errors.ts +18 -0
- package/apps/desktop/application/gateway-port.ts +867 -0
- package/apps/desktop/application/html-overlay-browser-runtime.ts +687 -0
- package/apps/desktop/application/html-overlay-integrity.ts +337 -0
- package/apps/desktop/application/html-overlay-renderer.ts +45 -0
- package/apps/desktop/application/index.ts +13 -0
- package/apps/desktop/application/operation-completion-checkpoint.ts +333 -0
- package/apps/desktop/application/operation-effects.ts +94 -0
- package/apps/desktop/application/operation.ts +224 -0
- package/apps/desktop/application/operations/analysis/faces.ts +244 -0
- package/apps/desktop/application/operations/analysis/music.ts +248 -0
- package/apps/desktop/application/operations/analysis/project-auto-zooms.ts +302 -0
- package/apps/desktop/application/operations/analysis/project-inactivity.ts +381 -0
- package/apps/desktop/application/operations/analysis/scenes.ts +272 -0
- package/apps/desktop/application/operations/analysis/shared.ts +202 -0
- package/apps/desktop/application/operations/derive/edit-batch.ts +967 -0
- package/apps/desktop/application/operations/derive/follow-faces.ts +454 -0
- package/apps/desktop/application/operations/edit/bind-candidate-revision.ts +91 -0
- package/apps/desktop/application/operations/edit/create-candidate-revision.ts +377 -0
- package/apps/desktop/application/operations/edit/create-revision.ts +255 -0
- package/apps/desktop/application/operations/edit/freeze-revision.ts +182 -0
- package/apps/desktop/application/operations/gateway/image.ts +41 -0
- package/apps/desktop/application/operations/gateway/index.ts +17 -0
- package/apps/desktop/application/operations/gateway/shared.ts +122 -0
- package/apps/desktop/application/operations/gateway/speech.ts +41 -0
- package/apps/desktop/application/operations/gateway/transcription.ts +42 -0
- package/apps/desktop/application/operations/gateway/video.ts +41 -0
- package/apps/desktop/application/operations/index.ts +31 -0
- package/apps/desktop/application/operations/iteration/create-candidate.ts +240 -0
- package/apps/desktop/application/operations/iteration/create-matrix.ts +117 -0
- package/apps/desktop/application/operations/iteration/select.ts +155 -0
- package/apps/desktop/application/operations/iteration/shared.ts +250 -0
- package/apps/desktop/application/operations/media/audio-effects.ts +376 -0
- package/apps/desktop/application/operations/media/binding.ts +79 -0
- package/apps/desktop/application/operations/media/capabilities.ts +112 -0
- package/apps/desktop/application/operations/media/color-grade.ts +343 -0
- package/apps/desktop/application/operations/media/html-overlay.ts +802 -0
- package/apps/desktop/application/operations/media/index.ts +8 -0
- package/apps/desktop/application/operations/media/ingest.ts +303 -0
- package/apps/desktop/application/operations/media/overlay.ts +729 -0
- package/apps/desktop/application/operations/media/shared.ts +845 -0
- package/apps/desktop/application/operations/media/transform-platform.ts +120 -0
- package/apps/desktop/application/operations/project/commit-edits.ts +2054 -0
- package/apps/desktop/application/operations/project/promote-selection.ts +495 -0
- package/apps/desktop/application/operations/project/snapshot.ts +95 -0
- package/apps/desktop/application/operations/recording/index.ts +5 -0
- package/apps/desktop/application/operations/recording/pause.ts +34 -0
- package/apps/desktop/application/operations/recording/resume.ts +34 -0
- package/apps/desktop/application/operations/recording/shared.ts +199 -0
- package/apps/desktop/application/operations/recording/start.ts +169 -0
- package/apps/desktop/application/operations/recording/stop.ts +34 -0
- package/apps/desktop/application/operations/render/bind-candidate-output.ts +324 -0
- package/apps/desktop/application/operations/render/materialize-selection.ts +322 -0
- package/apps/desktop/application/operations/render/project-caption-plan.ts +287 -0
- package/apps/desktop/application/operations/render/project-plan.ts +939 -0
- package/apps/desktop/application/operations/render/project-spatial-receipt.ts +70 -0
- package/apps/desktop/application/operations/render/project.ts +1922 -0
- package/apps/desktop/application/operations/shared.ts +67 -0
- package/apps/desktop/application/operations/slopcamera-portable.ts +1188 -0
- package/apps/desktop/application/operations/slopcamera-visuals.ts +784 -0
- package/apps/desktop/application/operations/spatial-project.ts +209 -0
- package/apps/desktop/application/operations/spatial-render.ts +415 -0
- package/apps/desktop/application/operations/spatial-scene.ts +97 -0
- package/apps/desktop/application/operations/studio.ts +143 -0
- package/apps/desktop/application/output-publication-lease.ts +163 -0
- package/apps/desktop/application/project-publication-lease.ts +233 -0
- package/apps/desktop/application/project-store.ts +196 -0
- package/apps/desktop/application/receipts.ts +533 -0
- package/apps/desktop/application/registry.ts +182 -0
- package/apps/desktop/application/spatial-assets.ts +675 -0
- package/apps/desktop/application/spatial-compositor-cadence.ts +23 -0
- package/apps/desktop/application/spatial-project-authority.ts +35 -0
- package/apps/desktop/application/spatial-project-lease.ts +126 -0
- package/apps/desktop/application/spatial-project-render-preparation.ts +225 -0
- package/apps/desktop/application/spatial-project-store.ts +286 -0
- package/apps/desktop/application/spatial-render-projection.ts +201 -0
- package/apps/desktop/application/spatial-render.ts +677 -0
- package/apps/desktop/application/spatial-spz.ts +44 -0
- package/apps/desktop/application/spatial-world-import.ts +135 -0
- package/apps/desktop/application/spatial-world-provenance.ts +46 -0
- package/apps/desktop/application/studio-port.ts +58 -0
- package/apps/desktop/application/verified-receipt-reconciliation.ts +1574 -0
- package/apps/desktop/capture/protocol.ts +689 -0
- package/apps/desktop/cli/analyzer.ts +406 -0
- package/apps/desktop/cli/args.ts +3181 -0
- package/apps/desktop/cli/asset-ingest.ts +747 -0
- package/apps/desktop/cli/atomic-render-effects.ts +210 -0
- package/apps/desktop/cli/atomic-render-platform.ts +205 -0
- package/apps/desktop/cli/atomic-render.ts +50 -0
- package/apps/desktop/cli/audio-analysis.ts +252 -0
- package/apps/desktop/cli/bounded-map.ts +39 -0
- package/apps/desktop/cli/bundle-service.ts +256 -0
- package/apps/desktop/cli/capabilities.ts +212 -0
- package/apps/desktop/cli/capture-bundle.ts +1117 -0
- package/apps/desktop/cli/command-host-resources.ts +251 -0
- package/apps/desktop/cli/commands.ts +6836 -0
- package/apps/desktop/cli/directing-blob.ts +291 -0
- package/apps/desktop/cli/directing-media.ts +517 -0
- package/apps/desktop/cli/directing-quote.ts +89 -0
- package/apps/desktop/cli/directing-service.ts +288 -0
- package/apps/desktop/cli/emoji-assets.ts +538 -0
- package/apps/desktop/cli/errors.ts +29 -0
- package/apps/desktop/cli/face-analysis-service.ts +940 -0
- package/apps/desktop/cli/filter-script.ts +76 -0
- package/apps/desktop/cli/gateway-application-port.ts +1142 -0
- package/apps/desktop/cli/gateway-credential.ts +81 -0
- package/apps/desktop/cli/gateway-media-artifacts.ts +723 -0
- package/apps/desktop/cli/gateway-media-catalog.ts +922 -0
- package/apps/desktop/cli/gateway-media-service.ts +3106 -0
- package/apps/desktop/cli/gateway-media-signature.ts +122 -0
- package/apps/desktop/cli/gateway-provider-options.ts +562 -0
- package/apps/desktop/cli/gateway-scene-provider.ts +391 -0
- package/apps/desktop/cli/help.ts +501 -0
- package/apps/desktop/cli/html-overlay-gpu.ts +97 -0
- package/apps/desktop/cli/html-overlay-renderer.ts +2478 -0
- package/apps/desktop/cli/io.ts +290 -0
- package/apps/desktop/cli/main.ts +123 -0
- package/apps/desktop/cli/media-effects-service.ts +885 -0
- package/apps/desktop/cli/media-ingest-model.ts +364 -0
- package/apps/desktop/cli/media-ingest-platform.ts +227 -0
- package/apps/desktop/cli/media-ingest-program.ts +200 -0
- package/apps/desktop/cli/media-ingest.ts +30 -0
- package/apps/desktop/cli/music-analysis-service.ts +434 -0
- package/apps/desktop/cli/mutation-lock.ts +530 -0
- package/apps/desktop/cli/native-assets.d.ts +12 -0
- package/apps/desktop/cli/native-media-runtime.macos.ts +7 -0
- package/apps/desktop/cli/overlay-playback.ts +177 -0
- package/apps/desktop/cli/paths.ts +265 -0
- package/apps/desktop/cli/portable-surface.ts +242 -0
- package/apps/desktop/cli/project-camera-receipt.ts +112 -0
- package/apps/desktop/cli/project-face-camera.ts +394 -0
- package/apps/desktop/cli/project-inactivity-service.ts +552 -0
- package/apps/desktop/cli/project-media-integrity.ts +121 -0
- package/apps/desktop/cli/project-renderer.ts +1526 -0
- package/apps/desktop/cli/project-service.ts +519 -0
- package/apps/desktop/cli/project-state-transaction.ts +520 -0
- package/apps/desktop/cli/query-limits.ts +1 -0
- package/apps/desktop/cli/recording-controller.ts +1567 -0
- package/apps/desktop/cli/recording-daemon.ts +931 -0
- package/apps/desktop/cli/recording-ref.ts +56 -0
- package/apps/desktop/cli/renamed-environment.ts +6 -0
- package/apps/desktop/cli/renderer.ts +1439 -0
- package/apps/desktop/cli/run-cli-test-helper.ts +60 -0
- package/apps/desktop/cli/scene-analysis-service.ts +879 -0
- package/apps/desktop/cli/spatial-compositor-verifier.ts +213 -0
- package/apps/desktop/cli/spatial-project-service.ts +90 -0
- package/apps/desktop/cli/spatial-scene-service.ts +105 -0
- package/apps/desktop/cli/spatial-world-service.ts +39 -0
- package/apps/desktop/cli/speech-analysis-service.ts +682 -0
- package/apps/desktop/cli/studio-assemble.ts +58 -0
- package/apps/desktop/cli/studio-command.ts +60 -0
- package/apps/desktop/cli/studio-custody.ts +60 -0
- package/apps/desktop/cli/studio-encode.ts +216 -0
- package/apps/desktop/cli/studio-exr.ts +52 -0
- package/apps/desktop/cli/studio-files.ts +179 -0
- package/apps/desktop/cli/studio-output-validation.ts +162 -0
- package/apps/desktop/cli/studio-process.ts +145 -0
- package/apps/desktop/cli/studio-runtime.ts +77 -0
- package/apps/desktop/cli/studio-scaffold.ts +70 -0
- package/apps/desktop/cli/studio-service.ts +301 -0
- package/apps/desktop/cli/studio-spatial-asset.ts +248 -0
- package/apps/desktop/cli/studio-template-names.ts +3 -0
- package/apps/desktop/cli/studio-workflow.ts +19 -0
- package/apps/desktop/cli/time.ts +25 -0
- package/apps/desktop/cli/workflow-code.ts +584 -0
- package/apps/desktop/cli/workflow-runs.ts +576 -0
- package/apps/desktop/code/advanced.ts +139 -0
- package/apps/desktop/code/application-node-planner.ts +1288 -0
- package/apps/desktop/code/compiler.ts +329 -0
- package/apps/desktop/code/contracts.ts +13 -0
- package/apps/desktop/code/creative-recipes.ts +94 -0
- package/apps/desktop/code/define-workflow.ts +115 -0
- package/apps/desktop/code/editing.ts +284 -0
- package/apps/desktop/code/file-candidate-provenance.ts +420 -0
- package/apps/desktop/code/file-candidate.ts +69 -0
- package/apps/desktop/code/graph-builder.ts +10 -0
- package/apps/desktop/code/host-resource-policy.ts +55 -0
- package/apps/desktop/code/plan-contracts.ts +159 -0
- package/apps/desktop/code/planning.ts +361 -0
- package/apps/desktop/code/public.ts +134 -0
- package/apps/desktop/code/reference-projection.ts +62 -0
- package/apps/desktop/code/run-contracts.ts +466 -0
- package/apps/desktop/code/run-store.ts +2478 -0
- package/apps/desktop/code/runtime-identity.ts +328 -0
- package/apps/desktop/code/scheduler.ts +3067 -0
- package/apps/desktop/code/semantic-builder.ts +1436 -0
- package/apps/desktop/code/source-bundle.ts +1641 -0
- package/apps/desktop/code/source-typecheck.ts +211 -0
- package/apps/desktop/code/testing.ts +79 -0
- package/apps/desktop/code/worker-client.ts +1675 -0
- package/apps/desktop/code/worker-effects.ts +141 -0
- package/apps/desktop/code/worker-entry.ts +435 -0
- package/apps/desktop/code/worker-lease-guardian.ts +179 -0
- package/apps/desktop/code/worker-process-identity.ts +484 -0
- package/apps/desktop/code/worker-protocol.ts +211 -0
- package/apps/desktop/code/workflow-effects.ts +132 -0
- package/apps/desktop/contracts/analysis.ts +949 -0
- package/apps/desktop/contracts/edit.ts +576 -0
- package/apps/desktop/contracts/index.ts +9 -0
- package/apps/desktop/contracts/media-effects.ts +139 -0
- package/apps/desktop/contracts/project-render.ts +644 -0
- package/apps/desktop/contracts/project.ts +740 -0
- package/apps/desktop/contracts/recording.ts +1434 -0
- package/apps/desktop/contracts/render.ts +334 -0
- package/apps/desktop/contracts/runtime.ts +155 -0
- package/apps/desktop/contracts/spatial-compositor.ts +58 -0
- package/apps/desktop/contracts/spatial-project.ts +159 -0
- package/apps/desktop/contracts/spatial-world.ts +48 -0
- package/apps/desktop/contracts/video-effects.ts +120 -0
- package/apps/desktop/core/alignment-apply.ts +400 -0
- package/apps/desktop/core/audio-alignment.ts +466 -0
- package/apps/desktop/core/auto-zoom.ts +209 -0
- package/apps/desktop/core/canonical-json.ts +14 -0
- package/apps/desktop/core/emoji.ts +210 -0
- package/apps/desktop/core/events.ts +409 -0
- package/apps/desktop/core/face-framing.ts +533 -0
- package/apps/desktop/core/face-tracks.ts +326 -0
- package/apps/desktop/core/inactivity.ts +137 -0
- package/apps/desktop/core/index.ts +30 -0
- package/apps/desktop/core/intervals.ts +123 -0
- package/apps/desktop/core/montage.ts +236 -0
- package/apps/desktop/core/music-analysis.ts +518 -0
- package/apps/desktop/core/plan.ts +244 -0
- package/apps/desktop/core/project-auto-zoom.ts +75 -0
- package/apps/desktop/core/project-camera-spatial.ts +676 -0
- package/apps/desktop/core/project-camera.ts +403 -0
- package/apps/desktop/core/project-captions.ts +888 -0
- package/apps/desktop/core/project-inactivity.ts +125 -0
- package/apps/desktop/core/project-metadata.ts +927 -0
- package/apps/desktop/core/project-plan.ts +375 -0
- package/apps/desktop/core/project-render-plan.ts +303 -0
- package/apps/desktop/core/project-time.ts +469 -0
- package/apps/desktop/core/render-plan.ts +442 -0
- package/apps/desktop/core/scene-cache.ts +174 -0
- package/apps/desktop/core/scene-sampling.ts +448 -0
- package/apps/desktop/core/spatial-compositor.ts +22 -0
- package/apps/desktop/core/spatial-durability.ts +99 -0
- package/apps/desktop/core/spatial-project.ts +169 -0
- package/apps/desktop/core/spatial-shot-clock.ts +32 -0
- package/apps/desktop/core/speech-analysis.ts +333 -0
- package/apps/desktop/core/storage.ts +970 -0
- package/apps/desktop/core/time-map.ts +91 -0
- package/apps/desktop/core/time.ts +61 -0
- package/apps/desktop/core/video-effects.ts +660 -0
- package/apps/desktop/dist/cli/NebulaSans-Bold-26se8aek.otf +0 -0
- package/apps/desktop/dist/cli/NebulaSans-Bold-bcz7y08t.woff2 +0 -0
- package/apps/desktop/dist/cli/NebulaSans-Book-5ax05zvn.woff2 +0 -0
- package/apps/desktop/dist/cli/NebulaSans-Book-8cenzchw.otf +0 -0
- package/apps/desktop/dist/cli/main.js +5086 -0
- package/apps/desktop/html-overlay/catalog.ts +171 -0
- package/apps/desktop/html-overlay/contracts.ts +372 -0
- package/apps/desktop/html-overlay/execution-profile.ts +77 -0
- package/apps/desktop/html-overlay/index.ts +98 -0
- package/apps/desktop/html-overlay/libraries.ts +263 -0
- package/apps/desktop/html-overlay/random.ts +49 -0
- package/apps/desktop/html-overlay/runtime.ts +813 -0
- package/apps/desktop/html-overlay/scaffolds.ts +792 -0
- package/apps/desktop/html-overlay/spark-runtime.ts +88 -0
- package/apps/desktop/html-overlay/spatial-splat-runtime.ts +60 -0
- package/apps/desktop/html-overlay/spatial.ts +720 -0
- package/apps/desktop/studio/assets/README.md +39 -0
- package/apps/desktop/studio/assets/contracts.ts +129 -0
- package/apps/desktop/studio/assets/network.ts +64 -0
- package/apps/desktop/studio/assets/poly-haven.ts +148 -0
- package/apps/desktop/studio/drivers/blender_driver.py +466 -0
- package/apps/desktop/studio/drivers/cadquery_driver.py +176 -0
- package/apps/desktop/studio/education/driver.py +308 -0
- package/apps/desktop/studio/education/lesson.py +180 -0
- package/apps/desktop/studio/education/toolkit.py +249 -0
- package/apps/desktop/workflows/chaptered-demo.ts +48 -0
- package/apps/desktop/workflows/creative-iteration.ts +107 -0
- package/apps/desktop/workflows/creative-selection.ts +92 -0
- package/apps/desktop/workflows/fragments.ts +486 -0
- package/apps/desktop/workflows/index.ts +93 -0
- package/apps/desktop/workflows/polished-screen-demo.ts +128 -0
- package/apps/desktop/workflows/scene-direction.ts +12 -0
- package/apps/desktop/workflows/social-variants.ts +75 -0
- package/apps/desktop/workflows/talking-head-cleanup.ts +53 -0
- package/dist/NebulaSans-Bold-26se8aek.otf +0 -0
- package/dist/NebulaSans-Bold-bcz7y08t.woff2 +0 -0
- package/dist/NebulaSans-Book-5ax05zvn.woff2 +0 -0
- package/dist/NebulaSans-Book-8cenzchw.otf +0 -0
- package/dist/cli.js +479 -0
- package/dist/code/advanced.js +270 -0
- package/dist/code/index.js +2240 -0
- package/dist/generate.js +24 -0
- package/dist/host-resources.js +26 -0
- package/dist/index-42zsesc1.js +2257 -0
- package/dist/index-7308egqr.js +48 -0
- package/dist/index-8txs6fkn.js +712 -0
- package/dist/index-mcy8z0br.js +192 -0
- package/dist/index-p63wavx0.js +2029 -0
- package/dist/index-r7gdhmsp.js +424 -0
- package/dist/index-sh6xbav6.js +1219 -0
- package/dist/index-z1w83f81.js +4 -0
- package/dist/index-z7239b4h.js +2363 -0
- package/dist/index-zfeg9hmw.js +2013 -0
- package/dist/index.js +241 -0
- package/dist/operations.js +29 -0
- package/dist/skill-install-dh0ntqba.js +10 -0
- package/dist/vectorize/worker.js +142 -0
- package/dist/workflow.js +16 -0
- package/docs/README.md +38 -0
- package/docs/studio.md +215 -0
- package/examples/studio/blender/README.md +26 -0
- package/examples/studio/blender/character.py +152 -0
- package/examples/studio/blender/cloth.py +101 -0
- package/examples/studio/blender/color_chart.py +29 -0
- package/examples/studio/blender/fluid.py +78 -0
- package/examples/studio/blender/import_model.py +74 -0
- package/examples/studio/blender/product.py +53 -0
- package/examples/studio/blender/shaded_street.py +481 -0
- package/examples/studio/blender/studio_scene.py +147 -0
- package/examples/studio/cadquery/README.md +13 -0
- package/examples/studio/cadquery/bracket.py +36 -0
- package/examples/studio/cadquery/import_step.py +12 -0
- package/examples/studio/education/README.md +46 -0
- package/examples/studio/education/lesson.json +99 -0
- package/examples/studio/education/scene.py +7 -0
- package/examples/studio/hybrid-scene.ts +96 -0
- package/examples/studio/native-workflow.ts +14 -0
- package/examples/studio/vgpu/README.md +64 -0
- package/examples/studio/vgpu/heat-field.mjs +290 -0
- package/package.json +304 -0
- package/packages/scene/src/index.ts +1 -0
- package/packages/scene/src/scene.ts +215 -0
- package/schema/diagram.schema.json +334 -0
- package/skills/slopcamera/SKILL.md +45 -0
- package/skills/slopcamera/agents/openai.yaml +4 -0
- package/skills/slopcamera/references/customization.md +77 -0
- package/skills/slopcamera/references/diagrams.md +153 -0
- package/skills/slopcamera/references/directed-scenes.md +42 -0
- package/skills/slopcamera/references/directing-video.md +18 -0
- package/skills/slopcamera/references/educational-video.md +26 -0
- package/skills/slopcamera/references/gateway-media.md +134 -0
- package/skills/slopcamera/references/install.md +62 -0
- package/skills/slopcamera/references/native-studio.md +31 -0
- package/skills/slopcamera/references/reference-led-3d.md +140 -0
- package/skills/slopcamera/references/rubber-stamp-examples/poster-example-1.jpg +0 -0
- package/skills/slopcamera/references/rubber-stamp-examples/poster-example-2.jpg +0 -0
- package/skills/slopcamera/references/rubber-stamp-examples/stamp-style-1.png +0 -0
- package/skills/slopcamera/references/rubber-stamp-examples/stamp-style-2.png +0 -0
- package/skills/slopcamera/references/rubber-stamp-field-notes.md +144 -0
- package/skills/slopcamera/references/vectorization.md +29 -0
- package/skills/slopcamera/references/video-projects.md +187 -0
- package/skills/slopcamera/references/visual-communication.md +120 -0
- package/skills/slopcamera/references/workflows-sdk.md +45 -0
- package/skills/slopcamera/scripts/compose-rubber-stamp-field-note.ts +229 -0
- package/src/artifacts.ts +106 -0
- package/src/assets/fonts/nebula-sans/LICENSE.txt +96 -0
- package/src/assets/fonts/nebula-sans/NebulaSans-Bold.otf +0 -0
- package/src/assets/fonts/nebula-sans/NebulaSans-Bold.woff2 +0 -0
- package/src/assets/fonts/nebula-sans/NebulaSans-Book.otf +0 -0
- package/src/assets/fonts/nebula-sans/NebulaSans-Book.woff2 +0 -0
- package/src/assets/fonts/nebula-sans/PROVENANCE.md +21 -0
- package/src/assets.d.ts +9 -0
- package/src/cli.ts +601 -0
- package/src/cloud-errors.ts +26 -0
- package/src/code/advanced.ts +10 -0
- package/src/code/boundary.ts +21 -0
- package/src/code/canonical-json.ts +129 -0
- package/src/code/compiler.ts +953 -0
- package/src/code/contracts.ts +576 -0
- package/src/code/define-workflow.ts +334 -0
- package/src/code/errors.ts +41 -0
- package/src/code/graph-builder.ts +945 -0
- package/src/code/index.ts +121 -0
- package/src/code/json-snapshot.ts +899 -0
- package/src/code/json-utf8.ts +88 -0
- package/src/code/portable-builder.ts +136 -0
- package/src/code/projection.ts +378 -0
- package/src/code/public-operations.ts +450 -0
- package/src/code/runtime.ts +580 -0
- package/src/code/sha256.ts +36 -0
- package/src/config.ts +180 -0
- package/src/desktop.ts +253 -0
- package/src/fs.ts +10 -0
- package/src/generate.ts +704 -0
- package/src/host-resource-posix.ts +161 -0
- package/src/host-resources.ts +1749 -0
- package/src/icons.ts +58 -0
- package/src/index.ts +200 -0
- package/src/label-layout.ts +130 -0
- package/src/layout.ts +413 -0
- package/src/lint.ts +127 -0
- package/src/mcp/boundary.ts +354 -0
- package/src/mcp/index.ts +33 -0
- package/src/mcp/server.ts +272 -0
- package/src/mcp/tools.ts +963 -0
- package/src/mcp/types.ts +71 -0
- package/src/operations.ts +775 -0
- package/src/parse.ts +861 -0
- package/src/process-environment.ts +17 -0
- package/src/render.ts +437 -0
- package/src/skill-install.ts +49 -0
- package/src/spatial-scene/authoring.ts +27 -0
- package/src/spatial-scene/camera-track.ts +83 -0
- package/src/spatial-scene/contracts.ts +277 -0
- package/src/spatial-scene/evaluate.ts +145 -0
- package/src/spatial-scene/gltf.ts +558 -0
- package/src/spatial-scene/identity.ts +260 -0
- package/src/spatial-scene/index.ts +10 -0
- package/src/spatial-scene/inspect.ts +68 -0
- package/src/spatial-scene/math.ts +280 -0
- package/src/spatial-scene/patch.ts +131 -0
- package/src/spatial-scene/time.ts +53 -0
- package/src/studio/contracts.ts +129 -0
- package/src/studio/index.ts +2 -0
- package/src/studio/plan.ts +156 -0
- package/src/studio/shared.ts +41 -0
- package/src/theme.ts +68 -0
- package/src/tldr.ts +474 -0
- package/src/types.ts +212 -0
- package/src/vectorize/archive.ts +101 -0
- package/src/vectorize/command.ts +797 -0
- package/src/vectorize/index.ts +27 -0
- package/src/vectorize/limits.ts +61 -0
- package/src/vectorize/metrics.ts +351 -0
- package/src/vectorize/pixels.ts +323 -0
- package/src/vectorize/supervisor.ts +339 -0
- package/src/vectorize/svg.ts +188 -0
- package/src/vectorize/tool.ts +542 -0
- package/src/vectorize/types.ts +113 -0
- package/src/vectorize/vectorize.ts +634 -0
- package/src/vectorize/worker-protocol.ts +40 -0
- package/src/vectorize/worker.ts +209 -0
- package/src/version.ts +1 -0
- package/src/workflow.ts +409 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Use SDKs and durable workflows
|
|
2
|
+
|
|
3
|
+
Use `slopcamera workflows list --json` and `slopcamera workflows show <id> --json` to discover checked recipes and their actual inputs. Built-ins include `talking-head-cleanup`, `polished-screen-demo`, `chaptered-demo`, `social-variants`, `creative-iteration`, `creative-selection` and `directed-scene`. Keep ordinary project edits complete before a V2 scene migration.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
slopcamera workflows plan <id> --input input.json --json
|
|
7
|
+
slopcamera workflows run <id> --input input.json --json
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
For custom local authoring, use `slopcamera code init workflow.ts`, inspect the starter and its input schema, then `code check`, `code plan` and `code run`. Use `slopcamera help code` for their required `--input` and exact `--plan` flags. Loading a custom module for check or plan runs its trusted Bun top-level code; withheld registered effects are not an OS sandbox.
|
|
11
|
+
|
|
12
|
+
## Select the SDK boundary
|
|
13
|
+
|
|
14
|
+
`@hraness/slopcamera/code` is the portable fixed four-operation diagram/image projection. Portable scene and studio schemas do not grant native executors. `@hraness/slopcamera/workflow` preserves the explicitly imported imperative API. `@hraness/slopcamera/local/code` adds the complete closed local media builder, including `.scene`, `.spatialProject`, `.studio`, `.gateway`, `.media`, `.project` and `.render`. Use `@hraness/slopcamera/local/code/workflows` for built-ins, never the nonexistent portable `code/workflows` or `code/testing` imports.
|
|
15
|
+
|
|
16
|
+
Discover exact local inputs with `slopcamera operations list|show`. No host accepts arbitrary new operation registration or caller-selected shell/argv. The fixed `slopcamera.studio.run` is an explicit exception for previously retained native source: its bundle/job input remains typed, while executable paths and trusted-current-user authority belong to the host invocation. The checked `examples/studio/native-workflow.ts` uses `defineWorkflow` and `StudioRunInputSchema` from the local entrypoint.
|
|
17
|
+
|
|
18
|
+
`media.ingest` needs an existing ordinary project. There is no public arbitrary-file project bootstrap or SDK project-create operation. Follow [video projects](video-projects.md) for the supported recording/native/directing entry paths; never synthesize their receipts or depend on private constructors.
|
|
19
|
+
|
|
20
|
+
## Inspect, approve and resume exact work
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
slopcamera runs show <run-id> --json
|
|
24
|
+
slopcamera runs resume <run-id> --json
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If paused for approval, read the returned exact preparation or node plan and use `runs approve` with its `--preparation-plan` or `--node-plan` flag. Approval records a decision; a later resume performs work. Do not grant a broader plan than the task authorized.
|
|
28
|
+
|
|
29
|
+
Native workflow execution also needs `--allow-trusted-code` and the selected `--studio-blender-bin` or `--studio-python` on the execution/resume invocation. A generic effect approval cannot confer native source authority. A completed exact receipt may replay without those execution settings. Private Gateway provider options must be supplied again with the same digest when required; do not store credentials in workflow JSON.
|
|
30
|
+
|
|
31
|
+
Keep run IDs, errors and receipts after failure. A missing journal does not prove that an effect was never dispatched. Use `--replay-ambiguous-code <node>` only for an explicitly authorized new execution of uncertain trusted code, not as a routine retry. Cancellation does not undo a published output or provider charge.
|
|
32
|
+
|
|
33
|
+
## Use the portable MCP surface narrowly
|
|
34
|
+
|
|
35
|
+
When connected, use `check_diagram` and `render_diagram` for compatibility calls, or `search_slopcamera` and `execute_slopcamera` with one exact returned operation and typed JSON. No tool rewrites source.
|
|
36
|
+
|
|
37
|
+
- Use root-relative paths. A diagram must end in `.diagram.json`.
|
|
38
|
+
- Diagram render replaces the five documented exports, never its source.
|
|
39
|
+
- MCP bounds diagrams to 64 shapes and 128 edges and reports at most 40 findings. Use the CLI for larger checked sources.
|
|
40
|
+
- MCP uses built-in themes/icons and never executes workspace configuration; trusted custom config belongs to the CLI.
|
|
41
|
+
- `slopcamera.image.vectorize` keeps raster bytes local and needs no login.
|
|
42
|
+
- `slopcamera.image.generate` accepts a root-relative `.webp` output and the two exact registry model IDs; it has no automatic retry.
|
|
43
|
+
- Never submit source code, shell text, dynamic imports, arbitrary remote URLs or unregistered names to semantic execution.
|
|
44
|
+
|
|
45
|
+
The equivalent portable CLI is `slopcamera code search '<terms>' --limit 4` followed by `slopcamera code execute <exact-code> --input '<strict JSON>'`. This small semantic surface is distinct from loading an explicitly trusted local workflow module.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Compose one rubber-stamp travel field-note poster.
|
|
4
|
+
*
|
|
5
|
+
* Left ~58%: the source photograph (cover-cropped, never redrawn).
|
|
6
|
+
* Right ~42%: warm paper + a generated stamp vignette + typewriter text.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* bun skills/slopcamera/scripts/compose-rubber-stamp-field-note.ts \
|
|
10
|
+
* --photo /abs/photo.jpg \
|
|
11
|
+
* --stamp /abs/stamp.png \
|
|
12
|
+
* --output /abs/out.jpg \
|
|
13
|
+
* --place "VENICE" \
|
|
14
|
+
* --number "01" \
|
|
15
|
+
* --keywords "brick / bell / lagoon" \
|
|
16
|
+
* --year "2026"
|
|
17
|
+
*/
|
|
18
|
+
import { mkdir } from "node:fs/promises";
|
|
19
|
+
import { dirname, resolve } from "node:path";
|
|
20
|
+
import sharp from "sharp";
|
|
21
|
+
|
|
22
|
+
type Args = {
|
|
23
|
+
photo: string;
|
|
24
|
+
stamp: string;
|
|
25
|
+
output: string;
|
|
26
|
+
place: string;
|
|
27
|
+
number: string;
|
|
28
|
+
keywords: string;
|
|
29
|
+
year: string;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
leftRatio: number;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function usage(): never {
|
|
36
|
+
console.error(`usage: compose-rubber-stamp-field-note.ts \\
|
|
37
|
+
--photo <path> --stamp <path> --output <path> \\
|
|
38
|
+
--place <NAME> --number <NN> --keywords "a / b / c" --year <YYYY> \\
|
|
39
|
+
[--width 1600] [--height 1200] [--left-ratio 0.58]`);
|
|
40
|
+
process.exit(64);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function readArgs(argv: string[]): Args {
|
|
44
|
+
const get = (name: string): string | undefined => {
|
|
45
|
+
const index = argv.indexOf(name);
|
|
46
|
+
if (index < 0) return undefined;
|
|
47
|
+
return argv[index + 1];
|
|
48
|
+
};
|
|
49
|
+
const photo = get("--photo");
|
|
50
|
+
const stamp = get("--stamp");
|
|
51
|
+
const output = get("--output");
|
|
52
|
+
const place = get("--place");
|
|
53
|
+
const number = get("--number");
|
|
54
|
+
const keywords = get("--keywords");
|
|
55
|
+
const year = get("--year");
|
|
56
|
+
if (!photo || !stamp || !output || !place || !number || !keywords || !year) usage();
|
|
57
|
+
return {
|
|
58
|
+
photo: resolve(photo),
|
|
59
|
+
stamp: resolve(stamp),
|
|
60
|
+
output: resolve(output),
|
|
61
|
+
place: place.trim().toUpperCase(),
|
|
62
|
+
number: number.trim().replace(/^No\.?\s*/i, ""),
|
|
63
|
+
keywords: keywords.trim().toLowerCase(),
|
|
64
|
+
year: year.trim(),
|
|
65
|
+
width: Number(get("--width") ?? "1600"),
|
|
66
|
+
height: Number(get("--height") ?? "1200"),
|
|
67
|
+
leftRatio: Number(get("--left-ratio") ?? "0.58"),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function escapeXml(value: string): string {
|
|
72
|
+
return value
|
|
73
|
+
.replaceAll("&", "&")
|
|
74
|
+
.replaceAll("<", "<")
|
|
75
|
+
.replaceAll(">", ">")
|
|
76
|
+
.replaceAll('"', """);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function paperPanel(width: number, height: number): Promise<Buffer> {
|
|
80
|
+
// Warm off-white base with soft fiber noise.
|
|
81
|
+
const noise = await sharp({
|
|
82
|
+
create: {
|
|
83
|
+
width,
|
|
84
|
+
height,
|
|
85
|
+
channels: 3,
|
|
86
|
+
background: { r: 236, g: 228, b: 210 },
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
.png()
|
|
90
|
+
.toBuffer();
|
|
91
|
+
|
|
92
|
+
const grainSvg = Buffer.from(`<?xml version="1.0" encoding="UTF-8"?>
|
|
93
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">
|
|
94
|
+
<filter id="grain">
|
|
95
|
+
<feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/>
|
|
96
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0.72 0 0 0 0 0.68 0 0 0 0 0.58 0 0 0 0.12 0"/>
|
|
97
|
+
</filter>
|
|
98
|
+
<rect width="100%" height="100%" fill="#ece4d2"/>
|
|
99
|
+
<rect width="100%" height="100%" filter="url(#grain)"/>
|
|
100
|
+
</svg>`);
|
|
101
|
+
|
|
102
|
+
return sharp(noise)
|
|
103
|
+
.composite([{ input: grainSvg, blend: "multiply" }])
|
|
104
|
+
.jpeg({ quality: 95 })
|
|
105
|
+
.toBuffer()
|
|
106
|
+
.then((jpeg) => sharp(jpeg).png().toBuffer());
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function textPanel(
|
|
110
|
+
width: number,
|
|
111
|
+
height: number,
|
|
112
|
+
args: Args,
|
|
113
|
+
): Promise<Buffer> {
|
|
114
|
+
const font = "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf";
|
|
115
|
+
const lines = [
|
|
116
|
+
args.place,
|
|
117
|
+
`No. ${args.number}`,
|
|
118
|
+
args.keywords,
|
|
119
|
+
args.year,
|
|
120
|
+
];
|
|
121
|
+
const fontSize = Math.max(18, Math.round(width * 0.055));
|
|
122
|
+
const lineGap = Math.round(fontSize * 1.35);
|
|
123
|
+
const startY = Math.round(fontSize * 1.1);
|
|
124
|
+
const textSvg = Buffer.from(`<?xml version="1.0" encoding="UTF-8"?>
|
|
125
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">
|
|
126
|
+
<style>
|
|
127
|
+
.t {
|
|
128
|
+
font-family: "DejaVu Sans Mono", monospace;
|
|
129
|
+
font-size: ${fontSize}px;
|
|
130
|
+
fill: #1a1a1a;
|
|
131
|
+
letter-spacing: 0.5px;
|
|
132
|
+
}
|
|
133
|
+
</style>
|
|
134
|
+
${lines
|
|
135
|
+
.map(
|
|
136
|
+
(line, index) =>
|
|
137
|
+
`<text class="t" x="0" y="${startY + index * lineGap}">${escapeXml(line)}</text>`,
|
|
138
|
+
)
|
|
139
|
+
.join("\n ")}
|
|
140
|
+
</svg>`);
|
|
141
|
+
return sharp(textSvg).png().toBuffer();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
async function main(): Promise<void> {
|
|
145
|
+
const args = readArgs(process.argv.slice(2));
|
|
146
|
+
if (
|
|
147
|
+
!Number.isFinite(args.width)
|
|
148
|
+
|| !Number.isFinite(args.height)
|
|
149
|
+
|| args.width < 640
|
|
150
|
+
|| args.height < 480
|
|
151
|
+
|| args.leftRatio <= 0.4
|
|
152
|
+
|| args.leftRatio >= 0.7
|
|
153
|
+
) {
|
|
154
|
+
throw new Error("invalid canvas size or left ratio");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const leftWidth = Math.round(args.width * args.leftRatio);
|
|
158
|
+
const rightWidth = args.width - leftWidth;
|
|
159
|
+
|
|
160
|
+
const photo = await sharp(args.photo)
|
|
161
|
+
.rotate()
|
|
162
|
+
.resize(leftWidth, args.height, { fit: "cover", position: "centre" })
|
|
163
|
+
.modulate({ saturation: 0.92, brightness: 1.02 })
|
|
164
|
+
.jpeg({ quality: 92 })
|
|
165
|
+
.toBuffer();
|
|
166
|
+
|
|
167
|
+
const paper = await paperPanel(rightWidth, args.height);
|
|
168
|
+
|
|
169
|
+
const stampMaxWidth = Math.round(rightWidth * 0.78);
|
|
170
|
+
const stampMaxHeight = Math.round(args.height * 0.36);
|
|
171
|
+
const stamp = await sharp(args.stamp)
|
|
172
|
+
.ensureAlpha()
|
|
173
|
+
.resize(stampMaxWidth, stampMaxHeight, {
|
|
174
|
+
fit: "inside",
|
|
175
|
+
withoutEnlargement: false,
|
|
176
|
+
})
|
|
177
|
+
.png()
|
|
178
|
+
.toBuffer();
|
|
179
|
+
const stampMeta = await sharp(stamp).metadata();
|
|
180
|
+
const stampW = stampMeta.width ?? stampMaxWidth;
|
|
181
|
+
const stampH = stampMeta.height ?? stampMaxHeight;
|
|
182
|
+
|
|
183
|
+
const stampLeft = Math.round((rightWidth - stampW) / 2);
|
|
184
|
+
// Mid-lower placement with room for typewriter text under the stamp.
|
|
185
|
+
const stampTop = Math.round(args.height * 0.34);
|
|
186
|
+
|
|
187
|
+
const textWidth = Math.round(rightWidth * 0.78);
|
|
188
|
+
const textHeight = Math.round(args.height * 0.22);
|
|
189
|
+
const text = await textPanel(textWidth, textHeight, args);
|
|
190
|
+
const textLeft = Math.round((rightWidth - textWidth) / 2);
|
|
191
|
+
const textTop = stampTop + stampH + Math.round(args.height * 0.04);
|
|
192
|
+
|
|
193
|
+
const right = await sharp(paper)
|
|
194
|
+
.composite([
|
|
195
|
+
{ input: stamp, left: stampLeft, top: stampTop },
|
|
196
|
+
{ input: text, left: textLeft, top: textTop },
|
|
197
|
+
])
|
|
198
|
+
.png()
|
|
199
|
+
.toBuffer();
|
|
200
|
+
|
|
201
|
+
await mkdir(dirname(args.output), { recursive: true });
|
|
202
|
+
await sharp({
|
|
203
|
+
create: {
|
|
204
|
+
width: args.width,
|
|
205
|
+
height: args.height,
|
|
206
|
+
channels: 3,
|
|
207
|
+
background: { r: 236, g: 228, b: 210 },
|
|
208
|
+
},
|
|
209
|
+
})
|
|
210
|
+
.composite([
|
|
211
|
+
{ input: photo, left: 0, top: 0 },
|
|
212
|
+
{ input: right, left: leftWidth, top: 0 },
|
|
213
|
+
])
|
|
214
|
+
.jpeg({ quality: 94, mozjpeg: true })
|
|
215
|
+
.toFile(args.output);
|
|
216
|
+
|
|
217
|
+
console.log(JSON.stringify({
|
|
218
|
+
ok: true,
|
|
219
|
+
output: args.output,
|
|
220
|
+
width: args.width,
|
|
221
|
+
height: args.height,
|
|
222
|
+
leftWidth,
|
|
223
|
+
rightWidth,
|
|
224
|
+
place: args.place,
|
|
225
|
+
number: args.number,
|
|
226
|
+
}));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
await main();
|
package/src/artifacts.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises"
|
|
2
|
+
import { basename, dirname, join, resolve } from "node:path"
|
|
3
|
+
import { loadDiagramConfig } from "./config.js"
|
|
4
|
+
import { lintDiagram } from "./lint.js"
|
|
5
|
+
import { parseDiagramSpec } from "./parse.js"
|
|
6
|
+
import { renderPng, renderSvg } from "./render.js"
|
|
7
|
+
import { serializeTldr } from "./tldr.js"
|
|
8
|
+
import type { LintFinding, RenderArtifacts } from "./types.js"
|
|
9
|
+
|
|
10
|
+
async function atomicWrite(filePath: string, data: string | Uint8Array): Promise<void> {
|
|
11
|
+
const temporary = `${filePath}.tmp-${process.pid}-${crypto.randomUUID()}`
|
|
12
|
+
try {
|
|
13
|
+
await writeFile(temporary, data)
|
|
14
|
+
await rename(temporary, filePath)
|
|
15
|
+
} catch (error) {
|
|
16
|
+
await rm(temporary, { force: true })
|
|
17
|
+
throw error
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function readDiagramFile(filePath: string) {
|
|
22
|
+
const absolutePath = resolve(filePath)
|
|
23
|
+
let parsed: unknown
|
|
24
|
+
try {
|
|
25
|
+
parsed = JSON.parse(await readFile(absolutePath, "utf8"))
|
|
26
|
+
} catch (error) {
|
|
27
|
+
throw new Error(`Could not read diagram JSON at ${absolutePath}`, { cause: error })
|
|
28
|
+
}
|
|
29
|
+
return { absolutePath, spec: parseDiagramSpec(parsed) }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export async function checkDiagramFile(options: {
|
|
33
|
+
readonly filePath: string
|
|
34
|
+
readonly configPath?: string
|
|
35
|
+
}): Promise<{ readonly findings: readonly LintFinding[]; readonly configPath: string | null }> {
|
|
36
|
+
const { absolutePath, spec } = await readDiagramFile(options.filePath)
|
|
37
|
+
const config = await loadDiagramConfig({
|
|
38
|
+
...(options.configPath === undefined ? {} : { explicitPath: options.configPath }),
|
|
39
|
+
searchDirectory: dirname(absolutePath),
|
|
40
|
+
})
|
|
41
|
+
for (const shape of spec.shapes) {
|
|
42
|
+
if (
|
|
43
|
+
(shape.type === "rect" || shape.type === "ellipse") &&
|
|
44
|
+
shape.icon !== undefined &&
|
|
45
|
+
config.value.icons?.[shape.icon] === undefined
|
|
46
|
+
) {
|
|
47
|
+
throw new Error(`Unknown icon "${shape.icon}" on shape ${shape.id}`)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return { findings: lintDiagram(spec), configPath: config.filePath }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export async function renderDiagramFile(options: {
|
|
54
|
+
readonly filePath: string
|
|
55
|
+
readonly outDirectory?: string
|
|
56
|
+
readonly configPath?: string
|
|
57
|
+
readonly scale?: number
|
|
58
|
+
}): Promise<{
|
|
59
|
+
readonly artifacts: RenderArtifacts
|
|
60
|
+
readonly findings: readonly LintFinding[]
|
|
61
|
+
readonly configPath: string | null
|
|
62
|
+
}> {
|
|
63
|
+
const { absolutePath, spec } = await readDiagramFile(options.filePath)
|
|
64
|
+
const outDirectory = resolve(options.outDirectory ?? dirname(absolutePath))
|
|
65
|
+
const config = await loadDiagramConfig({
|
|
66
|
+
...(options.configPath === undefined ? {} : { explicitPath: options.configPath }),
|
|
67
|
+
searchDirectory: dirname(absolutePath),
|
|
68
|
+
})
|
|
69
|
+
const scale = options.scale ?? 2
|
|
70
|
+
if (!Number.isFinite(scale) || scale <= 0 || scale > 8) {
|
|
71
|
+
throw new Error("PNG scale must be greater than zero and no more than 8")
|
|
72
|
+
}
|
|
73
|
+
const [light, dark] = await Promise.all([
|
|
74
|
+
renderSvg(spec, "light", config.value),
|
|
75
|
+
renderSvg(spec, "dark", config.value),
|
|
76
|
+
])
|
|
77
|
+
const [lightPng, darkPng] = [renderPng(light, config.value, scale), renderPng(dark, config.value, scale)]
|
|
78
|
+
const artifacts = {
|
|
79
|
+
spec: absolutePath,
|
|
80
|
+
tldr: join(outDirectory, `${spec.name}.tldr`),
|
|
81
|
+
lightSvg: join(outDirectory, `${spec.name}.light.svg`),
|
|
82
|
+
darkSvg: join(outDirectory, `${spec.name}.dark.svg`),
|
|
83
|
+
lightPng: join(outDirectory, `${spec.name}.light.png`),
|
|
84
|
+
darkPng: join(outDirectory, `${spec.name}.dark.png`),
|
|
85
|
+
} satisfies RenderArtifacts
|
|
86
|
+
await mkdir(outDirectory, { recursive: true })
|
|
87
|
+
await Promise.all([
|
|
88
|
+
atomicWrite(artifacts.tldr, serializeTldr(spec, config.value)),
|
|
89
|
+
atomicWrite(artifacts.lightSvg, light.svg),
|
|
90
|
+
atomicWrite(artifacts.darkSvg, dark.svg),
|
|
91
|
+
atomicWrite(artifacts.lightPng, lightPng),
|
|
92
|
+
atomicWrite(artifacts.darkPng, darkPng),
|
|
93
|
+
])
|
|
94
|
+
return { artifacts, findings: lintDiagram(spec), configPath: config.filePath }
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function artifactSummary(artifacts: RenderArtifacts): string {
|
|
98
|
+
return [
|
|
99
|
+
`Rendered ${basename(artifacts.spec)}`,
|
|
100
|
+
` ${artifacts.tldr}`,
|
|
101
|
+
` ${artifacts.lightSvg}`,
|
|
102
|
+
` ${artifacts.darkSvg}`,
|
|
103
|
+
` ${artifacts.lightPng}`,
|
|
104
|
+
` ${artifacts.darkPng}`,
|
|
105
|
+
].join("\n")
|
|
106
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Copyright (c) 2024, Nebula Entertainment & Broadcasting LLC (https://nebula.tv),
|
|
2
|
+
with Reserved Font Name 'Nebula'.
|
|
3
|
+
|
|
4
|
+
Based on Source Sans, copyright 2010-2024 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
|
|
5
|
+
|
|
6
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
7
|
+
This license is copied below, and is also available with a FAQ at:
|
|
8
|
+
https://openfontlicense.org
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
13
|
+
-----------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
PREAMBLE
|
|
16
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
17
|
+
development of collaborative font projects, to support the font creation
|
|
18
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
19
|
+
open framework in which fonts may be shared and improved in partnership
|
|
20
|
+
with others.
|
|
21
|
+
|
|
22
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
23
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
24
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
25
|
+
redistributed and/or sold with any software provided that any reserved
|
|
26
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
27
|
+
however, cannot be released under any other type of license. The
|
|
28
|
+
requirement for fonts to remain under this license does not apply
|
|
29
|
+
to any document created using the fonts or their derivatives.
|
|
30
|
+
|
|
31
|
+
DEFINITIONS
|
|
32
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
33
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
34
|
+
include source files, build scripts and documentation.
|
|
35
|
+
|
|
36
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
37
|
+
copyright statement(s).
|
|
38
|
+
|
|
39
|
+
"Original Version" refers to the collection of Font Software components as
|
|
40
|
+
distributed by the Copyright Holder(s).
|
|
41
|
+
|
|
42
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
43
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
44
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
45
|
+
new environment.
|
|
46
|
+
|
|
47
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
48
|
+
writer or other person who contributed to the Font Software.
|
|
49
|
+
|
|
50
|
+
PERMISSION & CONDITIONS
|
|
51
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
52
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
53
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
54
|
+
Software, subject to the following conditions:
|
|
55
|
+
|
|
56
|
+
1) Neither the Font Software nor any of its individual components,
|
|
57
|
+
in Original or Modified Versions, may be sold by itself.
|
|
58
|
+
|
|
59
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
60
|
+
redistributed and/or sold with any software, provided that each copy
|
|
61
|
+
contains the above copyright notice and this license. These can be
|
|
62
|
+
included either as stand-alone text files, human-readable headers or
|
|
63
|
+
in the appropriate machine-readable metadata fields within text or
|
|
64
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
65
|
+
|
|
66
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
67
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
68
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
69
|
+
presented to the users.
|
|
70
|
+
|
|
71
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
72
|
+
Software shall not be used to promote, endorse or advertise any
|
|
73
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
74
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
75
|
+
permission.
|
|
76
|
+
|
|
77
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
78
|
+
must be distributed entirely under this license, and must not be
|
|
79
|
+
distributed under any other license. The requirement for fonts to
|
|
80
|
+
remain under this license does not apply to any document created
|
|
81
|
+
using the Font Software.
|
|
82
|
+
|
|
83
|
+
TERMINATION
|
|
84
|
+
This license becomes null and void if any of the above conditions are
|
|
85
|
+
not met.
|
|
86
|
+
|
|
87
|
+
DISCLAIMER
|
|
88
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
89
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
90
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
91
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
92
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
93
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
94
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
95
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
96
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Nebula Sans provenance
|
|
2
|
+
|
|
3
|
+
- Family: Nebula Sans
|
|
4
|
+
- Version: 1.010
|
|
5
|
+
- Use: default proportional browser text and heading face
|
|
6
|
+
- Upstream: https://www.nebulasans.com/
|
|
7
|
+
- Source archive: https://www.nebulasans.com/download/NebulaSans-1.010.zip
|
|
8
|
+
- Retrieved: 2026-08-27
|
|
9
|
+
- Archive SHA-256: `a9b56ef15e24b6e8195af7457cc75f714ecf5501fc3c20a69f546c8f589e7bdb`
|
|
10
|
+
- License: SIL Open Font License 1.1, retained as `LICENSE.txt`
|
|
11
|
+
|
|
12
|
+
The WOFF2 and OTF files are vendored unchanged from the official archive. Nebula
|
|
13
|
+
Entertainment & Broadcasting LLC reserves the font name `Nebula`; this package
|
|
14
|
+
distributes the unmodified original files under that name.
|
|
15
|
+
|
|
16
|
+
Slopcamera carries the unchanged Book and Bold WOFF2 and OTF files from the canonical
|
|
17
|
+
`@hraness/design-kit` v0.2.1 release. Resvg loads Bold OTF directly for caption
|
|
18
|
+
sprites with system font discovery disabled. Diagram PNG rendering loads Book
|
|
19
|
+
plus Bold OTF for the ordinary proportional default while retaining system font
|
|
20
|
+
discovery for explicit mono and custom font roles. The WOFF2 files remain
|
|
21
|
+
embedded in standalone diagram SVG output.
|