@innovastudio/contentbuilder 1.5.222 → 1.5.224

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@innovastudio/contentbuilder",
4
- "version": "1.5.222",
4
+ "version": "1.5.224",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -4977,6 +4977,12 @@ i.bi, i.icon {
4977
4977
  display: inline-flex;
4978
4978
  }
4979
4979
 
4980
+ /* As a flex box an icon ignores Bootstrap Icons' own vertical-align (on its ::before) and sits
4981
+ higher than the text beside it in the editor. Put the same offset on the icon itself. */
4982
+ .is-container i.bi {
4983
+ vertical-align: -0.125em;
4984
+ }
4985
+
4980
4986
  /* block tool */
4981
4987
  /*
4982
4988
  .is-block-tool {
@@ -4027,6 +4027,24 @@ function readHoverColor(el, aspect) {
4027
4027
  return '';
4028
4028
  }
4029
4029
 
4030
+ // The colour a button shows, for a swatch or a colour picker. A colour written as a mode role
4031
+ // (var(--cb-mode-button, ...), see the runtime's modes) is resolved to the colour it gives here and
4032
+ // now, so the picker opens on a real colour; any other value is returned as it is. Reading only:
4033
+ // the role stays in the markup until the user picks a colour.
4034
+ // property: a CSS property ('color', 'backgroundColor') or a hover variable ('--cb-hover-bg')
4035
+ function resolveColor(el, value, property) {
4036
+ if (!value || value.indexOf('var(') === -1) return value;
4037
+ const win = el.ownerDocument && el.ownerDocument.defaultView;
4038
+ if (!win) return value;
4039
+ const cs = win.getComputedStyle(el);
4040
+ // Read the role's own variable, not the property: the property shows the hover colour while
4041
+ // the pointer is over the button (as it is right after the button is clicked)
4042
+ const role = value.trim().match(/^var\(\s*(--[\w-]+)\s*(?:,\s*([\s\S]+))?\)$/);
4043
+ if (role) return cs.getPropertyValue(role[1]).trim() || (role[2] || '').trim() || value;
4044
+ const shown = property.indexOf('--') === 0 ? cs.getPropertyValue(property).trim() : cs[property];
4045
+ return shown || value;
4046
+ }
4047
+
4030
4048
  // Write one hover aspect, and drop every legacy form of THAT aspect.
4031
4049
  //
4032
4050
  // Per aspect, not per button: editing the hover background must not silently
@@ -4267,7 +4285,7 @@ const BUTTON_PRESETS = [
4267
4285
  type: 'solid',
4268
4286
  shape: 'rounded',
4269
4287
  text: 'Read More',
4270
- color: 'rgb(24, 24, 27)',
4288
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4271
4289
  bg: 'transparent',
4272
4290
  hoverBg: 'transparent',
4273
4291
  customClasses: 'underline'
@@ -4275,33 +4293,35 @@ const BUTTON_PRESETS = [
4275
4293
  type: 'outline',
4276
4294
  shape: 'rounded',
4277
4295
  text: 'Read More',
4278
- color: 'rgb(24, 24, 27)',
4296
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4279
4297
  bg: 'transparent',
4280
- hoverBg: 'rgb(24, 24, 27)',
4281
- hoverColor: 'rgb(255, 255, 255)'
4298
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4299
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
4282
4300
  }, {
4283
4301
  type: 'solid',
4284
4302
  shape: 'rounded',
4285
4303
  text: 'Read More',
4286
- color: 'rgb(24, 24, 27)',
4287
- bg: 'rgb(240, 240, 241)',
4288
- hoverBg: 'rgb(236, 236, 238)'
4304
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4305
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
4306
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
4289
4307
  }, {
4290
4308
  type: 'solid',
4291
4309
  shape: 'rounded',
4292
4310
  text: 'Read More',
4293
- color: 'rgb(250, 250, 250)',
4294
- bg: 'rgb(24, 24, 27)',
4295
- hoverBg: 'rgb(63, 63, 70)'
4296
- }, {
4297
- type: 'outline',
4298
- shape: 'rounded',
4299
- text: 'Read More',
4300
- color: 'rgb(250, 250, 250)',
4301
- bg: 'transparent',
4302
- hoverBg: '#fff',
4303
- hoverColor: 'rgb(0, 0, 0)'
4304
- }, {
4311
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
4312
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4313
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
4314
+ },
4315
+ // {
4316
+ // type: 'outline',
4317
+ // shape: 'rounded',
4318
+ // text: 'Read More',
4319
+ // color: 'rgb(250, 250, 250)',
4320
+ // bg: 'transparent',
4321
+ // hoverBg: '#fff',
4322
+ // hoverColor: 'rgb(0, 0, 0)'
4323
+ // },
4324
+ {
4305
4325
  type: 'solid',
4306
4326
  shape: 'rounded',
4307
4327
  text: 'Read More',
@@ -4410,7 +4430,7 @@ const BUTTON_PRESETS = [
4410
4430
  type: 'solid',
4411
4431
  shape: 'slightly-rounded',
4412
4432
  text: 'Read More',
4413
- color: 'rgb(24, 24, 27)',
4433
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4414
4434
  bg: 'transparent',
4415
4435
  hoverBg: 'transparent',
4416
4436
  customClasses: 'underline'
@@ -4418,33 +4438,35 @@ const BUTTON_PRESETS = [
4418
4438
  type: 'outline',
4419
4439
  shape: 'slightly-rounded',
4420
4440
  text: 'Read More',
4421
- color: 'rgb(24, 24, 27)',
4441
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4422
4442
  bg: 'transparent',
4423
- hoverBg: 'rgb(24, 24, 27)',
4424
- hoverColor: 'rgb(255, 255, 255)'
4443
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4444
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
4425
4445
  }, {
4426
4446
  type: 'solid',
4427
4447
  shape: 'slightly-rounded',
4428
4448
  text: 'Read More',
4429
- color: 'rgb(24, 24, 27)',
4430
- bg: 'rgb(240, 240, 241)',
4431
- hoverBg: 'rgb(236, 236, 238)'
4449
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4450
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
4451
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
4432
4452
  }, {
4433
4453
  type: 'solid',
4434
4454
  shape: 'slightly-rounded',
4435
4455
  text: 'Read More',
4436
- color: 'rgb(250, 250, 250)',
4437
- bg: 'rgb(24, 24, 27)',
4438
- hoverBg: 'rgb(63, 63, 70)'
4439
- }, {
4440
- type: 'outline',
4441
- shape: 'slightly-rounded',
4442
- text: 'Read More',
4443
- color: 'rgb(250, 250, 250)',
4444
- bg: 'transparent',
4445
- hoverBg: '#fff',
4446
- hoverColor: 'rgb(0, 0, 0)'
4447
- }, {
4456
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
4457
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4458
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
4459
+ },
4460
+ // {
4461
+ // type: 'outline',
4462
+ // shape: 'slightly-rounded',
4463
+ // text: 'Read More',
4464
+ // color: 'rgb(250, 250, 250)',
4465
+ // bg: 'transparent',
4466
+ // hoverBg: '#fff',
4467
+ // hoverColor: 'rgb(0, 0, 0)'
4468
+ // },
4469
+ {
4448
4470
  type: 'solid',
4449
4471
  shape: 'slightly-rounded',
4450
4472
  text: 'Read More',
@@ -4553,7 +4575,7 @@ const BUTTON_PRESETS = [
4553
4575
  type: 'solid',
4554
4576
  shape: 'square',
4555
4577
  text: 'Read More',
4556
- color: 'rgb(24, 24, 27)',
4578
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4557
4579
  bg: 'transparent',
4558
4580
  hoverBg: 'transparent',
4559
4581
  customClasses: 'underline px-0'
@@ -4561,33 +4583,35 @@ const BUTTON_PRESETS = [
4561
4583
  type: 'outline',
4562
4584
  shape: 'square',
4563
4585
  text: 'Read More',
4564
- color: 'rgb(24, 24, 27)',
4586
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4565
4587
  bg: 'transparent',
4566
- hoverBg: 'rgb(24, 24, 27)',
4567
- hoverColor: 'rgb(255, 255, 255)'
4588
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4589
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
4568
4590
  }, {
4569
4591
  type: 'solid',
4570
4592
  shape: 'square',
4571
4593
  text: 'Read More',
4572
- color: 'rgb(24, 24, 27)',
4573
- bg: 'rgb(240, 240, 241)',
4574
- hoverBg: 'rgb(236, 236, 238)'
4594
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4595
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
4596
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
4575
4597
  }, {
4576
4598
  type: 'solid',
4577
4599
  shape: 'square',
4578
4600
  text: 'Read More',
4579
- color: 'rgb(250, 250, 250)',
4580
- bg: 'rgb(24, 24, 27)',
4581
- hoverBg: 'rgb(63, 63, 70)'
4582
- }, {
4583
- type: 'outline',
4584
- shape: 'square',
4585
- text: 'Read More',
4586
- color: 'rgb(250, 250, 250)',
4587
- bg: 'transparent',
4588
- hoverBg: '#fff',
4589
- hoverColor: 'rgb(0, 0, 0)'
4590
- }, {
4601
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
4602
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4603
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
4604
+ },
4605
+ // {
4606
+ // type: 'outline',
4607
+ // shape: 'square',
4608
+ // text: 'Read More',
4609
+ // color: 'rgb(250, 250, 250)',
4610
+ // bg: 'transparent',
4611
+ // hoverBg: '#fff',
4612
+ // hoverColor: 'rgb(0, 0, 0)'
4613
+ // },
4614
+ {
4591
4615
  type: 'solid',
4592
4616
  shape: 'square',
4593
4617
  text: 'Read More',
@@ -4697,7 +4721,7 @@ const BUTTON_PRESETS = [
4697
4721
  shape: 'rounded',
4698
4722
  size: 'small',
4699
4723
  text: 'Read More',
4700
- color: 'rgb(24, 24, 27)',
4724
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4701
4725
  bg: 'transparent',
4702
4726
  hoverBg: 'transparent',
4703
4727
  customClasses: 'underline'
@@ -4706,36 +4730,38 @@ const BUTTON_PRESETS = [
4706
4730
  shape: 'rounded',
4707
4731
  size: 'small',
4708
4732
  text: 'Read More',
4709
- color: 'rgb(24, 24, 27)',
4733
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4710
4734
  bg: 'transparent',
4711
- hoverBg: 'rgb(24, 24, 27)',
4712
- hoverColor: 'rgb(255, 255, 255)'
4735
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4736
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
4713
4737
  }, {
4714
4738
  type: 'solid',
4715
4739
  shape: 'rounded',
4716
4740
  size: 'small',
4717
4741
  text: 'Read More',
4718
- color: 'rgb(24, 24, 27)',
4719
- bg: 'rgb(240, 240, 241)',
4720
- hoverBg: 'rgb(236, 236, 238)'
4742
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4743
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
4744
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
4721
4745
  }, {
4722
4746
  type: 'solid',
4723
4747
  shape: 'rounded',
4724
4748
  size: 'small',
4725
4749
  text: 'Read More',
4726
- color: 'rgb(250, 250, 250)',
4727
- bg: 'rgb(24, 24, 27)',
4728
- hoverBg: 'rgb(63, 63, 70)'
4729
- }, {
4730
- type: 'outline',
4731
- shape: 'rounded',
4732
- size: 'small',
4733
- text: 'Read More',
4734
- color: 'rgb(250, 250, 250)',
4735
- bg: 'transparent',
4736
- hoverBg: '#fff',
4737
- hoverColor: 'rgb(0, 0, 0)'
4738
- }, {
4750
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
4751
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4752
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
4753
+ },
4754
+ // {
4755
+ // type: 'outline',
4756
+ // shape: 'rounded',
4757
+ // size: 'small',
4758
+ // text: 'Read More',
4759
+ // color: 'rgb(250, 250, 250)',
4760
+ // bg: 'transparent',
4761
+ // hoverBg: '#fff',
4762
+ // hoverColor: 'rgb(0, 0, 0)'
4763
+ // },
4764
+ {
4739
4765
  type: 'solid',
4740
4766
  shape: 'rounded',
4741
4767
  size: 'small',
@@ -4848,7 +4874,7 @@ const BUTTON_PRESETS = [
4848
4874
  shape: 'slightly-rounded',
4849
4875
  size: 'small',
4850
4876
  text: 'Read More',
4851
- color: 'rgb(24, 24, 27)',
4877
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4852
4878
  bg: 'transparent',
4853
4879
  hoverBg: 'transparent',
4854
4880
  customClasses: 'underline'
@@ -4857,36 +4883,38 @@ const BUTTON_PRESETS = [
4857
4883
  shape: 'slightly-rounded',
4858
4884
  size: 'small',
4859
4885
  text: 'Read More',
4860
- color: 'rgb(24, 24, 27)',
4886
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4861
4887
  bg: 'transparent',
4862
- hoverBg: 'rgb(24, 24, 27)',
4863
- hoverColor: 'rgb(255, 255, 255)'
4888
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4889
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
4864
4890
  }, {
4865
4891
  type: 'solid',
4866
4892
  shape: 'slightly-rounded',
4867
4893
  size: 'small',
4868
4894
  text: 'Read More',
4869
- color: 'rgb(24, 24, 27)',
4870
- bg: 'rgb(240, 240, 241)',
4871
- hoverBg: 'rgb(236, 236, 238)'
4895
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
4896
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
4897
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
4872
4898
  }, {
4873
4899
  type: 'solid',
4874
4900
  shape: 'slightly-rounded',
4875
4901
  size: 'small',
4876
4902
  text: 'Read More',
4877
- color: 'rgb(250, 250, 250)',
4878
- bg: 'rgb(24, 24, 27)',
4879
- hoverBg: 'rgb(63, 63, 70)'
4880
- }, {
4881
- type: 'outline',
4882
- shape: 'slightly-rounded',
4883
- size: 'small',
4884
- text: 'Read More',
4885
- color: 'rgb(250, 250, 250)',
4886
- bg: 'transparent',
4887
- hoverBg: '#fff',
4888
- hoverColor: 'rgb(0, 0, 0)'
4889
- }, {
4903
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
4904
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
4905
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
4906
+ },
4907
+ // {
4908
+ // type: 'outline',
4909
+ // shape: 'slightly-rounded',
4910
+ // size: 'small',
4911
+ // text: 'Read More',
4912
+ // color: 'rgb(250, 250, 250)',
4913
+ // bg: 'transparent',
4914
+ // hoverBg: '#fff',
4915
+ // hoverColor: 'rgb(0, 0, 0)'
4916
+ // },
4917
+ {
4890
4918
  type: 'solid',
4891
4919
  shape: 'slightly-rounded',
4892
4920
  size: 'small',
@@ -4999,7 +5027,7 @@ const BUTTON_PRESETS = [
4999
5027
  shape: 'rounded',
5000
5028
  size: 'large',
5001
5029
  text: 'Read More',
5002
- color: 'rgb(24, 24, 27)',
5030
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5003
5031
  bg: 'transparent',
5004
5032
  hoverBg: 'transparent',
5005
5033
  customClasses: 'underline'
@@ -5008,36 +5036,38 @@ const BUTTON_PRESETS = [
5008
5036
  shape: 'rounded',
5009
5037
  size: 'large',
5010
5038
  text: 'Read More',
5011
- color: 'rgb(24, 24, 27)',
5039
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5012
5040
  bg: 'transparent',
5013
- hoverBg: 'rgb(24, 24, 27)',
5014
- hoverColor: 'rgb(255, 255, 255)'
5041
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
5042
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
5015
5043
  }, {
5016
5044
  type: 'solid',
5017
5045
  shape: 'rounded',
5018
5046
  size: 'large',
5019
5047
  text: 'Read More',
5020
- color: 'rgb(24, 24, 27)',
5021
- bg: 'rgb(240, 240, 241)',
5022
- hoverBg: 'rgb(236, 236, 238)'
5048
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5049
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
5050
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
5023
5051
  }, {
5024
5052
  type: 'solid',
5025
5053
  shape: 'rounded',
5026
5054
  size: 'large',
5027
5055
  text: 'Read More',
5028
- color: 'rgb(250, 250, 250)',
5029
- bg: 'rgb(24, 24, 27)',
5030
- hoverBg: 'rgb(63, 63, 70)'
5031
- }, {
5032
- type: 'outline',
5033
- shape: 'rounded',
5034
- size: 'large',
5035
- text: 'Read More',
5036
- color: 'rgb(250, 250, 250)',
5037
- bg: 'transparent',
5038
- hoverBg: '#fff',
5039
- hoverColor: 'rgb(0, 0, 0)'
5040
- }, {
5056
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
5057
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
5058
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
5059
+ },
5060
+ // {
5061
+ // type: 'outline',
5062
+ // shape: 'rounded',
5063
+ // size: 'large',
5064
+ // text: 'Read More',
5065
+ // color: 'rgb(250, 250, 250)',
5066
+ // bg: 'transparent',
5067
+ // hoverBg: '#fff',
5068
+ // hoverColor: 'rgb(0, 0, 0)'
5069
+ // },
5070
+ {
5041
5071
  type: 'solid',
5042
5072
  shape: 'rounded',
5043
5073
  size: 'large',
@@ -5150,7 +5180,7 @@ const BUTTON_PRESETS = [
5150
5180
  shape: 'slightly-rounded',
5151
5181
  size: 'large',
5152
5182
  text: 'Read More',
5153
- color: 'rgb(24, 24, 27)',
5183
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5154
5184
  bg: 'transparent',
5155
5185
  hoverBg: 'transparent',
5156
5186
  customClasses: 'underline'
@@ -5159,36 +5189,38 @@ const BUTTON_PRESETS = [
5159
5189
  shape: 'slightly-rounded',
5160
5190
  size: 'large',
5161
5191
  text: 'Read More',
5162
- color: 'rgb(24, 24, 27)',
5192
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5163
5193
  bg: 'transparent',
5164
- hoverBg: 'rgb(24, 24, 27)',
5165
- hoverColor: 'rgb(255, 255, 255)'
5194
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
5195
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
5166
5196
  }, {
5167
5197
  type: 'solid',
5168
5198
  shape: 'slightly-rounded',
5169
5199
  size: 'large',
5170
5200
  text: 'Read More',
5171
- color: 'rgb(24, 24, 27)',
5172
- bg: 'rgb(240, 240, 241)',
5173
- hoverBg: 'rgb(236, 236, 238)'
5201
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5202
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
5203
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
5174
5204
  }, {
5175
5205
  type: 'solid',
5176
5206
  shape: 'slightly-rounded',
5177
5207
  size: 'large',
5178
5208
  text: 'Read More',
5179
- color: 'rgb(250, 250, 250)',
5180
- bg: 'rgb(24, 24, 27)',
5181
- hoverBg: 'rgb(63, 63, 70)'
5182
- }, {
5183
- type: 'outline',
5184
- shape: 'slightly-rounded',
5185
- size: 'large',
5186
- text: 'Read More',
5187
- color: 'rgb(250, 250, 250)',
5188
- bg: 'transparent',
5189
- hoverBg: '#fff',
5190
- hoverColor: 'rgb(0, 0, 0)'
5191
- }, {
5209
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
5210
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
5211
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
5212
+ },
5213
+ // {
5214
+ // type: 'outline',
5215
+ // shape: 'slightly-rounded',
5216
+ // size: 'large',
5217
+ // text: 'Read More',
5218
+ // color: 'rgb(250, 250, 250)',
5219
+ // bg: 'transparent',
5220
+ // hoverBg: '#fff',
5221
+ // hoverColor: 'rgb(0, 0, 0)'
5222
+ // },
5223
+ {
5192
5224
  type: 'solid',
5193
5225
  shape: 'slightly-rounded',
5194
5226
  size: 'large',
@@ -5301,7 +5333,7 @@ const BUTTON_PRESETS = [
5301
5333
  shape: 'square',
5302
5334
  size: 'large',
5303
5335
  text: 'Read More',
5304
- color: 'rgb(24, 24, 27)',
5336
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5305
5337
  bg: 'transparent',
5306
5338
  hoverBg: 'transparent',
5307
5339
  customClasses: 'underline'
@@ -5310,36 +5342,38 @@ const BUTTON_PRESETS = [
5310
5342
  shape: 'square',
5311
5343
  size: 'large',
5312
5344
  text: 'Read More',
5313
- color: 'rgb(24, 24, 27)',
5345
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5314
5346
  bg: 'transparent',
5315
- hoverBg: 'rgb(24, 24, 27)',
5316
- hoverColor: 'rgb(255, 255, 255)'
5347
+ hoverBg: 'var(--cb-mode-button, rgb(24, 24, 27))',
5348
+ hoverColor: 'var(--cb-mode-button-on, rgb(255, 255, 255))'
5317
5349
  }, {
5318
5350
  type: 'solid',
5319
5351
  shape: 'square',
5320
5352
  size: 'large',
5321
5353
  text: 'Read More',
5322
- color: 'rgb(24, 24, 27)',
5323
- bg: 'rgb(240, 240, 241)',
5324
- hoverBg: 'rgb(236, 236, 238)'
5354
+ color: 'var(--cb-mode-button, rgb(24, 24, 27))',
5355
+ bg: 'var(--cb-mode-button-soft, rgb(240, 240, 241))',
5356
+ hoverBg: 'var(--cb-mode-button-soft-hover, rgb(236, 236, 238))'
5325
5357
  }, {
5326
5358
  type: 'solid',
5327
5359
  shape: 'square',
5328
5360
  size: 'large',
5329
5361
  text: 'Read More',
5330
- color: 'rgb(250, 250, 250)',
5331
- bg: 'rgb(24, 24, 27)',
5332
- hoverBg: 'rgb(63, 63, 70)'
5333
- }, {
5334
- type: 'outline',
5335
- shape: 'square',
5336
- size: 'large',
5337
- text: 'Read More',
5338
- color: 'rgb(250, 250, 250)',
5339
- bg: 'transparent',
5340
- hoverBg: '#fff',
5341
- hoverColor: 'rgb(0, 0, 0)'
5342
- }, {
5362
+ color: 'var(--cb-mode-button-on, rgb(250, 250, 250))',
5363
+ bg: 'var(--cb-mode-button, rgb(24, 24, 27))',
5364
+ hoverBg: 'var(--cb-mode-button-hover, rgb(63, 63, 70))'
5365
+ },
5366
+ // {
5367
+ // type: 'outline',
5368
+ // shape: 'square',
5369
+ // size: 'large',
5370
+ // text: 'Read More',
5371
+ // color: 'rgb(250, 250, 250)',
5372
+ // bg: 'transparent',
5373
+ // hoverBg: '#fff',
5374
+ // hoverColor: 'rgb(0, 0, 0)'
5375
+ // },
5376
+ {
5343
5377
  type: 'solid',
5344
5378
  shape: 'square',
5345
5379
  size: 'large',
@@ -31813,7 +31847,7 @@ class ButtonEditor {
31813
31847
 
31814
31848
  const dom = this.dom;
31815
31849
  let current = '';
31816
- if (cmd === 'color-bg') current = el.style.backgroundColor || dom.getStyle(el, 'background-color');else if (cmd === 'color-text') current = el.style.color || dom.getStyle(el, 'color');else if (cmd === 'hover-bg') current = readButton(el).hoverBg;else if (cmd === 'hover-text') current = readButton(el).hoverColor;else if (cmd === 'hover-border') current = readButton(el).hoverBorder;
31850
+ if (cmd === 'color-bg') current = resolveColor(el, el.style.backgroundColor, 'backgroundColor') || dom.getStyle(el, 'background-color');else if (cmd === 'color-text') current = resolveColor(el, el.style.color, 'color') || dom.getStyle(el, 'color');else if (cmd === 'hover-bg') current = resolveColor(el, readButton(el).hoverBg, '--cb-hover-bg');else if (cmd === 'hover-text') current = resolveColor(el, readButton(el).hoverColor, '--cb-hover-color');else if (cmd === 'hover-border') current = resolveColor(el, readButton(el).hoverBorder, '--cb-hover-border');
31817
31851
  btn.setAttribute('data-focus', true);
31818
31852
  this.builder.colorPicker.open(color => {
31819
31853
  const el = this.getButton();
@@ -31996,9 +32030,9 @@ class ButtonEditor {
31996
32030
  this.paintSwatch('color-bg', dom.getStyle(el, 'background-color'));
31997
32031
  this.paintSwatch('color-text', dom.getStyle(el, 'color'));
31998
32032
  // Hover colours straight from the model.
31999
- this.paintSwatch('hover-bg', r.hoverBg);
32000
- this.paintSwatch('hover-text', r.hoverColor);
32001
- this.paintSwatch('hover-border', r.hoverBorder);
32033
+ this.paintSwatch('hover-bg', resolveColor(el, r.hoverBg, '--cb-hover-bg'));
32034
+ this.paintSwatch('hover-text', resolveColor(el, r.hoverColor, '--cb-hover-color'));
32035
+ this.paintSwatch('hover-border', resolveColor(el, r.hoverBorder, '--cb-hover-border'));
32002
32036
  }
32003
32037
  syncSeg(cmd, value) {
32004
32038
  this.buttonModal.querySelectorAll(`[data-cmd="${cmd}"]`).forEach(b => {
@@ -93438,21 +93472,21 @@ ON A LIGHT BACKGROUND: primary 'text-black', body 'text-gray-600', muted 'text-g
93438
93472
 
93439
93473
  ON A DARK SURFACE (a div with a dark inline background, a photo overlay): primary 'text-white', body 'text-gray-200', muted 'text-gray-300'. NEVER 'text-gray-600' or 'text-gray-700' there — they are near-black and vanish. Check every text colour against the background it actually sits on, including small labels and eyebrow text.
93440
93474
 
93441
- Read the hex values below rather than assuming a scale you know from elsewhere: here a HIGHER number is LIGHTER, so 'text-gray-300' is nearly white and 'text-gray-700' is nearly black.
93475
+ A HIGHER number is DARKER: 'text-gray-200' and 'text-gray-300' are light, 'text-gray-600' and 'text-gray-700' are dark.
93442
93476
 
93443
93477
  | Class | Color |
93444
93478
  |-------|-------|
93445
93479
  | '.text-black' | #000 |
93446
93480
  | '.text-gray-700' | #374151 |
93447
- | '.text-gray-600' | #6b7280 |
93448
- | '.text-gray-500' | #9ca3af |
93449
- | '.text-gray-400' | #d1d5db |
93450
- | '.text-gray-300' | #e5e7eb |
93451
- | '.text-gray-200' | #f3f4f6 |
93481
+ | '.text-gray-600' | #4b5563 |
93482
+ | '.text-gray-500' | #6b7280 |
93483
+ | '.text-gray-400' | #9ca3af |
93484
+ | '.text-gray-300' | #d1d5db |
93485
+ | '.text-gray-200' | #e5e7eb |
93452
93486
 
93453
93487
  ### Background Colors
93454
93488
 
93455
- '.bg-white' #ffffff · '.bg-gray-50' #fafafa · '.bg-gray-100' #f3f4f6 · '.bg-black' #000000
93489
+ '.bg-white' #ffffff · '.bg-gray-50' #f9fafb · '.bg-gray-100' #f3f4f6 · '.bg-black' #000000
93456
93490
 
93457
93491
  Editorial style: stick to black, white and grays; use color sparingly for accents.
93458
93492
 
@@ -96324,7 +96358,9 @@ class ContentBuilder {
96324
96358
  let inputFocused = document.activeElement.tagName.toLowerCase() === 'input';
96325
96359
 
96326
96360
  // let insideEditable = this.doc.activeElement && this.doc.activeElement.closest('[contenteditable]');
96327
- let insideEditable = target.closest('[contenteditable]');
96361
+ // contenteditable="false" (a plugin sealed off, eg. a video in an overlay) is not editable
96362
+ const editableHost = target.closest('[contenteditable]');
96363
+ let insideEditable = editableHost && editableHost.getAttribute('contenteditable') !== 'false';
96328
96364
 
96329
96365
  // if(!document.querySelector('.is-modal.active')) { // Additional (to prevent lost focus)
96330
96366
  let openedModal = document.querySelector('.is-modal.active:not(.is-modal-content)');