mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-05 17:30:50 +00:00
* feat(core): add pure resolveEditingAffordances (edit capabilities + section applicability) * fix(core): replace prohibited as-cast and !-assertions in isIdentityTransform * refactor(studio): consume core resolveEditingAffordances; drop duplicated capability + section logic - affordances.ts: add matrix3d identity-transform branch (was missing, caused test regression) - domEditingLayers: add domEditSelectionToFacts mapper; resolveDomEditCapabilities is now a thin wrapper over core (kept for backward-compat — tests + barrel import it); isTextEditableSelection delegates to core sections.text; drop parsePx + isIdentityTransform imports (now in core) - PropertyPanel: import resolveEditingAffordances + domEditSelectionToFacts; compute sections once; replace isMediaElement/isColorGradingCapableElement/timing inline check with sections.* - propertyPanelMediaSection: delete isMediaElement (no remaining callers) - propertyPanelColorGradingSection: delete isColorGradingCapableElement (no remaining callers) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(sdk): add browser-only resolveElementAffordances adapter over core * fix(sdk): add position to inlineStyles, replace ! assertion with guard in test - Add missing 'position' key to inlineStyles in affordances.ts to match computedStyles - Replace non-null assertion (doc.defaultView!) with proper null guard in test Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> * fix(editing): resolve code-review findings on affordances feature Max-effort review (8 verified findings) fixes: Correctness regressions (studio behavior): - SVG selection crash: dropped `classNames` from EditableElementFacts entirely (it was never read by the resolver), which removes the `.className.split()` calls that throw on SVGElement (className is an SVGAnimatedString, not a string). Masked in tests by happy-dom. - Timing panel hidden for GSAP-only layers: domEditSelectionToFacts now takes animationCount from the caller; PropertyPanel feeds the live gsapAnimations prop (selection.gsapAnimations is never populated). Cleanups: - Removed dead inline `position` key from SDK adapter (core reads position only from computedStyles). - Added sections-only `resolveEditingSections` export; PropertyPanel uses it so panel re-renders no longer re-run the capability geometry parse. - Declared happy-dom in packages/sdk devDependencies (was root-hoist only). - Deduped the two capability fact-construction sites behind a shared capabilityFacts() helper. - parsePx now has a single source of truth in core; studio domEditingDom re-exports it so the copies can't drift. isIdentityTransform is now core-internal (studio's only consumer moved to core in the prior task). bun.lock also reconciles stale 0.7.17->0.7.21 package versions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
384 lines
14 KiB
JSON
384 lines
14 KiB
JSON
{
|
|
"name": "@hyperframes/core",
|
|
"version": "0.7.21",
|
|
"description": "",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
"directory": "packages/core"
|
|
},
|
|
"files": [
|
|
"dist/**/*.js",
|
|
"dist/**/*.d.ts",
|
|
"dist/**/*.d.ts.map",
|
|
"dist/**/*.js.map",
|
|
"!dist/hyperframe.runtime.mjs",
|
|
"docs",
|
|
"schemas",
|
|
"README.md"
|
|
],
|
|
"type": "module",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"bun": "./src/index.ts",
|
|
"node": "./dist/index.js",
|
|
"import": "./src/index.ts",
|
|
"types": "./src/index.ts"
|
|
},
|
|
"./package.json": "./package.json",
|
|
"./beats": {
|
|
"bun": "./src/beats/index.ts",
|
|
"node": "./dist/beats/index.js",
|
|
"import": "./src/beats/index.ts",
|
|
"types": "./src/beats/index.ts"
|
|
},
|
|
"./html-attr-safety": {
|
|
"bun": "./src/utils/htmlAttrSafety.ts",
|
|
"node": "./dist/utils/htmlAttrSafety.js",
|
|
"import": "./src/utils/htmlAttrSafety.ts",
|
|
"types": "./src/utils/htmlAttrSafety.ts"
|
|
},
|
|
"./editing": {
|
|
"bun": "./src/editing/affordances.ts",
|
|
"node": "./dist/editing/affordances.js",
|
|
"import": "./src/editing/affordances.ts",
|
|
"types": "./src/editing/affordances.ts"
|
|
},
|
|
"./slideshow": {
|
|
"bun": "./src/slideshow/index.ts",
|
|
"node": "./dist/slideshow/index.js",
|
|
"import": "./src/slideshow/index.ts",
|
|
"types": "./src/slideshow/index.ts"
|
|
},
|
|
"./generators": {
|
|
"bun": "./src/generators/hyperframes.ts",
|
|
"node": "./dist/generators/hyperframes.js",
|
|
"import": "./src/generators/hyperframes.ts",
|
|
"types": "./src/generators/hyperframes.ts"
|
|
},
|
|
"./lint": {
|
|
"bun": "./src/lint/index.ts",
|
|
"node": "./dist/lint/index.js",
|
|
"import": "./src/lint/index.ts",
|
|
"types": "./src/lint/index.ts"
|
|
},
|
|
"./compiler": {
|
|
"bun": "./src/compiler/index.ts",
|
|
"node": "./dist/compiler/index.js",
|
|
"import": "./src/compiler/index.ts",
|
|
"types": "./src/compiler/index.ts"
|
|
},
|
|
"./color-grading": {
|
|
"bun": "./src/colorGrading.ts",
|
|
"node": "./dist/colorGrading.js",
|
|
"import": "./src/colorGrading.ts",
|
|
"types": "./src/colorGrading.ts"
|
|
},
|
|
"./color-luts": {
|
|
"bun": "./src/colorLuts.ts",
|
|
"node": "./dist/colorLuts.js",
|
|
"import": "./src/colorLuts.ts",
|
|
"types": "./src/colorLuts.ts"
|
|
},
|
|
"./storyboard": {
|
|
"bun": "./src/storyboard/index.ts",
|
|
"node": "./dist/storyboard/index.js",
|
|
"import": "./src/storyboard/index.ts",
|
|
"types": "./src/storyboard/index.ts"
|
|
},
|
|
"./runtime": "./dist/hyperframe.runtime.iife.js",
|
|
"./runtime/clipTree": {
|
|
"bun": "./src/runtime/clipTree.ts",
|
|
"node": "./dist/runtime/clipTree.js",
|
|
"import": "./src/runtime/clipTree.ts",
|
|
"types": "./src/runtime/clipTree.ts"
|
|
},
|
|
"./runtime/lottie-readiness": {
|
|
"bun": "./src/lottieReadiness.ts",
|
|
"node": "./dist/lottieReadiness.js",
|
|
"import": "./src/lottieReadiness.ts",
|
|
"types": "./src/lottieReadiness.ts"
|
|
},
|
|
"./studio-api": {
|
|
"bun": "./src/studio-api/index.ts",
|
|
"node": "./dist/studio-api/index.js",
|
|
"import": "./src/studio-api/index.ts",
|
|
"types": "./src/studio-api/index.ts"
|
|
},
|
|
"./studio-api/screenshot-clip": {
|
|
"bun": "./src/studio-api/helpers/screenshotClip.ts",
|
|
"node": "./dist/studio-api/helpers/screenshotClip.js",
|
|
"import": "./src/studio-api/helpers/screenshotClip.ts",
|
|
"types": "./src/studio-api/helpers/screenshotClip.ts"
|
|
},
|
|
"./studio-api/manual-edits-render-script": {
|
|
"bun": "./src/studio-api/helpers/manualEditsRenderScript.ts",
|
|
"node": "./dist/studio-api/helpers/manualEditsRenderScript.js",
|
|
"import": "./src/studio-api/helpers/manualEditsRenderScript.ts",
|
|
"types": "./src/studio-api/helpers/manualEditsRenderScript.ts"
|
|
},
|
|
"./studio-api/studio-motion-render-script": {
|
|
"bun": "./src/studio-api/helpers/studioMotionRenderScript.ts",
|
|
"node": "./dist/studio-api/helpers/studioMotionRenderScript.js",
|
|
"import": "./src/studio-api/helpers/studioMotionRenderScript.ts",
|
|
"types": "./src/studio-api/helpers/studioMotionRenderScript.ts"
|
|
},
|
|
"./studio-api/draft-markers": {
|
|
"bun": "./src/studio-api/helpers/draftMarkers.ts",
|
|
"node": "./dist/studio-api/helpers/draftMarkers.js",
|
|
"import": "./src/studio-api/helpers/draftMarkers.ts",
|
|
"types": "./src/studio-api/helpers/draftMarkers.ts"
|
|
},
|
|
"./studio-api/finite-mutation": {
|
|
"bun": "./src/studio-api/helpers/finiteMutation.ts",
|
|
"node": "./dist/studio-api/helpers/finiteMutation.js",
|
|
"import": "./src/studio-api/helpers/finiteMutation.ts",
|
|
"types": "./src/studio-api/helpers/finiteMutation.ts"
|
|
},
|
|
"./text": {
|
|
"bun": "./src/text/index.ts",
|
|
"node": "./dist/text/index.js",
|
|
"import": "./src/text/index.ts",
|
|
"types": "./src/text/index.ts"
|
|
},
|
|
"./registry": {
|
|
"bun": "./src/registry/index.ts",
|
|
"node": "./dist/registry/index.js",
|
|
"import": "./src/registry/index.ts",
|
|
"types": "./src/registry/index.ts"
|
|
},
|
|
"./media-volume-envelope": {
|
|
"bun": "./src/runtime/mediaVolumeEnvelope.ts",
|
|
"node": "./dist/runtime/mediaVolumeEnvelope.js",
|
|
"import": "./src/runtime/mediaVolumeEnvelope.ts",
|
|
"types": "./src/runtime/mediaVolumeEnvelope.ts"
|
|
},
|
|
"./hf-ids": {
|
|
"bun": "./src/parsers/hfIds.ts",
|
|
"node": "./dist/parsers/hfIds.js",
|
|
"import": "./src/parsers/hfIds.ts",
|
|
"types": "./src/parsers/hfIds.ts"
|
|
},
|
|
"./gsap-parser": {
|
|
"bun": "./src/parsers/gsapParserExports.ts",
|
|
"node": "./dist/parsers/gsapParserExports.js",
|
|
"import": "./src/parsers/gsapParserExports.ts",
|
|
"types": "./src/parsers/gsapParserExports.ts"
|
|
},
|
|
"./gsap-parser-acorn": {
|
|
"bun": "./src/parsers/gsapParserAcorn.ts",
|
|
"node": "./dist/parsers/gsapParserAcorn.js",
|
|
"import": "./src/parsers/gsapParserAcorn.ts",
|
|
"types": "./src/parsers/gsapParserAcorn.ts"
|
|
},
|
|
"./gsap-writer-acorn": {
|
|
"bun": "./src/parsers/gsapWriterAcorn.ts",
|
|
"node": "./dist/parsers/gsapWriterAcorn.js",
|
|
"import": "./src/parsers/gsapWriterAcorn.ts",
|
|
"types": "./src/parsers/gsapWriterAcorn.ts"
|
|
},
|
|
"./gsap-constants": {
|
|
"bun": "./src/parsers/gsapConstants.ts",
|
|
"node": "./dist/parsers/gsapConstants.js",
|
|
"import": "./src/parsers/gsapConstants.ts",
|
|
"types": "./src/parsers/gsapConstants.ts"
|
|
},
|
|
"./spring-ease": {
|
|
"bun": "./src/parsers/springEase.ts",
|
|
"node": "./dist/parsers/springEase.js",
|
|
"import": "./src/parsers/springEase.ts",
|
|
"types": "./src/parsers/springEase.ts"
|
|
},
|
|
"./fonts/aliases": {
|
|
"bun": "./src/fonts/aliases.ts",
|
|
"node": "./dist/fonts/aliases.js",
|
|
"import": "./src/fonts/aliases.ts",
|
|
"types": "./src/fonts/aliases.ts"
|
|
},
|
|
"./fonts/system-locator": {
|
|
"bun": "./src/fonts/systemFontLocator.ts",
|
|
"node": "./dist/fonts/systemFontLocator.js",
|
|
"import": "./src/fonts/systemFontLocator.ts",
|
|
"types": "./src/fonts/systemFontLocator.ts"
|
|
},
|
|
"./schemas/registry.json": "./schemas/registry.json",
|
|
"./schemas/registry-item.json": "./schemas/registry-item.json"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
},
|
|
"./package.json": "./package.json",
|
|
"./beats": {
|
|
"import": "./dist/beats/index.js",
|
|
"types": "./dist/beats/index.d.ts"
|
|
},
|
|
"./html-attr-safety": {
|
|
"import": "./dist/utils/htmlAttrSafety.js",
|
|
"types": "./dist/utils/htmlAttrSafety.d.ts"
|
|
},
|
|
"./editing": {
|
|
"import": "./dist/editing/affordances.js",
|
|
"types": "./dist/editing/affordances.d.ts"
|
|
},
|
|
"./generators": {
|
|
"import": "./dist/generators/hyperframes.js",
|
|
"types": "./dist/generators/hyperframes.d.ts"
|
|
},
|
|
"./lint": {
|
|
"import": "./dist/lint/index.js",
|
|
"types": "./dist/lint/index.d.ts"
|
|
},
|
|
"./slideshow": {
|
|
"import": "./dist/slideshow/index.js",
|
|
"types": "./dist/slideshow/index.d.ts"
|
|
},
|
|
"./compiler": {
|
|
"import": "./dist/compiler/index.js",
|
|
"types": "./dist/compiler/index.d.ts"
|
|
},
|
|
"./color-grading": {
|
|
"import": "./dist/colorGrading.js",
|
|
"types": "./dist/colorGrading.d.ts"
|
|
},
|
|
"./color-luts": {
|
|
"import": "./dist/colorLuts.js",
|
|
"types": "./dist/colorLuts.d.ts"
|
|
},
|
|
"./storyboard": {
|
|
"import": "./dist/storyboard/index.js",
|
|
"types": "./dist/storyboard/index.d.ts"
|
|
},
|
|
"./runtime": "./dist/hyperframe.runtime.iife.js",
|
|
"./runtime/clipTree": {
|
|
"import": "./dist/runtime/clipTree.js",
|
|
"types": "./dist/runtime/clipTree.d.ts"
|
|
},
|
|
"./runtime/lottie-readiness": {
|
|
"import": "./dist/lottieReadiness.js",
|
|
"types": "./dist/lottieReadiness.d.ts"
|
|
},
|
|
"./studio-api": {
|
|
"import": "./dist/studio-api/index.js",
|
|
"types": "./dist/studio-api/index.d.ts"
|
|
},
|
|
"./studio-api/screenshot-clip": {
|
|
"import": "./dist/studio-api/helpers/screenshotClip.js",
|
|
"types": "./dist/studio-api/helpers/screenshotClip.d.ts"
|
|
},
|
|
"./studio-api/manual-edits-render-script": {
|
|
"import": "./dist/studio-api/helpers/manualEditsRenderScript.js",
|
|
"types": "./dist/studio-api/helpers/manualEditsRenderScript.d.ts"
|
|
},
|
|
"./studio-api/studio-motion-render-script": {
|
|
"import": "./dist/studio-api/helpers/studioMotionRenderScript.js",
|
|
"types": "./dist/studio-api/helpers/studioMotionRenderScript.d.ts"
|
|
},
|
|
"./studio-api/draft-markers": {
|
|
"import": "./dist/studio-api/helpers/draftMarkers.js",
|
|
"types": "./dist/studio-api/helpers/draftMarkers.d.ts"
|
|
},
|
|
"./studio-api/finite-mutation": {
|
|
"import": "./dist/studio-api/helpers/finiteMutation.js",
|
|
"types": "./dist/studio-api/helpers/finiteMutation.d.ts"
|
|
},
|
|
"./text": {
|
|
"import": "./dist/text/index.js",
|
|
"types": "./dist/text/index.d.ts"
|
|
},
|
|
"./registry": {
|
|
"import": "./dist/registry/index.js",
|
|
"types": "./dist/registry/index.d.ts"
|
|
},
|
|
"./media-volume-envelope": {
|
|
"import": "./dist/runtime/mediaVolumeEnvelope.js",
|
|
"types": "./dist/runtime/mediaVolumeEnvelope.d.ts"
|
|
},
|
|
"./hf-ids": {
|
|
"import": "./dist/parsers/hfIds.js",
|
|
"types": "./dist/parsers/hfIds.d.ts"
|
|
},
|
|
"./gsap-parser": {
|
|
"import": "./dist/parsers/gsapParserExports.js",
|
|
"types": "./dist/parsers/gsapParserExports.d.ts"
|
|
},
|
|
"./gsap-parser-acorn": {
|
|
"import": "./dist/parsers/gsapParserAcorn.js",
|
|
"types": "./dist/parsers/gsapParserAcorn.d.ts"
|
|
},
|
|
"./gsap-writer-acorn": {
|
|
"import": "./dist/parsers/gsapWriterAcorn.js",
|
|
"types": "./dist/parsers/gsapWriterAcorn.d.ts"
|
|
},
|
|
"./gsap-constants": {
|
|
"import": "./dist/parsers/gsapConstants.js",
|
|
"types": "./dist/parsers/gsapConstants.d.ts"
|
|
},
|
|
"./spring-ease": {
|
|
"import": "./dist/parsers/springEase.js",
|
|
"types": "./dist/parsers/springEase.d.ts"
|
|
},
|
|
"./fonts/aliases": {
|
|
"import": "./dist/fonts/aliases.js",
|
|
"types": "./dist/fonts/aliases.d.ts"
|
|
},
|
|
"./fonts/system-locator": {
|
|
"import": "./dist/fonts/systemFontLocator.js",
|
|
"types": "./dist/fonts/systemFontLocator.d.ts"
|
|
},
|
|
"./schemas/registry.json": "./schemas/registry.json",
|
|
"./schemas/registry-item.json": "./schemas/registry-item.json"
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
},
|
|
"scripts": {
|
|
"build": "bun run build:hyperframes-runtime && tsc && tsx scripts/rewrite-esm-extensions.ts",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint:runtime-preview-guards": "tsx scripts/lint-runtime-preview-guards.ts",
|
|
"build:hyperframes-runtime": "tsx scripts/build-hyperframes-runtime-artifact.ts",
|
|
"build:hyperframes-runtime:modular": "SANDBOX_RUNTIME_VARIANT=modular tsx scripts/build-hyperframes-runtime-artifact.ts",
|
|
"build:hyperframe-runtime": "tsx scripts/build-hyperframes-runtime-artifact.ts",
|
|
"test:hyperframe-runtime-contract": "tsx scripts/test-hyperframe-runtime-contract.ts",
|
|
"test:hyperframe-runtime-behavior": "tsx scripts/test-hyperframe-runtime-behavior.ts",
|
|
"test:hyperframe-runtime-seek": "tsx scripts/test-hyperframe-runtime-seek.ts",
|
|
"test:hyperframe-runtime-duration-guards": "tsx scripts/test-hyperframe-runtime-duration-guards.ts",
|
|
"test:hyperframe-runtime-parity": "tsx scripts/test-hyperframe-runtime-parity.ts",
|
|
"test:hyperframe-runtime-security": "tsx scripts/test-hyperframe-runtime-security.ts",
|
|
"test:hyperframe-linter": "tsx scripts/test-hyperframe-linter.ts",
|
|
"test:hyperframe-runtime-ci": "bun run build:hyperframes-runtime && bun run test:hyperframe-runtime-contract && bun run test:hyperframe-runtime-behavior && bun run test:hyperframe-runtime-seek && bun run test:hyperframe-runtime-duration-guards && bun run test:hyperframe-runtime-parity && bun run test:hyperframe-runtime-security",
|
|
"check:hyperframe-html": "tsx scripts/check-hyperframe-static.ts",
|
|
"debug:timeline": "tsx scripts/debug-timeline.ts",
|
|
"prepublishOnly": "echo skip"
|
|
},
|
|
"dependencies": {
|
|
"@chenglou/pretext": "^0.0.5",
|
|
"@hyperframes/lint": "workspace:*",
|
|
"@hyperframes/parsers": "workspace:*",
|
|
"@hyperframes/studio-server": "workspace:*",
|
|
"bpm-detective": "^2.0.5",
|
|
"linkedom": "^0.18.12",
|
|
"postcss": "^8.5.8"
|
|
},
|
|
"devDependencies": {
|
|
"@types/jsdom": "^28.0.0",
|
|
"@types/node": "^25.0.10",
|
|
"@vitest/coverage-v8": "^3.2.4",
|
|
"jsdom": "^29.0.0",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^5.0.0",
|
|
"vitest": "^3.2.4"
|
|
},
|
|
"optionalDependencies": {
|
|
"esbuild": "^0.25.12"
|
|
}
|
|
}
|