@hyperframes/core 0.8.11 → 0.8.13
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/dist/audio/audioFxWorklets.d.ts.map +1 -1
- package/dist/audio/audioFxWorklets.js +53 -4
- package/dist/audio/audioFxWorklets.js.map +1 -1
- package/dist/audioCarve.d.ts +27 -0
- package/dist/audioCarve.d.ts.map +1 -1
- package/dist/audioCarve.js +32 -0
- package/dist/audioCarve.js.map +1 -1
- package/dist/audioFx.d.ts.map +1 -1
- package/dist/audioFx.js +86 -47
- package/dist/audioFx.js.map +1 -1
- package/dist/audioGroups.d.ts +39 -28
- package/dist/audioGroups.d.ts.map +1 -1
- package/dist/audioGroups.js +83 -59
- package/dist/audioGroups.js.map +1 -1
- package/dist/compiler/index.d.ts +1 -1
- package/dist/compiler/index.d.ts.map +1 -1
- package/dist/compiler/index.js +1 -1
- package/dist/compiler/index.js.map +1 -1
- package/dist/compiler/mediaRenderIds.d.ts +12 -0
- package/dist/compiler/mediaRenderIds.d.ts.map +1 -1
- package/dist/compiler/mediaRenderIds.js +84 -0
- package/dist/compiler/mediaRenderIds.js.map +1 -1
- package/dist/editing/affordances.d.ts.map +1 -1
- package/dist/editing/affordances.js +21 -11
- package/dist/editing/affordances.js.map +1 -1
- package/dist/generated/audio-fx-runtime-inline.js +1 -1
- package/dist/generated/audio-fx-runtime-inline.js.map +1 -1
- package/dist/generated/runtime-inline.js +1 -1
- package/dist/generated/runtime-inline.js.map +1 -1
- package/dist/hyperframe.runtime.iife.js +81 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/media.d.ts +0 -5
- package/dist/runtime/media.d.ts.map +1 -1
- package/dist/runtime/media.js +9 -5
- package/dist/runtime/media.js.map +1 -1
- package/package.json +4 -4
package/dist/audioGroups.d.ts
CHANGED
|
@@ -29,6 +29,13 @@ export interface HfAudioGroup {
|
|
|
29
29
|
*/
|
|
30
30
|
hidden: boolean;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* A group element's `data-volume`, defaulting to 1 for a missing, unparseable
|
|
34
|
+
* or absent element. Shared so the preview bus and `resolveAudioGroups` (which
|
|
35
|
+
* the render reads) cannot drift: the export was ~8 dB quieter than what was
|
|
36
|
+
* auditioned for exactly as long as the preview ignored this.
|
|
37
|
+
*/
|
|
38
|
+
export declare function readAudioGroupVolume(el: Element | null | undefined): number;
|
|
32
39
|
/**
|
|
33
40
|
* Every group with at least one member, resolved from the live document.
|
|
34
41
|
*
|
|
@@ -36,6 +43,31 @@ export interface HfAudioGroup {
|
|
|
36
43
|
* (label = id) so a hand-authored composition degrades gracefully. Audio
|
|
37
44
|
* only in v1 — a `data-audio-group` on a `<video>` is ignored.
|
|
38
45
|
*/
|
|
46
|
+
/**
|
|
47
|
+
* The `<hf-audio-group>` element for a group id, or null.
|
|
48
|
+
*
|
|
49
|
+
* Tag-checked, which a bare `getElementById` is not. Every group attribute —
|
|
50
|
+
* the fader, the mute, the FX chain, the automation lane — is read off whatever
|
|
51
|
+
* this returns, so an unrelated element sharing the id used to be read as a bus:
|
|
52
|
+
* an `<audio id="vo" data-audio-group="vo" data-volume="0.5" data-fx-chain=…>`
|
|
53
|
+
* had its own fader and chain applied a SECOND time on the bus, and a
|
|
54
|
+
* `<div id="bg" data-hidden>` silenced group "bg" in preview only. The render
|
|
55
|
+
* never had this problem — `resolveAudioGroups` only ever accepted the tag —
|
|
56
|
+
* so the two disagreed on exactly the attributes the bus exists to carry.
|
|
57
|
+
*
|
|
58
|
+
* Returning null is the documented "group with no element" case, which
|
|
59
|
+
* degrades to a flat sum rather than borrowing a stranger's settings.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveGroupElement(doc: (Pick<Document, "getElementById"> & Partial<Pick<Document, "querySelectorAll">>) | null | undefined, groupId: string): Element | null;
|
|
62
|
+
/**
|
|
63
|
+
* Whether the bus a member belongs to is muted.
|
|
64
|
+
*
|
|
65
|
+
* Membership is held by the MEMBER's `data-audio-group`; a group never nests
|
|
66
|
+
* its members. So `el.closest("[data-hidden]")` cannot see a muted bus, which
|
|
67
|
+
* is how the render came to drop a hidden group's members while the preview
|
|
68
|
+
* fallback played them at full level.
|
|
69
|
+
*/
|
|
70
|
+
export declare function isMemberGroupHidden(doc: Pick<Document, "getElementById"> | null | undefined, el: Element | null | undefined): boolean;
|
|
39
71
|
export declare function resolveAudioGroups(root: ParentNode): HfAudioGroup[];
|
|
40
72
|
/**
|
|
41
73
|
* Expand a list of source ids for a carve: a plain id passes through if it
|
|
@@ -49,20 +81,14 @@ export declare function resolveAudioGroups(root: ParentNode): HfAudioGroup[];
|
|
|
49
81
|
* as a dangling reference the analysis would only fail to find anyway.
|
|
50
82
|
*/
|
|
51
83
|
export declare function resolveCarveSourceIds(doc: Document, ids: readonly string[]): string[];
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* element.
|
|
56
|
-
*
|
|
57
|
-
* Non-`<audio>` returns null: video is out of scope in v1, and so is
|
|
58
|
-
* `data-audio-group` on an `<hf-audio-group>` itself (groups do not nest).
|
|
59
|
-
* `data-audio-group=""` returns null rather than `""` — the resolver skips a
|
|
60
|
-
* falsy id, and the "or null" in this contract has to mean it.
|
|
84
|
+
/** The group an audio member belongs to, or null. Membership is audio-only in
|
|
85
|
+
* v1, matching `resolveAudioGroups` and the render mixer; video and group-bus
|
|
86
|
+
* attributes are inert.
|
|
61
87
|
*
|
|
62
|
-
* Tolerant of objects that only partially implement `Element` (test doubles
|
|
63
|
-
* `HTMLMediaElement` commonly do)
|
|
64
|
-
* simply has no group, mirroring `readChain`'s style in
|
|
65
|
-
*/
|
|
88
|
+
* Tolerant of objects that only partially implement `Element` (test doubles
|
|
89
|
+
* for `HTMLMediaElement` commonly do) — anything missing `tagName` or
|
|
90
|
+
* `getAttribute` simply has no group, mirroring `readChain`'s style in
|
|
91
|
+
* `runtime/audioFx.ts`. */
|
|
66
92
|
export declare function audioGroupOf(el: Element): string | null;
|
|
67
93
|
/**
|
|
68
94
|
* Make `<hf-audio-group>` inert, once per document.
|
|
@@ -80,19 +106,4 @@ export declare function audioGroupOf(el: Element): string | null;
|
|
|
80
106
|
* runtime rather than the compiler so preview and render share one source.
|
|
81
107
|
*/
|
|
82
108
|
export declare function ensureAudioGroupInertStyle(doc: Document): void;
|
|
83
|
-
/**
|
|
84
|
-
* Solo ("Hear only this") predicate — shared by the studio store (which owns
|
|
85
|
-
* the `soloed` set and the UI's lit/half-lit state) and the preview transport
|
|
86
|
-
* (which turns it into gain). An element is audible while any solo is active
|
|
87
|
-
* only if IT is soloed, or its OWN group is soloed (group solo = members
|
|
88
|
-
* solo). There is no "ancestor" to reach up to in this data model — a group
|
|
89
|
-
* bus is never itself attenuated by solo, so a soloed member's path through
|
|
90
|
-
* its group stays open by construction; this predicate only ever gates the
|
|
91
|
-
* member's own gain. No solo active at all is the one path that returns true
|
|
92
|
-
* unconditionally.
|
|
93
|
-
*/
|
|
94
|
-
export declare function isAudibleUnderSolo(soloed: ReadonlySet<string>, id: string, groupId?: string | null): boolean;
|
|
95
|
-
/** Half-lit: this group itself isn't soloed, but at least one of its members
|
|
96
|
-
* is — the display-only signal that "some of what's under here still plays". */
|
|
97
|
-
export declare function isGroupHalfLitUnderSolo(soloed: ReadonlySet<string>, groupId: string, memberIds: readonly string[]): boolean;
|
|
98
109
|
//# sourceMappingURL=audioGroups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audioGroups.d.ts","sourceRoot":"","sources":["../src/audioGroups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"audioGroups.d.ts","sourceRoot":"","sources":["../src/audioGroups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,mBAAmB,qBAA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;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAO9D"}
|
package/dist/audioGroups.js
CHANGED
|
@@ -9,23 +9,17 @@
|
|
|
9
9
|
* nothing here routes or sums audio yet.
|
|
10
10
|
*/
|
|
11
11
|
import { HF_AUDIO_FX_ATTR } from "./audioFx.js";
|
|
12
|
+
import { AUDIO_GROUP_RENDER_ID_ATTR, MEDIA_RENDER_ID_ATTR } from "./compiler/mediaRenderIds.js";
|
|
12
13
|
import { HF_AUDIO_AUTOMATION_ATTR } from "./audioAutomation.js";
|
|
13
14
|
export const HF_AUDIO_GROUP_TAG = "hf-audio-group";
|
|
14
15
|
export const HF_AUDIO_GROUP_ATTR = "data-audio-group";
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
* `
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* did not. `resolveAudioGroups` scanned `audio[...]` while `audioGroupOf`
|
|
21
|
-
* returned the attribute off any element, so the same DOM answered "no group"
|
|
22
|
-
* for a `<video data-audio-group="voiceover">` in one and `"voiceover"` in the
|
|
23
|
-
* other. The render already enforces audio-only (see audioMixer's
|
|
24
|
-
* `type === "audio"` guard), so the disagreement was preview routing a track
|
|
25
|
-
* the export would never group.
|
|
17
|
+
* A group element's `data-volume`, defaulting to 1 for a missing, unparseable
|
|
18
|
+
* or absent element. Shared so the preview bus and `resolveAudioGroups` (which
|
|
19
|
+
* the render reads) cannot drift: the export was ~8 dB quieter than what was
|
|
20
|
+
* auditioned for exactly as long as the preview ignored this.
|
|
26
21
|
*/
|
|
27
|
-
|
|
28
|
-
function parseGroupVolume(el) {
|
|
22
|
+
export function readAudioGroupVolume(el) {
|
|
29
23
|
const raw = el?.getAttribute("data-volume");
|
|
30
24
|
const parsed = raw ? parseFloat(raw) : 1;
|
|
31
25
|
return Number.isFinite(parsed) ? parsed : 1;
|
|
@@ -39,7 +33,7 @@ function buildGroup(id, memberIds, el) {
|
|
|
39
33
|
memberIds,
|
|
40
34
|
...(fxChain ? { fxChain } : {}),
|
|
41
35
|
...(automation ? { automation } : {}),
|
|
42
|
-
volume:
|
|
36
|
+
volume: readAudioGroupVolume(el),
|
|
43
37
|
hidden: el?.hasAttribute("data-hidden") ?? false,
|
|
44
38
|
};
|
|
45
39
|
}
|
|
@@ -50,10 +44,64 @@ function buildGroup(id, memberIds, el) {
|
|
|
50
44
|
* (label = id) so a hand-authored composition degrades gracefully. Audio
|
|
51
45
|
* only in v1 — a `data-audio-group` on a `<video>` is ignored.
|
|
52
46
|
*/
|
|
47
|
+
/**
|
|
48
|
+
* The `<hf-audio-group>` element for a group id, or null.
|
|
49
|
+
*
|
|
50
|
+
* Tag-checked, which a bare `getElementById` is not. Every group attribute —
|
|
51
|
+
* the fader, the mute, the FX chain, the automation lane — is read off whatever
|
|
52
|
+
* this returns, so an unrelated element sharing the id used to be read as a bus:
|
|
53
|
+
* an `<audio id="vo" data-audio-group="vo" data-volume="0.5" data-fx-chain=…>`
|
|
54
|
+
* had its own fader and chain applied a SECOND time on the bus, and a
|
|
55
|
+
* `<div id="bg" data-hidden>` silenced group "bg" in preview only. The render
|
|
56
|
+
* never had this problem — `resolveAudioGroups` only ever accepted the tag —
|
|
57
|
+
* so the two disagreed on exactly the attributes the bus exists to carry.
|
|
58
|
+
*
|
|
59
|
+
* Returning null is the documented "group with no element" case, which
|
|
60
|
+
* degrades to a flat sum rather than borrowing a stranger's settings.
|
|
61
|
+
*/
|
|
62
|
+
export function resolveGroupElement(doc, groupId) {
|
|
63
|
+
// A render-stamped key names an INSTANCE, and `getElementById` cannot find it
|
|
64
|
+
// — the author id is what is on the element's `id`. Tried first so a compiled
|
|
65
|
+
// document resolves the right one of two identically-named buses.
|
|
66
|
+
// Compare the raw attribute value instead of interpolating an author-provided
|
|
67
|
+
// id into a selector. Quotes and backslashes are valid attribute values, and
|
|
68
|
+
// turning one into selector syntax made this otherwise tolerant reader throw.
|
|
69
|
+
const stamped = Array.from(doc?.querySelectorAll?.(`${HF_AUDIO_GROUP_TAG}[${MEDIA_RENDER_ID_ATTR}]`) ?? []).find((candidate) => candidate.getAttribute(MEDIA_RENDER_ID_ATTR) === groupId);
|
|
70
|
+
if (stamped)
|
|
71
|
+
return stamped;
|
|
72
|
+
const el = doc?.getElementById(groupId) ?? null;
|
|
73
|
+
if (!el)
|
|
74
|
+
return null;
|
|
75
|
+
return el.tagName?.toLowerCase() === HF_AUDIO_GROUP_TAG ? el : null;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Whether the bus a member belongs to is muted.
|
|
79
|
+
*
|
|
80
|
+
* Membership is held by the MEMBER's `data-audio-group`; a group never nests
|
|
81
|
+
* its members. So `el.closest("[data-hidden]")` cannot see a muted bus, which
|
|
82
|
+
* is how the render came to drop a hidden group's members while the preview
|
|
83
|
+
* fallback played them at full level.
|
|
84
|
+
*/
|
|
85
|
+
export function isMemberGroupHidden(doc, el) {
|
|
86
|
+
// A compiler stamp identifies the bus INSTANCE. The author id is only unique
|
|
87
|
+
// within one composition file, so resolving by it in an inlined document made
|
|
88
|
+
// every repeated sub-composition consult the first instance's mute state.
|
|
89
|
+
const groupId = el?.getAttribute?.(AUDIO_GROUP_RENDER_ID_ATTR) ?? el?.getAttribute?.(HF_AUDIO_GROUP_ATTR);
|
|
90
|
+
if (!groupId)
|
|
91
|
+
return false;
|
|
92
|
+
return resolveGroupElement(doc, groupId)?.hasAttribute("data-hidden") ?? false;
|
|
93
|
+
}
|
|
53
94
|
export function resolveAudioGroups(root) {
|
|
54
95
|
const membersByGroup = new Map();
|
|
55
|
-
for (const member of root.querySelectorAll(
|
|
56
|
-
|
|
96
|
+
for (const member of root.querySelectorAll(`audio[${HF_AUDIO_GROUP_ATTR}]`)) {
|
|
97
|
+
// The render-stamped instance key when the compiler has been through
|
|
98
|
+
// (`assignMediaRenderIds`), else the author id. An author id is unique only
|
|
99
|
+
// per composition FILE, so a sub-composition declaring a bus AND its members
|
|
100
|
+
// and used twice put both instances' members under one key — one sub-mix for
|
|
101
|
+
// two independent buses, instance B's fader and chain over instance A's
|
|
102
|
+
// audio, and with only B muted BOTH instances dropped from the export. The
|
|
103
|
+
// live preview has no stamps, so it reads exactly as before.
|
|
104
|
+
const groupId = member.getAttribute(AUDIO_GROUP_RENDER_ID_ATTR) ?? member.getAttribute(HF_AUDIO_GROUP_ATTR);
|
|
57
105
|
if (!groupId || !member.id)
|
|
58
106
|
continue;
|
|
59
107
|
const members = membersByGroup.get(groupId);
|
|
@@ -64,8 +112,11 @@ export function resolveAudioGroups(root) {
|
|
|
64
112
|
}
|
|
65
113
|
const groupElements = new Map();
|
|
66
114
|
for (const el of root.querySelectorAll(HF_AUDIO_GROUP_TAG)) {
|
|
67
|
-
|
|
68
|
-
|
|
115
|
+
// Keyed the same way, so a stamped document pairs instance for instance and
|
|
116
|
+
// an unstamped one keeps id-for-id.
|
|
117
|
+
const key = el.getAttribute(MEDIA_RENDER_ID_ATTR) ?? el.id;
|
|
118
|
+
if (key)
|
|
119
|
+
groupElements.set(key, el);
|
|
69
120
|
}
|
|
70
121
|
const groups = [];
|
|
71
122
|
for (const [id, memberIds] of membersByGroup) {
|
|
@@ -99,26 +150,24 @@ export function resolveCarveSourceIds(doc, ids) {
|
|
|
99
150
|
if (group) {
|
|
100
151
|
group.memberIds.forEach(add);
|
|
101
152
|
}
|
|
102
|
-
else if (doc.getElementById(id)) {
|
|
153
|
+
else if (doc.getElementById(id) && !resolveGroupElement(doc, id)) {
|
|
154
|
+
// A group with no members resolves to no entry above, and its own bus
|
|
155
|
+
// element would then pass this existence check and be returned as if it
|
|
156
|
+
// were a clip — a source the analysis can only fail to find, which the
|
|
157
|
+
// docblock above promises is dropped.
|
|
103
158
|
add(id);
|
|
104
159
|
}
|
|
105
160
|
}
|
|
106
161
|
return out;
|
|
107
162
|
}
|
|
108
|
-
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* element.
|
|
163
|
+
/** The group an audio member belongs to, or null. Membership is audio-only in
|
|
164
|
+
* v1, matching `resolveAudioGroups` and the render mixer; video and group-bus
|
|
165
|
+
* attributes are inert.
|
|
112
166
|
*
|
|
113
|
-
*
|
|
114
|
-
* `
|
|
115
|
-
* `
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* Tolerant of objects that only partially implement `Element` (test doubles for
|
|
119
|
-
* `HTMLMediaElement` commonly do): anything missing `tagName` or `getAttribute`
|
|
120
|
-
* simply has no group, mirroring `readChain`'s style in `runtime/audioFx.ts`.
|
|
121
|
-
*/
|
|
167
|
+
* Tolerant of objects that only partially implement `Element` (test doubles
|
|
168
|
+
* for `HTMLMediaElement` commonly do) — anything missing `tagName` or
|
|
169
|
+
* `getAttribute` simply has no group, mirroring `readChain`'s style in
|
|
170
|
+
* `runtime/audioFx.ts`. */
|
|
122
171
|
export function audioGroupOf(el) {
|
|
123
172
|
if (typeof el.tagName !== "string" || el.tagName.toLowerCase() !== "audio")
|
|
124
173
|
return null;
|
|
@@ -142,37 +191,12 @@ export function audioGroupOf(el) {
|
|
|
142
191
|
* runtime rather than the compiler so preview and render share one source.
|
|
143
192
|
*/
|
|
144
193
|
export function ensureAudioGroupInertStyle(doc) {
|
|
145
|
-
const
|
|
146
|
-
if (!doc?.head || doc.getElementById(
|
|
194
|
+
const styleId = "__hf-audio-group-inert";
|
|
195
|
+
if (!doc?.head || doc.getElementById(styleId))
|
|
147
196
|
return;
|
|
148
197
|
const style = doc.createElement("style");
|
|
149
|
-
style.id =
|
|
198
|
+
style.id = styleId;
|
|
150
199
|
style.textContent = `${HF_AUDIO_GROUP_TAG}{display:none!important}`;
|
|
151
200
|
doc.head.appendChild(style);
|
|
152
201
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Solo ("Hear only this") predicate — shared by the studio store (which owns
|
|
155
|
-
* the `soloed` set and the UI's lit/half-lit state) and the preview transport
|
|
156
|
-
* (which turns it into gain). An element is audible while any solo is active
|
|
157
|
-
* only if IT is soloed, or its OWN group is soloed (group solo = members
|
|
158
|
-
* solo). There is no "ancestor" to reach up to in this data model — a group
|
|
159
|
-
* bus is never itself attenuated by solo, so a soloed member's path through
|
|
160
|
-
* its group stays open by construction; this predicate only ever gates the
|
|
161
|
-
* member's own gain. No solo active at all is the one path that returns true
|
|
162
|
-
* unconditionally.
|
|
163
|
-
*/
|
|
164
|
-
export function isAudibleUnderSolo(soloed, id, groupId) {
|
|
165
|
-
if (soloed.size === 0)
|
|
166
|
-
return true;
|
|
167
|
-
if (soloed.has(id))
|
|
168
|
-
return true;
|
|
169
|
-
return Boolean(groupId && soloed.has(groupId));
|
|
170
|
-
}
|
|
171
|
-
/** Half-lit: this group itself isn't soloed, but at least one of its members
|
|
172
|
-
* is — the display-only signal that "some of what's under here still plays". */
|
|
173
|
-
export function isGroupHalfLitUnderSolo(soloed, groupId, memberIds) {
|
|
174
|
-
if (soloed.size === 0 || soloed.has(groupId))
|
|
175
|
-
return false;
|
|
176
|
-
return memberIds.some((id) => soloed.has(id));
|
|
177
|
-
}
|
|
178
202
|
//# sourceMappingURL=audioGroups.js.map
|
package/dist/audioGroups.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audioGroups.js","sourceRoot":"","sources":["../src/audioGroups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"audioGroups.js","sourceRoot":"","sources":["../src/audioGroups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,8BA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AAmB,CAAC,IAAI,IAAI,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,0BAA0B,CAAC,GAAa;IACtD,MAAM,OAAO,GAAG,wBAAwB,CAAC;IACzC,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO;IACtD,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,GAAG,OAAO,CAAC;IACnB,KAAK,CAAC,WAAW,GAAG,GAAG,kBAAkB,0BAA0B,CAAC;IACpE,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/compiler/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export { buildVariablesByCompScript, scopeCssToComposition, wrapScopedCompositio
|
|
|
10
10
|
export { inlineSubCompositions, type InlineSubCompositionsOptions, type InlineSubCompositionsResult, } from "./inlineSubCompositions";
|
|
11
11
|
export { checkSubCompositionUsability, type ParsableDocumentLike, type SubCompositionValidity, type SubCompositionValidityReason, } from "./subCompositionValidity";
|
|
12
12
|
export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside } from "./assetPaths";
|
|
13
|
-
export { MEDIA_RENDER_ID_ATTR, assignMediaRenderIds } from "./mediaRenderIds";
|
|
13
|
+
export { AUDIO_GROUP_RENDER_ID_ATTR, MEDIA_RENDER_ID_ATTR, assignMediaRenderIds, } from "./mediaRenderIds";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KA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BAAqB,EACrB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EACL,4BAA4B,EAC5B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,GAClC,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtF,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
|
package/dist/compiler/index.js
CHANGED
|
@@ -22,5 +22,5 @@ export { inlineSubCompositions, } from "./inlineSubCompositions.js";
|
|
|
22
22
|
export { checkSubCompositionUsability, } from "./subCompositionValidity.js";
|
|
23
23
|
// Asset-path primitives (shared across core, producer, CLI)
|
|
24
24
|
export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside } from "./assetPaths.js";
|
|
25
|
-
export { MEDIA_RENDER_ID_ATTR, assignMediaRenderIds } from "./mediaRenderIds.js";
|
|
25
|
+
export { AUDIO_GROUP_RENDER_ID_ATTR, MEDIA_RENDER_ID_ATTR, assignMediaRenderIds, } from "./mediaRenderIds.js";
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/compiler/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,oEAAoE;AACpE,OAAO,EACL,cAAc,GAOf,MAAM,kBAAkB,CAAC;AAE1B,iCAAiC;AACjC,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,wBAAwB,EACxB,gCAAgC,GAKjC,MAAM,kBAAkB,CAAC;AAE1B,wCAAwC;AACxC,OAAO,EAAE,WAAW,EAA4B,MAAM,gBAAgB,CAAC;AAEvE,0DAA0D;AAC1D,OAAO,EACL,kCAAkC,EAElC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,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAExF,OAAO,EACL,iCAAiC,GAKlC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC;AAExB,eAAe;AACf,OAAO,EACL,8BAA8B,GAG/B,MAAM,eAAe,CAAC;AAEvB,gCAAgC;AAChC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,iEAAiE;AACjE,OAAO,EACL,qBAAqB,GAGtB,MAAM,yBAAyB,CAAC;AAEjC,6EAA6E;AAC7E,iEAAiE;AACjE,qCAAqC;AACrC,OAAO,EACL,4BAA4B,GAI7B,MAAM,0BAA0B,CAAC;AAElC,4DAA4D;AAC5D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtF,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
|
|
@@ -25,6 +25,18 @@
|
|
|
25
25
|
* fix scene footage.
|
|
26
26
|
*/
|
|
27
27
|
export declare const MEDIA_RENDER_ID_ATTR = "data-hf-render-id";
|
|
28
|
+
/**
|
|
29
|
+
* The bus a member belongs to, as a DOCUMENT-unique key.
|
|
30
|
+
*
|
|
31
|
+
* `data-audio-group` names a bus by author id, unique only per composition FILE
|
|
32
|
+
* — so a sub-composition that declares a bus AND its members, used twice, put
|
|
33
|
+
* both instances' members under one key and let the second bus element
|
|
34
|
+
* overwrite the first. The mixer then sub-mixed two independent buses as one,
|
|
35
|
+
* applied instance B's fader, chain and label to instance A's audio, and — with
|
|
36
|
+
* only B muted — dropped BOTH instances from the export. This attribute is that
|
|
37
|
+
* collision resolved at the same boundary the media ids are.
|
|
38
|
+
*/
|
|
39
|
+
export declare const AUDIO_GROUP_RENDER_ID_ATTR = "data-hf-group-render-id";
|
|
28
40
|
interface MediaElementLike {
|
|
29
41
|
getAttribute(name: string): string | null;
|
|
30
42
|
setAttribute(name: string, value: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaRenderIds.d.ts","sourceRoot":"","sources":["../../src/compiler/mediaRenderIds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"mediaRenderIds.d.ts","sourceRoot":"","sources":["../../src/compiler/mediaRenderIds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAExD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AAQpE,UAAU,gBAAgB;IACxB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACjD;AAOD,UAAU,YAAY;IACpB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CAChE;AAkBD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAwBjE"}
|
|
@@ -25,8 +25,23 @@
|
|
|
25
25
|
* fix scene footage.
|
|
26
26
|
*/
|
|
27
27
|
export const MEDIA_RENDER_ID_ATTR = "data-hf-render-id";
|
|
28
|
+
/**
|
|
29
|
+
* The bus a member belongs to, as a DOCUMENT-unique key.
|
|
30
|
+
*
|
|
31
|
+
* `data-audio-group` names a bus by author id, unique only per composition FILE
|
|
32
|
+
* — so a sub-composition that declares a bus AND its members, used twice, put
|
|
33
|
+
* both instances' members under one key and let the second bus element
|
|
34
|
+
* overwrite the first. The mixer then sub-mixed two independent buses as one,
|
|
35
|
+
* applied instance B's fader, chain and label to instance A's audio, and — with
|
|
36
|
+
* only B muted — dropped BOTH instances from the export. This attribute is that
|
|
37
|
+
* collision resolved at the same boundary the media ids are.
|
|
38
|
+
*/
|
|
39
|
+
export const AUDIO_GROUP_RENDER_ID_ATTR = "data-hf-group-render-id";
|
|
28
40
|
/** Elements the render pipeline addresses by id. */
|
|
29
41
|
const MEDIA_SELECTOR = "video[src], audio[src], img[src]";
|
|
42
|
+
/** Buses, which are addressed by id in exactly the same way and collide the
|
|
43
|
+
* same way. Only an id'd bus can be joined at all. */
|
|
44
|
+
const AUDIO_GROUP_SELECTOR = "hf-audio-group[id]";
|
|
30
45
|
/**
|
|
31
46
|
* Derive a document-unique render id from an element's own id.
|
|
32
47
|
*
|
|
@@ -71,5 +86,74 @@ export function assignMediaRenderIds(document) {
|
|
|
71
86
|
taken.add(renderId);
|
|
72
87
|
el.setAttribute(MEDIA_RENDER_ID_ATTR, renderId);
|
|
73
88
|
}
|
|
89
|
+
assignAudioGroupRenderIds(document, taken);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Give every `<hf-audio-group>` a document-unique render id, and tell each
|
|
93
|
+
* member which INSTANCE of its bus it belongs to.
|
|
94
|
+
*
|
|
95
|
+
* Shares the `taken` set with the media pass, so a bus id and a clip id can
|
|
96
|
+
* never resolve to the same key either.
|
|
97
|
+
*
|
|
98
|
+
* A member is paired to the bus inside its OWN composition subtree. Two
|
|
99
|
+
* instances of the same sub-composition are indistinguishable by
|
|
100
|
+
* `data-composition-id` — both carry the file's own id — so the subtree
|
|
101
|
+
* ELEMENT is the only thing that separates them, which is exactly what
|
|
102
|
+
* `closest()` returns. A member whose bus is not in its subtree (a
|
|
103
|
+
* hand-authored bus in the root composition, members in a scene) falls back to
|
|
104
|
+
* the first bus with that id, which is the pre-existing behaviour and the only
|
|
105
|
+
* sensible reading when there is one bus and several scenes referencing it.
|
|
106
|
+
*/
|
|
107
|
+
function assignAudioGroupRenderIds(document, taken) {
|
|
108
|
+
const busesById = stampAudioGroupBuses(document, taken);
|
|
109
|
+
if (busesById.size === 0)
|
|
110
|
+
return;
|
|
111
|
+
for (const member of document.querySelectorAll("audio[data-audio-group]")) {
|
|
112
|
+
const groupId = member.getAttribute("data-audio-group");
|
|
113
|
+
const buses = groupId ? busesById.get(groupId) : undefined;
|
|
114
|
+
if (!groupId || !buses?.length)
|
|
115
|
+
continue;
|
|
116
|
+
const renderId = busForMember(member, groupId, buses)?.getAttribute(MEDIA_RENDER_ID_ATTR);
|
|
117
|
+
if (renderId)
|
|
118
|
+
member.setAttribute(AUDIO_GROUP_RENDER_ID_ATTR, renderId);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/** Every id'd bus, stamped and indexed by author id — several per id when a
|
|
122
|
+
* sub-composition that declares one is used more than once. */
|
|
123
|
+
function stampAudioGroupBuses(document, taken) {
|
|
124
|
+
const busesById = new Map();
|
|
125
|
+
for (const bus of document.querySelectorAll(AUDIO_GROUP_SELECTOR)) {
|
|
126
|
+
const id = bus.getAttribute("id");
|
|
127
|
+
if (!id)
|
|
128
|
+
continue;
|
|
129
|
+
const renderId = bus.getAttribute(MEDIA_RENDER_ID_ATTR) ?? uniqueRenderId(id, taken);
|
|
130
|
+
taken.add(renderId);
|
|
131
|
+
bus.setAttribute(MEDIA_RENDER_ID_ATTR, renderId);
|
|
132
|
+
const existing = busesById.get(id);
|
|
133
|
+
if (existing)
|
|
134
|
+
existing.push(bus);
|
|
135
|
+
else
|
|
136
|
+
busesById.set(id, [bus]);
|
|
137
|
+
}
|
|
138
|
+
return busesById;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Which instance of a bus a member belongs to: the one in its own composition
|
|
142
|
+
* subtree. Falls back to the first when the bus is not in the member's subtree
|
|
143
|
+
* at all — a hand-authored bus in the root composition with members in scenes —
|
|
144
|
+
* which is the pre-existing reading and the only sensible one there.
|
|
145
|
+
*/
|
|
146
|
+
function busForMember(member, groupId, buses) {
|
|
147
|
+
if (buses.length === 1)
|
|
148
|
+
return buses[0];
|
|
149
|
+
const scope = member.closest?.("[data-composition-id]");
|
|
150
|
+
if (!scope)
|
|
151
|
+
return buses[0];
|
|
152
|
+
// `scope.querySelectorAll()` also sees buses owned by nested compositions.
|
|
153
|
+
// Compare each bus's own nearest composition instead, so a root member does
|
|
154
|
+
// not bind to a same-named bus inside a child merely because the child comes
|
|
155
|
+
// first in document order.
|
|
156
|
+
return (buses.find((candidate) => candidate.getAttribute("id") === groupId &&
|
|
157
|
+
candidate.closest?.("[data-composition-id]") === scope) ?? buses[0]);
|
|
74
158
|
}
|
|
75
159
|
//# sourceMappingURL=mediaRenderIds.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mediaRenderIds.js","sourceRoot":"","sources":["../../src/compiler/mediaRenderIds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAExD,oDAAoD;AACpD,MAAM,cAAc,GAAG,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"mediaRenderIds.js","sourceRoot":"","sources":["../../src/compiler/mediaRenderIds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAExD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AAEpE,oDAAoD;AACpD,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAC1D;uDACuD;AACvD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAgBlD;;;;;;;;GAQG;AACH,SAAS,cAAc,CAAC,MAAc,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CAAC;QACjD,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACnC,IAAI,QAAQ;YAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;YAC5B,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,SAAS,YAAY,CACnB,MAAyB,EACzB,OAAe,EACf,KAA0B;IAE1B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,uBAAuB,CAAC,CAAC;IACxD,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5B,2EAA2E;IAC3E,4EAA4E;IAC5E,6EAA6E;IAC7E,2BAA2B;IAC3B,OAAO,CACL,KAAK,CAAC,IAAI,CACR,CAAC,SAAS,EAAE,EAAE,CACZ,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,OAAO;QACxC,SAAS,CAAC,OAAO,EAAE,CAAC,uBAAuB,CAAC,KAAK,KAAK,CACzD,IAAI,KAAK,CAAC,CAAC,CAAC,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affordances.d.ts","sourceRoot":"","sources":["../../src/editing/affordances.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"affordances.d.ts","sourceRoot":"","sources":["../../src/editing/affordances.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB;;;8EAG0E;IAC1E,OAAO,EAAE,OAAO,CAAC;IACjB,+FAA+F;IAC/F,OAAO,E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,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAMhE;AAqHD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,oBAAoB,GAAG,2BAA2B,CA+B/F;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,oBAAoB,GAAG,kBAAkB,CAEzF"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Pure, DOM-free editing-affordance resolution. Single source of truth for what
|
|
3
|
-
* the studio's edit panel (and any SDK consumer) surfaces per selected element:
|
|
4
|
-
* capability flags + which section types apply. No getComputedStyle, no DOM —
|
|
5
|
-
* the caller supplies normalized facts (live or static). See the SDK adapter
|
|
6
|
-
* (browser-only) and the studio mapper for the two fact extractors.
|
|
7
|
-
*/
|
|
1
|
+
import { HF_AUDIO_GROUP_TAG } from "../audioGroups.js";
|
|
8
2
|
/**
|
|
9
3
|
* kebab-case px parser. Single source of truth — studio's domEditingDom
|
|
10
4
|
* re-exports this so the two paths can't drift.
|
|
@@ -131,17 +125,33 @@ function resolveCapabilities(facts) {
|
|
|
131
125
|
* without re-running the capability geometry parse.
|
|
132
126
|
*/
|
|
133
127
|
export function resolveEditingSections(facts) {
|
|
128
|
+
// An `<hf-audio-group>` is a mixer bus: it has no visual frame AND no media
|
|
129
|
+
// of its own, but it does carry a `data-fx-chain`, which is the whole point
|
|
130
|
+
// of selecting one. Without this the timeline's "Open rack" on a group led to
|
|
131
|
+
// a panel offering Fill, Gradient, Stroke and Shadow for something that paints
|
|
132
|
+
// nothing — and no Audio FX section at all, so a bus effect could only ever be
|
|
133
|
+
// applied from the preset popover and never edited.
|
|
134
|
+
const isAudioBus = facts.tag === HF_AUDIO_GROUP_TAG;
|
|
134
135
|
// `<audio>` never paints a visual frame — position/size/rotation/stacking
|
|
135
136
|
// and fill/radius/stroke/shadow/etc. are all inert on it. Every other tag
|
|
136
137
|
// (div, img, video, svg, canvas, composition hosts) renders a real box.
|
|
137
|
-
const hasVisualBox = facts.tag !== "audio";
|
|
138
|
+
const hasVisualBox = facts.tag !== "audio" && !isAudioBus;
|
|
138
139
|
return {
|
|
139
140
|
text: facts.hasEditableText && !facts.isCompositionHost && !facts.isInsideLockedComposition,
|
|
140
141
|
media: facts.tag === "video" || facts.tag === "audio" || facts.tag === "img",
|
|
141
|
-
audioFx: facts.tag === "audio",
|
|
142
|
+
audioFx: facts.tag === "audio" || isAudioBus,
|
|
142
143
|
colorGrading: facts.tag === "video" || facts.tag === "img",
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
// A bus has no clip range at all — no `data-start`, no duration, and its
|
|
145
|
+
// automation clock is composition time — so Start/Duration/End would be
|
|
146
|
+
// editing nothing. Audio keeps its timing: an `<audio>` clip is placed on
|
|
147
|
+
// the timeline like any other, it just cannot be tweened (see `animation`).
|
|
148
|
+
timing: !isAudioBus && (facts.hasTimingStart || facts.animationCount > 0),
|
|
149
|
+
// Has tweens AND could meaningfully have them. Neither an `<audio>` clip nor
|
|
150
|
+
// a bus has a transform, opacity or box, so a tween on one moves nothing —
|
|
151
|
+
// the flat panel gates its editor on the same two tags, and does it by tag
|
|
152
|
+
// rather than by this flag because a div with no tweens yet must still
|
|
153
|
+
// offer "+ Add".
|
|
154
|
+
animation: facts.animationCount > 0 && facts.tag !== "audio" && !isAudioBus,
|
|
145
155
|
layout: hasVisualBox,
|
|
146
156
|
style: hasVisualBox,
|
|
147
157
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affordances.js","sourceRoot":"","sources":["../../src/editing/affordances.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"affordances.js","sourceRoot":"","sources":["../../src/editing/affordances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAyEvD;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAyB;IAC/C,IAAI,CAAC,KAAK;QAAE,OAAO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