@clypra-studio/engine 1.8.0 → 1.8.1

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/index.js CHANGED
@@ -1,3 +1,28 @@
1
+ import {
2
+ FontLoader,
3
+ checkFontVariant,
4
+ ensureFontsLoaded,
5
+ getFontLoader,
6
+ initializeFontSystem,
7
+ injectFontVariantRules,
8
+ resetFontLoader
9
+ } from "./chunk-V5VSY64D.js";
10
+ import {
11
+ ALL_TRANSITIONS,
12
+ TRANSITION_CATEGORIES,
13
+ TRANSITION_PRESETS,
14
+ TransitionRenderer,
15
+ getAllTransitionTags,
16
+ getAllTransitions,
17
+ getRecommendedDuration,
18
+ getTransitionById,
19
+ getTransitionByRenderer,
20
+ getTransitionCategories,
21
+ getTransitionCountByCategory,
22
+ getTransitionsByCategory,
23
+ getTransitionsByTags,
24
+ searchTransitions
25
+ } from "./chunk-PU3Q4QI7.js";
1
26
  import {
2
27
  CANONICAL_RENDERER_VERSION,
3
28
  CANONICAL_SCHEMA_VERSION,
@@ -36,16 +61,7 @@ import {
36
61
  solveSpring,
37
62
  splitTextContent,
38
63
  validateTextTemplateArtifact
39
- } from "./chunk-B2KQXJLS.js";
40
- import {
41
- FontLoader,
42
- checkFontVariant,
43
- ensureFontsLoaded,
44
- getFontLoader,
45
- initializeFontSystem,
46
- injectFontVariantRules,
47
- resetFontLoader
48
- } from "./chunk-NG4F55V7.js";
64
+ } from "./chunk-JP44RJUI.js";
49
65
  import {
50
66
  COMPOSITION_PRESETS,
51
67
  CanvasDevice,
@@ -106,23 +122,7 @@ import {
106
122
  syncCompositorFromScene,
107
123
  textEffectConfigToScene,
108
124
  wrapTextToWidth
109
- } from "./chunk-7ORA5BPW.js";
110
- import {
111
- ALL_TRANSITIONS,
112
- TRANSITION_CATEGORIES,
113
- TRANSITION_PRESETS,
114
- TransitionRenderer,
115
- getAllTransitionTags,
116
- getAllTransitions,
117
- getRecommendedDuration,
118
- getTransitionById,
119
- getTransitionByRenderer,
120
- getTransitionCategories,
121
- getTransitionCountByCategory,
122
- getTransitionsByCategory,
123
- getTransitionsByTags,
124
- searchTransitions
125
- } from "./chunk-PU3Q4QI7.js";
125
+ } from "./chunk-YBOYDQU5.js";
126
126
  import {
127
127
  EFFECTS_REGISTRY,
128
128
  EffectEngine,
@@ -6620,6 +6620,347 @@ var BUILTIN_CANVAS_TEMPLATES = [
6620
6620
  }
6621
6621
  }
6622
6622
  ]
6623
+ },
6624
+ // ── Caption Templates (Admin-Customizable Studio Presets) ────────────────────
6625
+ {
6626
+ id: "classic-yellow",
6627
+ label: "Classic Yellow",
6628
+ category: "caption",
6629
+ duration: 4,
6630
+ canvasWidth: 1920,
6631
+ canvasHeight: 1080,
6632
+ description: "High-contrast yellow text with bold black outline \u2014 the most readable caption style for mixed backgrounds.",
6633
+ layers: [
6634
+ {
6635
+ kind: "text",
6636
+ id: "caption-text",
6637
+ content: "Sample Subtitle Caption",
6638
+ fontFamily: "Outfit Variable",
6639
+ fontSize: 38,
6640
+ fontWeight: 800,
6641
+ color: "#FFE600",
6642
+ align: "center",
6643
+ x: 360,
6644
+ y: 890,
6645
+ width: 1200,
6646
+ height: 100,
6647
+ role: "primary",
6648
+ textRole: "caption",
6649
+ stroke: { color: "#000000", width: 4 },
6650
+ shadow: { color: "rgba(0,0,0,0.6)", blur: 6, offsetX: 0, offsetY: 3 },
6651
+ animation: {
6652
+ in: "fade",
6653
+ out: "fade",
6654
+ inDuration: 0.2,
6655
+ outDuration: 0.2,
6656
+ hold: "full"
6657
+ },
6658
+ anchor: {
6659
+ anchorPoint: "bottom-center",
6660
+ maxWidthPercentage: 90
6661
+ }
6662
+ }
6663
+ ]
6664
+ },
6665
+ {
6666
+ id: "dark-pill",
6667
+ label: "Dark Pill",
6668
+ category: "caption",
6669
+ duration: 4,
6670
+ canvasWidth: 1920,
6671
+ canvasHeight: 1080,
6672
+ description: "White text inside a semi-transparent dark rounded pill \u2014 works on any background.",
6673
+ layers: [
6674
+ {
6675
+ kind: "text",
6676
+ id: "caption-text",
6677
+ content: "Sample Subtitle Caption",
6678
+ fontFamily: "Inter Variable",
6679
+ fontSize: 34,
6680
+ fontWeight: 700,
6681
+ color: "#FFFFFF",
6682
+ align: "center",
6683
+ x: 360,
6684
+ y: 890,
6685
+ width: 1200,
6686
+ height: 100,
6687
+ role: "primary",
6688
+ textRole: "caption",
6689
+ backgroundColor: "rgba(0,0,0,0.75)",
6690
+ backgroundRadius: 10,
6691
+ padding: 10,
6692
+ paddingTop: 10,
6693
+ paddingBottom: 10,
6694
+ paddingLeft: 20,
6695
+ paddingRight: 20,
6696
+ shadow: { color: "rgba(0,0,0,0.5)", blur: 4, offsetX: 0, offsetY: 2 },
6697
+ animation: {
6698
+ in: "fade",
6699
+ out: "fade",
6700
+ inDuration: 0.2,
6701
+ outDuration: 0.2,
6702
+ hold: "full"
6703
+ },
6704
+ anchor: {
6705
+ anchorPoint: "bottom-center",
6706
+ maxWidthPercentage: 90
6707
+ }
6708
+ }
6709
+ ]
6710
+ },
6711
+ {
6712
+ id: "outline-white",
6713
+ label: "Outline White",
6714
+ category: "caption",
6715
+ duration: 4,
6716
+ canvasWidth: 1920,
6717
+ canvasHeight: 1080,
6718
+ description: "Broadcast-standard white text with dark outline \u2014 clean and professional on any content.",
6719
+ layers: [
6720
+ {
6721
+ kind: "text",
6722
+ id: "caption-text",
6723
+ content: "Sample Subtitle Caption",
6724
+ fontFamily: "Inter Variable",
6725
+ fontSize: 32,
6726
+ fontWeight: 600,
6727
+ color: "#FFFFFF",
6728
+ align: "center",
6729
+ x: 360,
6730
+ y: 890,
6731
+ width: 1200,
6732
+ height: 100,
6733
+ role: "primary",
6734
+ textRole: "caption",
6735
+ stroke: { color: "#1a1a1a", width: 3 },
6736
+ shadow: { color: "rgba(0,0,0,0.8)", blur: 5, offsetX: 0, offsetY: 2 },
6737
+ animation: {
6738
+ in: "fade",
6739
+ out: "fade",
6740
+ inDuration: 0.2,
6741
+ outDuration: 0.2,
6742
+ hold: "full"
6743
+ },
6744
+ anchor: {
6745
+ anchorPoint: "bottom-center",
6746
+ maxWidthPercentage: 90
6747
+ }
6748
+ }
6749
+ ]
6750
+ },
6751
+ {
6752
+ id: "neon-pop",
6753
+ label: "Neon Pop",
6754
+ category: "caption",
6755
+ duration: 4,
6756
+ canvasWidth: 1920,
6757
+ canvasHeight: 1080,
6758
+ description: "Electric cyan with a vivid blue glow \u2014 perfect for tech, gaming, and high-energy content.",
6759
+ layers: [
6760
+ {
6761
+ kind: "text",
6762
+ id: "caption-text",
6763
+ content: "Sample Subtitle Caption",
6764
+ fontFamily: "Outfit Variable",
6765
+ fontSize: 38,
6766
+ fontWeight: 800,
6767
+ color: "#00FFFF",
6768
+ align: "center",
6769
+ x: 360,
6770
+ y: 890,
6771
+ width: 1200,
6772
+ height: 100,
6773
+ role: "primary",
6774
+ textRole: "caption",
6775
+ stroke: { color: "#0044EE", width: 3 },
6776
+ shadow: { color: "rgba(0,68,238,0.5)", blur: 10, offsetX: 0, offsetY: 0 },
6777
+ animation: {
6778
+ in: "fade",
6779
+ out: "fade",
6780
+ inDuration: 0.2,
6781
+ outDuration: 0.2,
6782
+ hold: "full"
6783
+ },
6784
+ anchor: {
6785
+ anchorPoint: "bottom-center",
6786
+ maxWidthPercentage: 90
6787
+ }
6788
+ }
6789
+ ]
6790
+ },
6791
+ {
6792
+ id: "minimal-clean",
6793
+ label: "Minimal Clean",
6794
+ category: "caption",
6795
+ duration: 4,
6796
+ canvasWidth: 1920,
6797
+ canvasHeight: 1080,
6798
+ description: "Understated white text with a soft shadow \u2014 editorial and podcast-friendly.",
6799
+ layers: [
6800
+ {
6801
+ kind: "text",
6802
+ id: "caption-text",
6803
+ content: "Sample Subtitle Caption",
6804
+ fontFamily: "Inter Variable",
6805
+ fontSize: 30,
6806
+ fontWeight: 400,
6807
+ color: "#FFFFFF",
6808
+ align: "center",
6809
+ x: 360,
6810
+ y: 890,
6811
+ width: 1200,
6812
+ height: 100,
6813
+ role: "primary",
6814
+ textRole: "caption",
6815
+ stroke: { color: "rgba(0,0,0,0.3)", width: 1.5 },
6816
+ shadow: { color: "rgba(0,0,0,0.7)", blur: 8, offsetX: 0, offsetY: 3 },
6817
+ animation: {
6818
+ in: "fade",
6819
+ out: "fade",
6820
+ inDuration: 0.2,
6821
+ outDuration: 0.2,
6822
+ hold: "full"
6823
+ },
6824
+ anchor: {
6825
+ anchorPoint: "bottom-center",
6826
+ maxWidthPercentage: 90
6827
+ }
6828
+ }
6829
+ ]
6830
+ },
6831
+ {
6832
+ id: "fire-orange",
6833
+ label: "Fire Orange",
6834
+ category: "caption",
6835
+ duration: 4,
6836
+ canvasWidth: 1920,
6837
+ canvasHeight: 1080,
6838
+ description: "Bold warm orange with dark outline \u2014 energetic and attention-grabbing for action content.",
6839
+ layers: [
6840
+ {
6841
+ kind: "text",
6842
+ id: "caption-text",
6843
+ content: "Sample Subtitle Caption",
6844
+ fontFamily: "Outfit Variable",
6845
+ fontSize: 40,
6846
+ fontWeight: 900,
6847
+ color: "#FF6B1A",
6848
+ align: "center",
6849
+ x: 360,
6850
+ y: 890,
6851
+ width: 1200,
6852
+ height: 100,
6853
+ role: "primary",
6854
+ textRole: "caption",
6855
+ stroke: { color: "#1A0800", width: 4 },
6856
+ shadow: { color: "rgba(255,80,0,0.4)", blur: 8, offsetX: 0, offsetY: 0 },
6857
+ animation: {
6858
+ in: "fade",
6859
+ out: "fade",
6860
+ inDuration: 0.2,
6861
+ outDuration: 0.2,
6862
+ hold: "full"
6863
+ },
6864
+ anchor: {
6865
+ anchorPoint: "bottom-center",
6866
+ maxWidthPercentage: 90
6867
+ }
6868
+ }
6869
+ ]
6870
+ },
6871
+ {
6872
+ id: "frosted-glass",
6873
+ label: "Frosted Glass",
6874
+ category: "caption",
6875
+ duration: 4,
6876
+ canvasWidth: 1920,
6877
+ canvasHeight: 1080,
6878
+ description: "Modern frosted glass pill with light text \u2014 clean, premium look for lifestyle and brand content.",
6879
+ layers: [
6880
+ {
6881
+ kind: "text",
6882
+ id: "caption-text",
6883
+ content: "Sample Subtitle Caption",
6884
+ fontFamily: "Inter Variable",
6885
+ fontSize: 32,
6886
+ fontWeight: 600,
6887
+ color: "#FFFFFF",
6888
+ align: "center",
6889
+ x: 360,
6890
+ y: 890,
6891
+ width: 1200,
6892
+ height: 100,
6893
+ role: "primary",
6894
+ textRole: "caption",
6895
+ backgroundColor: "rgba(255,255,255,0.12)",
6896
+ backgroundBorderColor: "rgba(255,255,255,0.3)",
6897
+ backgroundBorderWidth: 1,
6898
+ backgroundRadius: 14,
6899
+ padding: 12,
6900
+ paddingTop: 12,
6901
+ paddingBottom: 12,
6902
+ paddingLeft: 24,
6903
+ paddingRight: 24,
6904
+ stroke: { color: "rgba(255,255,255,0.3)", width: 1 },
6905
+ shadow: { color: "rgba(0,0,0,0.4)", blur: 6, offsetX: 0, offsetY: 2 },
6906
+ animation: {
6907
+ in: "fade",
6908
+ out: "fade",
6909
+ inDuration: 0.2,
6910
+ outDuration: 0.2,
6911
+ hold: "full"
6912
+ },
6913
+ anchor: {
6914
+ anchorPoint: "bottom-center",
6915
+ maxWidthPercentage: 90
6916
+ }
6917
+ }
6918
+ ]
6919
+ },
6920
+ {
6921
+ id: "typewriter-mono",
6922
+ label: "Typewriter Mono",
6923
+ category: "caption",
6924
+ duration: 4,
6925
+ canvasWidth: 1920,
6926
+ canvasHeight: 1080,
6927
+ description: "Monospace typewriter style \u2014 perfect for documentary narration, tech, or interview content.",
6928
+ layers: [
6929
+ {
6930
+ kind: "text",
6931
+ id: "caption-text",
6932
+ content: "Sample Subtitle Caption",
6933
+ fontFamily: "monospace",
6934
+ fontSize: 28,
6935
+ fontWeight: 400,
6936
+ color: "#E8E8D8",
6937
+ align: "left",
6938
+ x: 360,
6939
+ y: 890,
6940
+ width: 1200,
6941
+ height: 100,
6942
+ role: "primary",
6943
+ textRole: "caption",
6944
+ backgroundColor: "rgba(0,0,0,0.85)",
6945
+ backgroundRadius: 4,
6946
+ padding: 10,
6947
+ paddingTop: 10,
6948
+ paddingBottom: 10,
6949
+ paddingLeft: 16,
6950
+ paddingRight: 16,
6951
+ animation: {
6952
+ in: "fade",
6953
+ out: "fade",
6954
+ inDuration: 0.2,
6955
+ outDuration: 0.2,
6956
+ hold: "full"
6957
+ },
6958
+ anchor: {
6959
+ anchorPoint: "bottom-center",
6960
+ maxWidthPercentage: 90
6961
+ }
6962
+ }
6963
+ ]
6623
6964
  }
6624
6965
  ];
6625
6966
  function getCanvasTemplatePreset(id) {