smoothly 0.1.113 → 0.1.114

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.
@@ -85,8 +85,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
85
85
  exports.StateEditor = void 0;
86
86
  class StateEditor {
87
87
  constructor(state) {
88
+ var _a, _b, _c;
88
89
  this.value = state.value;
89
- this.selection = { start: state.selection.start, end: state.selection.end, direction: state.selection.direction };
90
+ this.selection = { start: (_a = state.selection) === null || _a === void 0 ? void 0 : _a.start, end: (_b = state.selection) === null || _b === void 0 ? void 0 : _b.end, direction: (_c = state.selection) === null || _c === void 0 ? void 0 : _c.direction };
90
91
  }
91
92
  get(index, length = 1) {
92
93
  return this.value.substr(index, length);
@@ -633,12 +634,12 @@ class Handler extends Base_1.Base {
633
634
  super(seperator);
634
635
  }
635
636
  toString(data) {
636
- return data.length == 10
637
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
637
638
  ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
638
639
  : "";
639
640
  }
640
641
  fromString(value) {
641
- const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
642
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
642
643
  return index$3.dist.Date.is(result) ? result : undefined;
643
644
  }
644
645
  format(unformatted) {
@@ -689,7 +690,7 @@ class Handler extends Base_1.Base {
689
690
  super(seperator);
690
691
  }
691
692
  toString(data) {
692
- return data.length == 10
693
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
693
694
  ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
694
695
  : "";
695
696
  }
@@ -743,7 +744,7 @@ class Handler extends Base_1.Base {
743
744
  return typeof data != "string" ? "" : data;
744
745
  }
745
746
  fromString(value) {
746
- const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
747
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
747
748
  return index$3.dist.Date.is(result) ? result : undefined;
748
749
  }
749
750
  format(unformatted) {
@@ -37490,8 +37490,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
37490
37490
  exports.StateEditor = void 0;
37491
37491
  class StateEditor {
37492
37492
  constructor(state) {
37493
+ var _a, _b, _c;
37493
37494
  this.value = state.value;
37494
- this.selection = { start: state.selection.start, end: state.selection.end, direction: state.selection.direction };
37495
+ this.selection = { start: (_a = state.selection) === null || _a === void 0 ? void 0 : _a.start, end: (_b = state.selection) === null || _b === void 0 ? void 0 : _b.end, direction: (_c = state.selection) === null || _c === void 0 ? void 0 : _c.direction };
37495
37496
  }
37496
37497
  get(index, length = 1) {
37497
37498
  return this.value.substr(index, length);
@@ -38008,12 +38009,12 @@ class Handler extends Base_1.Base {
38008
38009
  super(seperator);
38009
38010
  }
38010
38011
  toString(data) {
38011
- return data.length == 10
38012
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
38012
38013
  ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
38013
38014
  : "";
38014
38015
  }
38015
38016
  fromString(value) {
38016
- const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
38017
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
38017
38018
  return dist$3.Date.is(result) ? result : undefined;
38018
38019
  }
38019
38020
  format(unformatted) {
@@ -38061,7 +38062,7 @@ class Handler extends Base_1.Base {
38061
38062
  super(seperator);
38062
38063
  }
38063
38064
  toString(data) {
38064
- return data.length == 10
38065
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
38065
38066
  ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
38066
38067
  : "";
38067
38068
  }
@@ -38112,7 +38113,7 @@ class Handler extends Base_1.Base {
38112
38113
  return typeof data != "string" ? "" : data;
38113
38114
  }
38114
38115
  fromString(value) {
38115
- const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
38116
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
38116
38117
  return dist$3.Date.is(result) ? result : undefined;
38117
38118
  }
38118
38119
  format(unformatted) {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-138c41c2.js');
6
- const index$1 = require('./index-d66869d7.js');
6
+ const index$1 = require('./index-36da3c23.js');
7
7
  require('./_commonjsHelpers-10109b76.js');
8
8
  require('./index-ac32385c.js');
9
9
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-138c41c2.js');
6
6
  const index$2 = require('./index-ac32385c.js');
7
- const index$1 = require('./index-d66869d7.js');
7
+ const index$1 = require('./index-36da3c23.js');
8
8
  require('./_commonjsHelpers-10109b76.js');
9
9
 
10
10
  const styleCss = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight);padding:var(--padding);overflow:hidden;background-color:rgb(var(--background-color));color:rgb(var(--text-color, var(--smoothly-default-contrast)))}[hidden].sc-smoothly-input-h{display:none}.sc-smoothly-input-h>div.sc-smoothly-input{position:relative;width:100%;height:100%}label.sc-smoothly-input{position:absolute;left:0.4em;top:0.6em;color:rgb(var(--text-color, var(--smoothly-default-contrast)));opacity:0.8;user-select:none;cursor:inherit;transition:transform 0.1s;transform-origin:top left;transition-timing-function:ease}.sc-smoothly-input-h:not([show-label]) label.sc-smoothly-input{display:none}.sc-smoothly-input-h:not([show-label]) input.sc-smoothly-input{padding:0.7em 0.3em 0.7em 0.4em}input.sc-smoothly-input{padding:1.2em 0.3em 0.2em 0.4em;box-sizing:border-box;width:100%;height:100%;background:none;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family);background-color:rgb(var(--background-color))}smoothly-icon.sc-smoothly-input{display:none;position:absolute;right:0.2em;top:0.6em}input.sc-smoothly-input:invalid+label.sc-smoothly-input+smoothly-icon.sc-smoothly-input{display:block}.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{z-index:1;pointer-events:none}.has-value.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input,.sc-smoothly-input-h:focus-within>div.sc-smoothly-input>label.sc-smoothly-input{top:0.4em;transform:scale(0.6)}input.sc-smoothly-input:focus{outline:none}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill:hover,input.sc-smoothly-input:-webkit-autofill:focus,input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 40em rgb(var(--background-color)) inset;-webkit-box-shadow:0 0 0 40em rgb(var(--background-color)) inset}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill+label.sc-smoothly-input{-webkit-text-fill-color:rgb(var(--text-color, var(--smoothly-default-contrast)))}";
@@ -40362,8 +40362,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
40362
40362
  exports.StateEditor = void 0;
40363
40363
  class StateEditor {
40364
40364
  constructor(state) {
40365
+ var _a, _b, _c;
40365
40366
  this.value = state.value;
40366
- this.selection = { start: state.selection.start, end: state.selection.end, direction: state.selection.direction };
40367
+ this.selection = { start: (_a = state.selection) === null || _a === void 0 ? void 0 : _a.start, end: (_b = state.selection) === null || _b === void 0 ? void 0 : _b.end, direction: (_c = state.selection) === null || _c === void 0 ? void 0 : _c.direction };
40367
40368
  }
40368
40369
  get(index, length = 1) {
40369
40370
  return this.value.substr(index, length);
@@ -40910,12 +40911,12 @@ class Handler extends Base_1.Base {
40910
40911
  super(seperator);
40911
40912
  }
40912
40913
  toString(data) {
40913
- return data.length == 10
40914
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
40914
40915
  ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
40915
40916
  : "";
40916
40917
  }
40917
40918
  fromString(value) {
40918
- const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
40919
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
40919
40920
  return dist$3.Date.is(result) ? result : undefined;
40920
40921
  }
40921
40922
  format(unformatted) {
@@ -40966,7 +40967,7 @@ class Handler extends Base_1.Base {
40966
40967
  super(seperator);
40967
40968
  }
40968
40969
  toString(data) {
40969
- return data.length == 10
40970
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
40970
40971
  ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
40971
40972
  : "";
40972
40973
  }
@@ -41020,7 +41021,7 @@ class Handler extends Base_1.Base {
41020
41021
  return typeof data != "string" ? "" : data;
41021
41022
  }
41022
41023
  fromString(value) {
41023
- const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
41024
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
41024
41025
  return dist$3.Date.is(result) ? result : undefined;
41025
41026
  }
41026
41027
  format(unformatted) {
@@ -83,8 +83,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
83
83
  exports.StateEditor = void 0;
84
84
  class StateEditor {
85
85
  constructor(state) {
86
+ var _a, _b, _c;
86
87
  this.value = state.value;
87
- this.selection = { start: state.selection.start, end: state.selection.end, direction: state.selection.direction };
88
+ this.selection = { start: (_a = state.selection) === null || _a === void 0 ? void 0 : _a.start, end: (_b = state.selection) === null || _b === void 0 ? void 0 : _b.end, direction: (_c = state.selection) === null || _c === void 0 ? void 0 : _c.direction };
88
89
  }
89
90
  get(index, length = 1) {
90
91
  return this.value.substr(index, length);
@@ -631,12 +632,12 @@ class Handler extends Base_1.Base {
631
632
  super(seperator);
632
633
  }
633
634
  toString(data) {
634
- return data.length == 10
635
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
635
636
  ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
636
637
  : "";
637
638
  }
638
639
  fromString(value) {
639
- const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
640
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
640
641
  return dist$1.Date.is(result) ? result : undefined;
641
642
  }
642
643
  format(unformatted) {
@@ -687,7 +688,7 @@ class Handler extends Base_1.Base {
687
688
  super(seperator);
688
689
  }
689
690
  toString(data) {
690
- return data.length == 10
691
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
691
692
  ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
692
693
  : "";
693
694
  }
@@ -741,7 +742,7 @@ class Handler extends Base_1.Base {
741
742
  return typeof data != "string" ? "" : data;
742
743
  }
743
744
  fromString(value) {
744
- const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
745
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
745
746
  return dist$1.Date.is(result) ? result : undefined;
746
747
  }
747
748
  format(unformatted) {
@@ -37486,8 +37486,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
37486
37486
  exports.StateEditor = void 0;
37487
37487
  class StateEditor {
37488
37488
  constructor(state) {
37489
+ var _a, _b, _c;
37489
37490
  this.value = state.value;
37490
- this.selection = { start: state.selection.start, end: state.selection.end, direction: state.selection.direction };
37491
+ this.selection = { start: (_a = state.selection) === null || _a === void 0 ? void 0 : _a.start, end: (_b = state.selection) === null || _b === void 0 ? void 0 : _b.end, direction: (_c = state.selection) === null || _c === void 0 ? void 0 : _c.direction };
37491
37492
  }
37492
37493
  get(index, length = 1) {
37493
37494
  return this.value.substr(index, length);
@@ -38004,12 +38005,12 @@ class Handler extends Base_1.Base {
38004
38005
  super(seperator);
38005
38006
  }
38006
38007
  toString(data) {
38007
- return data.length == 10
38008
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
38008
38009
  ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
38009
38010
  : "";
38010
38011
  }
38011
38012
  fromString(value) {
38012
- const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
38013
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
38013
38014
  return dist$3.Date.is(result) ? result : undefined;
38014
38015
  }
38015
38016
  format(unformatted) {
@@ -38057,7 +38058,7 @@ class Handler extends Base_1.Base {
38057
38058
  super(seperator);
38058
38059
  }
38059
38060
  toString(data) {
38060
- return data.length == 10
38061
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
38061
38062
  ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
38062
38063
  : "";
38063
38064
  }
@@ -38108,7 +38109,7 @@ class Handler extends Base_1.Base {
38108
38109
  return typeof data != "string" ? "" : data;
38109
38110
  }
38110
38111
  fromString(value) {
38111
- const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
38112
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
38112
38113
  return dist$3.Date.is(result) ? result : undefined;
38113
38114
  }
38114
38115
  format(unformatted) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h } from './index-02a70ac1.js';
2
- import { d as dist } from './index-401c6ce3.js';
2
+ import { d as dist } from './index-d1360bcf.js';
3
3
  import './_commonjsHelpers-8fe71198.js';
4
4
  import './index-a5a08f46.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, i as createEvent, h, k as Host } from './index-02a70ac1.js';
2
2
  import { d as dist$1 } from './index-a5a08f46.js';
3
- import { d as dist } from './index-401c6ce3.js';
3
+ import { d as dist } from './index-d1360bcf.js';
4
4
  import './_commonjsHelpers-8fe71198.js';
5
5
 
6
6
  const styleCss = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight);padding:var(--padding);overflow:hidden;background-color:rgb(var(--background-color));color:rgb(var(--text-color, var(--smoothly-default-contrast)))}[hidden].sc-smoothly-input-h{display:none}.sc-smoothly-input-h>div.sc-smoothly-input{position:relative;width:100%;height:100%}label.sc-smoothly-input{position:absolute;left:0.4em;top:0.6em;color:rgb(var(--text-color, var(--smoothly-default-contrast)));opacity:0.8;user-select:none;cursor:inherit;transition:transform 0.1s;transform-origin:top left;transition-timing-function:ease}.sc-smoothly-input-h:not([show-label]) label.sc-smoothly-input{display:none}.sc-smoothly-input-h:not([show-label]) input.sc-smoothly-input{padding:0.7em 0.3em 0.7em 0.4em}input.sc-smoothly-input{padding:1.2em 0.3em 0.2em 0.4em;box-sizing:border-box;width:100%;height:100%;background:none;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family);background-color:rgb(var(--background-color))}smoothly-icon.sc-smoothly-input{display:none;position:absolute;right:0.2em;top:0.6em}input.sc-smoothly-input:invalid+label.sc-smoothly-input+smoothly-icon.sc-smoothly-input{display:block}.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{z-index:1;pointer-events:none}.has-value.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input,.sc-smoothly-input-h:focus-within>div.sc-smoothly-input>label.sc-smoothly-input{top:0.4em;transform:scale(0.6)}input.sc-smoothly-input:focus{outline:none}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill:hover,input.sc-smoothly-input:-webkit-autofill:focus,input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 40em rgb(var(--background-color)) inset;-webkit-box-shadow:0 0 0 40em rgb(var(--background-color)) inset}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill+label.sc-smoothly-input{-webkit-text-fill-color:rgb(var(--text-color, var(--smoothly-default-contrast)))}";
@@ -83,8 +83,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
83
83
  exports.StateEditor = void 0;
84
84
  class StateEditor {
85
85
  constructor(state) {
86
+ var _a, _b, _c;
86
87
  this.value = state.value;
87
- this.selection = { start: state.selection.start, end: state.selection.end, direction: state.selection.direction };
88
+ this.selection = { start: (_a = state.selection) === null || _a === void 0 ? void 0 : _a.start, end: (_b = state.selection) === null || _b === void 0 ? void 0 : _b.end, direction: (_c = state.selection) === null || _c === void 0 ? void 0 : _c.direction };
88
89
  }
89
90
  get(index, length = 1) {
90
91
  return this.value.substr(index, length);
@@ -631,12 +632,12 @@ class Handler extends Base_1.Base {
631
632
  super(seperator);
632
633
  }
633
634
  toString(data) {
634
- return data.length == 10
635
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
635
636
  ? [data.substring(8, 10), data.substring(5, 7), data.substring(0, 4)].join(this.seperator)
636
637
  : "";
637
638
  }
638
639
  fromString(value) {
639
- const result = value.length == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
640
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(4, 8)}-${value.substring(2, 4)}-${value.substring(0, 2)}` : undefined;
640
641
  return dist$1.Date.is(result) ? result : undefined;
641
642
  }
642
643
  format(unformatted) {
@@ -687,7 +688,7 @@ class Handler extends Base_1.Base {
687
688
  super(seperator);
688
689
  }
689
690
  toString(data) {
690
- return data.length == 10
691
+ return (data === null || data === void 0 ? void 0 : data.length) == 10
691
692
  ? [data.substring(5, 7), data.substring(8, 10), data.substring(0, 4)].join(this.seperator)
692
693
  : "";
693
694
  }
@@ -741,7 +742,7 @@ class Handler extends Base_1.Base {
741
742
  return typeof data != "string" ? "" : data;
742
743
  }
743
744
  fromString(value) {
744
- const result = value.length == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
745
+ const result = (value === null || value === void 0 ? void 0 : value.length) == 8 ? `${value.substring(0, 4)}-${value.substring(4, 6)}-${value.substring(6, 8)}` : undefined;
745
746
  return dist$1.Date.is(result) ? result : undefined;
746
747
  }
747
748
  format(unformatted) {