@lvce-editor/settings-view 1.15.0 → 1.16.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.
@@ -1044,6 +1044,11 @@ const diff = (oldState, newState) => {
1044
1044
  const diffResult = [];
1045
1045
  for (let i = 0; i < modules.length; i++) {
1046
1046
  const fn = modules[i];
1047
+
1048
+ // TODO enable this
1049
+ if (numbers[i] === RenderScrollOffset) {
1050
+ continue;
1051
+ }
1047
1052
  if (!fn(oldState, newState)) {
1048
1053
  diffResult.push(numbers[i]);
1049
1054
  }
@@ -1239,6 +1244,7 @@ const String = 2;
1239
1244
  const Boolean$1 = 3;
1240
1245
  const Number$1 = 5;
1241
1246
  const Color = 6;
1247
+ const Url = 7;
1242
1248
 
1243
1249
  const emptyObject = {};
1244
1250
  const RE_PLACEHOLDER = /\{(PH\d+)\}/g;
@@ -3728,6 +3734,33 @@ const getItemUnknownVirtualDom = () => {
3728
3734
  }, text(unknownSettingType())];
3729
3735
  };
3730
3736
 
3737
+ const getItemUrlVirtualDom = item => {
3738
+ const {
3739
+ heading,
3740
+ description,
3741
+ id,
3742
+ modified
3743
+ } = item;
3744
+ const domId = getInputId(id);
3745
+ const isModified = modified || false;
3746
+ return [{
3747
+ type: VirtualDomElements.Div,
3748
+ className: SettingsItem,
3749
+ childCount: 3,
3750
+ role: 'group',
3751
+ 'data-modified': isModified
3752
+ }, ...getItemHeadingDom(heading), ...getItemLabelDom(domId, description), {
3753
+ type: VirtualDomElements.Input,
3754
+ className: InputBox,
3755
+ inputType: 'url',
3756
+ placeholder: numberValue(),
3757
+ childCount: 0,
3758
+ id: domId,
3759
+ name: id,
3760
+ onInput: HandleSettingInput
3761
+ }];
3762
+ };
3763
+
3731
3764
  const getItemVirtualDom = item => {
3732
3765
  if (item.type === Number$1) {
3733
3766
  return getItemNumberVirtualDom(item);
@@ -3744,6 +3777,9 @@ const getItemVirtualDom = item => {
3744
3777
  if (item.type === Color) {
3745
3778
  return getItemColorVirtualDom(item);
3746
3779
  }
3780
+ if (item.type === Url) {
3781
+ return getItemUrlVirtualDom(item);
3782
+ }
3747
3783
  return getItemUnknownVirtualDom();
3748
3784
  };
3749
3785
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/settings-view",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",