@remotion/studio 4.0.477 → 4.0.479
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/components/AssetSelector.js +8 -14
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Button.js +8 -5
- package/dist/components/CanvasIfSizeIsAvailable.js +2 -6
- package/dist/components/CompactExplanation.d.ts +12 -0
- package/dist/components/CompactExplanation.js +52 -0
- package/dist/components/CompositionSelector.js +2 -4
- package/dist/components/CurrentAsset.d.ts +3 -1
- package/dist/components/CurrentAsset.js +42 -34
- package/dist/components/CurrentComposition.d.ts +1 -1
- package/dist/components/CurrentComposition.js +38 -31
- package/dist/components/DefaultPropsEditor.d.ts +12 -2
- package/dist/components/DefaultPropsEditor.js +2 -2
- package/dist/components/EditorGuides/Guide.js +37 -9
- package/dist/components/EditorRuler/Ruler.js +4 -14
- package/dist/components/EditorRuler/index.js +9 -4
- package/dist/components/EffectPickerModal.d.ts +5 -0
- package/dist/components/EffectPickerModal.js +179 -0
- package/dist/components/InlineAction.js +1 -0
- package/dist/components/InspectorInfoHeader.d.ts +11 -0
- package/dist/components/InspectorInfoHeader.js +55 -0
- package/dist/components/InspectorPanel/DefaultInspector.d.ts +8 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +93 -0
- package/dist/components/InspectorPanel/EasingInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/EasingInspector.js +41 -0
- package/dist/components/InspectorPanel/GuideInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/GuideInspector.js +55 -0
- package/dist/components/InspectorPanel/KeyframeInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/KeyframeInspector.js +109 -0
- package/dist/components/InspectorPanel/SelectedInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SelectedInspector.js +26 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +116 -0
- package/dist/components/InspectorPanel/common.d.ts +15 -0
- package/dist/components/InspectorPanel/common.js +18 -0
- package/dist/components/InspectorPanel/inspector-selection.d.ts +10 -0
- package/dist/components/InspectorPanel/inspector-selection.js +34 -0
- package/dist/components/InspectorPanel/styles.d.ts +27 -0
- package/dist/components/InspectorPanel/styles.js +178 -0
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +2 -0
- package/dist/components/InspectorPanel/use-track-for-selection.js +22 -0
- package/dist/components/InspectorPanel.d.ts +8 -0
- package/dist/components/InspectorPanel.js +26 -0
- package/dist/components/InspectorPanelLayout.d.ts +1 -0
- package/dist/components/InspectorPanelLayout.js +4 -0
- package/dist/components/InspectorSequenceSection.d.ts +16 -0
- package/dist/components/InspectorSequenceSection.js +147 -0
- package/dist/components/InspectorSourceLocation.d.ts +7 -0
- package/dist/components/InspectorSourceLocation.js +71 -0
- package/dist/components/MenuToolbar.d.ts +1 -0
- package/dist/components/MenuToolbar.js +4 -1
- package/dist/components/Modals.js +3 -3
- package/dist/components/NewComposition/InputDragger.js +1 -1
- package/dist/components/NewComposition/RemInput.d.ts +1 -0
- package/dist/components/NewComposition/RemInput.js +8 -2
- package/dist/components/NewComposition/RemTextarea.d.ts +1 -0
- package/dist/components/NewComposition/RemTextarea.js +8 -2
- package/dist/components/NewComposition/ValidationMessage.d.ts +3 -0
- package/dist/components/NewComposition/ValidationMessage.js +16 -5
- package/dist/components/OptionsPanel.d.ts +1 -1
- package/dist/components/OptionsPanel.js +8 -17
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +2 -7
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +3 -10
- package/dist/components/QuickSwitcher/shared.d.ts +4 -0
- package/dist/components/QuickSwitcher/shared.js +24 -0
- package/dist/components/RenderModal/DataEditor.d.ts +29 -2
- package/dist/components/RenderModal/DataEditor.js +107 -56
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -0
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +25 -7
- package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +2 -1
- package/dist/components/RenderModal/SchemaEditor/Fieldset.js +10 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -0
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +27 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +23 -9
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +8 -1
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -6
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +9 -11
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
- package/dist/components/RenderModal/WarningIndicatorButton.d.ts +1 -0
- package/dist/components/RenderModal/WarningIndicatorButton.js +17 -4
- package/dist/components/RenderModal/get-render-modal-warnings.d.ts +2 -1
- package/dist/components/RenderModal/get-render-modal-warnings.js +6 -3
- package/dist/components/RendersTab.js +1 -1
- package/dist/components/SegmentedControl.d.ts +3 -0
- package/dist/components/SegmentedControl.js +11 -5
- package/dist/components/SelectedOutlineElement.js +135 -31
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +45 -29
- package/dist/components/SelectedOutlineUvControls.d.ts +9 -0
- package/dist/components/SelectedOutlineUvControls.js +64 -10
- package/dist/components/Tabs/index.js +4 -4
- package/dist/components/Timeline/EasingEditorModal.d.ts +5 -4
- package/dist/components/Timeline/EasingEditorModal.js +597 -124
- package/dist/components/Timeline/KeyframeSettingsModal.d.ts +2 -2
- package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -2
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +15 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +85 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +10 -3
- package/dist/components/Timeline/TimelineEffectItem.d.ts +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +8 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +24 -20
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +5 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +5 -19
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +8 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +24 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -47
- package/dist/components/Timeline/TimelineKeyframedValue.d.ts +1 -1
- package/dist/components/Timeline/TimelineKeyframedValue.js +8 -10
- package/dist/components/Timeline/TimelineNumberField.js +5 -11
- package/dist/components/Timeline/TimelineRotationField.js +5 -6
- package/dist/components/Timeline/TimelineScaleField.js +4 -8
- package/dist/components/Timeline/TimelineSelection.d.ts +6 -0
- package/dist/components/Timeline/TimelineSelection.js +109 -14
- package/dist/components/Timeline/TimelineSequence.js +22 -14
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -67
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +12 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +56 -52
- package/dist/components/Timeline/TimelineTransformOriginField.js +4 -5
- package/dist/components/Timeline/TimelineTranslateField.js +4 -5
- package/dist/components/Timeline/TimelineUvCoordinateField.js +4 -4
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +93 -8
- package/dist/components/Timeline/call-add-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-delete-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-move-keyframe.d.ts +2 -2
- package/dist/components/Timeline/call-update-keyframe-settings.d.ts +3 -3
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +27 -1
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +7 -0
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +32 -3
- package/dist/components/Timeline/parse-keyframe-field-from-node-path.js +2 -2
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +3 -3
- package/dist/components/Timeline/reset-selected-timeline-props.js +19 -5
- package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
- package/dist/components/Timeline/save-sequence-prop.d.ts +2 -2
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -3
- package/dist/components/Timeline/timeline-field-display-utils.d.ts +5 -0
- package/dist/components/Timeline/timeline-field-display-utils.js +244 -0
- package/dist/components/Timeline/timeline-video-filmstrip-times.d.ts +17 -0
- package/dist/components/Timeline/timeline-video-filmstrip-times.js +22 -0
- package/dist/components/Timeline/update-selected-easing.d.ts +47 -4
- package/dist/components/Timeline/update-selected-easing.js +40 -9
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +13 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +73 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -3
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +11 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +33 -0
- package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -1
- package/dist/components/VisualControls/VisualControlsContent.js +4 -5
- package/dist/components/effect-drag-and-drop.d.ts +10 -0
- package/dist/components/effect-drag-and-drop.js +17 -8
- package/dist/components/effect-picker-search.d.ts +5 -0
- package/dist/components/effect-picker-search.js +77 -0
- package/dist/components/import-assets.d.ts +11 -2
- package/dist/components/import-assets.js +61 -6
- package/dist/components/selected-outline-drag.d.ts +44 -2
- package/dist/components/selected-outline-drag.js +74 -1
- package/dist/components/selected-outline-types.d.ts +7 -7
- package/dist/components/selected-outline-uv.d.ts +4 -3
- package/dist/components/selected-outline-uv.js +6 -2
- package/dist/error-overlay/remotion-overlay/Overlay.js +3 -0
- package/dist/esm/{chunk-t8fjnw2d.js → chunk-fge2mq5p.js} +17004 -13432
- package/dist/esm/internals.mjs +17004 -13432
- package/dist/esm/previewEntry.mjs +26617 -23041
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/editor-guide-selection.js +1 -1
- package/dist/helpers/get-preview-file-type.js +1 -1
- package/dist/helpers/render-codec-label.d.ts +2 -0
- package/dist/helpers/render-codec-label.js +49 -0
- package/dist/helpers/ruler-canvas-size.d.ts +5 -0
- package/dist/helpers/ruler-canvas-size.js +17 -0
- package/dist/helpers/timeline-layout.d.ts +4 -4
- package/dist/helpers/use-media-metadata.d.ts +8 -2
- package/dist/helpers/use-media-metadata.js +17 -4
- package/dist/state/modals.d.ts +9 -4
- package/package.json +12 -12
|
@@ -32,7 +32,7 @@ const ZodColorEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad })
|
|
|
32
32
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
33
33
|
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: localValue.success, suffix: null }), jsx_runtime_1.jsxs("div", { style: fullWidth, children: [
|
|
34
34
|
jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
35
|
-
jsx_runtime_1.jsx(ColorPicker_1.ColorPicker, { value: value, status: status, onChange: onPickerChange, onChangeComplete: onPickerComplete, width: 45, height: 39, name: jsonPath.join('.') }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1, block: true }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: value, status: status, placeholder: jsonPath.join('.'), onChange: onTextChange, onBlur: onTextBlur, rightAlign: false })
|
|
35
|
+
jsx_runtime_1.jsx(ColorPicker_1.ColorPicker, { value: value, status: status, onChange: onPickerChange, onChangeComplete: onPickerComplete, width: 45, height: 39, name: jsonPath.join('.') }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1, block: true }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: value, status: status, placeholder: jsonPath.join('.'), onChange: onTextChange, onBlur: onTextBlur, rightAlign: false, small: true })
|
|
36
36
|
] }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: localValue })
|
|
37
37
|
] })
|
|
38
38
|
] }));
|
|
@@ -55,7 +55,7 @@ const ZodDateEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad })
|
|
|
55
55
|
const zodValidation = (0, react_1.useMemo)(() => (0, zod_schema_type_1.zodSafeParse)(schema, value), [schema, value]);
|
|
56
56
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
57
57
|
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsxs("div", { style: fullWidth, children: [
|
|
58
|
-
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: formatDate(value), type: "datetime-local", status: zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, onBlur: onBlur, style: inputStyle, rightAlign: false }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx("div", { style: explainer, children: "Date is in local format" }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
58
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: formatDate(value), type: "datetime-local", status: zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, onBlur: onBlur, style: inputStyle, rightAlign: false, small: true }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx("div", { style: explainer, children: "Date is in local format" }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
59
59
|
] })
|
|
60
60
|
] }));
|
|
61
61
|
};
|
|
@@ -47,7 +47,7 @@ const ZodDiscriminatedUnionEditor = ({ schema, setValue, value, mayPad, jsonPath
|
|
|
47
47
|
return {
|
|
48
48
|
discriminator,
|
|
49
49
|
markup: (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
50
|
-
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: [...jsonPath, discriminator], onRemove: onRemove, suffix: null, valid: zodValidation.success }), jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: "Select type", values: comboBoxValues, selectedId: value[discriminator] })
|
|
50
|
+
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: [...jsonPath, discriminator], onRemove: onRemove, suffix: null, valid: zodValidation.success }), jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: "Select type", values: comboBoxValues, selectedId: value[discriminator], small: true })
|
|
51
51
|
] }, 'replacement')),
|
|
52
52
|
};
|
|
53
53
|
}, [
|
|
@@ -39,7 +39,7 @@ const ZodEnumEditor = ({ schema, jsonPath, setValue, value, onRemove }) => {
|
|
|
39
39
|
}, [enumValues, onChange, value]);
|
|
40
40
|
const zodValidation = (0, react_1.useMemo)(() => (0, zod_schema_type_1.zodSafeParse)(schema, value), [schema, value]);
|
|
41
41
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: true, children: [
|
|
42
|
-
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsx("div", { style: isRoot ? undefined : container, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: value, title: value }) }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
42
|
+
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsx("div", { style: isRoot ? undefined : container, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: value, title: value, small: true }) }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
43
43
|
] }));
|
|
44
44
|
};
|
|
45
45
|
exports.ZodEnumEditor = ZodEnumEditor;
|
|
@@ -10,6 +10,10 @@ const schemaLabel = {
|
|
|
10
10
|
fontSize: 14,
|
|
11
11
|
color: colors_1.LIGHT_TEXT,
|
|
12
12
|
};
|
|
13
|
+
const compactSchemaLabel = {
|
|
14
|
+
...schemaLabel,
|
|
15
|
+
fontSize: 12,
|
|
16
|
+
};
|
|
13
17
|
const jsonLabel = {
|
|
14
18
|
color: 'white',
|
|
15
19
|
fontSize: 13,
|
|
@@ -17,29 +21,42 @@ const jsonLabel = {
|
|
|
17
21
|
display: 'flex',
|
|
18
22
|
alignItems: 'center',
|
|
19
23
|
};
|
|
24
|
+
const compactJsonLabel = {
|
|
25
|
+
...jsonLabel,
|
|
26
|
+
fontSize: 12,
|
|
27
|
+
};
|
|
20
28
|
const triangleStyle = {
|
|
21
29
|
width: 12,
|
|
22
30
|
height: 12,
|
|
23
31
|
flexShrink: 0,
|
|
24
32
|
fill: colors_1.FAIL_COLOR,
|
|
25
33
|
};
|
|
26
|
-
const
|
|
34
|
+
const compactTriangleStyle = {
|
|
35
|
+
...triangleStyle,
|
|
36
|
+
width: 10,
|
|
37
|
+
height: 10,
|
|
38
|
+
};
|
|
39
|
+
const ZodErrorMessages = ({ zodValidationResult, viewTab, size = 'default' }) => {
|
|
27
40
|
if (zodValidationResult.success) {
|
|
28
41
|
throw new Error('Expected error');
|
|
29
42
|
}
|
|
30
43
|
const style = (0, react_1.useMemo)(() => {
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
if (viewTab === 'json') {
|
|
45
|
+
return size === 'compact' ? compactJsonLabel : jsonLabel;
|
|
46
|
+
}
|
|
47
|
+
return size === 'compact' ? compactSchemaLabel : schemaLabel;
|
|
48
|
+
}, [size, viewTab]);
|
|
33
49
|
const code = (0, react_1.useMemo)(() => {
|
|
34
50
|
return {
|
|
35
|
-
...schemaLabel,
|
|
51
|
+
...(size === 'compact' ? compactSchemaLabel : schemaLabel),
|
|
36
52
|
fontFamily: 'monospace',
|
|
37
53
|
};
|
|
38
|
-
}, []);
|
|
54
|
+
}, [size]);
|
|
55
|
+
const finalTriangleStyle = size === 'compact' ? compactTriangleStyle : triangleStyle;
|
|
39
56
|
if (viewTab === 'json') {
|
|
40
57
|
return (jsx_runtime_1.jsx("div", { children: zodValidationResult.error.issues.map((error) => {
|
|
41
58
|
return (jsx_runtime_1.jsxs("div", { style: style, children: [
|
|
42
|
-
jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { style:
|
|
59
|
+
jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { style: finalTriangleStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: size === 'compact' ? 0.75 : 1 }), error.path.length === 0 ? 'Root' : error.path.join('.'), ":", ' ', error.message] }, error.path.join('.')));
|
|
43
60
|
}) }));
|
|
44
61
|
}
|
|
45
62
|
return (jsx_runtime_1.jsx("div", { children: zodValidationResult.error.issues.map((error) => {
|
|
@@ -14,14 +14,14 @@ const stackTrace = {
|
|
|
14
14
|
padding: 10,
|
|
15
15
|
};
|
|
16
16
|
const stackTraceLabel = {
|
|
17
|
-
fontSize:
|
|
17
|
+
fontSize: 12,
|
|
18
18
|
};
|
|
19
19
|
const ZodFieldValidation = ({ zodValidation, path }) => {
|
|
20
20
|
if (zodValidation.success) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
return (jsx_runtime_1.jsxs("div", { style: legend, children: [
|
|
24
|
-
jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: zodValidation.error.format()._errors[0], type: "error" }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { title: "Zod validation failure", children: jsx_runtime_1.jsxs("div", { style: stackTrace, children: [
|
|
24
|
+
jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: zodValidation.error.format()._errors[0], type: "error", size: "compact" }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { title: "Zod validation failure", children: jsx_runtime_1.jsxs("div", { style: stackTrace, children: [
|
|
25
25
|
jsx_runtime_1.jsx("div", { style: stackTraceLabel, children: "Zod Validation has failed:" }), zodValidation.error.issues.map((error, index) => (
|
|
26
26
|
// eslint-disable-next-line react/no-array-index-key
|
|
27
27
|
jsx_runtime_1.jsxs("div", { style: stackTraceLabel, children: ["Type: ", error.code, " ",
|
|
@@ -16,7 +16,8 @@ const emptyLabel = {
|
|
|
16
16
|
};
|
|
17
17
|
const wideEmptyLabel = {
|
|
18
18
|
...emptyLabel,
|
|
19
|
-
|
|
19
|
+
fontSize: 12,
|
|
20
|
+
lineHeight: '28px',
|
|
20
21
|
};
|
|
21
22
|
const ZonNonEditableValue = ({ jsonPath, label, mayPad }) => {
|
|
22
23
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
@@ -26,7 +26,7 @@ const ZodNumberEditor = ({ jsonPath, value, schema, setValue, onRemove, mayPad }
|
|
|
26
26
|
const zodValidation = (0, react_1.useMemo)(() => (0, zod_schema_type_1.zodSafeParse)(schema, value), [schema, value]);
|
|
27
27
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
28
28
|
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsxs("div", { style: fullWidth, children: [
|
|
29
|
-
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: 'number', value: value, style: fullWidth, status: zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onTextChange: onTextChange, onValueChange: onNumberChange, onValueChangeEnd: onNumberChangeEnd, min: (0, zod_number_constraints_1.getZodNumberMinimum)(schema), max: (0, zod_number_constraints_1.getZodNumberMaximum)(schema), step: (0, zod_number_constraints_1.getZodNumberStep)(schema), rightAlign: false }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
29
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: 'number', value: value, style: fullWidth, status: zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onTextChange: onTextChange, onValueChange: onNumberChange, onValueChangeEnd: onNumberChangeEnd, min: (0, zod_number_constraints_1.getZodNumberMinimum)(schema), max: (0, zod_number_constraints_1.getZodNumberMaximum)(schema), step: (0, zod_number_constraints_1.getZodNumberStep)(schema), rightAlign: false, small: true }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
30
30
|
] })
|
|
31
31
|
] }));
|
|
32
32
|
};
|
|
@@ -40,7 +40,6 @@ const react_2 = __importStar(require("react"));
|
|
|
40
40
|
const layout_1 = require("../layout");
|
|
41
41
|
const Fieldset_1 = require("./Fieldset");
|
|
42
42
|
const SchemaLabel_1 = require("./SchemaLabel");
|
|
43
|
-
const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
|
|
44
43
|
const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
|
|
45
44
|
const zod_schema_type_1 = require("./zod-schema-type");
|
|
46
45
|
const zod_schema_type_2 = require("./zod-schema-type");
|
|
@@ -61,20 +60,19 @@ const ZodObjectEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad,
|
|
|
61
60
|
return expanded ? ' {' : ' {...}';
|
|
62
61
|
}, [expanded]);
|
|
63
62
|
const zodValidation = (0, react_2.useMemo)(() => (0, zod_schema_type_1.zodSafeParse)(schema, value), [schema, value]);
|
|
64
|
-
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: !isRoot && mayPad, children: [isRoot ? null : (jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { jsonPath: jsonPath, onRemove: onRemove, suffix: suffix, valid: zodValidation.success, handleClick: () => setExpanded(!expanded) })), expanded ? (jsx_runtime_1.jsx(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: isRoot, children: keys.map((key
|
|
63
|
+
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: !isRoot && mayPad, children: [isRoot ? null : (jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { jsonPath: jsonPath, onRemove: onRemove, suffix: suffix, valid: zodValidation.success, handleClick: () => setExpanded(!expanded) })), expanded ? (jsx_runtime_1.jsx(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: isRoot, children: keys.map((key) => {
|
|
65
64
|
if (discriminatedUnionReplacement &&
|
|
66
65
|
key === discriminatedUnionReplacement.discriminator) {
|
|
67
66
|
return discriminatedUnionReplacement.markup;
|
|
68
67
|
}
|
|
69
|
-
return (jsx_runtime_1.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, onRemove: null }), i === keys.length - 1 ? null : jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaSeparationLine, {})] }, key));
|
|
68
|
+
return (jsx_runtime_1.jsx(react_2.default.Fragment, { children: jsx_runtime_1.jsx(ZodSwitch_1.ZodSwitch, { mayPad: true, jsonPath: [...jsonPath, key], schema: shape[key], value: value[key], setValue: (val, { shouldSave }) => {
|
|
69
|
+
onChange((oldVal) => {
|
|
70
|
+
return {
|
|
71
|
+
...oldVal,
|
|
72
|
+
[key]: typeof val === 'function' ? val(oldVal[key]) : val,
|
|
73
|
+
};
|
|
74
|
+
}, { shouldSave });
|
|
75
|
+
}, onRemove: null }) }, key));
|
|
78
76
|
}) })) : null, isRoot || !expanded ? null : jsx_runtime_1.jsx("div", { style: layout_1.fieldsetLabel, children: '}' })] }));
|
|
79
77
|
};
|
|
80
78
|
exports.ZodObjectEditor = ZodObjectEditor;
|
|
@@ -38,7 +38,7 @@ const ZodStaticFileEditor = ({ schema, jsonPath, setValue, value, onRemove, mayP
|
|
|
38
38
|
});
|
|
39
39
|
}, [onChange, staticFiles, value]);
|
|
40
40
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
41
|
-
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsx("div", { style: isRoot ? undefined : container, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: value, title: value }) }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
41
|
+
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsx("div", { style: isRoot ? undefined : container, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: comboBoxValues, selectedId: value, title: value, small: true }) }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
42
42
|
] }));
|
|
43
43
|
};
|
|
44
44
|
exports.ZodStaticFileEditor = ZodStaticFileEditor;
|
|
@@ -27,7 +27,7 @@ const ZodStringEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad }
|
|
|
27
27
|
}, [setValue, value]);
|
|
28
28
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
29
29
|
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsxs("div", { style: fullWidth, children: [
|
|
30
|
-
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: value, status: zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, onBlur: onBlur, rightAlign: false, name: jsonPath.join('.') }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
30
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: value, status: zodValidation.success ? 'ok' : 'error', placeholder: jsonPath.join('.'), onChange: onChange, onBlur: onBlur, rightAlign: false, name: jsonPath.join('.'), small: true }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
31
31
|
] })
|
|
32
32
|
] }));
|
|
33
33
|
};
|
|
@@ -67,7 +67,7 @@ const ZodTextareaEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad
|
|
|
67
67
|
const zodValidation = react_1.default.useMemo(() => (0, zod_schema_type_1.zodSafeParse)(schema, value), [schema, value]);
|
|
68
68
|
return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [
|
|
69
69
|
jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null }), jsx_runtime_1.jsxs("div", { style: fullWidth, children: [
|
|
70
|
-
jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { onChange: onChange, onBlur: onBlur, value: value, status: zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), name: jsonPath.join('.'), style: textareaStyle }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
70
|
+
jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { onChange: onChange, onBlur: onBlur, value: value, status: zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), name: jsonPath.join('.'), style: textareaStyle, small: true }), jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, zodValidation: zodValidation })
|
|
71
71
|
] })
|
|
72
72
|
] }));
|
|
73
73
|
};
|
|
@@ -21,31 +21,44 @@ const style = {
|
|
|
21
21
|
paddingTop: 4,
|
|
22
22
|
paddingBottom: 4,
|
|
23
23
|
};
|
|
24
|
+
const compactStyle = {
|
|
25
|
+
...style,
|
|
26
|
+
fontSize: 11,
|
|
27
|
+
paddingBottom: 2,
|
|
28
|
+
paddingLeft: 6,
|
|
29
|
+
paddingRight: 6,
|
|
30
|
+
paddingTop: 2,
|
|
31
|
+
};
|
|
24
32
|
const triangleStyle = {
|
|
25
33
|
width: 12,
|
|
26
34
|
height: 12,
|
|
27
35
|
flexShrink: 0,
|
|
28
36
|
fill: colors_1.WARNING_COLOR,
|
|
29
37
|
};
|
|
38
|
+
const compactTriangleStyle = {
|
|
39
|
+
...triangleStyle,
|
|
40
|
+
height: 10,
|
|
41
|
+
width: 10,
|
|
42
|
+
};
|
|
30
43
|
const WarningTriangle = (props) => {
|
|
31
44
|
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 576 512", ...props, children: jsx_runtime_1.jsx("path", { d: "M248.747 204.705l6.588 112c.373 6.343 5.626 11.295 11.979 11.295h41.37a12 12 0 0 0 11.979-11.295l6.588-112c.405-6.893-5.075-12.705-11.979-12.705h-54.547c-6.903 0-12.383 5.812-11.978 12.705zM330 384c0 23.196-18.804 42-42 42s-42-18.804-42-42 18.804-42 42-42 42 18.804 42 42zm-.423-360.015c-18.433-31.951-64.687-32.009-83.154 0L6.477 440.013C-11.945 471.946 11.118 512 48.054 512H527.94c36.865 0 60.035-39.993 41.577-71.987L329.577 23.985zM53.191 455.002L282.803 57.008c2.309-4.002 8.085-4.002 10.394 0l229.612 397.993c2.308 4-.579 8.998-5.197 8.998H58.388c-4.617.001-7.504-4.997-5.197-8.997z" }) }));
|
|
32
45
|
};
|
|
33
|
-
const WarningIndicatorButton = ({ setShowWarning, showWarning, warningCount }) => {
|
|
46
|
+
const WarningIndicatorButton = ({ setShowWarning, showWarning, warningCount, size = 'default' }) => {
|
|
34
47
|
const onClick = (0, react_1.useCallback)(() => {
|
|
35
48
|
setShowWarning((s) => !s);
|
|
36
49
|
}, [setShowWarning]);
|
|
37
50
|
const buttonStyle = (0, react_1.useMemo)(() => {
|
|
38
51
|
return {
|
|
39
|
-
...style,
|
|
52
|
+
...(size === 'compact' ? compactStyle : style),
|
|
40
53
|
backgroundColor: showWarning ? colors_1.INPUT_BACKGROUND : 'transparent',
|
|
41
54
|
borderColor: showWarning
|
|
42
55
|
? colors_1.INPUT_BORDER_COLOR_HOVERED
|
|
43
56
|
: colors_1.INPUT_BORDER_COLOR_UNHOVERED,
|
|
44
57
|
color: showWarning ? 'white' : colors_1.LIGHT_TEXT,
|
|
45
58
|
};
|
|
46
|
-
}, [showWarning]);
|
|
59
|
+
}, [showWarning, size]);
|
|
47
60
|
return (jsx_runtime_1.jsxs("button", { type: "button", style: buttonStyle, onClick: onClick, children: [
|
|
48
|
-
jsx_runtime_1.jsx(WarningTriangle, { style: triangleStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), warningCount, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx(caret_1.AngleDown, { down: showWarning })
|
|
61
|
+
jsx_runtime_1.jsx(WarningTriangle, { style: size === 'compact' ? compactTriangleStyle : triangleStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), warningCount, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx(caret_1.AngleDown, { down: showWarning })
|
|
49
62
|
] }));
|
|
50
63
|
};
|
|
51
64
|
exports.WarningIndicatorButton = WarningIndicatorButton;
|
|
@@ -12,7 +12,7 @@ export type TypeCanSaveState = {
|
|
|
12
12
|
reason: string;
|
|
13
13
|
determined: boolean;
|
|
14
14
|
};
|
|
15
|
-
export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, jsMapUsed, jsSetUsed, inJSONEditor, propsEditType, }: {
|
|
15
|
+
export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, jsMapUsed, jsSetUsed, inJSONEditor, propsEditType, showCannotSaveDefaultPropsWarning, }: {
|
|
16
16
|
cliProps: unknown;
|
|
17
17
|
canSaveDefaultProps: TypeCanSaveState | null;
|
|
18
18
|
isCustomDateUsed: boolean;
|
|
@@ -21,4 +21,5 @@ export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, i
|
|
|
21
21
|
jsSetUsed: boolean;
|
|
22
22
|
inJSONEditor: boolean;
|
|
23
23
|
propsEditType: PropsEditType;
|
|
24
|
+
showCannotSaveDefaultPropsWarning: boolean;
|
|
24
25
|
}) => RenderModalWarning[];
|
|
@@ -19,7 +19,10 @@ const getInputPropsWarning = ({ cliProps, propsEditType, }) => {
|
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
};
|
|
22
|
-
const getCannotSaveDefaultProps = (canSaveDefaultProps) => {
|
|
22
|
+
const getCannotSaveDefaultProps = (canSaveDefaultProps, showCannotSaveDefaultPropsWarning) => {
|
|
23
|
+
if (!showCannotSaveDefaultPropsWarning) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
23
26
|
if (canSaveDefaultProps === null) {
|
|
24
27
|
return null;
|
|
25
28
|
}
|
|
@@ -59,10 +62,10 @@ const setUsed = (used, inJSONEditor) => {
|
|
|
59
62
|
}
|
|
60
63
|
return null;
|
|
61
64
|
};
|
|
62
|
-
const getRenderModalWarnings = ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, jsMapUsed, jsSetUsed, inJSONEditor, propsEditType, }) => {
|
|
65
|
+
const getRenderModalWarnings = ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, jsMapUsed, jsSetUsed, inJSONEditor, propsEditType, showCannotSaveDefaultPropsWarning, }) => {
|
|
63
66
|
return [
|
|
64
67
|
warningOrNull('input-props-override', getInputPropsWarning({ cliProps, propsEditType })),
|
|
65
|
-
getCannotSaveDefaultProps(canSaveDefaultProps),
|
|
68
|
+
getCannotSaveDefaultProps(canSaveDefaultProps, showCannotSaveDefaultPropsWarning),
|
|
66
69
|
warningOrNull('custom-date-used', customDateUsed(isCustomDateUsed, inJSONEditor)),
|
|
67
70
|
warningOrNull('static-file-used', staticFileUsed(customFileUsed, inJSONEditor)),
|
|
68
71
|
warningOrNull('map-used', mapUsed(jsMapUsed, inJSONEditor)),
|
|
@@ -5,7 +5,10 @@ export type SegmentedControlItem = {
|
|
|
5
5
|
key: string;
|
|
6
6
|
selected: boolean;
|
|
7
7
|
};
|
|
8
|
+
type SegmentedControlSize = 'default' | 'compact';
|
|
8
9
|
export declare const SegmentedControl: React.FC<{
|
|
9
10
|
readonly items: SegmentedControlItem[];
|
|
10
11
|
readonly needsWrapping: boolean;
|
|
12
|
+
readonly size?: SegmentedControlSize;
|
|
11
13
|
}>;
|
|
14
|
+
export {};
|
|
@@ -25,7 +25,13 @@ const item = {
|
|
|
25
25
|
justifyContent: 'center',
|
|
26
26
|
whiteSpace: 'nowrap',
|
|
27
27
|
};
|
|
28
|
-
const
|
|
28
|
+
const compactItem = {
|
|
29
|
+
...item,
|
|
30
|
+
fontSize: 11,
|
|
31
|
+
fontWeight: 400,
|
|
32
|
+
padding: '2px 7px',
|
|
33
|
+
};
|
|
34
|
+
const SegmentedControl = ({ items, needsWrapping, size = 'default' }) => {
|
|
29
35
|
const controlStyle = (0, react_1.useMemo)(() => {
|
|
30
36
|
if (needsWrapping) {
|
|
31
37
|
return {
|
|
@@ -41,11 +47,11 @@ const SegmentedControl = ({ items, needsWrapping }) => {
|
|
|
41
47
|
};
|
|
42
48
|
}, [needsWrapping]);
|
|
43
49
|
return (jsx_runtime_1.jsx("div", { style: controlStyle, children: items.map((i) => {
|
|
44
|
-
return (jsx_runtime_1.jsx(Item, { onClick: i.onClick, selected: i.selected, children: i.label }, i.key));
|
|
50
|
+
return (jsx_runtime_1.jsx(Item, { onClick: i.onClick, selected: i.selected, size: size, children: i.label }, i.key));
|
|
45
51
|
}) }));
|
|
46
52
|
};
|
|
47
53
|
exports.SegmentedControl = SegmentedControl;
|
|
48
|
-
const Item = ({ selected, onClick, children }) => {
|
|
54
|
+
const Item = ({ selected, onClick, children, size }) => {
|
|
49
55
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
50
56
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
51
57
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
@@ -56,10 +62,10 @@ const Item = ({ selected, onClick, children }) => {
|
|
|
56
62
|
}, []);
|
|
57
63
|
const itemStyle = (0, react_1.useMemo)(() => {
|
|
58
64
|
return {
|
|
59
|
-
...item,
|
|
65
|
+
...(size === 'compact' ? compactItem : item),
|
|
60
66
|
backgroundColor: selected ? colors_1.INPUT_BACKGROUND : 'transparent',
|
|
61
67
|
color: selected ? 'white' : hovered ? 'white' : colors_1.LIGHT_TEXT,
|
|
62
68
|
};
|
|
63
|
-
}, [hovered, selected]);
|
|
69
|
+
}, [hovered, selected, size]);
|
|
64
70
|
return (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: itemStyle, tabIndex: tabIndex, onClick: onClick, children: children }));
|
|
65
71
|
};
|