timered-counter 0.0.2 → 0.0.3

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.
@@ -38,7 +38,7 @@
38
38
  "text": "object"
39
39
  },
40
40
  "static": true,
41
- "default": "{ fromAttribute(value: string | null) { return CounterAdapter.NUMBER_ADAPTER.create(isNullish(value) ? 0 : value); }, toAttribute(value: unknown) { return CounterAdapter.NUMBER_ADAPTER.toString(value); }, }",
41
+ "default": "{ fromAttribute(value: string | null) { return value; }, toAttribute(value: unknown) { return isNullish(value) ? value : CounterAdapter.NUMBER_ADAPTER.toString(value); }, }",
42
42
  "description": "将 value 及其相关的属性, 在 attribute 和 property 上的互相转换.",
43
43
  "privacy": "protected"
44
44
  },
@@ -213,6 +213,26 @@
213
213
  "module": "src/mixins/counter-base.ts"
214
214
  }
215
215
  },
216
+ {
217
+ "kind": "field",
218
+ "name": "__initialValuePlain",
219
+ "type": {
220
+ "text": "any"
221
+ },
222
+ "privacy": "private",
223
+ "default": "null"
224
+ },
225
+ {
226
+ "kind": "field",
227
+ "name": "initialValue",
228
+ "description": "同 value",
229
+ "attribute": "initial-value",
230
+ "reflects": true,
231
+ "inheritedFrom": {
232
+ "name": "CounterBaseMixin",
233
+ "module": "src/mixins/counter-base.ts"
234
+ }
235
+ },
216
236
  {
217
237
  "kind": "field",
218
238
  "name": "__partsOptions",
@@ -253,15 +273,6 @@
253
273
  "privacy": "private",
254
274
  "default": "new Date()"
255
275
  },
256
- {
257
- "kind": "field",
258
- "name": "__durationInMilliseconds",
259
- "type": {
260
- "text": "number"
261
- },
262
- "privacy": "private",
263
- "default": "0"
264
- },
265
276
  {
266
277
  "kind": "field",
267
278
  "name": "__minPrecision",
@@ -752,20 +763,10 @@
752
763
  "kind": "field",
753
764
  "name": "__initialValue",
754
765
  "type": {
755
- "text": "V"
766
+ "text": "V | null"
756
767
  },
757
768
  "privacy": "private",
758
- "inheritedFrom": {
759
- "name": "CounterBaseMixin",
760
- "module": "src/mixins/counter-base.ts"
761
- }
762
- },
763
- {
764
- "kind": "field",
765
- "name": "initialValue",
766
- "description": "如果初始值被设置, 组件初始化时会使用该值而不是 `value`, 然后在初始化完成后, 将内部值更新为 `value`.\n\n这对于初始化完成后启动动画效果非常有用.",
767
- "attribute": "initial-value",
768
- "reflects": true,
769
+ "default": "null",
769
770
  "inheritedFrom": {
770
771
  "name": "CounterBaseMixin",
771
772
  "module": "src/mixins/counter-base.ts"
@@ -790,6 +791,7 @@
790
791
  "description": "自定义本地化配置, 否则从浏览器环境中获取.",
791
792
  "default": "\"en-US\"",
792
793
  "attribute": "locale",
794
+ "reflects": true,
793
795
  "inheritedFrom": {
794
796
  "name": "CounterBaseMixin",
795
797
  "module": "src/mixins/counter-base.ts"
@@ -851,20 +853,6 @@
851
853
  "module": "src/mixins/counter-base.ts"
852
854
  }
853
855
  },
854
- {
855
- "kind": "field",
856
- "name": "isValueFirstUpdate",
857
- "type": {
858
- "text": "boolean"
859
- },
860
- "privacy": "private",
861
- "default": "true",
862
- "description": "第一次更新时, changedProperties 中 value 的旧值始终为 undefined.\n因此, 当 value 第一次更新时, oldValue 的值应当来自 initialValue 或 value.\n以保证 oldValue 始终有值.",
863
- "inheritedFrom": {
864
- "name": "CounterBaseMixin",
865
- "module": "src/mixins/counter-base.ts"
866
- }
867
- },
868
856
  {
869
857
  "kind": "field",
870
858
  "name": "resizeObserver",
@@ -1156,9 +1144,18 @@
1156
1144
  "type": {
1157
1145
  "text": "string"
1158
1146
  },
1159
- "default": "'.'",
1147
+ "default": "''",
1160
1148
  "description": "本地化数字格式化配置中的小数点分隔符. 根据不同的地区可能是 `.` 或 `,`."
1161
1149
  },
1150
+ {
1151
+ "kind": "field",
1152
+ "name": "localeGroupingSeparator",
1153
+ "type": {
1154
+ "text": "string"
1155
+ },
1156
+ "default": "''",
1157
+ "description": "本地化数字格式化配置中的分组分隔符."
1158
+ },
1162
1159
  {
1163
1160
  "kind": "method",
1164
1161
  "name": "sampleToString",
@@ -1644,9 +1641,10 @@
1644
1641
  "kind": "field",
1645
1642
  "name": "__initialValue",
1646
1643
  "type": {
1647
- "text": "V"
1644
+ "text": "V | null"
1648
1645
  },
1649
1646
  "privacy": "private",
1647
+ "default": "null",
1650
1648
  "inheritedFrom": {
1651
1649
  "name": "CounterBaseMixin",
1652
1650
  "module": "src/mixins/counter-base.ts"
@@ -1682,6 +1680,7 @@
1682
1680
  "description": "自定义本地化配置, 否则从浏览器环境中获取.",
1683
1681
  "default": "\"en-US\"",
1684
1682
  "attribute": "locale",
1683
+ "reflects": true,
1685
1684
  "inheritedFrom": {
1686
1685
  "name": "CounterBaseMixin",
1687
1686
  "module": "src/mixins/counter-base.ts"
@@ -1743,20 +1742,6 @@
1743
1742
  "module": "src/mixins/counter-base.ts"
1744
1743
  }
1745
1744
  },
1746
- {
1747
- "kind": "field",
1748
- "name": "isValueFirstUpdate",
1749
- "type": {
1750
- "text": "boolean"
1751
- },
1752
- "privacy": "private",
1753
- "default": "true",
1754
- "description": "第一次更新时, changedProperties 中 value 的旧值始终为 undefined.\n因此, 当 value 第一次更新时, oldValue 的值应当来自 initialValue 或 value.\n以保证 oldValue 始终有值.",
1755
- "inheritedFrom": {
1756
- "name": "CounterBaseMixin",
1757
- "module": "src/mixins/counter-base.ts"
1758
- }
1759
- },
1760
1745
  {
1761
1746
  "kind": "field",
1762
1747
  "name": "resizeObserver",
@@ -2064,6 +2049,15 @@
2064
2049
  "privacy": "private",
2065
2050
  "default": "''"
2066
2051
  },
2052
+ {
2053
+ "kind": "field",
2054
+ "name": "__oldValueString",
2055
+ "type": {
2056
+ "text": "string"
2057
+ },
2058
+ "privacy": "private",
2059
+ "default": "''"
2060
+ },
2067
2061
  {
2068
2062
  "kind": "field",
2069
2063
  "name": "value",
@@ -2589,9 +2583,10 @@
2589
2583
  "kind": "field",
2590
2584
  "name": "__initialValue",
2591
2585
  "type": {
2592
- "text": "V"
2586
+ "text": "V | null"
2593
2587
  },
2594
2588
  "privacy": "private",
2589
+ "default": "null",
2595
2590
  "inheritedFrom": {
2596
2591
  "name": "CounterBaseMixin",
2597
2592
  "module": "src/mixins/counter-base.ts"
@@ -2616,6 +2611,7 @@
2616
2611
  "description": "自定义本地化配置, 否则从浏览器环境中获取.",
2617
2612
  "default": "\"en-US\"",
2618
2613
  "attribute": "locale",
2614
+ "reflects": true,
2619
2615
  "inheritedFrom": {
2620
2616
  "name": "CounterBaseMixin",
2621
2617
  "module": "src/mixins/counter-base.ts"
@@ -2677,20 +2673,6 @@
2677
2673
  "module": "src/mixins/counter-base.ts"
2678
2674
  }
2679
2675
  },
2680
- {
2681
- "kind": "field",
2682
- "name": "isValueFirstUpdate",
2683
- "type": {
2684
- "text": "boolean"
2685
- },
2686
- "privacy": "private",
2687
- "default": "true",
2688
- "description": "第一次更新时, changedProperties 中 value 的旧值始终为 undefined.\n因此, 当 value 第一次更新时, oldValue 的值应当来自 initialValue 或 value.\n以保证 oldValue 始终有值.",
2689
- "inheritedFrom": {
2690
- "name": "CounterBaseMixin",
2691
- "module": "src/mixins/counter-base.ts"
2692
- }
2693
- },
2694
2676
  {
2695
2677
  "kind": "field",
2696
2678
  "name": "resizeObserver",
@@ -3461,9 +3443,10 @@
3461
3443
  "kind": "field",
3462
3444
  "name": "__initialValue",
3463
3445
  "type": {
3464
- "text": "V"
3446
+ "text": "V | null"
3465
3447
  },
3466
3448
  "privacy": "private",
3449
+ "default": "null",
3467
3450
  "inheritedFrom": {
3468
3451
  "name": "CounterBaseMixin",
3469
3452
  "module": "src/mixins/counter-base.ts"
@@ -3499,6 +3482,7 @@
3499
3482
  "description": "自定义本地化配置, 否则从浏览器环境中获取.",
3500
3483
  "default": "\"en-US\"",
3501
3484
  "attribute": "locale",
3485
+ "reflects": true,
3502
3486
  "inheritedFrom": {
3503
3487
  "name": "CounterBaseMixin",
3504
3488
  "module": "src/mixins/counter-base.ts"
@@ -3559,20 +3543,6 @@
3559
3543
  "name": "CounterBaseMixin",
3560
3544
  "module": "src/mixins/counter-base.ts"
3561
3545
  }
3562
- },
3563
- {
3564
- "kind": "field",
3565
- "name": "isValueFirstUpdate",
3566
- "type": {
3567
- "text": "boolean"
3568
- },
3569
- "privacy": "private",
3570
- "default": "true",
3571
- "description": "第一次更新时, changedProperties 中 value 的旧值始终为 undefined.\n因此, 当 value 第一次更新时, oldValue 的值应当来自 initialValue 或 value.\n以保证 oldValue 始终有值.",
3572
- "inheritedFrom": {
3573
- "name": "CounterBaseMixin",
3574
- "module": "src/mixins/counter-base.ts"
3575
- }
3576
3546
  }
3577
3547
  ],
3578
3548
  "events": [
@@ -4775,9 +4745,10 @@
4775
4745
  "kind": "field",
4776
4746
  "name": "__initialValue",
4777
4747
  "type": {
4778
- "text": "V"
4748
+ "text": "V | null"
4779
4749
  },
4780
- "privacy": "private"
4750
+ "privacy": "private",
4751
+ "default": "null"
4781
4752
  },
4782
4753
  {
4783
4754
  "kind": "field",
@@ -4800,7 +4771,8 @@
4800
4771
  "name": "locale",
4801
4772
  "description": "自定义本地化配置, 否则从浏览器环境中获取.",
4802
4773
  "default": "\"en-US\"",
4803
- "attribute": "locale"
4774
+ "attribute": "locale",
4775
+ "reflects": true
4804
4776
  },
4805
4777
  {
4806
4778
  "kind": "field",
@@ -4837,16 +4809,6 @@
4837
4809
  "type": {
4838
4810
  "text": "StringAdapter"
4839
4811
  }
4840
- },
4841
- {
4842
- "kind": "field",
4843
- "name": "isValueFirstUpdate",
4844
- "type": {
4845
- "text": "boolean"
4846
- },
4847
- "privacy": "private",
4848
- "default": "true",
4849
- "description": "第一次更新时, changedProperties 中 value 的旧值始终为 undefined.\n因此, 当 value 第一次更新时, oldValue 的值应当来自 initialValue 或 value.\n以保证 oldValue 始终有值."
4850
4812
  }
4851
4813
  ],
4852
4814
  "attributes": [
@@ -5632,213 +5594,124 @@
5632
5594
  },
5633
5595
  {
5634
5596
  "kind": "javascript-module",
5635
- "path": "src/types/duration.ts",
5597
+ "path": "stories/story-parts/animation-events.ts",
5636
5598
  "declarations": [
5637
5599
  {
5638
- "kind": "variable",
5639
- "name": "DurationPartMillisecond",
5640
- "type": {
5641
- "text": "{\n [DurationPartType.Millisecond]: 1,\n [DurationPartType.Second]: 1000,\n [DurationPartType.Minute]: 60000,\n [DurationPartType.Hour]: 3600000,\n [DurationPartType.Day]: 86400000,\n [DurationPartType.Week]: 604800000,\n [DurationPartType.Month]: 2629800000,\n [DurationPartType.Quarter]: 7889400000,\n [DurationPartType.Year]: 31557600000,\n}"
5642
- },
5643
- "default": "{ [DurationPartType.Millisecond]: 1, [DurationPartType.Second]: 1000, [DurationPartType.Minute]: 60000, [DurationPartType.Hour]: 3600000, [DurationPartType.Day]: 86400000, [DurationPartType.Week]: 604800000, [DurationPartType.Month]: 2629800000, [DurationPartType.Quarter]: 7889400000, [DurationPartType.Year]: 31557600000, }"
5644
- },
5645
- {
5646
- "kind": "variable",
5647
- "name": "DurationPartMillisecondToType",
5648
- "type": {
5649
- "text": "{\n 1: DurationPartType.Millisecond,\n 1000: DurationPartType.Second,\n 60000: DurationPartType.Minute,\n 3600000: DurationPartType.Hour,\n 86400000: DurationPartType.Day,\n 604800000: DurationPartType.Week,\n 2629800000: DurationPartType.Month,\n 7889400000: DurationPartType.Quarter,\n 31557600000: DurationPartType.Year,\n}"
5650
- },
5651
- "default": "{ 1: DurationPartType.Millisecond, 1000: DurationPartType.Second, 60000: DurationPartType.Minute, 3600000: DurationPartType.Hour, 86400000: DurationPartType.Day, 604800000: DurationPartType.Week, 2629800000: DurationPartType.Month, 7889400000: DurationPartType.Quarter, 31557600000: DurationPartType.Year, }"
5600
+ "kind": "function",
5601
+ "name": "animationEvents",
5602
+ "parameters": [
5603
+ {
5604
+ "name": "context",
5605
+ "type": {
5606
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5607
+ }
5608
+ },
5609
+ {
5610
+ "name": "{\n counter,\n list = range(0, 5).map(v => v * 10) as T[],\n setBy,\n equal = _equal,\n }",
5611
+ "type": {
5612
+ "text": "{\n counter: TC;\n list?: T[];\n setBy: (counter: TC, key: string, value: T) => void;\n equal?: (counter: TimeredCounter, a: any, b: any) => Promise<void>;\n }"
5613
+ }
5614
+ }
5615
+ ]
5652
5616
  }
5653
5617
  ],
5654
5618
  "exports": [
5655
5619
  {
5656
5620
  "kind": "js",
5657
- "name": "DurationPartMillisecond",
5658
- "declaration": {
5659
- "name": "DurationPartMillisecond",
5660
- "module": "src/types/duration.ts"
5661
- }
5662
- },
5663
- {
5664
- "kind": "js",
5665
- "name": "DurationPartMillisecondToType",
5621
+ "name": "animationEvents",
5666
5622
  "declaration": {
5667
- "name": "DurationPartMillisecondToType",
5668
- "module": "src/types/duration.ts"
5623
+ "name": "animationEvents",
5624
+ "module": "stories/story-parts/animation-events.ts"
5669
5625
  }
5670
5626
  }
5671
5627
  ]
5672
5628
  },
5673
5629
  {
5674
5630
  "kind": "javascript-module",
5675
- "path": "src/types/group.ts",
5676
- "declarations": [],
5677
- "exports": []
5678
- },
5679
- {
5680
- "kind": "javascript-module",
5681
- "path": "src/utils/any-base.ts",
5631
+ "path": "stories/story-parts/animation-options.ts",
5682
5632
  "declarations": [
5683
5633
  {
5684
5634
  "kind": "function",
5685
- "name": "anyBase",
5635
+ "name": "animationOptions",
5686
5636
  "parameters": [
5687
5637
  {
5688
- "name": "sa",
5689
- "type": {
5690
- "text": "StringAdapter"
5691
- }
5692
- },
5693
- {
5694
- "name": "srcAlphabet",
5638
+ "name": "context",
5695
5639
  "type": {
5696
- "text": "string"
5640
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5697
5641
  }
5698
5642
  },
5699
5643
  {
5700
- "name": "dstAlphabet",
5644
+ "name": "{\n counter,\n list = [114514] as T[],\n setBy,\n }",
5701
5645
  "type": {
5702
- "text": "string"
5646
+ "text": "{\n counter: TC;\n list?: T[];\n setBy: (counter: TC, key: string, value: T) => void;\n }"
5703
5647
  }
5704
5648
  }
5705
5649
  ]
5706
- },
5707
- {
5708
- "kind": "variable",
5709
- "name": "BIN",
5710
- "type": {
5711
- "text": "string"
5712
- },
5713
- "default": "'01'"
5714
- },
5715
- {
5716
- "kind": "variable",
5717
- "name": "OCT",
5718
- "type": {
5719
- "text": "string"
5720
- },
5721
- "default": "'01234567'"
5722
- },
5723
- {
5724
- "kind": "variable",
5725
- "name": "DEC",
5726
- "type": {
5727
- "text": "string"
5728
- },
5729
- "default": "'0123456789'"
5730
- },
5731
- {
5732
- "kind": "variable",
5733
- "name": "HEX",
5734
- "type": {
5735
- "text": "string"
5736
- },
5737
- "default": "'0123456789abcdef'"
5738
5650
  }
5739
5651
  ],
5740
5652
  "exports": [
5741
5653
  {
5742
5654
  "kind": "js",
5743
- "name": "anyBase",
5744
- "declaration": {
5745
- "name": "anyBase",
5746
- "module": "src/utils/any-base.ts"
5747
- }
5748
- },
5749
- {
5750
- "kind": "js",
5751
- "name": "BIN",
5752
- "declaration": {
5753
- "name": "BIN",
5754
- "module": "src/utils/any-base.ts"
5755
- }
5756
- },
5757
- {
5758
- "kind": "js",
5759
- "name": "OCT",
5760
- "declaration": {
5761
- "name": "OCT",
5762
- "module": "src/utils/any-base.ts"
5763
- }
5764
- },
5765
- {
5766
- "kind": "js",
5767
- "name": "DEC",
5768
- "declaration": {
5769
- "name": "DEC",
5770
- "module": "src/utils/any-base.ts"
5771
- }
5772
- },
5773
- {
5774
- "kind": "js",
5775
- "name": "HEX",
5655
+ "name": "animationOptions",
5776
5656
  "declaration": {
5777
- "name": "HEX",
5778
- "module": "src/utils/any-base.ts"
5657
+ "name": "animationOptions",
5658
+ "module": "stories/story-parts/animation-options.ts"
5779
5659
  }
5780
5660
  }
5781
5661
  ]
5782
5662
  },
5783
5663
  {
5784
5664
  "kind": "javascript-module",
5785
- "path": "src/utils/duration.ts",
5665
+ "path": "stories/story-parts/big-number.ts",
5786
5666
  "declarations": [
5787
5667
  {
5788
5668
  "kind": "function",
5789
- "name": "durationObject",
5790
- "return": {
5791
- "type": {
5792
- "text": "{ [key in DurationPartType]?: number }"
5793
- }
5794
- },
5669
+ "name": "bigNumber",
5795
5670
  "parameters": [
5796
5671
  {
5797
- "name": "start",
5798
- "type": {
5799
- "text": "Date"
5800
- }
5801
- },
5802
- {
5803
- "name": "end",
5672
+ "name": "context",
5804
5673
  "type": {
5805
- "text": "Date"
5674
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5806
5675
  }
5807
5676
  },
5808
5677
  {
5809
- "name": "parts",
5678
+ "name": "{\n counter,\n setBy,\n equal = _equal,\n }",
5810
5679
  "type": {
5811
- "text": "DurationPartType[]"
5680
+ "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: string) => void;\n equal?: (counter: TimeredCounter, a: any, b: any) => Promise<void>;\n }"
5812
5681
  }
5813
5682
  }
5814
- ],
5815
- "description": "计算两个日期之间的时间间隔. 返回一个数组, 包含 parts 每个部分的值."
5816
- },
5683
+ ]
5684
+ }
5685
+ ],
5686
+ "exports": [
5687
+ {
5688
+ "kind": "js",
5689
+ "name": "bigNumber",
5690
+ "declaration": {
5691
+ "name": "bigNumber",
5692
+ "module": "stories/story-parts/big-number.ts"
5693
+ }
5694
+ }
5695
+ ]
5696
+ },
5697
+ {
5698
+ "kind": "javascript-module",
5699
+ "path": "stories/story-parts/datetime-locale.ts",
5700
+ "declarations": [
5817
5701
  {
5818
5702
  "kind": "function",
5819
- "name": "duration",
5820
- "return": {
5821
- "type": {
5822
- "text": "number[]"
5823
- }
5824
- },
5703
+ "name": "datetimeLocale",
5825
5704
  "parameters": [
5826
5705
  {
5827
- "name": "start",
5828
- "type": {
5829
- "text": "Date"
5830
- }
5831
- },
5832
- {
5833
- "name": "end",
5706
+ "name": "context",
5834
5707
  "type": {
5835
- "text": "Date"
5708
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5836
5709
  }
5837
5710
  },
5838
5711
  {
5839
- "name": "parts",
5712
+ "name": "{\n counter,\n setBy,\n }",
5840
5713
  "type": {
5841
- "text": "DurationPartType[]"
5714
+ "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: Date[] | string) => void;\n equal: (counter: TimeredCounter, a: any, b: Date[]) => Promise<void>;\n }"
5842
5715
  }
5843
5716
  }
5844
5717
  ]
@@ -5847,192 +5720,256 @@
5847
5720
  "exports": [
5848
5721
  {
5849
5722
  "kind": "js",
5850
- "name": "durationObject",
5851
- "declaration": {
5852
- "name": "durationObject",
5853
- "module": "src/utils/duration.ts"
5854
- }
5855
- },
5856
- {
5857
- "kind": "js",
5858
- "name": "duration",
5723
+ "name": "datetimeLocale",
5859
5724
  "declaration": {
5860
- "name": "duration",
5861
- "module": "src/utils/duration.ts"
5725
+ "name": "datetimeLocale",
5726
+ "module": "stories/story-parts/datetime-locale.ts"
5862
5727
  }
5863
5728
  }
5864
5729
  ]
5865
5730
  },
5866
5731
  {
5867
5732
  "kind": "javascript-module",
5868
- "path": "src/utils/extract-group-option.ts",
5733
+ "path": "stories/story-parts/datetime-precision.ts",
5869
5734
  "declarations": [
5870
5735
  {
5871
5736
  "kind": "function",
5872
- "name": "extractGroupOption",
5737
+ "name": "datetimePrecision",
5873
5738
  "parameters": [
5874
5739
  {
5875
- "name": "option",
5740
+ "name": "context",
5876
5741
  "type": {
5877
- "text": "P"
5742
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5878
5743
  }
5879
5744
  },
5880
5745
  {
5881
- "name": "getterOptions",
5746
+ "name": "{\n counter,\n setBy,\n }",
5882
5747
  "type": {
5883
- "text": "GroupGetterOptions"
5748
+ "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: Date[] | string) => void;\n equal: (counter: TimeredCounter, a: any, b: Date[]) => Promise<void>;\n }"
5884
5749
  }
5885
5750
  }
5886
5751
  ]
5887
- },
5752
+ }
5753
+ ],
5754
+ "exports": [
5755
+ {
5756
+ "kind": "js",
5757
+ "name": "datetimePrecision",
5758
+ "declaration": {
5759
+ "name": "datetimePrecision",
5760
+ "module": "stories/story-parts/datetime-precision.ts"
5761
+ }
5762
+ }
5763
+ ]
5764
+ },
5765
+ {
5766
+ "kind": "javascript-module",
5767
+ "path": "stories/story-parts/edge-case.ts",
5768
+ "declarations": [
5888
5769
  {
5889
5770
  "kind": "function",
5890
- "name": "extractPartOption",
5771
+ "name": "edgeCase",
5891
5772
  "parameters": [
5892
5773
  {
5893
- "name": "option",
5774
+ "name": "context",
5894
5775
  "type": {
5895
- "text": "P"
5776
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5896
5777
  }
5897
5778
  },
5898
5779
  {
5899
- "name": "getterOptions",
5780
+ "name": "{\n counter,\n list,\n setBy,\n }",
5900
5781
  "type": {
5901
- "text": "GroupGetterOptions"
5782
+ "text": "{\n counter: TC;\n list: [label: string, value: T, expectedValue: T][];\n setBy: (counter: TC, key: string, value: T) => void;\n }"
5902
5783
  }
5903
5784
  }
5904
5785
  ]
5905
- },
5786
+ }
5787
+ ],
5788
+ "exports": [
5789
+ {
5790
+ "kind": "js",
5791
+ "name": "edgeCase",
5792
+ "declaration": {
5793
+ "name": "edgeCase",
5794
+ "module": "stories/story-parts/edge-case.ts"
5795
+ }
5796
+ }
5797
+ ]
5798
+ },
5799
+ {
5800
+ "kind": "javascript-module",
5801
+ "path": "stories/story-parts/emoji.ts",
5802
+ "declarations": [
5906
5803
  {
5907
5804
  "kind": "function",
5908
- "name": "extractPartDigitOption",
5805
+ "name": "emoji",
5909
5806
  "parameters": [
5910
5807
  {
5911
- "name": "option",
5808
+ "name": "context",
5912
5809
  "type": {
5913
- "text": "P"
5810
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5914
5811
  }
5915
5812
  },
5916
5813
  {
5917
- "name": "getterOptions",
5814
+ "name": "{\n counter,\n setBy,\n list,\n }",
5918
5815
  "type": {
5919
- "text": "GroupGetterOptions"
5816
+ "text": "{\n counter: TC;\n list: string[];\n setBy: (counter: TC, key: string, value: string) => void;\n equal?: (counter: TimeredCounter, a: any, b: string) => Promise<void>;\n }"
5920
5817
  }
5921
5818
  }
5922
5819
  ]
5923
- },
5820
+ }
5821
+ ],
5822
+ "exports": [
5823
+ {
5824
+ "kind": "js",
5825
+ "name": "emoji",
5826
+ "declaration": {
5827
+ "name": "emoji",
5828
+ "module": "stories/story-parts/emoji.ts"
5829
+ }
5830
+ }
5831
+ ]
5832
+ },
5833
+ {
5834
+ "kind": "javascript-module",
5835
+ "path": "stories/story-parts/locale-number.ts",
5836
+ "declarations": [
5924
5837
  {
5925
5838
  "kind": "function",
5926
- "name": "extractPartDigitCellOption",
5839
+ "name": "localeNumber",
5927
5840
  "parameters": [
5928
5841
  {
5929
- "name": "option",
5842
+ "name": "context",
5930
5843
  "type": {
5931
- "text": "P"
5844
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5932
5845
  }
5933
5846
  },
5934
5847
  {
5935
- "name": "getterOptions",
5848
+ "name": "{\n counter,\n setBy,\n }",
5936
5849
  "type": {
5937
- "text": "GroupGetterOptions"
5850
+ "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: string) => void;\n }"
5938
5851
  }
5939
5852
  }
5940
5853
  ]
5941
- },
5854
+ }
5855
+ ],
5856
+ "exports": [
5857
+ {
5858
+ "kind": "js",
5859
+ "name": "localeNumber",
5860
+ "declaration": {
5861
+ "name": "localeNumber",
5862
+ "module": "stories/story-parts/locale-number.ts"
5863
+ }
5864
+ }
5865
+ ]
5866
+ },
5867
+ {
5868
+ "kind": "javascript-module",
5869
+ "path": "stories/story-parts/slots.ts",
5870
+ "declarations": [
5942
5871
  {
5943
5872
  "kind": "function",
5944
- "name": "mergeGroupOption",
5945
- "return": {
5946
- "type": {
5947
- "text": "Result"
5948
- }
5949
- },
5873
+ "name": "render",
5950
5874
  "parameters": [
5951
5875
  {
5952
- "name": "data",
5953
- "type": {
5954
- "text": "Result"
5955
- }
5956
- },
5957
- {
5958
- "name": "source",
5876
+ "name": "args",
5959
5877
  "type": {
5960
- "text": "Result"
5878
+ "text": "any"
5961
5879
  }
5962
5880
  }
5963
5881
  ]
5964
5882
  },
5965
5883
  {
5966
5884
  "kind": "function",
5967
- "name": "mergePartOption",
5968
- "return": {
5969
- "type": {
5970
- "text": "Result[]"
5971
- }
5972
- },
5885
+ "name": "slots",
5973
5886
  "parameters": [
5974
5887
  {
5975
- "name": "data",
5976
- "default": "[]",
5888
+ "name": "context",
5977
5889
  "type": {
5978
- "text": "Result[]"
5890
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
5979
5891
  }
5980
5892
  },
5981
5893
  {
5982
- "name": "source",
5983
- "default": "[]",
5894
+ "name": "{\n counter,\n }",
5984
5895
  "type": {
5985
- "text": "Result[]"
5896
+ "text": "{\n counter: TC;\n list?: T[];\n setBy?: (counter: TC, key: string, value: T) => void;\n equal?: (counter: TimeredCounter, a: any, b: T) => Promise<void>;\n }"
5986
5897
  }
5987
5898
  }
5988
5899
  ]
5900
+ }
5901
+ ],
5902
+ "exports": [
5903
+ {
5904
+ "kind": "js",
5905
+ "name": "render",
5906
+ "declaration": {
5907
+ "name": "render",
5908
+ "module": "stories/story-parts/slots.ts"
5909
+ }
5989
5910
  },
5911
+ {
5912
+ "kind": "js",
5913
+ "name": "slots",
5914
+ "declaration": {
5915
+ "name": "slots",
5916
+ "module": "stories/story-parts/slots.ts"
5917
+ }
5918
+ }
5919
+ ]
5920
+ },
5921
+ {
5922
+ "kind": "javascript-module",
5923
+ "path": "stories/story-parts/styles.ts",
5924
+ "declarations": [
5990
5925
  {
5991
5926
  "kind": "function",
5992
- "name": "mergePartDigitOption",
5993
- "return": {
5994
- "type": {
5995
- "text": "Result[][]"
5996
- }
5997
- },
5927
+ "name": "styles",
5998
5928
  "parameters": [
5999
5929
  {
6000
- "name": "data",
6001
- "default": "[]",
5930
+ "name": "context",
6002
5931
  "type": {
6003
- "text": "Result[][]"
5932
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6004
5933
  }
6005
5934
  },
6006
5935
  {
6007
- "name": "source",
6008
- "default": "[]",
5936
+ "name": "{\n counter,\n setBy,\n }",
6009
5937
  "type": {
6010
- "text": "Result[][]"
5938
+ "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: string) => void;\n }"
6011
5939
  }
6012
5940
  }
6013
5941
  ]
6014
- },
5942
+ }
5943
+ ],
5944
+ "exports": [
5945
+ {
5946
+ "kind": "js",
5947
+ "name": "styles",
5948
+ "declaration": {
5949
+ "name": "styles",
5950
+ "module": "stories/story-parts/styles.ts"
5951
+ }
5952
+ }
5953
+ ]
5954
+ },
5955
+ {
5956
+ "kind": "javascript-module",
5957
+ "path": "stories/story-parts/value-change.ts",
5958
+ "declarations": [
6015
5959
  {
6016
5960
  "kind": "function",
6017
- "name": "mergePartDigitCellOption",
6018
- "return": {
6019
- "type": {
6020
- "text": "Result[][][]"
6021
- }
6022
- },
5961
+ "name": "valueChange",
6023
5962
  "parameters": [
6024
5963
  {
6025
- "name": "data",
6026
- "default": "[]",
5964
+ "name": "context",
6027
5965
  "type": {
6028
- "text": "Result[][][]"
5966
+ "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6029
5967
  }
6030
5968
  },
6031
5969
  {
6032
- "name": "source",
6033
- "default": "[]",
5970
+ "name": "{\n counter,\n list = range(0, 5).map(v => v * 10) as T[],\n setBy,\n equal = _equal,\n }",
6034
5971
  "type": {
6035
- "text": "Result[][][]"
5972
+ "text": "{\n counter: TC;\n list?: T[];\n setBy: (counter: TC, key: string, value: T) => void;\n equal?: (counter: TimeredCounter, a: any, b: T) => Promise<void>;\n }"
6036
5973
  }
6037
5974
  }
6038
5975
  ]
@@ -6041,717 +5978,273 @@
6041
5978
  "exports": [
6042
5979
  {
6043
5980
  "kind": "js",
6044
- "name": "extractGroupOption",
5981
+ "name": "valueChange",
6045
5982
  "declaration": {
6046
- "name": "extractGroupOption",
6047
- "module": "src/utils/extract-group-option.ts"
5983
+ "name": "valueChange",
5984
+ "module": "stories/story-parts/value-change.ts"
6048
5985
  }
5986
+ }
5987
+ ]
5988
+ },
5989
+ {
5990
+ "kind": "javascript-module",
5991
+ "path": "stories/timered-counter/decimaljs.stories.ts",
5992
+ "declarations": [
5993
+ {
5994
+ "kind": "variable",
5995
+ "name": "meta",
5996
+ "type": {
5997
+ "text": "Meta"
5998
+ },
5999
+ "default": "{ title: 'TimeredCounter/with decimal.js', component: 'timered-counter', tags: ['autodocs', 'timered-counter'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); }, }"
6049
6000
  },
6001
+ {
6002
+ "kind": "variable",
6003
+ "name": "BigNumber",
6004
+ "type": {
6005
+ "text": "StoryObj<TimeredCounter>"
6006
+ },
6007
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => bigNumber(context, { counter, setBy: setByAttr }), ); await step('Testing with property', async () => bigNumber(context, { counter, setBy: setByProp }), ); }, }"
6008
+ }
6009
+ ],
6010
+ "exports": [
6050
6011
  {
6051
6012
  "kind": "js",
6052
- "name": "extractPartOption",
6013
+ "name": "default",
6053
6014
  "declaration": {
6054
- "name": "extractPartOption",
6055
- "module": "src/utils/extract-group-option.ts"
6015
+ "name": "meta",
6016
+ "module": "stories/timered-counter/decimaljs.stories.ts"
6056
6017
  }
6057
6018
  },
6058
6019
  {
6059
6020
  "kind": "js",
6060
- "name": "extractPartDigitOption",
6021
+ "name": "Basic",
6061
6022
  "declaration": {
6062
- "name": "extractPartDigitOption",
6063
- "module": "src/utils/extract-group-option.ts"
6023
+ "name": "Basic",
6024
+ "module": "./index.stories.js"
6064
6025
  }
6065
6026
  },
6066
6027
  {
6067
6028
  "kind": "js",
6068
- "name": "extractPartDigitCellOption",
6029
+ "name": "Events",
6069
6030
  "declaration": {
6070
- "name": "extractPartDigitCellOption",
6071
- "module": "src/utils/extract-group-option.ts"
6031
+ "name": "Events",
6032
+ "module": "./index.stories.js"
6072
6033
  }
6073
6034
  },
6074
6035
  {
6075
6036
  "kind": "js",
6076
- "name": "mergeGroupOption",
6037
+ "name": "AnimationOptions",
6077
6038
  "declaration": {
6078
- "name": "mergeGroupOption",
6079
- "module": "src/utils/extract-group-option.ts"
6039
+ "name": "AnimationOptions",
6040
+ "module": "./index.stories.js"
6080
6041
  }
6081
6042
  },
6082
6043
  {
6083
6044
  "kind": "js",
6084
- "name": "mergePartOption",
6045
+ "name": "Slots",
6085
6046
  "declaration": {
6086
- "name": "mergePartOption",
6087
- "module": "src/utils/extract-group-option.ts"
6047
+ "name": "Slots",
6048
+ "module": "./index.stories.js"
6088
6049
  }
6089
6050
  },
6090
6051
  {
6091
6052
  "kind": "js",
6092
- "name": "mergePartDigitOption",
6053
+ "name": "Styles",
6093
6054
  "declaration": {
6094
- "name": "mergePartDigitOption",
6095
- "module": "src/utils/extract-group-option.ts"
6055
+ "name": "Styles",
6056
+ "module": "./index.stories.js"
6096
6057
  }
6097
6058
  },
6098
6059
  {
6099
6060
  "kind": "js",
6100
- "name": "mergePartDigitCellOption",
6061
+ "name": "BigNumber",
6101
6062
  "declaration": {
6102
- "name": "mergePartDigitCellOption",
6103
- "module": "src/utils/extract-group-option.ts"
6063
+ "name": "BigNumber",
6064
+ "module": "stories/timered-counter/decimaljs.stories.ts"
6104
6065
  }
6105
6066
  }
6106
6067
  ]
6107
6068
  },
6108
6069
  {
6109
6070
  "kind": "javascript-module",
6110
- "path": "src/utils/iso8601-duration.ts",
6071
+ "path": "stories/timered-counter/index.stories.ts",
6111
6072
  "declarations": [
6112
6073
  {
6113
- "kind": "function",
6114
- "name": "iso8601Duration",
6115
- "return": {
6116
- "type": {
6117
- "text": "string"
6118
- }
6074
+ "kind": "variable",
6075
+ "name": "meta",
6076
+ "type": {
6077
+ "text": "Meta"
6119
6078
  },
6120
- "parameters": [
6121
- {
6122
- "name": "duration",
6123
- "type": {
6124
- "text": "{\n [key in DurationPartType]?: number;\n}"
6125
- }
6126
- }
6127
- ]
6128
- }
6129
- ],
6130
- "exports": [
6079
+ "default": "{ title: 'TimeredCounter', component: 'timered-counter', tags: ['autodocs', 'timered-counter'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, globals: { setByAttr, setByProp, }, }"
6080
+ },
6131
6081
  {
6132
- "kind": "js",
6133
- "name": "iso8601Duration",
6134
- "declaration": {
6135
- "name": "iso8601Duration",
6136
- "module": "src/utils/iso8601-duration.ts"
6137
- }
6138
- }
6139
- ]
6140
- },
6141
- {
6142
- "kind": "javascript-module",
6143
- "path": "src/utils/localized-date-time-fields.ts",
6144
- "declarations": [
6082
+ "kind": "variable",
6083
+ "name": "Basic",
6084
+ "type": {
6085
+ "text": "StoryObj<TimeredCounter>"
6086
+ },
6087
+ "default": "{ args: { className: 'test-target', // @ts-ignore value: '0', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await valueChange(context, { counter, setBy: setByAttr, }); await step('Edge case', async () => edgeCase(context, { counter, list: [ ['Setting an empty string', '', '0'], ['Setting a non-number', 'a', '0'], ['Setting a decimal number', '1.1', '1.1'], ['Setting a negative number', '-1', '-1'], ['Setting Infinity', 'Infinity', '0'], ['Setting NaN', 'NaN', '0'], ['Setting null', 'null', '0'], ['Setting undefined', 'undefined', '0'], ['Setting true', 'true', '0'], ['Setting false', 'false', '0'], ['Setting an object', '{}', '0'], ['Setting an array', '[]', '0'], ['Setting a function', '() => {}', '0'], ['Setting a Symbol', 'Symbol()', '0'], ['Setting a BigInt', 'BigInt(1)', '0'], ], setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await valueChange(context, { counter, setBy: setByProp }); await step('Edge case', async () => edgeCase(context, { counter, list: [ ['Setting an empty string', '', 0], ['Setting a non-number', 'a', 0], ['Setting a decimal number', '1.1', 1.1], ['Setting a negative number', '-1', -1], ['Setting Infinity', 'Infinity', 0], ['Setting NaN', 'NaN', 0], ['Setting null', 'null', 0], ['Setting undefined', 'undefined', 0], ['Setting true', 'true', 0], ['Setting false', 'false', 0], ['Setting an object', '{}', 0], ['Setting an array', '[]', 0], ['Setting a function', '() => {}', 0], ['Setting a Symbol', 'Symbol()', 0], ['Setting a BigInt', 'BigInt(1)', 0], ], setBy: setByProp, }), ); }); }, }"
6088
+ },
6145
6089
  {
6146
6090
  "kind": "variable",
6147
- "name": "DateTimeFields",
6091
+ "name": "Events",
6148
6092
  "type": {
6149
- "text": "[\n \"era\",\n \"year\",\n \"quarter\",\n \"month\",\n \"weekOfYear\",\n \"weekday\",\n \"day\",\n \"dayPeriod\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n]"
6093
+ "text": "StoryObj<TimeredCounter>"
6150
6094
  },
6151
- "default": "[ \"era\", \"year\", \"quarter\", \"month\", \"weekOfYear\", \"weekday\", \"day\", \"dayPeriod\", \"hour\", \"minute\", \"second\", \"timeZoneName\", ]"
6095
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Animation events', async () => animationEvents(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Animation events', async () => animationEvents(context, { counter, setBy: setByProp, }), ); }); }, }"
6152
6096
  },
6153
6097
  {
6154
- "kind": "function",
6155
- "name": "getLocalizedDateTimeFields",
6156
- "parameters": [
6157
- {
6158
- "name": "locale",
6159
- "type": {
6160
- "text": "Intl.Locale"
6161
- }
6162
- }
6163
- ]
6098
+ "kind": "variable",
6099
+ "name": "AnimationOptions",
6100
+ "type": {
6101
+ "text": "StoryObj<TimeredCounter>"
6102
+ },
6103
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Animation options', async () => animationOptions(context, { counter, setBy: setByAttr, }), ); }); // await step('Testing with property', async () => { // await step('Animation options', async () => // animationOptions(context, { // counter, // list, // setBy: setByProp, // }), // ); // }); }, }"
6104
+ },
6105
+ {
6106
+ "kind": "variable",
6107
+ "name": "Styles",
6108
+ "type": {
6109
+ "text": "StoryObj<TimeredCounter>"
6110
+ },
6111
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Styles', async () => styles(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Styles', async () => styles(context, { counter, setBy: setByProp, }), ); }); }, }"
6112
+ },
6113
+ {
6114
+ "kind": "variable",
6115
+ "name": "Slots",
6116
+ "type": {
6117
+ "text": "StoryObj<TimeredCounter>"
6118
+ },
6119
+ "default": "{ args: { className: 'test-target', value: 0, }, render: slotsRender, async play(context) { const { canvasElement } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await slots(context, { counter }); }, }"
6164
6120
  }
6165
6121
  ],
6166
6122
  "exports": [
6167
6123
  {
6168
6124
  "kind": "js",
6169
- "name": "DateTimeFields",
6125
+ "name": "default",
6170
6126
  "declaration": {
6171
- "name": "DateTimeFields",
6172
- "module": "src/utils/localized-date-time-fields.ts"
6127
+ "name": "meta",
6128
+ "module": "stories/timered-counter/index.stories.ts"
6173
6129
  }
6174
6130
  },
6175
6131
  {
6176
6132
  "kind": "js",
6177
- "name": "getLocalizedDateTimeFields",
6133
+ "name": "Basic",
6178
6134
  "declaration": {
6179
- "name": "getLocalizedDateTimeFields",
6180
- "module": "src/utils/localized-date-time-fields.ts"
6135
+ "name": "Basic",
6136
+ "module": "stories/timered-counter/index.stories.ts"
6137
+ }
6138
+ },
6139
+ {
6140
+ "kind": "js",
6141
+ "name": "Events",
6142
+ "declaration": {
6143
+ "name": "Events",
6144
+ "module": "stories/timered-counter/index.stories.ts"
6145
+ }
6146
+ },
6147
+ {
6148
+ "kind": "js",
6149
+ "name": "AnimationOptions",
6150
+ "declaration": {
6151
+ "name": "AnimationOptions",
6152
+ "module": "stories/timered-counter/index.stories.ts"
6153
+ }
6154
+ },
6155
+ {
6156
+ "kind": "js",
6157
+ "name": "Styles",
6158
+ "declaration": {
6159
+ "name": "Styles",
6160
+ "module": "stories/timered-counter/index.stories.ts"
6161
+ }
6162
+ },
6163
+ {
6164
+ "kind": "js",
6165
+ "name": "Slots",
6166
+ "declaration": {
6167
+ "name": "Slots",
6168
+ "module": "stories/timered-counter/index.stories.ts"
6181
6169
  }
6182
6170
  }
6183
6171
  ]
6184
6172
  },
6185
6173
  {
6186
6174
  "kind": "javascript-module",
6187
- "path": "src/utils/parse-json-string.ts",
6175
+ "path": "stories/timered-counter-datetime-duration/index.stories.ts",
6188
6176
  "declarations": [
6189
6177
  {
6190
- "kind": "function",
6191
- "name": "parseJsonString",
6192
- "parameters": [
6193
- {
6194
- "name": "value",
6195
- "type": {
6196
- "text": "string"
6197
- }
6198
- }
6199
- ]
6200
- }
6201
- ],
6202
- "exports": [
6203
- {
6204
- "kind": "js",
6205
- "name": "parseJsonString",
6206
- "declaration": {
6207
- "name": "parseJsonString",
6208
- "module": "src/utils/parse-json-string.ts"
6209
- }
6210
- }
6211
- ]
6212
- },
6213
- {
6214
- "kind": "javascript-module",
6215
- "path": "src/utils/polyfill-keyframes.ts",
6216
- "declarations": [
6217
- {
6218
- "kind": "function",
6219
- "name": "polyfillKeyframes",
6220
- "return": {
6221
- "type": {
6222
- "text": "Keyframe[]"
6223
- }
6224
- },
6225
- "parameters": [
6226
- {
6227
- "name": "keyframes",
6228
- "type": {
6229
- "text": "Keyframe[] | PropertyIndexedKeyframes"
6230
- }
6231
- }
6232
- ]
6233
- }
6234
- ],
6235
- "exports": [
6236
- {
6237
- "kind": "js",
6238
- "name": "polyfillKeyframes",
6239
- "declaration": {
6240
- "name": "polyfillKeyframes",
6241
- "module": "src/utils/polyfill-keyframes.ts"
6242
- }
6243
- }
6244
- ]
6245
- },
6246
- {
6247
- "kind": "javascript-module",
6248
- "path": "src/utils/preprocess-part-data.ts",
6249
- "declarations": [
6250
- {
6251
- "kind": "function",
6252
- "name": "preprocessPartData",
6253
- "parameters": [
6254
- {
6255
- "name": "newDirection",
6256
- "type": {
6257
- "text": "'up' | 'down'"
6258
- }
6259
- },
6260
- {
6261
- "name": "newData",
6262
- "type": {
6263
- "text": "PartData[]"
6264
- }
6265
- },
6266
- {
6267
- "name": "oldDirection",
6268
- "type": {
6269
- "text": "'up' | 'down'"
6270
- }
6271
- },
6272
- {
6273
- "name": "oldData",
6274
- "type": {
6275
- "text": "PartData[]"
6276
- }
6277
- }
6278
- ]
6279
- }
6280
- ],
6281
- "exports": [
6282
- {
6283
- "kind": "js",
6284
- "name": "preprocessPartData",
6285
- "declaration": {
6286
- "name": "preprocessPartData",
6287
- "module": "src/utils/preprocess-part-data.ts"
6288
- }
6289
- }
6290
- ]
6291
- },
6292
- {
6293
- "kind": "javascript-module",
6294
- "path": "src/utils/transition-digit.ts",
6295
- "declarations": [
6296
- {
6297
- "kind": "function",
6298
- "name": "transitionDigit",
6299
- "parameters": [
6300
- {
6301
- "name": "na",
6302
- "type": {
6303
- "text": "NS"
6304
- }
6305
- },
6306
- {
6307
- "name": "from",
6308
- "type": {
6309
- "text": "V"
6310
- }
6311
- },
6312
- {
6313
- "name": "to",
6314
- "type": {
6315
- "text": "V"
6316
- }
6317
- },
6318
- {
6319
- "name": "count",
6320
- "type": {
6321
- "text": "number"
6322
- }
6323
- }
6324
- ]
6325
- }
6326
- ],
6327
- "exports": [
6328
- {
6329
- "kind": "js",
6330
- "name": "transitionDigit",
6331
- "declaration": {
6332
- "name": "transitionDigit",
6333
- "module": "src/utils/transition-digit.ts"
6334
- }
6335
- }
6336
- ]
6337
- },
6338
- {
6339
- "kind": "javascript-module",
6340
- "path": "src/utils/uuid.ts",
6341
- "declarations": [
6342
- {
6343
- "kind": "function",
6344
- "name": "uuid"
6345
- }
6346
- ],
6347
- "exports": [
6348
- {
6349
- "kind": "js",
6350
- "name": "uuid",
6351
- "declaration": {
6352
- "name": "uuid",
6353
- "module": "src/utils/uuid.ts"
6354
- }
6355
- }
6356
- ]
6357
- },
6358
- {
6359
- "kind": "javascript-module",
6360
- "path": "stories/story-parts/animation-events.ts",
6361
- "declarations": [
6362
- {
6363
- "kind": "function",
6364
- "name": "animationEvents",
6365
- "parameters": [
6366
- {
6367
- "name": "context",
6368
- "type": {
6369
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6370
- }
6371
- },
6372
- {
6373
- "name": "{\n counter,\n list = range(0, 5).map(v => v * 10) as T[],\n setBy,\n equal = _equal,\n }",
6374
- "type": {
6375
- "text": "{\n counter: TC;\n list?: T[];\n setBy: (counter: TC, key: string, value: T) => void;\n equal?: (counter: TimeredCounter, a: any, b: any) => Promise<void>;\n }"
6376
- }
6377
- }
6378
- ]
6379
- }
6380
- ],
6381
- "exports": [
6382
- {
6383
- "kind": "js",
6384
- "name": "animationEvents",
6385
- "declaration": {
6386
- "name": "animationEvents",
6387
- "module": "stories/story-parts/animation-events.ts"
6388
- }
6389
- }
6390
- ]
6391
- },
6392
- {
6393
- "kind": "javascript-module",
6394
- "path": "stories/story-parts/animation-options.ts",
6395
- "declarations": [
6396
- {
6397
- "kind": "function",
6398
- "name": "animationOptions",
6399
- "parameters": [
6400
- {
6401
- "name": "context",
6402
- "type": {
6403
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6404
- }
6405
- },
6406
- {
6407
- "name": "{\n counter,\n list = [114514] as T[],\n setBy,\n }",
6408
- "type": {
6409
- "text": "{\n counter: TC;\n list?: T[];\n setBy: (counter: TC, key: string, value: T) => void;\n }"
6410
- }
6411
- }
6412
- ]
6413
- }
6414
- ],
6415
- "exports": [
6416
- {
6417
- "kind": "js",
6418
- "name": "animationOptions",
6419
- "declaration": {
6420
- "name": "animationOptions",
6421
- "module": "stories/story-parts/animation-options.ts"
6422
- }
6423
- }
6424
- ]
6425
- },
6426
- {
6427
- "kind": "javascript-module",
6428
- "path": "stories/story-parts/big-number.ts",
6429
- "declarations": [
6430
- {
6431
- "kind": "function",
6432
- "name": "bigNumber",
6433
- "parameters": [
6434
- {
6435
- "name": "context",
6436
- "type": {
6437
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6438
- }
6439
- },
6440
- {
6441
- "name": "{\n counter,\n setBy,\n equal = _equal,\n }",
6442
- "type": {
6443
- "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: string) => void;\n equal?: (counter: TimeredCounter, a: any, b: any) => Promise<void>;\n }"
6444
- }
6445
- }
6446
- ]
6447
- }
6448
- ],
6449
- "exports": [
6450
- {
6451
- "kind": "js",
6452
- "name": "bigNumber",
6453
- "declaration": {
6454
- "name": "bigNumber",
6455
- "module": "stories/story-parts/big-number.ts"
6456
- }
6457
- }
6458
- ]
6459
- },
6460
- {
6461
- "kind": "javascript-module",
6462
- "path": "stories/story-parts/datetime-locale.ts",
6463
- "declarations": [
6464
- {
6465
- "kind": "function",
6466
- "name": "datetimeLocale",
6467
- "parameters": [
6468
- {
6469
- "name": "context",
6470
- "type": {
6471
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6472
- }
6473
- },
6474
- {
6475
- "name": "{\n counter,\n setBy,\n }",
6476
- "type": {
6477
- "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: Date[] | string) => void;\n equal: (counter: TimeredCounter, a: any, b: Date[]) => Promise<void>;\n }"
6478
- }
6479
- }
6480
- ]
6481
- }
6482
- ],
6483
- "exports": [
6484
- {
6485
- "kind": "js",
6486
- "name": "datetimeLocale",
6487
- "declaration": {
6488
- "name": "datetimeLocale",
6489
- "module": "stories/story-parts/datetime-locale.ts"
6490
- }
6491
- }
6492
- ]
6493
- },
6494
- {
6495
- "kind": "javascript-module",
6496
- "path": "stories/story-parts/datetime-precision.ts",
6497
- "declarations": [
6498
- {
6499
- "kind": "function",
6500
- "name": "datetimePrecision",
6501
- "parameters": [
6502
- {
6503
- "name": "context",
6504
- "type": {
6505
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6506
- }
6507
- },
6508
- {
6509
- "name": "{\n counter,\n setBy,\n }",
6510
- "type": {
6511
- "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: Date[] | string) => void;\n equal: (counter: TimeredCounter, a: any, b: Date[]) => Promise<void>;\n }"
6512
- }
6513
- }
6514
- ]
6515
- }
6516
- ],
6517
- "exports": [
6518
- {
6519
- "kind": "js",
6520
- "name": "datetimePrecision",
6521
- "declaration": {
6522
- "name": "datetimePrecision",
6523
- "module": "stories/story-parts/datetime-precision.ts"
6524
- }
6525
- }
6526
- ]
6527
- },
6528
- {
6529
- "kind": "javascript-module",
6530
- "path": "stories/story-parts/edge-case.ts",
6531
- "declarations": [
6532
- {
6533
- "kind": "function",
6534
- "name": "edgeCase",
6535
- "parameters": [
6536
- {
6537
- "name": "context",
6538
- "type": {
6539
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6540
- }
6541
- },
6542
- {
6543
- "name": "{\n counter,\n list,\n setBy,\n }",
6544
- "type": {
6545
- "text": "{\n counter: TC;\n list: [label: string, value: T, expectedValue: T][];\n setBy: (counter: TC, key: string, value: T) => void;\n }"
6546
- }
6547
- }
6548
- ]
6549
- }
6550
- ],
6551
- "exports": [
6552
- {
6553
- "kind": "js",
6554
- "name": "edgeCase",
6555
- "declaration": {
6556
- "name": "edgeCase",
6557
- "module": "stories/story-parts/edge-case.ts"
6558
- }
6559
- }
6560
- ]
6561
- },
6562
- {
6563
- "kind": "javascript-module",
6564
- "path": "stories/story-parts/emoji.ts",
6565
- "declarations": [
6566
- {
6567
- "kind": "function",
6568
- "name": "emoji",
6569
- "parameters": [
6570
- {
6571
- "name": "context",
6572
- "type": {
6573
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6574
- }
6575
- },
6576
- {
6577
- "name": "{\n counter,\n setBy,\n list,\n }",
6578
- "type": {
6579
- "text": "{\n counter: TC;\n list: string[];\n setBy: (counter: TC, key: string, value: string) => void;\n equal?: (counter: TimeredCounter, a: any, b: string) => Promise<void>;\n }"
6580
- }
6581
- }
6582
- ]
6583
- }
6584
- ],
6585
- "exports": [
6586
- {
6587
- "kind": "js",
6588
- "name": "emoji",
6589
- "declaration": {
6590
- "name": "emoji",
6591
- "module": "stories/story-parts/emoji.ts"
6592
- }
6593
- }
6594
- ]
6595
- },
6596
- {
6597
- "kind": "javascript-module",
6598
- "path": "stories/story-parts/locale-number.ts",
6599
- "declarations": [
6600
- {
6601
- "kind": "function",
6602
- "name": "localeNumber",
6603
- "parameters": [
6604
- {
6605
- "name": "context",
6606
- "type": {
6607
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6608
- }
6609
- },
6610
- {
6611
- "name": "{\n counter,\n setBy,\n }",
6612
- "type": {
6613
- "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: string) => void;\n }"
6614
- }
6615
- }
6616
- ]
6617
- }
6618
- ],
6619
- "exports": [
6178
+ "kind": "variable",
6179
+ "name": "meta",
6180
+ "type": {
6181
+ "text": "Meta"
6182
+ },
6183
+ "default": "{ title: 'TimeredCounterDatetimeDuration', component: 'timered-counter-datetime-duration', tags: ['autodocs', 'timered-counter-datetime-duration'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, }"
6184
+ },
6620
6185
  {
6621
- "kind": "js",
6622
- "name": "localeNumber",
6623
- "declaration": {
6624
- "name": "localeNumber",
6625
- "module": "stories/story-parts/locale-number.ts"
6626
- }
6627
- }
6628
- ]
6629
- },
6630
- {
6631
- "kind": "javascript-module",
6632
- "path": "stories/story-parts/slots.ts",
6633
- "declarations": [
6186
+ "kind": "variable",
6187
+ "name": "Basic",
6188
+ "type": {
6189
+ "text": "StoryObj<TimeredCounterDatetimeDuration>"
6190
+ },
6191
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterDatetimeDuration; const list = [ ...range(0, 2).map(v => [new Date(), addSeconds(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addMinutes(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addHours(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addDays(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addMonths(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addYears(new Date(), v)]), ]; await step('Testing with attribute', async () => { await valueChange(context, { counter, list, setBy: setByAttr, equal }); }); await step('Testing with property', async () => { await valueChange(context, { counter, list, setBy: setByProp, equal }); }); }, }"
6192
+ },
6634
6193
  {
6635
- "kind": "function",
6636
- "name": "render",
6637
- "parameters": [
6638
- {
6639
- "name": "args",
6640
- "type": {
6641
- "text": "any"
6642
- }
6643
- }
6644
- ]
6194
+ "kind": "variable",
6195
+ "name": "Precision",
6196
+ "type": {
6197
+ "text": "StoryObj<TimeredCounterDatetimeDuration>"
6198
+ },
6199
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterDatetimeDuration; await step('Testing with attribute', async () => datetimePrecision(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', async () => datetimePrecision(context, { counter, setBy: setByProp, equal }), ); }, }"
6645
6200
  },
6646
6201
  {
6647
- "kind": "function",
6648
- "name": "slots",
6649
- "parameters": [
6650
- {
6651
- "name": "context",
6652
- "type": {
6653
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6654
- }
6655
- },
6656
- {
6657
- "name": "{\n counter,\n }",
6658
- "type": {
6659
- "text": "{\n counter: TC;\n list?: T[];\n setBy?: (counter: TC, key: string, value: T) => void;\n equal?: (counter: TimeredCounter, a: any, b: T) => Promise<void>;\n }"
6660
- }
6661
- }
6662
- ]
6202
+ "kind": "variable",
6203
+ "name": "Locale",
6204
+ "type": {
6205
+ "text": "StoryObj<TimeredCounterDatetimeDuration>"
6206
+ },
6207
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterDatetimeDuration; await step('Testing with attribute', () => datetimeLocale(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', () => datetimeLocale(context, { counter, setBy: setByProp, equal }), ); }, }"
6663
6208
  }
6664
6209
  ],
6665
6210
  "exports": [
6666
6211
  {
6667
6212
  "kind": "js",
6668
- "name": "render",
6213
+ "name": "default",
6669
6214
  "declaration": {
6670
- "name": "render",
6671
- "module": "stories/story-parts/slots.ts"
6215
+ "name": "meta",
6216
+ "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6672
6217
  }
6673
6218
  },
6674
6219
  {
6675
6220
  "kind": "js",
6676
- "name": "slots",
6677
- "declaration": {
6678
- "name": "slots",
6679
- "module": "stories/story-parts/slots.ts"
6680
- }
6681
- }
6682
- ]
6683
- },
6684
- {
6685
- "kind": "javascript-module",
6686
- "path": "stories/story-parts/styles.ts",
6687
- "declarations": [
6688
- {
6689
- "kind": "function",
6690
- "name": "styles",
6691
- "parameters": [
6692
- {
6693
- "name": "context",
6694
- "type": {
6695
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6696
- }
6697
- },
6698
- {
6699
- "name": "{\n counter,\n setBy,\n }",
6700
- "type": {
6701
- "text": "{\n counter: TC;\n setBy: (counter: TC, key: string, value: string) => void;\n }"
6702
- }
6703
- }
6704
- ]
6705
- }
6706
- ],
6707
- "exports": [
6708
- {
6709
- "kind": "js",
6710
- "name": "styles",
6711
- "declaration": {
6712
- "name": "styles",
6713
- "module": "stories/story-parts/styles.ts"
6714
- }
6715
- }
6716
- ]
6717
- },
6718
- {
6719
- "kind": "javascript-module",
6720
- "path": "stories/story-parts/value-change.ts",
6721
- "declarations": [
6722
- {
6723
- "kind": "function",
6724
- "name": "valueChange",
6725
- "parameters": [
6726
- {
6727
- "name": "context",
6728
- "type": {
6729
- "text": "Parameters<NoUndefinedField<StoryObj>['play']>[0]"
6730
- }
6731
- },
6732
- {
6733
- "name": "{\n counter,\n list = range(0, 5).map(v => v * 10) as T[],\n setBy,\n equal = _equal,\n }",
6734
- "type": {
6735
- "text": "{\n counter: TC;\n list?: T[];\n setBy: (counter: TC, key: string, value: T) => void;\n equal?: (counter: TimeredCounter, a: any, b: T) => Promise<void>;\n }"
6736
- }
6737
- }
6738
- ]
6739
- }
6740
- ],
6741
- "exports": [
6221
+ "name": "Basic",
6222
+ "declaration": {
6223
+ "name": "Basic",
6224
+ "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6225
+ }
6226
+ },
6742
6227
  {
6743
6228
  "kind": "js",
6744
- "name": "valueChange",
6229
+ "name": "Precision",
6745
6230
  "declaration": {
6746
- "name": "valueChange",
6747
- "module": "stories/story-parts/value-change.ts"
6231
+ "name": "Precision",
6232
+ "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6233
+ }
6234
+ },
6235
+ {
6236
+ "kind": "js",
6237
+ "name": "Locale",
6238
+ "declaration": {
6239
+ "name": "Locale",
6240
+ "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6748
6241
  }
6749
6242
  }
6750
6243
  ]
6751
6244
  },
6752
6245
  {
6753
6246
  "kind": "javascript-module",
6754
- "path": "stories/timered-counter/decimaljs.stories.ts",
6247
+ "path": "stories/timered-counter-number/decimaljs.stories.ts",
6755
6248
  "declarations": [
6756
6249
  {
6757
6250
  "kind": "variable",
@@ -6759,26 +6252,18 @@
6759
6252
  "type": {
6760
6253
  "text": "Meta"
6761
6254
  },
6762
- "default": "{ title: 'TimeredCounter/with decimal.js', component: 'timered-counter', tags: ['autodocs', 'timered-counter'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); }, }"
6255
+ "default": "{ title: 'TimeredCounterNumber/with decimal.js', component: 'timered-counter-number', tags: ['autodocs', 'timered-counter-number'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); }, }"
6763
6256
  },
6764
6257
  {
6765
6258
  "kind": "variable",
6766
6259
  "name": "BigNumber",
6767
6260
  "type": {
6768
- "text": "StoryObj<TimeredCounter>"
6261
+ "text": "StoryObj<TimeredCounterNumber>"
6769
6262
  },
6770
6263
  "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => bigNumber(context, { counter, setBy: setByAttr }), ); await step('Testing with property', async () => bigNumber(context, { counter, setBy: setByProp }), ); }, }"
6771
6264
  }
6772
6265
  ],
6773
6266
  "exports": [
6774
- {
6775
- "kind": "js",
6776
- "name": "default",
6777
- "declaration": {
6778
- "name": "meta",
6779
- "module": "stories/timered-counter/decimaljs.stories.ts"
6780
- }
6781
- },
6782
6267
  {
6783
6268
  "kind": "js",
6784
6269
  "name": "Basic",
@@ -6797,41 +6282,49 @@
6797
6282
  },
6798
6283
  {
6799
6284
  "kind": "js",
6800
- "name": "AnimationOptions",
6285
+ "name": "Styles",
6801
6286
  "declaration": {
6802
- "name": "AnimationOptions",
6287
+ "name": "Styles",
6803
6288
  "module": "./index.stories.js"
6804
6289
  }
6805
6290
  },
6806
6291
  {
6807
6292
  "kind": "js",
6808
- "name": "Slots",
6293
+ "name": "LocaleNumber",
6809
6294
  "declaration": {
6810
- "name": "Slots",
6295
+ "name": "LocaleNumber",
6811
6296
  "module": "./index.stories.js"
6812
6297
  }
6813
6298
  },
6814
6299
  {
6815
6300
  "kind": "js",
6816
- "name": "Styles",
6301
+ "name": "AnimationOptions",
6817
6302
  "declaration": {
6818
- "name": "Styles",
6303
+ "name": "AnimationOptions",
6819
6304
  "module": "./index.stories.js"
6820
6305
  }
6821
6306
  },
6307
+ {
6308
+ "kind": "js",
6309
+ "name": "default",
6310
+ "declaration": {
6311
+ "name": "meta",
6312
+ "module": "stories/timered-counter-number/decimaljs.stories.ts"
6313
+ }
6314
+ },
6822
6315
  {
6823
6316
  "kind": "js",
6824
6317
  "name": "BigNumber",
6825
6318
  "declaration": {
6826
6319
  "name": "BigNumber",
6827
- "module": "stories/timered-counter/decimaljs.stories.ts"
6320
+ "module": "stories/timered-counter-number/decimaljs.stories.ts"
6828
6321
  }
6829
6322
  }
6830
6323
  ]
6831
6324
  },
6832
6325
  {
6833
6326
  "kind": "javascript-module",
6834
- "path": "stories/timered-counter/index.stories.ts",
6327
+ "path": "stories/timered-counter-number/index.stories.ts",
6835
6328
  "declarations": [
6836
6329
  {
6837
6330
  "kind": "variable",
@@ -6839,13 +6332,13 @@
6839
6332
  "type": {
6840
6333
  "text": "Meta"
6841
6334
  },
6842
- "default": "{ title: 'TimeredCounter', component: 'timered-counter', tags: ['autodocs', 'timered-counter'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, globals: { setByAttr, setByProp, }, }"
6335
+ "default": "{ title: 'TimeredCounterNumber', component: 'timered-counter-number', tags: ['autodocs', 'timered-counter-number'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, }"
6843
6336
  },
6844
6337
  {
6845
6338
  "kind": "variable",
6846
6339
  "name": "Basic",
6847
6340
  "type": {
6848
- "text": "StoryObj<TimeredCounter>"
6341
+ "text": "StoryObj<TimeredCounterNumber>"
6849
6342
  },
6850
6343
  "default": "{ args: { className: 'test-target', // @ts-ignore value: '0', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await valueChange(context, { counter, setBy: setByAttr, }); await step('Edge case', async () => edgeCase(context, { counter, list: [ ['Setting an empty string', '', '0'], ['Setting a non-number', 'a', '0'], ['Setting a decimal number', '1.1', '1.1'], ['Setting a negative number', '-1', '-1'], ['Setting Infinity', 'Infinity', '0'], ['Setting NaN', 'NaN', '0'], ['Setting null', 'null', '0'], ['Setting undefined', 'undefined', '0'], ['Setting true', 'true', '0'], ['Setting false', 'false', '0'], ['Setting an object', '{}', '0'], ['Setting an array', '[]', '0'], ['Setting a function', '() => {}', '0'], ['Setting a Symbol', 'Symbol()', '0'], ['Setting a BigInt', 'BigInt(1)', '0'], ], setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await valueChange(context, { counter, setBy: setByProp }); await step('Edge case', async () => edgeCase(context, { counter, list: [ ['Setting an empty string', '', 0], ['Setting a non-number', 'a', 0], ['Setting a decimal number', '1.1', 1.1], ['Setting a negative number', '-1', -1], ['Setting Infinity', 'Infinity', 0], ['Setting NaN', 'NaN', 0], ['Setting null', 'null', 0], ['Setting undefined', 'undefined', 0], ['Setting true', 'true', 0], ['Setting false', 'false', 0], ['Setting an object', '{}', 0], ['Setting an array', '[]', 0], ['Setting a function', '() => {}', 0], ['Setting a Symbol', 'Symbol()', 0], ['Setting a BigInt', 'BigInt(1)', 0], ], setBy: setByProp, }), ); }); }, }"
6851
6344
  },
@@ -6853,7 +6346,7 @@
6853
6346
  "kind": "variable",
6854
6347
  "name": "Events",
6855
6348
  "type": {
6856
- "text": "StoryObj<TimeredCounter>"
6349
+ "text": "StoryObj<TimeredCounterNumber>"
6857
6350
  },
6858
6351
  "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Animation events', async () => animationEvents(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Animation events', async () => animationEvents(context, { counter, setBy: setByProp, }), ); }); }, }"
6859
6352
  },
@@ -6861,7 +6354,7 @@
6861
6354
  "kind": "variable",
6862
6355
  "name": "AnimationOptions",
6863
6356
  "type": {
6864
- "text": "StoryObj<TimeredCounter>"
6357
+ "text": "StoryObj<TimeredCounterNumber>"
6865
6358
  },
6866
6359
  "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Animation options', async () => animationOptions(context, { counter, setBy: setByAttr, }), ); }); // await step('Testing with property', async () => { // await step('Animation options', async () => // animationOptions(context, { // counter, // list, // setBy: setByProp, // }), // ); // }); }, }"
6867
6360
  },
@@ -6869,17 +6362,17 @@
6869
6362
  "kind": "variable",
6870
6363
  "name": "Styles",
6871
6364
  "type": {
6872
- "text": "StoryObj<TimeredCounter>"
6365
+ "text": "StoryObj<TimeredCounterNumber>"
6873
6366
  },
6874
6367
  "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Styles', async () => styles(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Styles', async () => styles(context, { counter, setBy: setByProp, }), ); }); }, }"
6875
6368
  },
6876
6369
  {
6877
6370
  "kind": "variable",
6878
- "name": "Slots",
6371
+ "name": "LocaleNumber",
6879
6372
  "type": {
6880
- "text": "StoryObj<TimeredCounter>"
6373
+ "text": "StoryObj<TimeredCounterNumber>"
6881
6374
  },
6882
- "default": "{ args: { className: 'test-target', value: 0, }, render: slotsRender, async play(context) { const { canvasElement } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await slots(context, { counter }); }, }"
6375
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Locale number', async () => localeNumber(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Locale number', async () => localeNumber(context, { counter, setBy: setByProp, }), ); }); }, }"
6883
6376
  }
6884
6377
  ],
6885
6378
  "exports": [
@@ -6888,7 +6381,7 @@
6888
6381
  "name": "default",
6889
6382
  "declaration": {
6890
6383
  "name": "meta",
6891
- "module": "stories/timered-counter/index.stories.ts"
6384
+ "module": "stories/timered-counter-number/index.stories.ts"
6892
6385
  }
6893
6386
  },
6894
6387
  {
@@ -6896,7 +6389,7 @@
6896
6389
  "name": "Basic",
6897
6390
  "declaration": {
6898
6391
  "name": "Basic",
6899
- "module": "stories/timered-counter/index.stories.ts"
6392
+ "module": "stories/timered-counter-number/index.stories.ts"
6900
6393
  }
6901
6394
  },
6902
6395
  {
@@ -6904,7 +6397,7 @@
6904
6397
  "name": "Events",
6905
6398
  "declaration": {
6906
6399
  "name": "Events",
6907
- "module": "stories/timered-counter/index.stories.ts"
6400
+ "module": "stories/timered-counter-number/index.stories.ts"
6908
6401
  }
6909
6402
  },
6910
6403
  {
@@ -6912,7 +6405,7 @@
6912
6405
  "name": "AnimationOptions",
6913
6406
  "declaration": {
6914
6407
  "name": "AnimationOptions",
6915
- "module": "stories/timered-counter/index.stories.ts"
6408
+ "module": "stories/timered-counter-number/index.stories.ts"
6916
6409
  }
6917
6410
  },
6918
6411
  {
@@ -6920,94 +6413,156 @@
6920
6413
  "name": "Styles",
6921
6414
  "declaration": {
6922
6415
  "name": "Styles",
6923
- "module": "stories/timered-counter/index.stories.ts"
6416
+ "module": "stories/timered-counter-number/index.stories.ts"
6924
6417
  }
6925
6418
  },
6926
6419
  {
6927
6420
  "kind": "js",
6928
- "name": "Slots",
6421
+ "name": "LocaleNumber",
6929
6422
  "declaration": {
6930
- "name": "Slots",
6931
- "module": "stories/timered-counter/index.stories.ts"
6423
+ "name": "LocaleNumber",
6424
+ "module": "stories/timered-counter-number/index.stories.ts"
6932
6425
  }
6933
6426
  }
6934
6427
  ]
6935
6428
  },
6936
6429
  {
6937
6430
  "kind": "javascript-module",
6938
- "path": "stories/timered-counter-datetime-duration/index.stories.ts",
6431
+ "path": "src/types/duration.ts",
6939
6432
  "declarations": [
6940
6433
  {
6941
6434
  "kind": "variable",
6942
- "name": "meta",
6435
+ "name": "DurationPartMillisecond",
6943
6436
  "type": {
6944
- "text": "Meta"
6437
+ "text": "{\n [DurationPartType.Millisecond]: 1,\n [DurationPartType.Second]: 1000,\n [DurationPartType.Minute]: 60000,\n [DurationPartType.Hour]: 3600000,\n [DurationPartType.Day]: 86400000,\n [DurationPartType.Week]: 604800000,\n [DurationPartType.Month]: 2629800000,\n [DurationPartType.Quarter]: 7889400000,\n [DurationPartType.Year]: 31557600000,\n}"
6945
6438
  },
6946
- "default": "{ title: 'TimeredCounterDatetimeDuration', component: 'timered-counter-datetime-duration', tags: ['autodocs', 'timered-counter-datetime-duration'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, }"
6439
+ "default": "{ [DurationPartType.Millisecond]: 1, [DurationPartType.Second]: 1000, [DurationPartType.Minute]: 60000, [DurationPartType.Hour]: 3600000, [DurationPartType.Day]: 86400000, [DurationPartType.Week]: 604800000, [DurationPartType.Month]: 2629800000, [DurationPartType.Quarter]: 7889400000, [DurationPartType.Year]: 31557600000, }"
6947
6440
  },
6948
6441
  {
6949
6442
  "kind": "variable",
6950
- "name": "Basic",
6443
+ "name": "DurationPartMillisecondToType",
6951
6444
  "type": {
6952
- "text": "StoryObj<TimeredCounterDatetimeDuration>"
6445
+ "text": "{\n 1: DurationPartType.Millisecond,\n 1000: DurationPartType.Second,\n 60000: DurationPartType.Minute,\n 3600000: DurationPartType.Hour,\n 86400000: DurationPartType.Day,\n 604800000: DurationPartType.Week,\n 2629800000: DurationPartType.Month,\n 7889400000: DurationPartType.Quarter,\n 31557600000: DurationPartType.Year,\n}"
6953
6446
  },
6954
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterDatetimeDuration; const list = [ ...range(0, 2).map(v => [new Date(), addSeconds(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addMinutes(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addHours(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addDays(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addMonths(new Date(), v)]), ...range(0, 2).map(v => [new Date(), addYears(new Date(), v)]), ]; await step('Testing with attribute', async () => { await valueChange(context, { counter, list, setBy: setByAttr, equal }); }); await step('Testing with property', async () => { await valueChange(context, { counter, list, setBy: setByProp, equal }); }); }, }"
6447
+ "default": "{ 1: DurationPartType.Millisecond, 1000: DurationPartType.Second, 60000: DurationPartType.Minute, 3600000: DurationPartType.Hour, 86400000: DurationPartType.Day, 604800000: DurationPartType.Week, 2629800000: DurationPartType.Month, 7889400000: DurationPartType.Quarter, 31557600000: DurationPartType.Year, }"
6448
+ }
6449
+ ],
6450
+ "exports": [
6451
+ {
6452
+ "kind": "js",
6453
+ "name": "DurationPartMillisecond",
6454
+ "declaration": {
6455
+ "name": "DurationPartMillisecond",
6456
+ "module": "src/types/duration.ts"
6457
+ }
6458
+ },
6459
+ {
6460
+ "kind": "js",
6461
+ "name": "DurationPartMillisecondToType",
6462
+ "declaration": {
6463
+ "name": "DurationPartMillisecondToType",
6464
+ "module": "src/types/duration.ts"
6465
+ }
6466
+ }
6467
+ ]
6468
+ },
6469
+ {
6470
+ "kind": "javascript-module",
6471
+ "path": "src/types/group.ts",
6472
+ "declarations": [],
6473
+ "exports": []
6474
+ },
6475
+ {
6476
+ "kind": "javascript-module",
6477
+ "path": "stories/timered-counter-string/decimaljs.stories.ts",
6478
+ "declarations": [
6479
+ {
6480
+ "kind": "variable",
6481
+ "name": "meta",
6482
+ "type": {
6483
+ "text": "Meta"
6484
+ },
6485
+ "default": "{ title: 'TimeredCounterString/with decimal.js', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); }, }"
6955
6486
  },
6956
6487
  {
6957
6488
  "kind": "variable",
6958
- "name": "Precision",
6489
+ "name": "Events",
6959
6490
  "type": {
6960
- "text": "StoryObj<TimeredCounterDatetimeDuration>"
6491
+ "text": "StoryObj<TimeredCounterString>"
6961
6492
  },
6962
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterDatetimeDuration; await step('Testing with attribute', async () => datetimePrecision(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', async () => datetimePrecision(context, { counter, setBy: setByProp, equal }), ); }, }"
6493
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list = range(0, 5).map(() => faker.lorem.sentence({ min: 1, max: 2 }), ); await step('Testing with attribute', () => animationEvents(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => animationEvents(context, { counter, list, setBy: setByProp, equal }), ); }, }"
6963
6494
  },
6964
6495
  {
6965
6496
  "kind": "variable",
6966
- "name": "Locale",
6497
+ "name": "BigNumber",
6967
6498
  "type": {
6968
- "text": "StoryObj<TimeredCounterDatetimeDuration>"
6499
+ "text": "StoryObj<TimeredCounterString>"
6969
6500
  },
6970
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterDatetimeDuration; await step('Testing with attribute', () => datetimeLocale(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', () => datetimeLocale(context, { counter, setBy: setByProp, equal }), ); }, }"
6501
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => bigNumber(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', async () => bigNumber(context, { counter, setBy: setByProp, equal }), ); }, }"
6971
6502
  }
6972
6503
  ],
6973
6504
  "exports": [
6974
6505
  {
6975
6506
  "kind": "js",
6976
- "name": "default",
6507
+ "name": "Basic",
6977
6508
  "declaration": {
6978
- "name": "meta",
6979
- "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6509
+ "name": "Basic",
6510
+ "module": "./index.stories.js"
6980
6511
  }
6981
6512
  },
6982
6513
  {
6983
6514
  "kind": "js",
6984
- "name": "Basic",
6515
+ "name": "AnimationOptions",
6985
6516
  "declaration": {
6986
- "name": "Basic",
6987
- "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6517
+ "name": "AnimationOptions",
6518
+ "module": "./index.stories.js"
6988
6519
  }
6989
6520
  },
6990
6521
  {
6991
6522
  "kind": "js",
6992
- "name": "Precision",
6523
+ "name": "Styles",
6993
6524
  "declaration": {
6994
- "name": "Precision",
6995
- "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6525
+ "name": "Styles",
6526
+ "module": "./index.stories.js"
6996
6527
  }
6997
6528
  },
6998
6529
  {
6999
6530
  "kind": "js",
7000
- "name": "Locale",
6531
+ "name": "Emoji",
7001
6532
  "declaration": {
7002
- "name": "Locale",
7003
- "module": "stories/timered-counter-datetime-duration/index.stories.ts"
6533
+ "name": "Emoji",
6534
+ "module": "./index.stories.js"
6535
+ }
6536
+ },
6537
+ {
6538
+ "kind": "js",
6539
+ "name": "default",
6540
+ "declaration": {
6541
+ "name": "meta",
6542
+ "module": "stories/timered-counter-string/decimaljs.stories.ts"
6543
+ }
6544
+ },
6545
+ {
6546
+ "kind": "js",
6547
+ "name": "Events",
6548
+ "declaration": {
6549
+ "name": "Events",
6550
+ "module": "stories/timered-counter-string/decimaljs.stories.ts"
6551
+ }
6552
+ },
6553
+ {
6554
+ "kind": "js",
6555
+ "name": "BigNumber",
6556
+ "declaration": {
6557
+ "name": "BigNumber",
6558
+ "module": "stories/timered-counter-string/decimaljs.stories.ts"
7004
6559
  }
7005
6560
  }
7006
6561
  ]
7007
6562
  },
7008
6563
  {
7009
6564
  "kind": "javascript-module",
7010
- "path": "stories/timered-counter-number/decimaljs.stories.ts",
6565
+ "path": "stories/timered-counter-string/grapheme-splitter.stories.ts",
7011
6566
  "declarations": [
7012
6567
  {
7013
6568
  "kind": "variable",
@@ -7015,15 +6570,23 @@
7015
6570
  "type": {
7016
6571
  "text": "Meta"
7017
6572
  },
7018
- "default": "{ title: 'TimeredCounterNumber/with decimal.js', component: 'timered-counter-number', tags: ['autodocs', 'timered-counter-number'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); }, }"
6573
+ "default": "{ title: 'TimeredCounterString/with grapheme-splitter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); setStringAdapter('grapheme-splitter'); }, }"
6574
+ },
6575
+ {
6576
+ "kind": "variable",
6577
+ "name": "Events",
6578
+ "type": {
6579
+ "text": "StoryObj<TimeredCounterString>"
6580
+ },
6581
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list = range(0, 5).map(() => faker.lorem.sentence({ min: 1, max: 2 }), ); await step('Testing with attribute', () => animationEvents(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => animationEvents(context, { counter, list, setBy: setByProp, equal }), ); }, }"
7019
6582
  },
7020
6583
  {
7021
6584
  "kind": "variable",
7022
6585
  "name": "BigNumber",
7023
6586
  "type": {
7024
- "text": "StoryObj<TimeredCounterNumber>"
6587
+ "text": "StoryObj<TimeredCounterString>"
7025
6588
  },
7026
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => bigNumber(context, { counter, setBy: setByAttr }), ); await step('Testing with property', async () => bigNumber(context, { counter, setBy: setByProp }), ); }, }"
6589
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => bigNumber(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', async () => bigNumber(context, { counter, setBy: setByProp, equal }), ); }, }"
7027
6590
  }
7028
6591
  ],
7029
6592
  "exports": [
@@ -7037,9 +6600,9 @@
7037
6600
  },
7038
6601
  {
7039
6602
  "kind": "js",
7040
- "name": "Events",
6603
+ "name": "AnimationOptions",
7041
6604
  "declaration": {
7042
- "name": "Events",
6605
+ "name": "AnimationOptions",
7043
6606
  "module": "./index.stories.js"
7044
6607
  }
7045
6608
  },
@@ -7053,26 +6616,26 @@
7053
6616
  },
7054
6617
  {
7055
6618
  "kind": "js",
7056
- "name": "LocaleNumber",
6619
+ "name": "Emoji",
7057
6620
  "declaration": {
7058
- "name": "LocaleNumber",
6621
+ "name": "Emoji",
7059
6622
  "module": "./index.stories.js"
7060
6623
  }
7061
6624
  },
7062
6625
  {
7063
6626
  "kind": "js",
7064
- "name": "AnimationOptions",
6627
+ "name": "default",
7065
6628
  "declaration": {
7066
- "name": "AnimationOptions",
7067
- "module": "./index.stories.js"
6629
+ "name": "meta",
6630
+ "module": "stories/timered-counter-string/grapheme-splitter.stories.ts"
7068
6631
  }
7069
6632
  },
7070
6633
  {
7071
6634
  "kind": "js",
7072
- "name": "default",
6635
+ "name": "Events",
7073
6636
  "declaration": {
7074
- "name": "meta",
7075
- "module": "stories/timered-counter-number/decimaljs.stories.ts"
6637
+ "name": "Events",
6638
+ "module": "stories/timered-counter-string/grapheme-splitter.stories.ts"
7076
6639
  }
7077
6640
  },
7078
6641
  {
@@ -7080,14 +6643,14 @@
7080
6643
  "name": "BigNumber",
7081
6644
  "declaration": {
7082
6645
  "name": "BigNumber",
7083
- "module": "stories/timered-counter-number/decimaljs.stories.ts"
6646
+ "module": "stories/timered-counter-string/grapheme-splitter.stories.ts"
7084
6647
  }
7085
6648
  }
7086
6649
  ]
7087
6650
  },
7088
6651
  {
7089
6652
  "kind": "javascript-module",
7090
- "path": "stories/timered-counter-number/index.stories.ts",
6653
+ "path": "stories/timered-counter-string/index.stories.ts",
7091
6654
  "declarations": [
7092
6655
  {
7093
6656
  "kind": "variable",
@@ -7095,47 +6658,47 @@
7095
6658
  "type": {
7096
6659
  "text": "Meta"
7097
6660
  },
7098
- "default": "{ title: 'TimeredCounterNumber', component: 'timered-counter-number', tags: ['autodocs', 'timered-counter-number'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, }"
6661
+ "default": "{ title: 'TimeredCounterString', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, }"
7099
6662
  },
7100
6663
  {
7101
6664
  "kind": "variable",
7102
6665
  "name": "Basic",
7103
6666
  "type": {
7104
- "text": "StoryObj<TimeredCounterNumber>"
6667
+ "text": "StoryObj<TimeredCounterString>"
7105
6668
  },
7106
- "default": "{ args: { className: 'test-target', // @ts-ignore value: '0', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await valueChange(context, { counter, setBy: setByAttr, }); await step('Edge case', async () => edgeCase(context, { counter, list: [ ['Setting an empty string', '', '0'], ['Setting a non-number', 'a', '0'], ['Setting a decimal number', '1.1', '1.1'], ['Setting a negative number', '-1', '-1'], ['Setting Infinity', 'Infinity', '0'], ['Setting NaN', 'NaN', '0'], ['Setting null', 'null', '0'], ['Setting undefined', 'undefined', '0'], ['Setting true', 'true', '0'], ['Setting false', 'false', '0'], ['Setting an object', '{}', '0'], ['Setting an array', '[]', '0'], ['Setting a function', '() => {}', '0'], ['Setting a Symbol', 'Symbol()', '0'], ['Setting a BigInt', 'BigInt(1)', '0'], ], setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await valueChange(context, { counter, setBy: setByProp }); await step('Edge case', async () => edgeCase(context, { counter, list: [ ['Setting an empty string', '', 0], ['Setting a non-number', 'a', 0], ['Setting a decimal number', '1.1', 1.1], ['Setting a negative number', '-1', -1], ['Setting Infinity', 'Infinity', 0], ['Setting NaN', 'NaN', 0], ['Setting null', 'null', 0], ['Setting undefined', 'undefined', 0], ['Setting true', 'true', 0], ['Setting false', 'false', 0], ['Setting an object', '{}', 0], ['Setting an array', '[]', 0], ['Setting a function', '() => {}', 0], ['Setting a Symbol', 'Symbol()', 0], ['Setting a BigInt', 'BigInt(1)', 0], ], setBy: setByProp, }), ); }); }, }"
6669
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterString; const list: string[] = [ 'Hello, World!', '你好,世界!', 'こんにちは、世界!', '안녕하세요, 세계!', // 太长了 // \"Bonjour, le monde!\", 'Hallo, Welt!', 'Ciao, mondo!', 'Olá, mundo!', 'Привет, мир!', // '¡Hola, mundo!', // 'Hej, världen!', // 'Merhaba, Dünya!', // 'مرحبا بالعالم!', // 'שלום, עולם!', // 'नमस्ते, दुनिया!', // 'سلام دنیا!', ]; await step('Testing with attribute', async () => { await valueChange(context, { counter, list, setBy: setByAttr, equal }); }); await step('Testing with property', async () => { await valueChange(context, { counter, list, setBy: setByProp, equal }); }); }, }"
7107
6670
  },
7108
6671
  {
7109
6672
  "kind": "variable",
7110
6673
  "name": "Events",
7111
6674
  "type": {
7112
- "text": "StoryObj<TimeredCounterNumber>"
6675
+ "text": "StoryObj<TimeredCounterString>"
7113
6676
  },
7114
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Animation events', async () => animationEvents(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Animation events', async () => animationEvents(context, { counter, setBy: setByProp, }), ); }); }, }"
6677
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list = range(0, 5).map(() => faker.lorem.word({ length: { min: 5, max: 10 } }), ); await step('Testing with attribute', () => animationEvents(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => animationEvents(context, { counter, list, setBy: setByProp, equal }), ); }, }"
7115
6678
  },
7116
6679
  {
7117
6680
  "kind": "variable",
7118
6681
  "name": "AnimationOptions",
7119
6682
  "type": {
7120
- "text": "StoryObj<TimeredCounterNumber>"
6683
+ "text": "StoryObj<TimeredCounterString>"
7121
6684
  },
7122
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Animation options', async () => animationOptions(context, { counter, setBy: setByAttr, }), ); }); // await step('Testing with property', async () => { // await step('Animation options', async () => // animationOptions(context, { // counter, // list, // setBy: setByProp, // }), // ); // }); }, }"
6685
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', () => animationOptions(context, { counter, setBy: setByAttr }), ); }, }"
7123
6686
  },
7124
6687
  {
7125
6688
  "kind": "variable",
7126
6689
  "name": "Styles",
7127
6690
  "type": {
7128
- "text": "StoryObj<TimeredCounterNumber>"
6691
+ "text": "StoryObj<TimeredCounterString>"
7129
6692
  },
7130
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Styles', async () => styles(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Styles', async () => styles(context, { counter, setBy: setByProp, }), ); }); }, }"
6693
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', () => styles(context, { counter, setBy: setByAttr }), ); await step('Testing with property', () => styles(context, { counter, setBy: setByProp }), ); }, }"
7131
6694
  },
7132
6695
  {
7133
6696
  "kind": "variable",
7134
- "name": "LocaleNumber",
6697
+ "name": "Emoji",
7135
6698
  "type": {
7136
- "text": "StoryObj<TimeredCounterNumber>"
6699
+ "text": "StoryObj<TimeredCounterString>"
7137
6700
  },
7138
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => { await step('Locale number', async () => localeNumber(context, { counter, setBy: setByAttr, }), ); }); await step('Testing with property', async () => { await step('Locale number', async () => localeNumber(context, { counter, setBy: setByProp, }), ); }); }, }"
6701
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, // partsOptions: { // fillChar: '1', // }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list: string[] = ['⌚', '↔️', '👩', '👩🏿', '🧑‍💻']; await step('Testing with attribute', () => emoji(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => emoji(context, { counter, list, setBy: setByProp, equal }), ); }, }"
7139
6702
  }
7140
6703
  ],
7141
6704
  "exports": [
@@ -7144,7 +6707,7 @@
7144
6707
  "name": "default",
7145
6708
  "declaration": {
7146
6709
  "name": "meta",
7147
- "module": "stories/timered-counter-number/index.stories.ts"
6710
+ "module": "stories/timered-counter-string/index.stories.ts"
7148
6711
  }
7149
6712
  },
7150
6713
  {
@@ -7152,7 +6715,7 @@
7152
6715
  "name": "Basic",
7153
6716
  "declaration": {
7154
6717
  "name": "Basic",
7155
- "module": "stories/timered-counter-number/index.stories.ts"
6718
+ "module": "stories/timered-counter-string/index.stories.ts"
7156
6719
  }
7157
6720
  },
7158
6721
  {
@@ -7160,7 +6723,7 @@
7160
6723
  "name": "Events",
7161
6724
  "declaration": {
7162
6725
  "name": "Events",
7163
- "module": "stories/timered-counter-number/index.stories.ts"
6726
+ "module": "stories/timered-counter-string/index.stories.ts"
7164
6727
  }
7165
6728
  },
7166
6729
  {
@@ -7168,7 +6731,7 @@
7168
6731
  "name": "AnimationOptions",
7169
6732
  "declaration": {
7170
6733
  "name": "AnimationOptions",
7171
- "module": "stories/timered-counter-number/index.stories.ts"
6734
+ "module": "stories/timered-counter-string/index.stories.ts"
7172
6735
  }
7173
6736
  },
7174
6737
  {
@@ -7176,22 +6739,22 @@
7176
6739
  "name": "Styles",
7177
6740
  "declaration": {
7178
6741
  "name": "Styles",
7179
- "module": "stories/timered-counter-number/index.stories.ts"
6742
+ "module": "stories/timered-counter-string/index.stories.ts"
7180
6743
  }
7181
6744
  },
7182
6745
  {
7183
6746
  "kind": "js",
7184
- "name": "LocaleNumber",
6747
+ "name": "Emoji",
7185
6748
  "declaration": {
7186
- "name": "LocaleNumber",
7187
- "module": "stories/timered-counter-number/index.stories.ts"
6749
+ "name": "Emoji",
6750
+ "module": "stories/timered-counter-string/index.stories.ts"
7188
6751
  }
7189
6752
  }
7190
6753
  ]
7191
6754
  },
7192
6755
  {
7193
6756
  "kind": "javascript-module",
7194
- "path": "stories/timered-counter-string/decimaljs.stories.ts",
6757
+ "path": "stories/timered-counter-string/intl-segmenter.stories.ts",
7195
6758
  "declarations": [
7196
6759
  {
7197
6760
  "kind": "variable",
@@ -7199,7 +6762,7 @@
7199
6762
  "type": {
7200
6763
  "text": "Meta"
7201
6764
  },
7202
- "default": "{ title: 'TimeredCounterString/with decimal.js', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); }, }"
6765
+ "default": "{ title: 'TimeredCounterString/with Intl Segmenter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); setStringAdapter('intl-segmenter'); }, }"
7203
6766
  },
7204
6767
  {
7205
6768
  "kind": "variable",
@@ -7256,7 +6819,7 @@
7256
6819
  "name": "default",
7257
6820
  "declaration": {
7258
6821
  "name": "meta",
7259
- "module": "stories/timered-counter-string/decimaljs.stories.ts"
6822
+ "module": "stories/timered-counter-string/intl-segmenter.stories.ts"
7260
6823
  }
7261
6824
  },
7262
6825
  {
@@ -7264,383 +6827,664 @@
7264
6827
  "name": "Events",
7265
6828
  "declaration": {
7266
6829
  "name": "Events",
7267
- "module": "stories/timered-counter-string/decimaljs.stories.ts"
6830
+ "module": "stories/timered-counter-string/intl-segmenter.stories.ts"
6831
+ }
6832
+ },
6833
+ {
6834
+ "kind": "js",
6835
+ "name": "BigNumber",
6836
+ "declaration": {
6837
+ "name": "BigNumber",
6838
+ "module": "stories/timered-counter-string/intl-segmenter.stories.ts"
6839
+ }
6840
+ }
6841
+ ]
6842
+ },
6843
+ {
6844
+ "kind": "javascript-module",
6845
+ "path": "stories/utils/index.ts",
6846
+ "declarations": [
6847
+ {
6848
+ "kind": "function",
6849
+ "name": "equal",
6850
+ "parameters": [
6851
+ {
6852
+ "name": "counter",
6853
+ "type": {
6854
+ "text": "TimeredCounter"
6855
+ }
6856
+ },
6857
+ {
6858
+ "name": "a",
6859
+ "type": {
6860
+ "text": "any"
6861
+ }
6862
+ },
6863
+ {
6864
+ "name": "b",
6865
+ "type": {
6866
+ "text": "any"
6867
+ }
6868
+ }
6869
+ ]
6870
+ },
6871
+ {
6872
+ "kind": "function",
6873
+ "name": "setByAttr",
6874
+ "parameters": [
6875
+ {
6876
+ "name": "element",
6877
+ "type": {
6878
+ "text": "TimeredCounter"
6879
+ }
6880
+ },
6881
+ {
6882
+ "name": "attr",
6883
+ "type": {
6884
+ "text": "string"
6885
+ }
6886
+ },
6887
+ {
6888
+ "name": "value",
6889
+ "type": {
6890
+ "text": "any"
6891
+ }
6892
+ }
6893
+ ]
6894
+ },
6895
+ {
6896
+ "kind": "function",
6897
+ "name": "setByProp",
6898
+ "parameters": [
6899
+ {
6900
+ "name": "element",
6901
+ "type": {
6902
+ "text": "TimeredCounter"
6903
+ }
6904
+ },
6905
+ {
6906
+ "name": "prop",
6907
+ "type": {
6908
+ "text": "string"
6909
+ }
6910
+ },
6911
+ {
6912
+ "name": "value",
6913
+ "type": {
6914
+ "text": "any"
6915
+ }
6916
+ }
6917
+ ]
6918
+ },
6919
+ {
6920
+ "kind": "function",
6921
+ "name": "sleep",
6922
+ "parameters": [
6923
+ {
6924
+ "name": "ms",
6925
+ "type": {
6926
+ "text": "number"
6927
+ }
6928
+ }
6929
+ ]
6930
+ }
6931
+ ],
6932
+ "exports": [
6933
+ {
6934
+ "kind": "js",
6935
+ "name": "equal",
6936
+ "declaration": {
6937
+ "name": "equal",
6938
+ "module": "stories/utils/index.ts"
6939
+ }
6940
+ },
6941
+ {
6942
+ "kind": "js",
6943
+ "name": "setByAttr",
6944
+ "declaration": {
6945
+ "name": "setByAttr",
6946
+ "module": "stories/utils/index.ts"
6947
+ }
6948
+ },
6949
+ {
6950
+ "kind": "js",
6951
+ "name": "setByProp",
6952
+ "declaration": {
6953
+ "name": "setByProp",
6954
+ "module": "stories/utils/index.ts"
6955
+ }
6956
+ },
6957
+ {
6958
+ "kind": "js",
6959
+ "name": "sleep",
6960
+ "declaration": {
6961
+ "name": "sleep",
6962
+ "module": "stories/utils/index.ts"
6963
+ }
6964
+ }
6965
+ ]
6966
+ },
6967
+ {
6968
+ "kind": "javascript-module",
6969
+ "path": "storybook-static/sb-manager/globals-module-info.js",
6970
+ "declarations": [
6971
+ {
6972
+ "kind": "variable",
6973
+ "name": "S"
6974
+ }
6975
+ ],
6976
+ "exports": [
6977
+ {
6978
+ "kind": "js",
6979
+ "name": "globalsModuleInfoMap",
6980
+ "declaration": {
6981
+ "name": "S",
6982
+ "module": "storybook-static/sb-manager/globals-module-info.js"
6983
+ }
6984
+ }
6985
+ ]
6986
+ },
6987
+ {
6988
+ "kind": "javascript-module",
6989
+ "path": "storybook-static/sb-manager/globals-runtime.js",
6990
+ "declarations": [],
6991
+ "exports": []
6992
+ },
6993
+ {
6994
+ "kind": "javascript-module",
6995
+ "path": "storybook-static/sb-manager/globals.js",
6996
+ "declarations": [
6997
+ {
6998
+ "kind": "variable",
6999
+ "name": "_",
7000
+ "type": {
7001
+ "text": "object"
7002
+ },
7003
+ "default": "{ react: \"__REACT__\", \"react-dom\": \"__REACT_DOM__\", \"react-dom/client\": \"__REACT_DOM_CLIENT__\", \"@storybook/icons\": \"__STORYBOOK_ICONS__\", \"storybook/internal/manager-api\": \"__STORYBOOK_API__\", \"@storybook/manager-api\": \"__STORYBOOK_API__\", \"@storybook/core/manager-api\": \"__STORYBOOK_API__\", \"storybook/internal/components\": \"__STORYBOOK_COMPONENTS__\", \"@storybook/components\": \"__STORYBOOK_COMPONENTS__\", \"@storybook/core/components\": \"__STORYBOOK_COMPONENTS__\", \"storybook/internal/channels\": \"__STORYBOOK_CHANNELS__\", \"@storybook/channels\": \"__STORYBOOK_CHANNELS__\", \"@storybook/core/channels\": \"__STORYBOOK_CHANNELS__\", \"storybook/internal/core-errors\": \"__STORYBOOK_CORE_EVENTS__\", \"@storybook/core-events\": \"__STORYBOOK_CORE_EVENTS__\", \"@storybook/core/core-events\": \"__STORYBOOK_CORE_EVENTS__\", \"storybook/internal/manager-errors\": \"__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__\", \"@storybook/core-events/manager-errors\": \"__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__\", \"@storybook/core/manager-errors\": \"__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__\", \"storybook/internal/router\": \"__STORYBOOK_ROUTER__\", \"@storybook/router\": \"__STORYBOOK_ROUTER__\", \"@storybook/core/router\": \"__STORYBOOK_ROUTER__\", \"storybook/internal/theming\": \"__STORYBOOK_THEMING__\", \"@storybook/theming\": \"__STORYBOOK_THEMING__\", \"@storybook/core/theming\": \"__STORYBOOK_THEMING__\", \"storybook/internal/theming/create\": \"__STORYBOOK_THEMING_CREATE__\", \"@storybook/theming/create\": \"__STORYBOOK_THEMING_CREATE__\", \"@storybook/core/theming/create\": \"__STORYBOOK_THEMING_CREATE__\", \"storybook/internal/client-logger\": \"__STORYBOOK_CLIENT_LOGGER__\", \"@storybook/client-logger\": \"__STORYBOOK_CLIENT_LOGGER__\", \"@storybook/core/client-logger\": \"__STORYBOOK_CLIENT_LOGGER__\", \"storybook/internal/types\": \"__STORYBOOK_TYPES__\", \"@storybook/types\": \"__STORYBOOK_TYPES__\", \"@storybook/core/types\": \"__STORYBOOK_TYPES__\" }"
7004
+ },
7005
+ {
7006
+ "kind": "variable",
7007
+ "name": "o"
7008
+ }
7009
+ ],
7010
+ "exports": [
7011
+ {
7012
+ "kind": "js",
7013
+ "name": "globalPackages",
7014
+ "declaration": {
7015
+ "name": "o",
7016
+ "module": "storybook-static/sb-manager/globals.js"
7268
7017
  }
7269
7018
  },
7270
7019
  {
7271
7020
  "kind": "js",
7272
- "name": "BigNumber",
7021
+ "name": "globalsNameReferenceMap",
7022
+ "declaration": {
7023
+ "name": "_",
7024
+ "module": "storybook-static/sb-manager/globals.js"
7025
+ }
7026
+ }
7027
+ ]
7028
+ },
7029
+ {
7030
+ "kind": "javascript-module",
7031
+ "path": "storybook-static/sb-manager/runtime.js",
7032
+ "declarations": [],
7033
+ "exports": []
7034
+ },
7035
+ {
7036
+ "kind": "javascript-module",
7037
+ "path": "storybook-static/sb-preview/globals.js",
7038
+ "declarations": [],
7039
+ "exports": []
7040
+ },
7041
+ {
7042
+ "kind": "javascript-module",
7043
+ "path": "storybook-static/sb-preview/runtime.js",
7044
+ "declarations": [],
7045
+ "exports": []
7046
+ },
7047
+ {
7048
+ "kind": "javascript-module",
7049
+ "path": "src/styles/timered-counter-datetime-styles.ts",
7050
+ "declarations": [
7051
+ {
7052
+ "kind": "variable",
7053
+ "name": "timeredCounterDatetimeStyles",
7054
+ "default": "css` ::part(part-suffix) { font-size: 0.4em; line-height: 1; } `"
7055
+ }
7056
+ ],
7057
+ "exports": [
7058
+ {
7059
+ "kind": "js",
7060
+ "name": "timeredCounterDatetimeStyles",
7273
7061
  "declaration": {
7274
- "name": "BigNumber",
7275
- "module": "stories/timered-counter-string/decimaljs.stories.ts"
7062
+ "name": "timeredCounterDatetimeStyles",
7063
+ "module": "src/styles/timered-counter-datetime-styles.ts"
7276
7064
  }
7277
7065
  }
7278
7066
  ]
7279
7067
  },
7280
7068
  {
7281
7069
  "kind": "javascript-module",
7282
- "path": "stories/timered-counter-string/grapheme-splitter.stories.ts",
7070
+ "path": "src/styles/timered-counter-number-styles.ts",
7283
7071
  "declarations": [
7284
7072
  {
7285
7073
  "kind": "variable",
7286
- "name": "meta",
7287
- "type": {
7288
- "text": "Meta"
7289
- },
7290
- "default": "{ title: 'TimeredCounterString/with grapheme-splitter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); setStringAdapter('grapheme-splitter'); }, }"
7291
- },
7292
- {
7293
- "kind": "variable",
7294
- "name": "Events",
7295
- "type": {
7296
- "text": "StoryObj<TimeredCounterString>"
7297
- },
7298
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list = range(0, 5).map(() => faker.lorem.sentence({ min: 1, max: 2 }), ); await step('Testing with attribute', () => animationEvents(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => animationEvents(context, { counter, list, setBy: setByProp, equal }), ); }, }"
7299
- },
7300
- {
7301
- "kind": "variable",
7302
- "name": "BigNumber",
7303
- "type": {
7304
- "text": "StoryObj<TimeredCounterString>"
7305
- },
7306
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => bigNumber(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', async () => bigNumber(context, { counter, setBy: setByProp, equal }), ); }, }"
7074
+ "name": "timeredCounterNumberStyles",
7075
+ "default": "css``"
7307
7076
  }
7308
7077
  ],
7309
7078
  "exports": [
7310
7079
  {
7311
7080
  "kind": "js",
7312
- "name": "Basic",
7313
- "declaration": {
7314
- "name": "Basic",
7315
- "module": "./index.stories.js"
7316
- }
7317
- },
7318
- {
7319
- "kind": "js",
7320
- "name": "AnimationOptions",
7321
- "declaration": {
7322
- "name": "AnimationOptions",
7323
- "module": "./index.stories.js"
7324
- }
7325
- },
7326
- {
7327
- "kind": "js",
7328
- "name": "Styles",
7081
+ "name": "timeredCounterNumberStyles",
7329
7082
  "declaration": {
7330
- "name": "Styles",
7331
- "module": "./index.stories.js"
7083
+ "name": "timeredCounterNumberStyles",
7084
+ "module": "src/styles/timered-counter-number-styles.ts"
7332
7085
  }
7333
- },
7086
+ }
7087
+ ]
7088
+ },
7089
+ {
7090
+ "kind": "javascript-module",
7091
+ "path": "src/styles/timered-counter-string-styles.ts",
7092
+ "declarations": [
7334
7093
  {
7335
- "kind": "js",
7336
- "name": "Emoji",
7337
- "declaration": {
7338
- "name": "Emoji",
7339
- "module": "./index.stories.js"
7340
- }
7341
- },
7094
+ "kind": "variable",
7095
+ "name": "timeredCounterStringStyles",
7096
+ "default": "css``"
7097
+ }
7098
+ ],
7099
+ "exports": [
7342
7100
  {
7343
7101
  "kind": "js",
7344
- "name": "default",
7102
+ "name": "timeredCounterStringStyles",
7345
7103
  "declaration": {
7346
- "name": "meta",
7347
- "module": "stories/timered-counter-string/grapheme-splitter.stories.ts"
7104
+ "name": "timeredCounterStringStyles",
7105
+ "module": "src/styles/timered-counter-string-styles.ts"
7348
7106
  }
7349
- },
7107
+ }
7108
+ ]
7109
+ },
7110
+ {
7111
+ "kind": "javascript-module",
7112
+ "path": "src/styles/timered-counter-styles.ts",
7113
+ "declarations": [
7350
7114
  {
7351
- "kind": "js",
7352
- "name": "Events",
7353
- "declaration": {
7354
- "name": "Events",
7355
- "module": "stories/timered-counter-string/grapheme-splitter.stories.ts"
7356
- }
7357
- },
7115
+ "kind": "variable",
7116
+ "name": "timeredCounterStyles",
7117
+ "default": "css` .timered-counter { position: relative; display: inline-flex; overflow: hidden; /** inline-block 和 overflow-hidden 同时存在会使得基线为下边缘. 手动设置 align-bottom 以修正这个问题. @see https://stackoverflow.com/questions/22421782/css-overflow-hidden-increases-height-of-container @see https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align */ vertical-align: bottom; } .timered-counter.debug { overflow: visible; } //.timered-counter-datetime-duration .duration-unit { // font-size: 0.4em; // line-height: 1; //} `"
7118
+ }
7119
+ ],
7120
+ "exports": [
7358
7121
  {
7359
7122
  "kind": "js",
7360
- "name": "BigNumber",
7123
+ "name": "timeredCounterStyles",
7361
7124
  "declaration": {
7362
- "name": "BigNumber",
7363
- "module": "stories/timered-counter-string/grapheme-splitter.stories.ts"
7125
+ "name": "timeredCounterStyles",
7126
+ "module": "src/styles/timered-counter-styles.ts"
7364
7127
  }
7365
7128
  }
7366
7129
  ]
7367
7130
  },
7368
7131
  {
7369
7132
  "kind": "javascript-module",
7370
- "path": "stories/timered-counter-string/index.stories.ts",
7133
+ "path": "src/utils/any-base.ts",
7371
7134
  "declarations": [
7372
7135
  {
7373
- "kind": "variable",
7374
- "name": "meta",
7375
- "type": {
7376
- "text": "Meta"
7377
- },
7378
- "default": "{ title: 'TimeredCounterString', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('number'); }, }"
7379
- },
7380
- {
7381
- "kind": "variable",
7382
- "name": "Basic",
7383
- "type": {
7384
- "text": "StoryObj<TimeredCounterString>"
7385
- },
7386
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterString; const list: string[] = [ 'Hello, World!', '你好,世界!', 'こんにちは、世界!', '안녕하세요, 세계!', // 太长了 // \"Bonjour, le monde!\", 'Hallo, Welt!', 'Ciao, mondo!', 'Olá, mundo!', 'Привет, мир!', // '¡Hola, mundo!', // 'Hej, världen!', // 'Merhaba, Dünya!', // 'مرحبا بالعالم!', // 'שלום, עולם!', // 'नमस्ते, दुनिया!', // 'سلام دنیا!', ]; await step('Testing with attribute', async () => { await valueChange(context, { counter, list, setBy: setByAttr, equal }); }); await step('Testing with property', async () => { await valueChange(context, { counter, list, setBy: setByProp, equal }); }); }, }"
7136
+ "kind": "function",
7137
+ "name": "anyBase",
7138
+ "parameters": [
7139
+ {
7140
+ "name": "sa",
7141
+ "type": {
7142
+ "text": "StringAdapter"
7143
+ }
7144
+ },
7145
+ {
7146
+ "name": "srcAlphabet",
7147
+ "type": {
7148
+ "text": "string"
7149
+ }
7150
+ },
7151
+ {
7152
+ "name": "dstAlphabet",
7153
+ "type": {
7154
+ "text": "string"
7155
+ }
7156
+ }
7157
+ ]
7387
7158
  },
7388
7159
  {
7389
7160
  "kind": "variable",
7390
- "name": "Events",
7161
+ "name": "BIN",
7391
7162
  "type": {
7392
- "text": "StoryObj<TimeredCounterString>"
7163
+ "text": "string"
7393
7164
  },
7394
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list = range(0, 5).map(() => faker.lorem.word({ length: { min: 5, max: 10 } }), ); await step('Testing with attribute', () => animationEvents(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => animationEvents(context, { counter, list, setBy: setByProp, equal }), ); }, }"
7165
+ "default": "'01'"
7395
7166
  },
7396
7167
  {
7397
7168
  "kind": "variable",
7398
- "name": "AnimationOptions",
7169
+ "name": "OCT",
7399
7170
  "type": {
7400
- "text": "StoryObj<TimeredCounterString>"
7171
+ "text": "string"
7401
7172
  },
7402
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', () => animationOptions(context, { counter, setBy: setByAttr }), ); }, }"
7173
+ "default": "'01234567'"
7403
7174
  },
7404
7175
  {
7405
7176
  "kind": "variable",
7406
- "name": "Styles",
7177
+ "name": "DEC",
7407
7178
  "type": {
7408
- "text": "StoryObj<TimeredCounterString>"
7179
+ "text": "string"
7409
7180
  },
7410
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', () => styles(context, { counter, setBy: setByAttr }), ); await step('Testing with property', () => styles(context, { counter, setBy: setByProp }), ); }, }"
7181
+ "default": "'0123456789'"
7411
7182
  },
7412
7183
  {
7413
7184
  "kind": "variable",
7414
- "name": "Emoji",
7185
+ "name": "HEX",
7415
7186
  "type": {
7416
- "text": "StoryObj<TimeredCounterString>"
7187
+ "text": "string"
7417
7188
  },
7418
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, // partsOptions: { // fillChar: '1', // }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list: string[] = ['⌚', '↔️', '👩', '👩🏿', '🧑‍💻']; await step('Testing with attribute', () => emoji(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => emoji(context, { counter, list, setBy: setByProp, equal }), ); }, }"
7189
+ "default": "'0123456789abcdef'"
7419
7190
  }
7420
7191
  ],
7421
7192
  "exports": [
7422
7193
  {
7423
7194
  "kind": "js",
7424
- "name": "default",
7425
- "declaration": {
7426
- "name": "meta",
7427
- "module": "stories/timered-counter-string/index.stories.ts"
7428
- }
7429
- },
7430
- {
7431
- "kind": "js",
7432
- "name": "Basic",
7195
+ "name": "anyBase",
7433
7196
  "declaration": {
7434
- "name": "Basic",
7435
- "module": "stories/timered-counter-string/index.stories.ts"
7197
+ "name": "anyBase",
7198
+ "module": "src/utils/any-base.ts"
7436
7199
  }
7437
7200
  },
7438
7201
  {
7439
7202
  "kind": "js",
7440
- "name": "Events",
7203
+ "name": "BIN",
7441
7204
  "declaration": {
7442
- "name": "Events",
7443
- "module": "stories/timered-counter-string/index.stories.ts"
7205
+ "name": "BIN",
7206
+ "module": "src/utils/any-base.ts"
7444
7207
  }
7445
7208
  },
7446
7209
  {
7447
7210
  "kind": "js",
7448
- "name": "AnimationOptions",
7211
+ "name": "OCT",
7449
7212
  "declaration": {
7450
- "name": "AnimationOptions",
7451
- "module": "stories/timered-counter-string/index.stories.ts"
7213
+ "name": "OCT",
7214
+ "module": "src/utils/any-base.ts"
7452
7215
  }
7453
7216
  },
7454
7217
  {
7455
7218
  "kind": "js",
7456
- "name": "Styles",
7219
+ "name": "DEC",
7457
7220
  "declaration": {
7458
- "name": "Styles",
7459
- "module": "stories/timered-counter-string/index.stories.ts"
7221
+ "name": "DEC",
7222
+ "module": "src/utils/any-base.ts"
7460
7223
  }
7461
7224
  },
7462
7225
  {
7463
7226
  "kind": "js",
7464
- "name": "Emoji",
7227
+ "name": "HEX",
7465
7228
  "declaration": {
7466
- "name": "Emoji",
7467
- "module": "stories/timered-counter-string/index.stories.ts"
7229
+ "name": "HEX",
7230
+ "module": "src/utils/any-base.ts"
7468
7231
  }
7469
7232
  }
7470
7233
  ]
7471
7234
  },
7472
7235
  {
7473
7236
  "kind": "javascript-module",
7474
- "path": "stories/timered-counter-string/intl-segmenter.stories.ts",
7237
+ "path": "src/utils/duration.ts",
7475
7238
  "declarations": [
7476
7239
  {
7477
- "kind": "variable",
7478
- "name": "meta",
7479
- "type": {
7480
- "text": "Meta"
7481
- },
7482
- "default": "{ title: 'TimeredCounterString/with Intl Segmenter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { setNumberAdapter('decimal.js'); setStringAdapter('intl-segmenter'); }, }"
7483
- },
7484
- {
7485
- "kind": "variable",
7486
- "name": "Events",
7487
- "type": {
7488
- "text": "StoryObj<TimeredCounterString>"
7240
+ "kind": "function",
7241
+ "name": "durationObject",
7242
+ "return": {
7243
+ "type": {
7244
+ "text": "{ [key in DurationPartType]?: number }"
7245
+ }
7489
7246
  },
7490
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100 }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; const list = range(0, 5).map(() => faker.lorem.sentence({ min: 1, max: 2 }), ); await step('Testing with attribute', () => animationEvents(context, { counter, list, setBy: setByAttr, equal }), ); await step('Testing with property', () => animationEvents(context, { counter, list, setBy: setByProp, equal }), ); }, }"
7247
+ "parameters": [
7248
+ {
7249
+ "name": "start",
7250
+ "type": {
7251
+ "text": "Date"
7252
+ }
7253
+ },
7254
+ {
7255
+ "name": "end",
7256
+ "type": {
7257
+ "text": "Date"
7258
+ }
7259
+ },
7260
+ {
7261
+ "name": "parts",
7262
+ "type": {
7263
+ "text": "DurationPartType[]"
7264
+ }
7265
+ }
7266
+ ],
7267
+ "description": "计算两个日期之间的时间间隔. 返回一个数组, 包含 parts 每个部分的值."
7491
7268
  },
7492
- {
7493
- "kind": "variable",
7494
- "name": "BigNumber",
7495
- "type": {
7496
- "text": "StoryObj<TimeredCounterString>"
7269
+ {
7270
+ "kind": "function",
7271
+ "name": "duration",
7272
+ "return": {
7273
+ "type": {
7274
+ "text": "number[]"
7275
+ }
7497
7276
  },
7498
- "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounter; await step('Testing with attribute', async () => bigNumber(context, { counter, setBy: setByAttr, equal }), ); await step('Testing with property', async () => bigNumber(context, { counter, setBy: setByProp, equal }), ); }, }"
7277
+ "parameters": [
7278
+ {
7279
+ "name": "start",
7280
+ "type": {
7281
+ "text": "Date"
7282
+ }
7283
+ },
7284
+ {
7285
+ "name": "end",
7286
+ "type": {
7287
+ "text": "Date"
7288
+ }
7289
+ },
7290
+ {
7291
+ "name": "parts",
7292
+ "type": {
7293
+ "text": "DurationPartType[]"
7294
+ }
7295
+ }
7296
+ ]
7499
7297
  }
7500
7298
  ],
7501
7299
  "exports": [
7502
7300
  {
7503
7301
  "kind": "js",
7504
- "name": "Basic",
7505
- "declaration": {
7506
- "name": "Basic",
7507
- "module": "./index.stories.js"
7508
- }
7509
- },
7510
- {
7511
- "kind": "js",
7512
- "name": "AnimationOptions",
7513
- "declaration": {
7514
- "name": "AnimationOptions",
7515
- "module": "./index.stories.js"
7516
- }
7517
- },
7518
- {
7519
- "kind": "js",
7520
- "name": "Styles",
7521
- "declaration": {
7522
- "name": "Styles",
7523
- "module": "./index.stories.js"
7524
- }
7525
- },
7526
- {
7527
- "kind": "js",
7528
- "name": "Emoji",
7529
- "declaration": {
7530
- "name": "Emoji",
7531
- "module": "./index.stories.js"
7532
- }
7533
- },
7534
- {
7535
- "kind": "js",
7536
- "name": "default",
7537
- "declaration": {
7538
- "name": "meta",
7539
- "module": "stories/timered-counter-string/intl-segmenter.stories.ts"
7540
- }
7541
- },
7542
- {
7543
- "kind": "js",
7544
- "name": "Events",
7302
+ "name": "durationObject",
7545
7303
  "declaration": {
7546
- "name": "Events",
7547
- "module": "stories/timered-counter-string/intl-segmenter.stories.ts"
7304
+ "name": "durationObject",
7305
+ "module": "src/utils/duration.ts"
7548
7306
  }
7549
7307
  },
7550
7308
  {
7551
7309
  "kind": "js",
7552
- "name": "BigNumber",
7310
+ "name": "duration",
7553
7311
  "declaration": {
7554
- "name": "BigNumber",
7555
- "module": "stories/timered-counter-string/intl-segmenter.stories.ts"
7312
+ "name": "duration",
7313
+ "module": "src/utils/duration.ts"
7556
7314
  }
7557
7315
  }
7558
7316
  ]
7559
7317
  },
7560
7318
  {
7561
7319
  "kind": "javascript-module",
7562
- "path": "stories/utils/index.ts",
7320
+ "path": "src/utils/extract-group-option.ts",
7563
7321
  "declarations": [
7564
7322
  {
7565
7323
  "kind": "function",
7566
- "name": "equal",
7324
+ "name": "extractGroupOption",
7567
7325
  "parameters": [
7568
7326
  {
7569
- "name": "counter",
7327
+ "name": "option",
7570
7328
  "type": {
7571
- "text": "TimeredCounter"
7329
+ "text": "P"
7572
7330
  }
7573
7331
  },
7574
7332
  {
7575
- "name": "a",
7333
+ "name": "getterOptions",
7576
7334
  "type": {
7577
- "text": "any"
7335
+ "text": "GroupGetterOptions"
7336
+ }
7337
+ }
7338
+ ]
7339
+ },
7340
+ {
7341
+ "kind": "function",
7342
+ "name": "extractPartOption",
7343
+ "parameters": [
7344
+ {
7345
+ "name": "option",
7346
+ "type": {
7347
+ "text": "P"
7578
7348
  }
7579
7349
  },
7580
7350
  {
7581
- "name": "b",
7351
+ "name": "getterOptions",
7582
7352
  "type": {
7583
- "text": "any"
7353
+ "text": "GroupGetterOptions"
7584
7354
  }
7585
7355
  }
7586
7356
  ]
7587
7357
  },
7588
7358
  {
7589
7359
  "kind": "function",
7590
- "name": "setByAttr",
7360
+ "name": "extractPartDigitOption",
7591
7361
  "parameters": [
7592
7362
  {
7593
- "name": "element",
7363
+ "name": "option",
7594
7364
  "type": {
7595
- "text": "TimeredCounter"
7365
+ "text": "P"
7596
7366
  }
7597
7367
  },
7598
7368
  {
7599
- "name": "attr",
7369
+ "name": "getterOptions",
7600
7370
  "type": {
7601
- "text": "string"
7371
+ "text": "GroupGetterOptions"
7372
+ }
7373
+ }
7374
+ ]
7375
+ },
7376
+ {
7377
+ "kind": "function",
7378
+ "name": "extractPartDigitCellOption",
7379
+ "parameters": [
7380
+ {
7381
+ "name": "option",
7382
+ "type": {
7383
+ "text": "P"
7602
7384
  }
7603
7385
  },
7604
7386
  {
7605
- "name": "value",
7387
+ "name": "getterOptions",
7606
7388
  "type": {
7607
- "text": "any"
7389
+ "text": "GroupGetterOptions"
7608
7390
  }
7609
7391
  }
7610
7392
  ]
7611
7393
  },
7612
7394
  {
7613
7395
  "kind": "function",
7614
- "name": "setByProp",
7396
+ "name": "mergeGroupOption",
7397
+ "return": {
7398
+ "type": {
7399
+ "text": "Result"
7400
+ }
7401
+ },
7615
7402
  "parameters": [
7616
7403
  {
7617
- "name": "element",
7404
+ "name": "data",
7618
7405
  "type": {
7619
- "text": "TimeredCounter"
7406
+ "text": "Result"
7620
7407
  }
7621
7408
  },
7622
7409
  {
7623
- "name": "prop",
7410
+ "name": "source",
7624
7411
  "type": {
7625
- "text": "string"
7412
+ "text": "Result"
7413
+ }
7414
+ }
7415
+ ]
7416
+ },
7417
+ {
7418
+ "kind": "function",
7419
+ "name": "mergePartOption",
7420
+ "return": {
7421
+ "type": {
7422
+ "text": "Result[]"
7423
+ }
7424
+ },
7425
+ "parameters": [
7426
+ {
7427
+ "name": "data",
7428
+ "default": "[]",
7429
+ "type": {
7430
+ "text": "Result[]"
7626
7431
  }
7627
7432
  },
7628
7433
  {
7629
- "name": "value",
7434
+ "name": "source",
7435
+ "default": "[]",
7630
7436
  "type": {
7631
- "text": "any"
7437
+ "text": "Result[]"
7632
7438
  }
7633
7439
  }
7634
7440
  ]
7635
7441
  },
7636
7442
  {
7637
7443
  "kind": "function",
7638
- "name": "sleep",
7444
+ "name": "mergePartDigitOption",
7445
+ "return": {
7446
+ "type": {
7447
+ "text": "Result[][]"
7448
+ }
7449
+ },
7639
7450
  "parameters": [
7640
7451
  {
7641
- "name": "ms",
7452
+ "name": "data",
7453
+ "default": "[]",
7642
7454
  "type": {
7643
- "text": "number"
7455
+ "text": "Result[][]"
7456
+ }
7457
+ },
7458
+ {
7459
+ "name": "source",
7460
+ "default": "[]",
7461
+ "type": {
7462
+ "text": "Result[][]"
7463
+ }
7464
+ }
7465
+ ]
7466
+ },
7467
+ {
7468
+ "kind": "function",
7469
+ "name": "mergePartDigitCellOption",
7470
+ "return": {
7471
+ "type": {
7472
+ "text": "Result[][][]"
7473
+ }
7474
+ },
7475
+ "parameters": [
7476
+ {
7477
+ "name": "data",
7478
+ "default": "[]",
7479
+ "type": {
7480
+ "text": "Result[][][]"
7481
+ }
7482
+ },
7483
+ {
7484
+ "name": "source",
7485
+ "default": "[]",
7486
+ "type": {
7487
+ "text": "Result[][][]"
7644
7488
  }
7645
7489
  }
7646
7490
  ]
@@ -7649,202 +7493,320 @@
7649
7493
  "exports": [
7650
7494
  {
7651
7495
  "kind": "js",
7652
- "name": "equal",
7496
+ "name": "extractGroupOption",
7653
7497
  "declaration": {
7654
- "name": "equal",
7655
- "module": "stories/utils/index.ts"
7498
+ "name": "extractGroupOption",
7499
+ "module": "src/utils/extract-group-option.ts"
7656
7500
  }
7657
7501
  },
7658
7502
  {
7659
7503
  "kind": "js",
7660
- "name": "setByAttr",
7504
+ "name": "extractPartOption",
7505
+ "declaration": {
7506
+ "name": "extractPartOption",
7507
+ "module": "src/utils/extract-group-option.ts"
7508
+ }
7509
+ },
7510
+ {
7511
+ "kind": "js",
7512
+ "name": "extractPartDigitOption",
7513
+ "declaration": {
7514
+ "name": "extractPartDigitOption",
7515
+ "module": "src/utils/extract-group-option.ts"
7516
+ }
7517
+ },
7518
+ {
7519
+ "kind": "js",
7520
+ "name": "extractPartDigitCellOption",
7521
+ "declaration": {
7522
+ "name": "extractPartDigitCellOption",
7523
+ "module": "src/utils/extract-group-option.ts"
7524
+ }
7525
+ },
7526
+ {
7527
+ "kind": "js",
7528
+ "name": "mergeGroupOption",
7529
+ "declaration": {
7530
+ "name": "mergeGroupOption",
7531
+ "module": "src/utils/extract-group-option.ts"
7532
+ }
7533
+ },
7534
+ {
7535
+ "kind": "js",
7536
+ "name": "mergePartOption",
7661
7537
  "declaration": {
7662
- "name": "setByAttr",
7663
- "module": "stories/utils/index.ts"
7538
+ "name": "mergePartOption",
7539
+ "module": "src/utils/extract-group-option.ts"
7664
7540
  }
7665
7541
  },
7666
7542
  {
7667
7543
  "kind": "js",
7668
- "name": "setByProp",
7544
+ "name": "mergePartDigitOption",
7669
7545
  "declaration": {
7670
- "name": "setByProp",
7671
- "module": "stories/utils/index.ts"
7546
+ "name": "mergePartDigitOption",
7547
+ "module": "src/utils/extract-group-option.ts"
7672
7548
  }
7673
7549
  },
7674
7550
  {
7675
7551
  "kind": "js",
7676
- "name": "sleep",
7552
+ "name": "mergePartDigitCellOption",
7677
7553
  "declaration": {
7678
- "name": "sleep",
7679
- "module": "stories/utils/index.ts"
7554
+ "name": "mergePartDigitCellOption",
7555
+ "module": "src/utils/extract-group-option.ts"
7680
7556
  }
7681
7557
  }
7682
7558
  ]
7683
7559
  },
7684
7560
  {
7685
7561
  "kind": "javascript-module",
7686
- "path": "src/styles/timered-counter-datetime-styles.ts",
7562
+ "path": "src/utils/iso8601-duration.ts",
7687
7563
  "declarations": [
7688
7564
  {
7689
- "kind": "variable",
7690
- "name": "timeredCounterDatetimeStyles",
7691
- "default": "css` ::part(part-suffix) { font-size: 0.4em; line-height: 1; } `"
7565
+ "kind": "function",
7566
+ "name": "iso8601Duration",
7567
+ "return": {
7568
+ "type": {
7569
+ "text": "string"
7570
+ }
7571
+ },
7572
+ "parameters": [
7573
+ {
7574
+ "name": "duration",
7575
+ "type": {
7576
+ "text": "{\n [key in DurationPartType]?: number;\n}"
7577
+ }
7578
+ }
7579
+ ]
7692
7580
  }
7693
7581
  ],
7694
7582
  "exports": [
7695
7583
  {
7696
7584
  "kind": "js",
7697
- "name": "timeredCounterDatetimeStyles",
7585
+ "name": "iso8601Duration",
7698
7586
  "declaration": {
7699
- "name": "timeredCounterDatetimeStyles",
7700
- "module": "src/styles/timered-counter-datetime-styles.ts"
7587
+ "name": "iso8601Duration",
7588
+ "module": "src/utils/iso8601-duration.ts"
7701
7589
  }
7702
7590
  }
7703
7591
  ]
7704
7592
  },
7705
7593
  {
7706
7594
  "kind": "javascript-module",
7707
- "path": "src/styles/timered-counter-number-styles.ts",
7595
+ "path": "src/utils/localized-date-time-fields.ts",
7708
7596
  "declarations": [
7709
7597
  {
7710
7598
  "kind": "variable",
7711
- "name": "timeredCounterNumberStyles",
7712
- "default": "css``"
7599
+ "name": "DateTimeFields",
7600
+ "type": {
7601
+ "text": "[\n \"era\",\n \"year\",\n \"quarter\",\n \"month\",\n \"weekOfYear\",\n \"weekday\",\n \"day\",\n \"dayPeriod\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n]"
7602
+ },
7603
+ "default": "[ \"era\", \"year\", \"quarter\", \"month\", \"weekOfYear\", \"weekday\", \"day\", \"dayPeriod\", \"hour\", \"minute\", \"second\", \"timeZoneName\", ]"
7604
+ },
7605
+ {
7606
+ "kind": "function",
7607
+ "name": "getLocalizedDateTimeFields",
7608
+ "parameters": [
7609
+ {
7610
+ "name": "locale",
7611
+ "type": {
7612
+ "text": "Intl.Locale"
7613
+ }
7614
+ }
7615
+ ]
7713
7616
  }
7714
7617
  ],
7715
7618
  "exports": [
7716
7619
  {
7717
7620
  "kind": "js",
7718
- "name": "timeredCounterNumberStyles",
7621
+ "name": "DateTimeFields",
7719
7622
  "declaration": {
7720
- "name": "timeredCounterNumberStyles",
7721
- "module": "src/styles/timered-counter-number-styles.ts"
7623
+ "name": "DateTimeFields",
7624
+ "module": "src/utils/localized-date-time-fields.ts"
7625
+ }
7626
+ },
7627
+ {
7628
+ "kind": "js",
7629
+ "name": "getLocalizedDateTimeFields",
7630
+ "declaration": {
7631
+ "name": "getLocalizedDateTimeFields",
7632
+ "module": "src/utils/localized-date-time-fields.ts"
7722
7633
  }
7723
7634
  }
7724
7635
  ]
7725
7636
  },
7726
7637
  {
7727
7638
  "kind": "javascript-module",
7728
- "path": "src/styles/timered-counter-string-styles.ts",
7639
+ "path": "src/utils/parse-json-string.ts",
7729
7640
  "declarations": [
7730
7641
  {
7731
- "kind": "variable",
7732
- "name": "timeredCounterStringStyles",
7733
- "default": "css``"
7642
+ "kind": "function",
7643
+ "name": "parseJsonString",
7644
+ "parameters": [
7645
+ {
7646
+ "name": "value",
7647
+ "type": {
7648
+ "text": "string"
7649
+ }
7650
+ }
7651
+ ]
7734
7652
  }
7735
7653
  ],
7736
7654
  "exports": [
7737
7655
  {
7738
7656
  "kind": "js",
7739
- "name": "timeredCounterStringStyles",
7657
+ "name": "parseJsonString",
7740
7658
  "declaration": {
7741
- "name": "timeredCounterStringStyles",
7742
- "module": "src/styles/timered-counter-string-styles.ts"
7659
+ "name": "parseJsonString",
7660
+ "module": "src/utils/parse-json-string.ts"
7743
7661
  }
7744
7662
  }
7745
7663
  ]
7746
7664
  },
7747
7665
  {
7748
7666
  "kind": "javascript-module",
7749
- "path": "src/styles/timered-counter-styles.ts",
7667
+ "path": "src/utils/polyfill-keyframes.ts",
7750
7668
  "declarations": [
7751
7669
  {
7752
- "kind": "variable",
7753
- "name": "timeredCounterStyles",
7754
- "default": "css` .timered-counter { position: relative; display: inline-flex; overflow: hidden; /** inline-block 和 overflow-hidden 同时存在会使得基线为下边缘. 手动设置 align-bottom 以修正这个问题. @see https://stackoverflow.com/questions/22421782/css-overflow-hidden-increases-height-of-container @see https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align */ vertical-align: bottom; } .timered-counter.debug { overflow: visible; } //.timered-counter-datetime-duration .duration-unit { // font-size: 0.4em; // line-height: 1; //} `"
7670
+ "kind": "function",
7671
+ "name": "polyfillKeyframes",
7672
+ "return": {
7673
+ "type": {
7674
+ "text": "Keyframe[]"
7675
+ }
7676
+ },
7677
+ "parameters": [
7678
+ {
7679
+ "name": "keyframes",
7680
+ "type": {
7681
+ "text": "Keyframe[] | PropertyIndexedKeyframes"
7682
+ }
7683
+ }
7684
+ ]
7755
7685
  }
7756
7686
  ],
7757
7687
  "exports": [
7758
7688
  {
7759
7689
  "kind": "js",
7760
- "name": "timeredCounterStyles",
7690
+ "name": "polyfillKeyframes",
7761
7691
  "declaration": {
7762
- "name": "timeredCounterStyles",
7763
- "module": "src/styles/timered-counter-styles.ts"
7692
+ "name": "polyfillKeyframes",
7693
+ "module": "src/utils/polyfill-keyframes.ts"
7764
7694
  }
7765
7695
  }
7766
7696
  ]
7767
7697
  },
7768
7698
  {
7769
7699
  "kind": "javascript-module",
7770
- "path": "storybook-static/sb-manager/globals-module-info.js",
7700
+ "path": "src/utils/preprocess-part-data.ts",
7771
7701
  "declarations": [
7772
7702
  {
7773
- "kind": "variable",
7774
- "name": "S"
7703
+ "kind": "function",
7704
+ "name": "preprocessPartData",
7705
+ "parameters": [
7706
+ {
7707
+ "name": "newDirection",
7708
+ "type": {
7709
+ "text": "'up' | 'down'"
7710
+ }
7711
+ },
7712
+ {
7713
+ "name": "newData",
7714
+ "type": {
7715
+ "text": "PartData[]"
7716
+ }
7717
+ },
7718
+ {
7719
+ "name": "oldDirection",
7720
+ "type": {
7721
+ "text": "'up' | 'down'"
7722
+ }
7723
+ },
7724
+ {
7725
+ "name": "oldData",
7726
+ "type": {
7727
+ "text": "PartData[]"
7728
+ }
7729
+ }
7730
+ ]
7775
7731
  }
7776
7732
  ],
7777
7733
  "exports": [
7778
7734
  {
7779
7735
  "kind": "js",
7780
- "name": "globalsModuleInfoMap",
7736
+ "name": "preprocessPartData",
7781
7737
  "declaration": {
7782
- "name": "S",
7783
- "module": "storybook-static/sb-manager/globals-module-info.js"
7738
+ "name": "preprocessPartData",
7739
+ "module": "src/utils/preprocess-part-data.ts"
7784
7740
  }
7785
7741
  }
7786
7742
  ]
7787
7743
  },
7788
7744
  {
7789
7745
  "kind": "javascript-module",
7790
- "path": "storybook-static/sb-manager/globals-runtime.js",
7791
- "declarations": [],
7792
- "exports": []
7793
- },
7794
- {
7795
- "kind": "javascript-module",
7796
- "path": "storybook-static/sb-manager/globals.js",
7746
+ "path": "src/utils/transition-digit.ts",
7797
7747
  "declarations": [
7798
7748
  {
7799
- "kind": "variable",
7800
- "name": "_",
7801
- "type": {
7802
- "text": "object"
7803
- },
7804
- "default": "{ react: \"__REACT__\", \"react-dom\": \"__REACT_DOM__\", \"react-dom/client\": \"__REACT_DOM_CLIENT__\", \"@storybook/icons\": \"__STORYBOOK_ICONS__\", \"storybook/internal/manager-api\": \"__STORYBOOK_API__\", \"@storybook/manager-api\": \"__STORYBOOK_API__\", \"@storybook/core/manager-api\": \"__STORYBOOK_API__\", \"storybook/internal/components\": \"__STORYBOOK_COMPONENTS__\", \"@storybook/components\": \"__STORYBOOK_COMPONENTS__\", \"@storybook/core/components\": \"__STORYBOOK_COMPONENTS__\", \"storybook/internal/channels\": \"__STORYBOOK_CHANNELS__\", \"@storybook/channels\": \"__STORYBOOK_CHANNELS__\", \"@storybook/core/channels\": \"__STORYBOOK_CHANNELS__\", \"storybook/internal/core-errors\": \"__STORYBOOK_CORE_EVENTS__\", \"@storybook/core-events\": \"__STORYBOOK_CORE_EVENTS__\", \"@storybook/core/core-events\": \"__STORYBOOK_CORE_EVENTS__\", \"storybook/internal/manager-errors\": \"__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__\", \"@storybook/core-events/manager-errors\": \"__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__\", \"@storybook/core/manager-errors\": \"__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__\", \"storybook/internal/router\": \"__STORYBOOK_ROUTER__\", \"@storybook/router\": \"__STORYBOOK_ROUTER__\", \"@storybook/core/router\": \"__STORYBOOK_ROUTER__\", \"storybook/internal/theming\": \"__STORYBOOK_THEMING__\", \"@storybook/theming\": \"__STORYBOOK_THEMING__\", \"@storybook/core/theming\": \"__STORYBOOK_THEMING__\", \"storybook/internal/theming/create\": \"__STORYBOOK_THEMING_CREATE__\", \"@storybook/theming/create\": \"__STORYBOOK_THEMING_CREATE__\", \"@storybook/core/theming/create\": \"__STORYBOOK_THEMING_CREATE__\", \"storybook/internal/client-logger\": \"__STORYBOOK_CLIENT_LOGGER__\", \"@storybook/client-logger\": \"__STORYBOOK_CLIENT_LOGGER__\", \"@storybook/core/client-logger\": \"__STORYBOOK_CLIENT_LOGGER__\", \"storybook/internal/types\": \"__STORYBOOK_TYPES__\", \"@storybook/types\": \"__STORYBOOK_TYPES__\", \"@storybook/core/types\": \"__STORYBOOK_TYPES__\" }"
7805
- },
7806
- {
7807
- "kind": "variable",
7808
- "name": "o"
7749
+ "kind": "function",
7750
+ "name": "transitionDigit",
7751
+ "parameters": [
7752
+ {
7753
+ "name": "na",
7754
+ "type": {
7755
+ "text": "NS"
7756
+ }
7757
+ },
7758
+ {
7759
+ "name": "from",
7760
+ "type": {
7761
+ "text": "V"
7762
+ }
7763
+ },
7764
+ {
7765
+ "name": "to",
7766
+ "type": {
7767
+ "text": "V"
7768
+ }
7769
+ },
7770
+ {
7771
+ "name": "count",
7772
+ "type": {
7773
+ "text": "number"
7774
+ }
7775
+ }
7776
+ ]
7809
7777
  }
7810
7778
  ],
7811
7779
  "exports": [
7812
7780
  {
7813
7781
  "kind": "js",
7814
- "name": "globalPackages",
7782
+ "name": "transitionDigit",
7815
7783
  "declaration": {
7816
- "name": "o",
7817
- "module": "storybook-static/sb-manager/globals.js"
7784
+ "name": "transitionDigit",
7785
+ "module": "src/utils/transition-digit.ts"
7818
7786
  }
7819
- },
7787
+ }
7788
+ ]
7789
+ },
7790
+ {
7791
+ "kind": "javascript-module",
7792
+ "path": "src/utils/uuid.ts",
7793
+ "declarations": [
7794
+ {
7795
+ "kind": "function",
7796
+ "name": "uuid"
7797
+ }
7798
+ ],
7799
+ "exports": [
7820
7800
  {
7821
7801
  "kind": "js",
7822
- "name": "globalsNameReferenceMap",
7802
+ "name": "uuid",
7823
7803
  "declaration": {
7824
- "name": "_",
7825
- "module": "storybook-static/sb-manager/globals.js"
7804
+ "name": "uuid",
7805
+ "module": "src/utils/uuid.ts"
7826
7806
  }
7827
7807
  }
7828
7808
  ]
7829
7809
  },
7830
- {
7831
- "kind": "javascript-module",
7832
- "path": "storybook-static/sb-manager/runtime.js",
7833
- "declarations": [],
7834
- "exports": []
7835
- },
7836
- {
7837
- "kind": "javascript-module",
7838
- "path": "storybook-static/sb-preview/globals.js",
7839
- "declarations": [],
7840
- "exports": []
7841
- },
7842
- {
7843
- "kind": "javascript-module",
7844
- "path": "storybook-static/sb-preview/runtime.js",
7845
- "declarations": [],
7846
- "exports": []
7847
- },
7848
7810
  {
7849
7811
  "kind": "javascript-module",
7850
7812
  "path": "coverage/storybook/lcov-report/block-navigation.js",
@@ -8402,12 +8364,12 @@
8402
8364
  {
8403
8365
  "kind": "variable",
8404
8366
  "name": "rollerStyles",
8405
- "default": "css` .counter-parts { display: inline-flex; flex: 1 1 auto; } .roller-part { white-space: nowrap; } .roller__prefix, .roller__suffix { flex: none; } .roller-part .roller-part__wrapper { display: inline-block; } .roller-part .roller-part__suffix { //display: inline-block; } `"
8367
+ "default": "css` .counter-parts { //display: inline-flex; flex: 1 1 auto; } .roller-part { //display: inline-flex; white-space: nowrap; } .roller__prefix, .roller__suffix { flex: none; } .roller-part .roller-part__wrapper { //display: inline-block; } .roller-part .roller-part__suffix { //display: inline-block; } `"
8406
8368
  },
8407
8369
  {
8408
8370
  "kind": "variable",
8409
8371
  "name": "rollerDigitStyles",
8410
- "default": "css` .roller-part-digit { position: relative; display: inline-block; } .placeholder { visibility: hidden; display: inline-block; } .roll-list { position: absolute; left: 0; display: inline-flex; width: 100%; flex-direction: column; align-items: center; } .roll-list.roll-list__up { top: 0; } .roll-list.roll-list__down { bottom: 0; } .roll-list__shadow { visibility: hidden; position: absolute; z-index: -10; display: inline-flex; flex-direction: column; white-space: nowrap; } .roll-item { display: inline-block; width: 100%; } .roll-item.roll-item__head { position: absolute; top: 100%; } .roll-item.roll-item__tail { position: absolute; bottom: 100%; } `"
8372
+ "default": "css` .roller-part-digit { position: relative; display: inline-block; } .placeholder { visibility: hidden; display: inline-block; } .roll-list { position: absolute; left: 0; display: inline-flex; width: 100%; flex-direction: column; align-items: center; } .roll-list.roll-list__up { top: 0; } .roll-list.roll-list__down { bottom: 0; } .roll-list__shadow { visibility: hidden; position: absolute; left: 0; top: 0; z-index: -10; display: inline-flex; flex-direction: column; white-space: nowrap; } .roll-item { display: inline-block; width: 100%; } .roll-item.roll-item__head { position: absolute; top: 100%; } .roll-item.roll-item__tail { position: absolute; bottom: 100%; } `"
8411
8373
  }
8412
8374
  ],
8413
8375
  "exports": [
@@ -8461,13 +8423,13 @@
8461
8423
  },
8462
8424
  {
8463
8425
  "kind": "javascript-module",
8464
- "path": "storybook-static/sb-addons/essentials-outline-8/manager-bundle.js",
8426
+ "path": "storybook-static/sb-addons/essentials-measure-7/manager-bundle.js",
8465
8427
  "declarations": [],
8466
8428
  "exports": []
8467
8429
  },
8468
8430
  {
8469
8431
  "kind": "javascript-module",
8470
- "path": "storybook-static/sb-addons/essentials-measure-7/manager-bundle.js",
8432
+ "path": "storybook-static/sb-addons/essentials-outline-8/manager-bundle.js",
8471
8433
  "declarations": [],
8472
8434
  "exports": []
8473
8435
  },