@cueframe/kernel 0.0.1 → 0.1.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.
Files changed (122) hide show
  1. package/dist/_members/account-model/testing/conversationStoreContract.d.ts +1 -1
  2. package/dist/_members/authoring/providers/resourceApi.d.ts +1 -1
  3. package/dist/_members/authoring/transpileComponent.d.ts +1 -1
  4. package/dist/_members/cloud-import/CloudImportService.d.ts +35 -0
  5. package/dist/_members/cloud-import/ImportProvider.d.ts +73 -0
  6. package/dist/_members/cloud-import/MediaItemPreprocessor.d.ts +27 -0
  7. package/dist/_members/cloud-import/chunk-XKO6ZSWI.js +162 -0
  8. package/dist/_members/cloud-import/chunk-XKO6ZSWI.js.map +1 -0
  9. package/dist/_members/cloud-import/cloudConfig.d.ts +23 -0
  10. package/dist/_members/cloud-import/index.d.ts +9 -0
  11. package/dist/_members/cloud-import/index.js +241 -0
  12. package/dist/_members/cloud-import/index.js.map +1 -0
  13. package/dist/_members/cloud-import/multipartUpload.d.ts +12 -0
  14. package/dist/_members/cloud-import/multipartUpload.js +7 -0
  15. package/dist/_members/cloud-import/multipartUpload.js.map +1 -0
  16. package/dist/_members/composition/ops/compositionOps.d.ts +1 -1
  17. package/dist/_members/composition/ops/types.d.ts +1 -1
  18. package/dist/_members/composition/timeline/placement.d.ts +1 -1
  19. package/dist/_members/composition/validators/composition.d.ts +1 -1
  20. package/dist/_members/composition-ops/index.d.ts +1 -1
  21. package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
  22. package/dist/_members/convex-api/api.d.ts +5 -0
  23. package/dist/_members/convex-api/dataModel.d.ts +6 -0
  24. package/dist/_members/core/render/exportSettings.d.ts +1 -1
  25. package/dist/_members/mcp/curation.d.ts +1 -1
  26. package/dist/_members/plane/conformance.d.ts +1 -1
  27. package/dist/_members/render-harness/localRender.d.ts +1 -1
  28. package/dist/animate.js +828 -79187
  29. package/dist/authoring/build-tools.js +8 -11
  30. package/dist/authoring/context.js +5 -5
  31. package/dist/authoring/models.js +1 -2
  32. package/dist/authoring/prompts.js +1 -1
  33. package/dist/authoring/tools.js +7 -7
  34. package/dist/authoring/transpileComponent.js +3 -2220
  35. package/dist/authoring.js +27 -29
  36. package/dist/brand-derivation.js +1 -1
  37. package/dist/chunk-6IU2UQI5.js +107 -0
  38. package/dist/{chunk-N67PDTKQ.js → chunk-ABL557OT.js} +1 -1
  39. package/dist/{chunk-DSNG6WLU.js → chunk-AYVJXDLB.js} +1 -4
  40. package/dist/{chunk-G3PBH53P.js → chunk-COYMZ76S.js} +1 -1
  41. package/dist/chunk-DSMLHYJ4.js +82 -0
  42. package/dist/{chunk-BRKJKB33.js → chunk-FYZVH3MC.js} +1 -1
  43. package/dist/{chunk-MVEE6HEC.js → chunk-GA23TRNR.js} +5 -7
  44. package/dist/{chunk-OIRUO5P7.js → chunk-GEA7E2FL.js} +1 -1
  45. package/dist/chunk-HCCBDJLW.js +68 -0
  46. package/dist/{chunk-QLAQHR3L.js → chunk-IBYQG46O.js} +1 -1
  47. package/dist/chunk-JQMPHKLU.js +126 -0
  48. package/dist/{chunk-ELLSET2N.js → chunk-LM4WDUQJ.js} +3 -6
  49. package/dist/{chunk-UEI3NLNK.js → chunk-MHOQTPOB.js} +1 -4
  50. package/dist/{chunk-ATAF24QG.js → chunk-MXFAADCQ.js} +1 -1
  51. package/dist/{chunk-TULRCY6U.js → chunk-NFEGPWGS.js} +1 -1
  52. package/dist/{chunk-MC5DLSEV.js → chunk-ODL7GQJG.js} +14 -14
  53. package/dist/{chunk-WZTTZHNR.js → chunk-OLFOPQCA.js} +12 -9
  54. package/dist/{chunk-P43IE4WB.js → chunk-P727GZVO.js} +2 -4
  55. package/dist/{chunk-S3P5BFFL.js → chunk-PMY24FUD.js} +2 -4
  56. package/dist/chunk-RF7U3SCL.js +606 -0
  57. package/dist/{chunk-JD77Y2WM.js → chunk-SW336CJP.js} +1 -4
  58. package/dist/{chunk-M3I5LMAB.js → chunk-UY4SWJVE.js} +1 -1
  59. package/dist/{chunk-52AHXNKM.js → chunk-VOO5FQSS.js} +5 -5
  60. package/dist/{chunk-NV4I6GJV.js → chunk-XWKZB5U5.js} +4 -4
  61. package/dist/{chunk-6QJ3V3VS.js → chunk-YX2GSJK7.js} +1 -1
  62. package/dist/{chunk-5I7VDCAC.js → chunk-ZB3C3HM7.js} +1 -1
  63. package/dist/chunk-ZT7MHRQU.js +104 -0
  64. package/dist/cloud-import/multipart.d.ts +1 -0
  65. package/dist/cloud-import/multipart.js +8 -0
  66. package/dist/cloud-import.d.ts +1 -0
  67. package/dist/cloud-import.js +234 -0
  68. package/dist/compose/renderer.js +18 -21
  69. package/dist/compose.js +18 -21
  70. package/dist/composition/graphics-plan.js +3 -3
  71. package/dist/composition/ops.js +4 -4
  72. package/dist/composition/primitive-catalog.js +1 -1
  73. package/dist/composition/projection.js +3 -3
  74. package/dist/composition/validators.js +2 -2
  75. package/dist/composition-ops.js +12 -12
  76. package/dist/composition.js +5 -5
  77. package/dist/{context-CEAKQ5T7.js → context-OKX3HHFS.js} +5 -5
  78. package/dist/convex-api/dataModel.d.ts +1 -0
  79. package/dist/convex-api/dataModel.js +0 -0
  80. package/dist/convex-api.d.ts +1 -0
  81. package/dist/convex-api.js +8 -0
  82. package/dist/core/render.js +2 -2
  83. package/dist/core.js +2 -2
  84. package/dist/mcp/adapter.js +1 -5
  85. package/dist/mcp/server.js +1 -2
  86. package/dist/mcp.js +2 -95
  87. package/dist/media-model/media-kind.js +9 -98
  88. package/dist/nle-export/xml.js +5 -22799
  89. package/dist/nle-export.js +18 -21
  90. package/dist/primitives/backgrounds.js +2 -3
  91. package/dist/primitives/captions.js +4 -243
  92. package/dist/primitives/effects.js +2 -3
  93. package/dist/primitives/hero-text.js +2 -3
  94. package/dist/primitives/layouts.js +2 -3
  95. package/dist/primitives/lib/index.js +8 -10
  96. package/dist/primitives/lib/preview.js +1 -2
  97. package/dist/primitives/lib/schema.js +1 -2
  98. package/dist/primitives/lib/text/fitText.js +1 -2
  99. package/dist/primitives/lib.js +8 -10
  100. package/dist/primitives/scenes.js +1 -2
  101. package/dist/primitives/text.js +2 -3
  102. package/dist/primitives/ui-blocks.js +4 -5
  103. package/dist/primitives.js +19 -21
  104. package/package.json +123 -13
  105. package/dist/TextureLoader-UQOFUSAP.js +0 -422
  106. package/dist/VideoTexture-AQWSPIJG.js +0 -62
  107. package/dist/chunk-7GISRVON.js +0 -14176
  108. package/dist/chunk-DIBOJJMU.js +0 -16838
  109. package/dist/chunk-EAUSEGB7.js +0 -420
  110. package/dist/chunk-FUWJOVVK.js +0 -3633
  111. package/dist/chunk-G75E7YA4.js +0 -11883
  112. package/dist/chunk-JCZQT7K3.js +0 -3266
  113. package/dist/chunk-KF5ETMKB.js +0 -544
  114. package/dist/chunk-NDKERSXY.js +0 -1296
  115. package/dist/chunk-V43Y7IE4.js +0 -3621
  116. package/dist/chunk-VIVQHIGZ.js +0 -4319
  117. package/dist/chunk-YA3OR2KK.js +0 -249
  118. package/dist/hls-HD4C5G6W.js +0 -33000
  119. package/dist/token-RGFIT24D.js +0 -69
  120. package/dist/token-util-GPLSGYVO.js +0 -5
  121. package/dist/vision_bundle-5Y376MAR.js +0 -4084
  122. package/dist/{chunk-6CMVBTTP.js → chunk-YIOY2XEO.js} +4 -4
@@ -1,249 +0,0 @@
1
- // ../../node_modules/.pnpm/@remotion+layout-utils@4.0.429/node_modules/@remotion/layout-utils/dist/esm/index.mjs
2
- var wordCache = /* @__PURE__ */ new Map();
3
- var takeMeasurement = ({
4
- text,
5
- fontFamily,
6
- fontSize,
7
- fontWeight,
8
- letterSpacing,
9
- fontVariantNumeric,
10
- additionalStyles,
11
- textTransform
12
- }) => {
13
- if (typeof document === "undefined") {
14
- throw new Error("measureText() can only be called in a browser.");
15
- }
16
- const node = document.createElement("span");
17
- if (fontFamily) {
18
- node.style.fontFamily = fontFamily;
19
- }
20
- node.style.display = "inline-block";
21
- node.style.position = "absolute";
22
- node.style.top = `-10000px`;
23
- node.style.whiteSpace = "pre";
24
- node.style.fontSize = typeof fontSize === "string" ? fontSize : `${fontSize}px`;
25
- if (additionalStyles) {
26
- for (const key of Object.keys(additionalStyles)) {
27
- node.style[key] = additionalStyles[key];
28
- }
29
- }
30
- if (fontWeight) {
31
- node.style.fontWeight = fontWeight.toString();
32
- }
33
- if (letterSpacing) {
34
- node.style.letterSpacing = letterSpacing;
35
- }
36
- if (fontVariantNumeric) {
37
- node.style.fontVariantNumeric = fontVariantNumeric;
38
- }
39
- if (textTransform) {
40
- node.style.textTransform = textTransform;
41
- }
42
- node.innerText = text;
43
- document.body.appendChild(node);
44
- const computedFontFamily = window.getComputedStyle(node).fontFamily;
45
- const boundingBox = node.getBoundingClientRect();
46
- document.body.removeChild(node);
47
- return {
48
- boundingBox,
49
- computedFontFamily
50
- };
51
- };
52
- var measureText = ({
53
- text,
54
- fontFamily,
55
- fontSize,
56
- fontWeight,
57
- letterSpacing,
58
- fontVariantNumeric,
59
- validateFontIsLoaded,
60
- additionalStyles,
61
- textTransform
62
- }) => {
63
- const key = `${text}-${fontFamily}-${fontWeight}-${fontSize}-${letterSpacing}-${textTransform}-${JSON.stringify(additionalStyles)}`;
64
- if (wordCache.has(key)) {
65
- return wordCache.get(key);
66
- }
67
- const { boundingBox, computedFontFamily } = takeMeasurement({
68
- fontFamily,
69
- fontSize,
70
- text,
71
- fontVariantNumeric,
72
- fontWeight,
73
- letterSpacing,
74
- additionalStyles,
75
- textTransform
76
- });
77
- if (validateFontIsLoaded && text.trim().length > 0) {
78
- const {
79
- boundingBox: boundingBoxOfFallbackFont,
80
- computedFontFamily: computedFallback
81
- } = takeMeasurement({
82
- fontFamily: null,
83
- fontSize,
84
- text,
85
- fontVariantNumeric,
86
- fontWeight,
87
- letterSpacing,
88
- additionalStyles,
89
- textTransform
90
- });
91
- const sameAsFallbackFont = boundingBox.height === boundingBoxOfFallbackFont.height && boundingBox.width === boundingBoxOfFallbackFont.width;
92
- if (sameAsFallbackFont && computedFallback !== computedFontFamily && new Set(text).size > 4) {
93
- const err = [
94
- `Called measureText() with "fontFamily": ${JSON.stringify(fontFamily)} but it looks like the font is not loaded at the time of calling.`,
95
- `A measurement with the fallback font ${computedFallback} was taken and had the same dimensions, indicating that the browser used the fallback font.`,
96
- "See https://remotion.dev/docs/layout-utils/best-practices for best practices."
97
- ];
98
- throw new Error(err.join(`
99
- `));
100
- }
101
- }
102
- const result = { height: boundingBox.height, width: boundingBox.width };
103
- wordCache.set(key, result);
104
- return result;
105
- };
106
- var fillTextBox = ({
107
- maxBoxWidth,
108
- maxLines
109
- }) => {
110
- const lines = new Array(maxLines).fill(0).map(() => []);
111
- return {
112
- add: ({
113
- text,
114
- fontFamily,
115
- fontWeight,
116
- fontSize,
117
- letterSpacing,
118
- fontVariantNumeric,
119
- validateFontIsLoaded,
120
- textTransform,
121
- additionalStyles
122
- }) => {
123
- const lastLineIndex = lines.reduceRight((acc, curr, index) => {
124
- if (acc === -1 && curr.length > 0) {
125
- return index;
126
- }
127
- return acc;
128
- }, -1);
129
- const currentlyAt = lastLineIndex === -1 ? 0 : lastLineIndex;
130
- const lineToUse = lines[currentlyAt];
131
- const lineWithWord = [
132
- ...lineToUse,
133
- {
134
- text,
135
- fontFamily,
136
- fontWeight,
137
- fontSize,
138
- letterSpacing,
139
- fontVariantNumeric,
140
- validateFontIsLoaded,
141
- textTransform,
142
- additionalStyles
143
- }
144
- ];
145
- const widths = lineWithWord.map((w) => measureText(w).width);
146
- const lineWidthWithWordAdded = widths.reduce((a, b) => a + b, 0);
147
- if (Math.ceil(lineWidthWithWordAdded) < maxBoxWidth) {
148
- lines[currentlyAt].push({
149
- text: lines[currentlyAt].length === 0 ? text.trimStart() : text,
150
- fontFamily,
151
- fontWeight,
152
- fontSize,
153
- letterSpacing,
154
- textTransform,
155
- fontVariantNumeric
156
- });
157
- return { exceedsBox: false, newLine: false };
158
- }
159
- if (currentlyAt === maxLines - 1) {
160
- return { exceedsBox: true, newLine: false };
161
- }
162
- lines[currentlyAt + 1] = [
163
- {
164
- text: text.trimStart(),
165
- fontFamily,
166
- fontWeight,
167
- fontSize,
168
- letterSpacing,
169
- textTransform,
170
- fontVariantNumeric
171
- }
172
- ];
173
- return { exceedsBox: false, newLine: true };
174
- }
175
- };
176
- };
177
- var PRECISION = 100;
178
- var fitTextOnNLines = ({
179
- text,
180
- maxLines,
181
- maxBoxWidth,
182
- fontFamily,
183
- fontWeight,
184
- letterSpacing,
185
- fontVariantNumeric,
186
- validateFontIsLoaded,
187
- textTransform,
188
- additionalStyles,
189
- maxFontSize
190
- }) => {
191
- const minFontSize = 0.1;
192
- let left = Math.floor(minFontSize * PRECISION);
193
- let right = Math.floor((maxFontSize ?? 2e3) * PRECISION);
194
- let optimalFontSize = minFontSize;
195
- let optimalLines = [];
196
- while (left <= right) {
197
- const mid = Math.floor((left + right) / 2);
198
- const fontSize = mid / PRECISION;
199
- const textBox = fillTextBox({
200
- maxBoxWidth,
201
- maxLines
202
- });
203
- const words = text.split(" ");
204
- let exceedsBox = false;
205
- let currentLine = 0;
206
- const lines = [""];
207
- for (const word of words) {
208
- const result = textBox.add({
209
- text: lines[currentLine].length === 0 ? word : " " + word,
210
- fontFamily,
211
- fontWeight,
212
- fontSize,
213
- letterSpacing,
214
- fontVariantNumeric,
215
- validateFontIsLoaded,
216
- textTransform,
217
- additionalStyles
218
- });
219
- if (result.exceedsBox) {
220
- exceedsBox = true;
221
- break;
222
- }
223
- if (result.newLine) {
224
- lines.push("");
225
- currentLine++;
226
- }
227
- lines[currentLine] += word + " ";
228
- }
229
- if (!exceedsBox && currentLine < maxLines) {
230
- optimalFontSize = fontSize;
231
- optimalLines = lines;
232
- left = mid + 1;
233
- } else {
234
- right = mid - 1;
235
- }
236
- }
237
- for (let i = 0; i < optimalLines.length; i++) {
238
- optimalLines[i] = optimalLines[i].trimEnd();
239
- }
240
- return {
241
- fontSize: optimalFontSize,
242
- lines: optimalLines
243
- };
244
- };
245
-
246
- export {
247
- fillTextBox,
248
- fitTextOnNLines
249
- };