@clipkit/editor 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +51 -0
- package/dist/Editor.d.ts +3 -0
- package/dist/Editor.d.ts.map +1 -0
- package/dist/Editor.js +73 -0
- package/dist/Editor.js.map +1 -0
- package/dist/ExportDialog.d.ts +12 -0
- package/dist/ExportDialog.d.ts.map +1 -0
- package/dist/ExportDialog.js +30 -0
- package/dist/ExportDialog.js.map +1 -0
- package/dist/MotionPathOverlay.d.ts +5 -0
- package/dist/MotionPathOverlay.d.ts.map +1 -0
- package/dist/MotionPathOverlay.js +156 -0
- package/dist/MotionPathOverlay.js.map +1 -0
- package/dist/PerfHud.d.ts +2 -0
- package/dist/PerfHud.d.ts.map +1 -0
- package/dist/PerfHud.js +85 -0
- package/dist/PerfHud.js.map +1 -0
- package/dist/Stage.d.ts +2 -0
- package/dist/Stage.d.ts.map +1 -0
- package/dist/Stage.js +406 -0
- package/dist/Stage.js.map +1 -0
- package/dist/StageOverlay.d.ts +7 -0
- package/dist/StageOverlay.d.ts.map +1 -0
- package/dist/StageOverlay.js +508 -0
- package/dist/StageOverlay.js.map +1 -0
- package/dist/commands.d.ts +18 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +103 -0
- package/dist/commands.js.map +1 -0
- package/dist/configuration.d.ts +9 -0
- package/dist/configuration.d.ts.map +1 -0
- package/dist/configuration.js +21 -0
- package/dist/configuration.js.map +1 -0
- package/dist/controls/AnimationsStack.d.ts +8 -0
- package/dist/controls/AnimationsStack.d.ts.map +1 -0
- package/dist/controls/AnimationsStack.js +188 -0
- package/dist/controls/AnimationsStack.js.map +1 -0
- package/dist/controls/CameraControl.d.ts +19 -0
- package/dist/controls/CameraControl.d.ts.map +1 -0
- package/dist/controls/CameraControl.js +47 -0
- package/dist/controls/CameraControl.js.map +1 -0
- package/dist/controls/CaptionLengthControl.d.ts +5 -0
- package/dist/controls/CaptionLengthControl.d.ts.map +1 -0
- package/dist/controls/CaptionLengthControl.js +11 -0
- package/dist/controls/CaptionLengthControl.js.map +1 -0
- package/dist/controls/CaptionTranscribe.d.ts +2 -0
- package/dist/controls/CaptionTranscribe.d.ts.map +1 -0
- package/dist/controls/CaptionTranscribe.js +95 -0
- package/dist/controls/CaptionTranscribe.js.map +1 -0
- package/dist/controls/ColorPicker.d.ts +17 -0
- package/dist/controls/ColorPicker.d.ts.map +1 -0
- package/dist/controls/ColorPicker.js +354 -0
- package/dist/controls/ColorPicker.js.map +1 -0
- package/dist/controls/ControlRenderer.d.ts +20 -0
- package/dist/controls/ControlRenderer.d.ts.map +1 -0
- package/dist/controls/ControlRenderer.js +106 -0
- package/dist/controls/ControlRenderer.js.map +1 -0
- package/dist/controls/CropControl.d.ts +2 -0
- package/dist/controls/CropControl.d.ts.map +1 -0
- package/dist/controls/CropControl.js +177 -0
- package/dist/controls/CropControl.js.map +1 -0
- package/dist/controls/EffectsStack.d.ts +8 -0
- package/dist/controls/EffectsStack.d.ts.map +1 -0
- package/dist/controls/EffectsStack.js +89 -0
- package/dist/controls/EffectsStack.js.map +1 -0
- package/dist/controls/GradeControl.d.ts +2 -0
- package/dist/controls/GradeControl.d.ts.map +1 -0
- package/dist/controls/GradeControl.js +120 -0
- package/dist/controls/GradeControl.js.map +1 -0
- package/dist/controls/KeyframeDiamond.d.ts +11 -0
- package/dist/controls/KeyframeDiamond.d.ts.map +1 -0
- package/dist/controls/KeyframeDiamond.js +87 -0
- package/dist/controls/KeyframeDiamond.js.map +1 -0
- package/dist/controls/LightingControls.d.ts +24 -0
- package/dist/controls/LightingControls.d.ts.map +1 -0
- package/dist/controls/LightingControls.js +108 -0
- package/dist/controls/LightingControls.js.map +1 -0
- package/dist/controls/ShapePresetControl.d.ts +4 -0
- package/dist/controls/ShapePresetControl.d.ts.map +1 -0
- package/dist/controls/ShapePresetControl.js +30 -0
- package/dist/controls/ShapePresetControl.js.map +1 -0
- package/dist/controls/ValueField.d.ts +10 -0
- package/dist/controls/ValueField.d.ts.map +1 -0
- package/dist/controls/ValueField.js +158 -0
- package/dist/controls/ValueField.js.map +1 -0
- package/dist/controls/VolumeControl.d.ts +10 -0
- package/dist/controls/VolumeControl.d.ts.map +1 -0
- package/dist/controls/VolumeControl.js +75 -0
- package/dist/controls/VolumeControl.js.map +1 -0
- package/dist/controls/compound.d.ts +46 -0
- package/dist/controls/compound.d.ts.map +1 -0
- package/dist/controls/compound.js +160 -0
- package/dist/controls/compound.js.map +1 -0
- package/dist/controls/layout.d.ts +38 -0
- package/dist/controls/layout.d.ts.map +1 -0
- package/dist/controls/layout.js +162 -0
- package/dist/controls/layout.js.map +1 -0
- package/dist/controls/primitives.d.ts +83 -0
- package/dist/controls/primitives.d.ts.map +1 -0
- package/dist/controls/primitives.js +194 -0
- package/dist/controls/primitives.js.map +1 -0
- package/dist/controls/transcribe.worker.d.ts +2 -0
- package/dist/controls/transcribe.worker.d.ts.map +1 -0
- package/dist/controls/transcribe.worker.js +22 -0
- package/dist/controls/transcribe.worker.js.map +1 -0
- package/dist/frame/AddElementBar.d.ts +2 -0
- package/dist/frame/AddElementBar.d.ts.map +1 -0
- package/dist/frame/AddElementBar.js +103 -0
- package/dist/frame/AddElementBar.js.map +1 -0
- package/dist/frame/Breadcrumbs.d.ts +2 -0
- package/dist/frame/Breadcrumbs.d.ts.map +1 -0
- package/dist/frame/Breadcrumbs.js +32 -0
- package/dist/frame/Breadcrumbs.js.map +1 -0
- package/dist/frame/GroupFlash.d.ts +2 -0
- package/dist/frame/GroupFlash.d.ts.map +1 -0
- package/dist/frame/GroupFlash.js +65 -0
- package/dist/frame/GroupFlash.js.map +1 -0
- package/dist/frame/Resizable.d.ts +12 -0
- package/dist/frame/Resizable.d.ts.map +1 -0
- package/dist/frame/Resizable.js +37 -0
- package/dist/frame/Resizable.js.map +1 -0
- package/dist/frame/Section.d.ts +23 -0
- package/dist/frame/Section.d.ts.map +1 -0
- package/dist/frame/Section.js +23 -0
- package/dist/frame/Section.js.map +1 -0
- package/dist/frame/ZoomControl.d.ts +9 -0
- package/dist/frame/ZoomControl.d.ts.map +1 -0
- package/dist/frame/ZoomControl.js +15 -0
- package/dist/frame/ZoomControl.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/camera-gizmo.d.ts +15 -0
- package/dist/lib/camera-gizmo.d.ts.map +1 -0
- package/dist/lib/camera-gizmo.js +57 -0
- package/dist/lib/camera-gizmo.js.map +1 -0
- package/dist/lib/camera-tool.d.ts +43 -0
- package/dist/lib/camera-tool.d.ts.map +1 -0
- package/dist/lib/camera-tool.js +80 -0
- package/dist/lib/camera-tool.js.map +1 -0
- package/dist/lib/caption-segments.d.ts +17 -0
- package/dist/lib/caption-segments.d.ts.map +1 -0
- package/dist/lib/caption-segments.js +50 -0
- package/dist/lib/caption-segments.js.map +1 -0
- package/dist/lib/group.d.ts +12 -0
- package/dist/lib/group.d.ts.map +1 -0
- package/dist/lib/group.js +61 -0
- package/dist/lib/group.js.map +1 -0
- package/dist/lib/keyframes.d.ts +29 -0
- package/dist/lib/keyframes.d.ts.map +1 -0
- package/dist/lib/keyframes.js +92 -0
- package/dist/lib/keyframes.js.map +1 -0
- package/dist/lib/sfx-preview.d.ts +18 -0
- package/dist/lib/sfx-preview.d.ts.map +1 -0
- package/dist/lib/sfx-preview.js +74 -0
- package/dist/lib/sfx-preview.js.map +1 -0
- package/dist/lib/shape-presets.d.ts +35 -0
- package/dist/lib/shape-presets.d.ts.map +1 -0
- package/dist/lib/shape-presets.js +81 -0
- package/dist/lib/shape-presets.js.map +1 -0
- package/dist/lib/ungroup.d.ts +12 -0
- package/dist/lib/ungroup.d.ts.map +1 -0
- package/dist/lib/ungroup.js +40 -0
- package/dist/lib/ungroup.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/panels/AssetsPanel.d.ts +2 -0
- package/dist/panels/AssetsPanel.d.ts.map +1 -0
- package/dist/panels/AssetsPanel.js +108 -0
- package/dist/panels/AssetsPanel.js.map +1 -0
- package/dist/panels/InspectorPanel.d.ts +2 -0
- package/dist/panels/InspectorPanel.d.ts.map +1 -0
- package/dist/panels/InspectorPanel.js +286 -0
- package/dist/panels/InspectorPanel.js.map +1 -0
- package/dist/panels/InterpolationPanel.d.ts +2 -0
- package/dist/panels/InterpolationPanel.d.ts.map +1 -0
- package/dist/panels/InterpolationPanel.js +226 -0
- package/dist/panels/InterpolationPanel.js.map +1 -0
- package/dist/panels/LayersTree.d.ts +4 -0
- package/dist/panels/LayersTree.d.ts.map +1 -0
- package/dist/panels/LayersTree.js +137 -0
- package/dist/panels/LayersTree.js.map +1 -0
- package/dist/panels/LeftRail.d.ts +6 -0
- package/dist/panels/LeftRail.d.ts.map +1 -0
- package/dist/panels/LeftRail.js +35 -0
- package/dist/panels/LeftRail.js.map +1 -0
- package/dist/panels/SourcePanel.d.ts +2 -0
- package/dist/panels/SourcePanel.d.ts.map +1 -0
- package/dist/panels/SourcePanel.js +470 -0
- package/dist/panels/SourcePanel.js.map +1 -0
- package/dist/panels/TimelinePanel.d.ts +11 -0
- package/dist/panels/TimelinePanel.d.ts.map +1 -0
- package/dist/panels/TimelinePanel.js +98 -0
- package/dist/panels/TimelinePanel.js.map +1 -0
- package/dist/panels/assets/SfxBrowser.d.ts +2 -0
- package/dist/panels/assets/SfxBrowser.d.ts.map +1 -0
- package/dist/panels/assets/SfxBrowser.js +49 -0
- package/dist/panels/assets/SfxBrowser.js.map +1 -0
- package/dist/panels/assets/use-assets.d.ts +11 -0
- package/dist/panels/assets/use-assets.d.ts.map +1 -0
- package/dist/panels/assets/use-assets.js +84 -0
- package/dist/panels/assets/use-assets.js.map +1 -0
- package/dist/panels/assets/use-sfx.d.ts +6 -0
- package/dist/panels/assets/use-sfx.d.ts.map +1 -0
- package/dist/panels/assets/use-sfx.js +47 -0
- package/dist/panels/assets/use-sfx.js.map +1 -0
- package/dist/panels/timeline/CanvasTimeline.d.ts +7 -0
- package/dist/panels/timeline/CanvasTimeline.d.ts.map +1 -0
- package/dist/panels/timeline/CanvasTimeline.js +1536 -0
- package/dist/panels/timeline/CanvasTimeline.js.map +1 -0
- package/dist/panels/timeline/Clip.d.ts +37 -0
- package/dist/panels/timeline/Clip.d.ts.map +1 -0
- package/dist/panels/timeline/Clip.js +176 -0
- package/dist/panels/timeline/Clip.js.map +1 -0
- package/dist/panels/timeline/CurveEditor.d.ts +2 -0
- package/dist/panels/timeline/CurveEditor.d.ts.map +1 -0
- package/dist/panels/timeline/CurveEditor.js +233 -0
- package/dist/panels/timeline/CurveEditor.js.map +1 -0
- package/dist/panels/timeline/MixerRail.d.ts +7 -0
- package/dist/panels/timeline/MixerRail.d.ts.map +1 -0
- package/dist/panels/timeline/MixerRail.js +295 -0
- package/dist/panels/timeline/MixerRail.js.map +1 -0
- package/dist/panels/timeline/Waveform.d.ts +11 -0
- package/dist/panels/timeline/Waveform.d.ts.map +1 -0
- package/dist/panels/timeline/Waveform.js +63 -0
- package/dist/panels/timeline/Waveform.js.map +1 -0
- package/dist/panels/timeline/clip-style.d.ts +10 -0
- package/dist/panels/timeline/clip-style.d.ts.map +1 -0
- package/dist/panels/timeline/clip-style.js +20 -0
- package/dist/panels/timeline/clip-style.js.map +1 -0
- package/dist/panels/timeline/filmstrip.d.ts +7 -0
- package/dist/panels/timeline/filmstrip.d.ts.map +1 -0
- package/dist/panels/timeline/filmstrip.js +135 -0
- package/dist/panels/timeline/filmstrip.js.map +1 -0
- package/dist/panels/timeline/timeline-layout.d.ts +65 -0
- package/dist/panels/timeline/timeline-layout.d.ts.map +1 -0
- package/dist/panels/timeline/timeline-layout.js +118 -0
- package/dist/panels/timeline/timeline-layout.js.map +1 -0
- package/dist/types.d.ts +68 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +56 -0
- package/src/styles.css +185 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Clipkit Contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @clipkit/editor
|
|
2
|
+
|
|
3
|
+
> One configurable React editor over the Source schema, spanning BASIC to ADVANCED modes.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @clipkit/editor
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The ClipKit editor is a single component tree—two modes (BASIC and ADVANCED) are just different configurations of the same `<Editor>`. The editor renders a four-panel layout (assets/layers on the left, canvas center, inspector right, timeline bottom) and is powered by `@clipkit/editor-core`. Storage is an injected `AssetStore` port, so you wire your own backend (or use the included in-memory and IndexedDB options). It requires React 19 and a stylesheet import.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import { Editor, BASIC_CONFIGURATION } from '@clipkit/editor';
|
|
15
|
+
import '@clipkit/editor/styles.css';
|
|
16
|
+
|
|
17
|
+
export function MyEditor({ source }) {
|
|
18
|
+
return (
|
|
19
|
+
<Editor
|
|
20
|
+
initialSource={source}
|
|
21
|
+
configuration={BASIC_CONFIGURATION}
|
|
22
|
+
onSourceChange={(updated) => console.log(updated)}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API
|
|
29
|
+
|
|
30
|
+
**Components**
|
|
31
|
+
- `Editor` — Main editor component. Takes `initialSource` (required), `configuration`, `assetStore`, `onSourceChange`, `onRender`, and render/theme props.
|
|
32
|
+
- `ExportDialog` — Modal for export format/resolution/quality selection. Consumer calls `onConfirm` with the user's choice; the editor has no knowledge of how to render it.
|
|
33
|
+
|
|
34
|
+
**Configurations**
|
|
35
|
+
- `BASIC_CONFIGURATION`, `ADVANCED_CONFIGURATION` — Pre-built editor layouts controlling visible panels (assets, layers, timeline).
|
|
36
|
+
|
|
37
|
+
**Hooks**
|
|
38
|
+
- `useEditor()` — Returns actions (play, seek, undo, select, etc.) and current playback state.
|
|
39
|
+
- `useEditorStore()` — Direct access to the editor's Zustand store.
|
|
40
|
+
|
|
41
|
+
**Storage**
|
|
42
|
+
- `createLocalAssetStore()` — IndexedDB-backed media bin (persists in browser, no backend).
|
|
43
|
+
- `createMemoryAssetStore()` — In-memory media bin (loses assets on reload).
|
|
44
|
+
|
|
45
|
+
**Other**
|
|
46
|
+
- `EDITOR_COMMANDS` — Keyboard command registry (play/pause, undo/redo, frame stepping).
|
|
47
|
+
- `Section`, `FieldRow` — UI components for building custom inspector panels.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
Apache-2.0 · part of [ClipKit](https://clipkit.dev) · [source](https://github.com/clipkit-video/clipkit)
|
package/dist/Editor.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../src/Editor.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,+BA0IxC"}
|
package/dist/Editor.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Editor — the configurable shell's root (EDITORS-PLAN B1). One
|
|
2
|
+
// component tree; the EditorConfiguration decides which regions exist
|
|
3
|
+
// (D2 layer 3). Four-region frame per design/refs: left rail (assets/
|
|
4
|
+
// layers), center stage, right inspector, bottom timeline — all flat,
|
|
5
|
+
// hairline-separated, resizable.
|
|
6
|
+
'use client';
|
|
7
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
9
|
+
import { useStore } from 'zustand';
|
|
10
|
+
import { ADVANCED_CONFIGURATION, EditorContext, createEditorStore, createLocalAssetStore, useEditor, useEditorContext, usePlaybackSession, } from '@clipkit/editor-core';
|
|
11
|
+
import { ConfigurationContext, getRegistry } from './configuration.js';
|
|
12
|
+
import { useKeyboardCommands } from './commands.js';
|
|
13
|
+
import { PanelGutter } from './frame/Resizable.js';
|
|
14
|
+
import { LeftRail } from './panels/LeftRail.js';
|
|
15
|
+
import { InspectorPanel } from './panels/InspectorPanel.js';
|
|
16
|
+
import { TimelinePanel } from './panels/TimelinePanel.js';
|
|
17
|
+
import { Stage } from './Stage.js';
|
|
18
|
+
export function Editor(props) {
|
|
19
|
+
const { initialSource, configuration = ADVANCED_CONFIGURATION, onSourceChange, onRender, exportFormats, rendering, renderProgress, backend = 'auto', theme = 'dark', assetStore: assetStoreProp, } = props;
|
|
20
|
+
const store = useMemo(() => createEditorStore(initialSource, theme), []);
|
|
21
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22
|
+
// ↑ The store owns state after mount (same contract as the legacy shell).
|
|
23
|
+
// Local IndexedDB store unless the embedder injects one (the storage seam).
|
|
24
|
+
const assetStore = useMemo(() => assetStoreProp ?? createLocalAssetStore(), [assetStoreProp]);
|
|
25
|
+
const canvasRef = useRef(null);
|
|
26
|
+
const engine = usePlaybackSession(store, canvasRef, {
|
|
27
|
+
backend,
|
|
28
|
+
onSourceChange,
|
|
29
|
+
});
|
|
30
|
+
const liveTheme = useStore(store, (s) => s.ui.theme);
|
|
31
|
+
// Track the `theme` prop live. The store seeds from it once (createEditorStore
|
|
32
|
+
// above), but a host that toggles light/dark at runtime — e.g. apps/web's site
|
|
33
|
+
// theme — needs the editor to follow. No-op when already in sync; an in-editor
|
|
34
|
+
// toggle (if one is added) still sticks until the prop next changes.
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (store.getState().ui.theme !== theme)
|
|
37
|
+
store.getState()._setUiState({ theme });
|
|
38
|
+
}, [store, theme]);
|
|
39
|
+
const editorCtx = useMemo(() => ({ store, engine, theme: liveTheme, assetStore }), [store, engine, liveTheme, assetStore]);
|
|
40
|
+
const configCtx = useMemo(() => ({ configuration, registry: getRegistry() }), [configuration]);
|
|
41
|
+
// Panel sizes are EDITOR STATE (the lens rule) — never serialized.
|
|
42
|
+
const [leftWidth, setLeftWidth] = useState(300);
|
|
43
|
+
const [rightWidth, setRightWidth] = useState(264);
|
|
44
|
+
const [bottomHeight, setBottomHeight] = useState(260);
|
|
45
|
+
// The Source (JSON) tab auto-widens the left rail a notch and
|
|
46
|
+
// restores the previous width on the way out (ruled by Ian
|
|
47
|
+
// 2026-06-11). A manual resize while on Source sticks for the visit;
|
|
48
|
+
// the pre-Source width is what comes back.
|
|
49
|
+
const preSourceWidth = useRef(300);
|
|
50
|
+
const onSourceTab = useRef(false);
|
|
51
|
+
const handleLeftTabChange = (tab) => {
|
|
52
|
+
const entering = tab === 'source';
|
|
53
|
+
if (entering && !onSourceTab.current) {
|
|
54
|
+
preSourceWidth.current = leftWidth;
|
|
55
|
+
setLeftWidth(Math.max(leftWidth, 380));
|
|
56
|
+
}
|
|
57
|
+
else if (!entering && onSourceTab.current) {
|
|
58
|
+
setLeftWidth(preSourceWidth.current);
|
|
59
|
+
}
|
|
60
|
+
onSourceTab.current = entering;
|
|
61
|
+
};
|
|
62
|
+
const showLeft = configuration.views.assets || configuration.views.layers;
|
|
63
|
+
const showTimeline = configuration.views.timeline;
|
|
64
|
+
return (_jsx(EditorContext.Provider, { value: editorCtx, children: _jsx(ConfigurationContext.Provider, { value: configCtx, children: _jsxs("div", { className: `clipkit-editor flex flex-col w-full h-full bg-background text-foreground ${liveTheme}`, "data-theme": liveTheme, children: [_jsx(KeyboardBridge, {}), _jsxs("div", { className: "flex flex-1 min-h-0 min-w-0", children: [showLeft && (_jsxs(_Fragment, { children: [_jsx("div", { style: { width: leftWidth }, className: "shrink-0 min-w-0", children: _jsx(LeftRail, { onActiveTabChange: handleLeftTabChange }) }), _jsx(PanelGutter, { direction: "left", size: leftWidth, min: 160, max: 600, onResize: setLeftWidth })] })), _jsx("div", { className: "flex-1 min-w-0 min-h-0 flex flex-col", children: _jsx(Stage, { ref: canvasRef }) }), _jsx(PanelGutter, { direction: "right", size: rightWidth, min: 220, max: 440, onResize: setRightWidth }), _jsx("div", { style: { width: rightWidth }, className: "shrink-0 min-w-0", children: _jsx(InspectorPanel, {}) })] }), showTimeline && (_jsxs(_Fragment, { children: [_jsx(PanelGutter, { direction: "bottom", size: bottomHeight, min: 120, max: 480, onResize: setBottomHeight }), _jsx("div", { style: { height: bottomHeight }, className: "shrink-0", children: _jsx(TimelinePanel, { onRender: onRender, exportFormats: exportFormats, rendering: rendering, renderProgress: renderProgress }) })] }))] }) }) }));
|
|
65
|
+
}
|
|
66
|
+
/** Mounts the keyboard command table once contexts exist. */
|
|
67
|
+
function KeyboardBridge() {
|
|
68
|
+
const { store, engine } = useEditorContext();
|
|
69
|
+
const actions = useEditor();
|
|
70
|
+
useKeyboardCommands({ store, engine, actions });
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=Editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../src/Editor.tsx"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,sEAAsE;AACtE,sEAAsE;AACtE,sEAAsE;AACtE,iCAAiC;AAEjC,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC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AAC,OAAO,EACjB,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,aAAa,GACvB,EACF,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,SAAS,EAAC,kBAAkB,YAC7D,KAAC,cAAc,KAAG,GACd,IACF,EAEL,YAAY,IAAI,CACf,8BACE,KAAC,WAAW,IACV,SAAS,EAAC,QAAQ,EAClB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,eAAe,GACzB,EACF,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,SAAS,EAAC,UAAU,YACxD,KAAC,aAAa,IACZ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,GAC9B,GACE,IACL,CACJ,IACG,GACwB,GACT,CAC1B,CAAC;AACJ,CAAC;AAED,6DAA6D;AAC7D,SAAS,cAAc;IACrB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAC7C,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAChD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExportFormatOption, ExportRequest } from './types.js';
|
|
2
|
+
export declare function ExportDialog({ open, formats, onClose, onConfirm, theme, }: {
|
|
3
|
+
open: boolean;
|
|
4
|
+
formats: ExportFormatOption[];
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onConfirm: (request: ExportRequest) => void;
|
|
7
|
+
/** Theme scope for the dialog. It portals to document.body — OUTSIDE the
|
|
8
|
+
* editor's `.clipkit-editor` root — so it must carry the scope itself or its
|
|
9
|
+
* tokens fall back to the global dark `:root` defaults. */
|
|
10
|
+
theme?: 'light' | 'dark';
|
|
11
|
+
}): import("react").ReactPortal | null;
|
|
12
|
+
//# sourceMappingURL=ExportDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDialog.d.ts","sourceRoot":"","sources":["../src/ExportDialog.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAiB,aAAa,EAAoB,MAAM,YAAY,CAAC;AAkBrG,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAc,GACf,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C;;gEAE4D;IAC5D,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B,sCA8EA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Export options dialog. Renders the FREE in-browser choices (resolution,
|
|
3
|
+
// quality) plus whatever formats the embedder injects via `formats`. The editor
|
|
4
|
+
// has zero knowledge of what any format is or how it renders — it collects the
|
|
5
|
+
// user's choice and hands it back through onConfirm; the consumer's onRender
|
|
6
|
+
// does the actual work (browser MP4, cloud API, …). Same boundary as AssetStore.
|
|
7
|
+
import { useState } from 'react';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
const RESOLUTIONS = [
|
|
10
|
+
{ id: 'source', label: 'Source' },
|
|
11
|
+
{ id: '720p', label: '720p' },
|
|
12
|
+
{ id: '1080p', label: '1080p' },
|
|
13
|
+
{ id: '1440p', label: '1440p' },
|
|
14
|
+
{ id: '4k', label: '4K' },
|
|
15
|
+
];
|
|
16
|
+
const QUALITIES = [
|
|
17
|
+
{ id: 'standard', label: 'Standard' },
|
|
18
|
+
{ id: 'high', label: 'High' },
|
|
19
|
+
];
|
|
20
|
+
const SELECT_CLS = 'w-full h-7 rounded border border-border bg-background px-2 text-xs text-foreground';
|
|
21
|
+
export function ExportDialog({ open, formats, onClose, onConfirm, theme = 'dark', }) {
|
|
22
|
+
const [format, setFormat] = useState(formats[0]?.id ?? 'mp4');
|
|
23
|
+
const [resolution, setResolution] = useState('1080p');
|
|
24
|
+
const [quality, setQuality] = useState('standard');
|
|
25
|
+
if (!open)
|
|
26
|
+
return null;
|
|
27
|
+
const active = formats.find((f) => f.id === format) ?? formats[0];
|
|
28
|
+
return createPortal(_jsx("div", { className: "clipkit-editor fixed inset-0 z-50 flex items-center justify-center bg-black/50", "data-theme": theme, onClick: onClose, children: _jsxs("div", { className: "w-80 rounded-lg border border-border bg-popover p-4 text-foreground shadow-xl", onClick: (e) => e.stopPropagation(), children: [_jsx("div", { className: "mb-3 text-sm font-semibold", children: "Export" }), _jsx("label", { className: "mb-1 block text-[11px] text-muted-foreground", children: "Format" }), _jsx("select", { className: `${SELECT_CLS} mb-1`, value: format, onChange: (e) => setFormat(e.target.value), children: formats.map((f) => (_jsxs("option", { value: f.id, children: [f.label, f.badge ? ` — ${f.badge}` : ''] }, f.id))) }), active?.badge && (_jsx("p", { className: "mb-3 text-[10px] text-muted-foreground", children: active.badge })), !active?.badge && _jsx("div", { className: "mb-3" }), _jsx("label", { className: "mb-1 block text-[11px] text-muted-foreground", children: "Resolution" }), _jsx("select", { className: `${SELECT_CLS} mb-3`, value: resolution, onChange: (e) => setResolution(e.target.value), children: RESOLUTIONS.map((r) => (_jsx("option", { value: r.id, children: r.label }, r.id))) }), _jsx("label", { className: "mb-1 block text-[11px] text-muted-foreground", children: "Quality" }), _jsx("select", { className: `${SELECT_CLS} mb-4`, value: quality, onChange: (e) => setQuality(e.target.value), children: QUALITIES.map((q) => (_jsx("option", { value: q.id, children: q.label }, q.id))) }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx("button", { type: "button", className: "h-7 rounded px-3 text-[11px] text-muted-foreground hover:text-foreground transition", onClick: onClose, children: "Cancel" }), _jsx("button", { type: "button", className: "h-7 rounded bg-primary px-3 text-[11px] font-medium text-primary-foreground hover:bg-primary/90 transition", onClick: () => onConfirm({ format, resolution, quality }), children: "Export" })] })] }) }), document.body);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ExportDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExportDialog.js","sourceRoot":"","sources":["../src/ExportDialog.tsx"],"names":[],"mappings":";AAAA,0EAA0E;AAC1E,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,iFAAiF;AAEjF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,WAAW,GAA8C;IAC7D,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACjC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAC7B,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/B,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/B,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;CAC1B,CAAC;AAEF,MAAM,SAAS,GAA2C;IACxD,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IACrC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;CAC9B,CAAC;AAEF,MAAM,UAAU,GACd,oFAAoF,CAAC;AAEvF,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,GAA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,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MotionPathOverlay.d.ts","sourceRoot":"","sources":["../src/MotionPathOverlay.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAY,KAAK,SAAS,EAAsC,MAAM,OAAO,CAAC;AAgBrF,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,GACZ,EAAE;IACD,WAAW,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAC/C,sCAkNA"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// On-stage motion-path editing (EDITORS B7b) — when the selected
|
|
2
|
+
// element has a `position` keyframe animation, its path draws on the
|
|
3
|
+
// stage as exact cubic segments (the §6.7 control-point construction:
|
|
4
|
+
// P1 = P0 + out_tangent, P2 = P3 + in_tangent, omitted handles =
|
|
5
|
+
// straight-line third-points), with draggable position keyframes and
|
|
6
|
+
// pen-tool tangent handles. Strictly a view of `keyframe_animations`
|
|
7
|
+
// — every gesture writes plain protocol keyframes back. 3D paths
|
|
8
|
+
// edit their xy projection (z stays untouched on drag).
|
|
9
|
+
'use client';
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { useState } from 'react';
|
|
12
|
+
import { useEditor, useEditorStore } from '@clipkit/editor-core';
|
|
13
|
+
export function MotionPathOverlay({ viewportRef, }) {
|
|
14
|
+
const actions = useEditor();
|
|
15
|
+
const source = useEditorStore((s) => s.source);
|
|
16
|
+
const selection = useEditorStore((s) => s.selection);
|
|
17
|
+
const zoom = useEditorStore((s) => s.ui.stageZoom) || 1;
|
|
18
|
+
const pan = useEditorStore((s) => s.ui.stagePan);
|
|
19
|
+
const [activePoint, setActivePoint] = useState(0);
|
|
20
|
+
const srcW = source.width ?? 1920;
|
|
21
|
+
const srcH = source.height ?? 1080;
|
|
22
|
+
const el = selection.length === 1 ? findById(source.elements, selection[0]) : null;
|
|
23
|
+
const animIndex = el?.keyframe_animations?.findIndex((a) => a.property === 'position') ?? -1;
|
|
24
|
+
const anim = animIndex >= 0 ? el.keyframe_animations[animIndex] : null;
|
|
25
|
+
if (!el || !anim)
|
|
26
|
+
return null;
|
|
27
|
+
const points = anim.keyframes
|
|
28
|
+
.filter((k) => Array.isArray(k.value) && k.value.length >= 2)
|
|
29
|
+
.map((k) => {
|
|
30
|
+
const v = k.value;
|
|
31
|
+
return {
|
|
32
|
+
x: v[0],
|
|
33
|
+
y: v[1],
|
|
34
|
+
rest: v.slice(2),
|
|
35
|
+
out: k.out_tangent ? [k.out_tangent[0], k.out_tangent[1]] : null,
|
|
36
|
+
inn: k.in_tangent ? [k.in_tangent[0], k.in_tangent[1]] : null,
|
|
37
|
+
raw: k,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
if (points.length < 1)
|
|
41
|
+
return null;
|
|
42
|
+
const act = Math.max(0, Math.min(activePoint, points.length - 1));
|
|
43
|
+
// §6.7 control points (third-point defaults).
|
|
44
|
+
const ctrl = (a, b) => ({
|
|
45
|
+
p1: a.out
|
|
46
|
+
? [a.x + a.out[0], a.y + a.out[1]]
|
|
47
|
+
: [a.x + (b.x - a.x) / 3, a.y + (b.y - a.y) / 3],
|
|
48
|
+
p2: b.inn
|
|
49
|
+
? [b.x + b.inn[0], b.y + b.inn[1]]
|
|
50
|
+
: [b.x - (b.x - a.x) / 3, b.y - (b.y - a.y) / 3],
|
|
51
|
+
});
|
|
52
|
+
let d = `M ${points[0].x} ${points[0].y}`;
|
|
53
|
+
for (let i = 0; i < points.length - 1; i++) {
|
|
54
|
+
const a = points[i];
|
|
55
|
+
const b = points[i + 1];
|
|
56
|
+
const { p1, p2 } = ctrl(a, b);
|
|
57
|
+
d += ` C ${p1[0]} ${p1[1]}, ${p2[0]} ${p2[1]}, ${b.x} ${b.y}`;
|
|
58
|
+
}
|
|
59
|
+
// ── Write-back: gestures snapshot history once, then stream live ──
|
|
60
|
+
const writeKeyframes = (next) => {
|
|
61
|
+
const nextAnims = el.keyframe_animations.map((a, i) => i === animIndex ? { ...a, keyframes: next } : a);
|
|
62
|
+
actions.moveElements([{ id: el.id, patch: { keyframe_animations: nextAnims } }], { skipHistory: true });
|
|
63
|
+
};
|
|
64
|
+
const sourcePoint = (ev, svg) => {
|
|
65
|
+
const rect = svg.getBoundingClientRect();
|
|
66
|
+
return [
|
|
67
|
+
((ev.clientX - rect.left) / rect.width) * srcW,
|
|
68
|
+
((ev.clientY - rect.top) / rect.height) * srcH,
|
|
69
|
+
];
|
|
70
|
+
};
|
|
71
|
+
const dragGesture = (e, apply) => {
|
|
72
|
+
if (e.button !== 0)
|
|
73
|
+
return;
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
const svg = e.currentTarget.ownerSVGElement ?? e.currentTarget;
|
|
77
|
+
let started = false;
|
|
78
|
+
const onMove = (ev) => {
|
|
79
|
+
if (!started) {
|
|
80
|
+
started = true;
|
|
81
|
+
actions.pushHistory();
|
|
82
|
+
actions.setInteractive(true);
|
|
83
|
+
}
|
|
84
|
+
writeKeyframes(apply(sourcePoint(ev, svg)));
|
|
85
|
+
};
|
|
86
|
+
const onUp = () => {
|
|
87
|
+
window.removeEventListener('mousemove', onMove);
|
|
88
|
+
window.removeEventListener('mouseup', onUp);
|
|
89
|
+
if (started) {
|
|
90
|
+
actions.flushPendingSource();
|
|
91
|
+
actions.setInteractive(false);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
window.addEventListener('mousemove', onMove);
|
|
95
|
+
window.addEventListener('mouseup', onUp);
|
|
96
|
+
};
|
|
97
|
+
const dragPoint = (e, pi) => {
|
|
98
|
+
setActivePoint(pi);
|
|
99
|
+
const target = points[pi].raw;
|
|
100
|
+
dragGesture(e, (sp) => {
|
|
101
|
+
const v = [round1(sp[0]), round1(sp[1]), ...points[pi].rest];
|
|
102
|
+
return anim.keyframes.map((k) => k === target ? { ...k, value: v } : k);
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
const dragTangent = (e, pi, which) => {
|
|
106
|
+
const p = points[pi];
|
|
107
|
+
const target = p.raw;
|
|
108
|
+
dragGesture(e, (sp) => {
|
|
109
|
+
const t = [round1(sp[0] - p.x), round1(sp[1] - p.y)];
|
|
110
|
+
return anim.keyframes.map((k) => k === target
|
|
111
|
+
? which === 'out'
|
|
112
|
+
? { ...k, out_tangent: t }
|
|
113
|
+
: { ...k, in_tangent: t }
|
|
114
|
+
: k);
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
// Tangent handle display positions for the active point (defaults
|
|
118
|
+
// shown at the third-point so dragging materializes them in place).
|
|
119
|
+
const a = points[act];
|
|
120
|
+
const prev = points[act - 1] ?? null;
|
|
121
|
+
const next = points[act + 1] ?? null;
|
|
122
|
+
const outPos = next
|
|
123
|
+
? a.out
|
|
124
|
+
? [a.x + a.out[0], a.y + a.out[1]]
|
|
125
|
+
: [a.x + (next.x - a.x) / 3, a.y + (next.y - a.y) / 3]
|
|
126
|
+
: null;
|
|
127
|
+
const innPos = prev
|
|
128
|
+
? a.inn
|
|
129
|
+
? [a.x + a.inn[0], a.y + a.inn[1]]
|
|
130
|
+
: [a.x - (a.x - prev.x) / 3, a.y - (a.y - prev.y) / 3]
|
|
131
|
+
: null;
|
|
132
|
+
const r = 6 / zoom; // keep hit targets ~constant on screen
|
|
133
|
+
void viewportRef;
|
|
134
|
+
return (_jsxs("svg", { viewBox: `0 0 ${srcW} ${srcH}`, className: "absolute z-20", style: {
|
|
135
|
+
left: pan.x,
|
|
136
|
+
top: pan.y,
|
|
137
|
+
width: srcW * zoom,
|
|
138
|
+
height: srcH * zoom,
|
|
139
|
+
pointerEvents: 'none',
|
|
140
|
+
overflow: 'visible',
|
|
141
|
+
}, "aria-label": "Motion path", children: [_jsx("path", { d: d, fill: "none", stroke: "var(--color-primary)", strokeOpacity: 0.7, strokeWidth: 1.5 / zoom, strokeDasharray: `${4 / zoom} ${3 / zoom}` }), outPos && (_jsxs("g", { style: { pointerEvents: 'auto' }, children: [_jsx("line", { x1: a.x, y1: a.y, x2: outPos[0], y2: outPos[1], stroke: "var(--color-primary)", strokeOpacity: 0.5, strokeWidth: 1 / zoom }), _jsx("circle", { cx: outPos[0], cy: outPos[1], r: r * 0.7, fill: "var(--color-background)", stroke: "var(--color-primary)", strokeWidth: 1.2 / zoom, className: "cursor-grab", onMouseDown: (e) => dragTangent(e, act, 'out') })] })), innPos && (_jsxs("g", { style: { pointerEvents: 'auto' }, children: [_jsx("line", { x1: a.x, y1: a.y, x2: innPos[0], y2: innPos[1], stroke: "var(--color-primary)", strokeOpacity: 0.5, strokeWidth: 1 / zoom }), _jsx("circle", { cx: innPos[0], cy: innPos[1], r: r * 0.7, fill: "var(--color-background)", stroke: "var(--color-primary)", strokeWidth: 1.2 / zoom, className: "cursor-grab", onMouseDown: (e) => dragTangent(e, act, 'in') })] })), points.map((p, pi) => (_jsx("rect", { x: p.x - r, y: p.y - r, width: r * 2, height: r * 2, transform: `rotate(45 ${p.x} ${p.y})`, fill: pi === act ? 'var(--color-primary)' : 'var(--color-background)', stroke: "var(--color-primary)", strokeWidth: 1.2 / zoom, style: { pointerEvents: 'auto' }, className: "cursor-move", onMouseDown: (e) => dragPoint(e, pi) }, pi)))] }));
|
|
142
|
+
}
|
|
143
|
+
function findById(elements, id) {
|
|
144
|
+
for (const el of elements) {
|
|
145
|
+
if (el.id === id)
|
|
146
|
+
return el;
|
|
147
|
+
if (el.type === 'group') {
|
|
148
|
+
const nested = findById(el.elements, id);
|
|
149
|
+
if (nested)
|
|
150
|
+
return nested;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
const round1 = (v) => Math.round(v * 10) / 10;
|
|
156
|
+
//# sourceMappingURL=MotionPathOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MotionPathOverlay.js","sourceRoot":"","sources":["../src/MotionPathOverlay.tsx"],"names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