timered-counter 1.1.1 → 1.3.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/custom-elements.json +396 -68
  2. package/dist/custom-elements.json +396 -68
  3. package/dist/src/index.d.ts +2 -0
  4. package/dist/src/index.js +9 -0
  5. package/dist/src/index.js.map +1 -1
  6. package/dist/src/mixins/counter-parts.d.ts +2 -0
  7. package/dist/src/mixins/counter-parts.js +13 -6
  8. package/dist/src/mixins/counter-parts.js.map +1 -1
  9. package/dist/src/timered-counter-adapter.d.ts +2 -1
  10. package/dist/src/timered-counter-adapter.js +4 -1
  11. package/dist/src/timered-counter-adapter.js.map +1 -1
  12. package/dist/src/timered-counter-datetime-duration.d.ts +2 -1
  13. package/dist/src/timered-counter-datetime-duration.js +12 -16
  14. package/dist/src/timered-counter-datetime-duration.js.map +1 -1
  15. package/dist/src/timered-counter-number.js +5 -7
  16. package/dist/src/timered-counter-number.js.map +1 -1
  17. package/dist/src/timered-counter-string.js +4 -8
  18. package/dist/src/timered-counter-string.js.map +1 -1
  19. package/dist/src/timered-counter.js +5 -7
  20. package/dist/src/timered-counter.js.map +1 -1
  21. package/dist/src/transitions/roller/roller-digit.js +5 -7
  22. package/dist/src/transitions/roller/roller-digit.js.map +1 -1
  23. package/dist/src/transitions/roller/roller.js +5 -7
  24. package/dist/src/transitions/roller/roller.js.map +1 -1
  25. package/dist/src/transitions/roller/styles.js +1 -0
  26. package/dist/src/transitions/roller/styles.js.map +1 -1
  27. package/dist/src/utils/grace-define-custom-element.d.ts +1 -0
  28. package/dist/src/utils/grace-define-custom-element.js +10 -0
  29. package/dist/src/utils/grace-define-custom-element.js.map +1 -0
  30. package/dist/src/wrappers/vue/format-props.d.ts +1 -0
  31. package/dist/src/wrappers/vue/format-props.js +22 -0
  32. package/dist/src/wrappers/vue/format-props.js.map +1 -0
  33. package/dist/src/wrappers/vue/index.d.ts +14 -0
  34. package/dist/src/wrappers/vue/index.js +13 -0
  35. package/dist/src/wrappers/vue/index.js.map +1 -0
  36. package/dist/src/wrappers/vue/timered-counter-datetime-duration.d.ts +14 -0
  37. package/dist/src/wrappers/vue/timered-counter-datetime-duration.js +39 -0
  38. package/dist/src/wrappers/vue/timered-counter-datetime-duration.js.map +1 -0
  39. package/dist/src/wrappers/vue/timered-counter-number.d.ts +14 -0
  40. package/dist/src/wrappers/vue/timered-counter-number.js +39 -0
  41. package/dist/src/wrappers/vue/timered-counter-number.js.map +1 -0
  42. package/dist/src/wrappers/vue/timered-counter-string.d.ts +14 -0
  43. package/dist/src/wrappers/vue/timered-counter-string.js +38 -0
  44. package/dist/src/wrappers/vue/timered-counter-string.js.map +1 -0
  45. package/dist/stories/timered-counter/decimaljs.stories.js +1 -1
  46. package/dist/stories/timered-counter/decimaljs.stories.js.map +1 -1
  47. package/dist/stories/timered-counter-datetime-duration/index.stories.js +11 -8
  48. package/dist/stories/timered-counter-datetime-duration/index.stories.js.map +1 -1
  49. package/dist/stories/timered-counter-number/decimaljs.stories.js +1 -1
  50. package/dist/stories/timered-counter-number/decimaljs.stories.js.map +1 -1
  51. package/dist/stories/timered-counter-string/decimaljs.stories.js +1 -1
  52. package/dist/stories/timered-counter-string/decimaljs.stories.js.map +1 -1
  53. package/dist/stories/timered-counter-string/grapheme-splitter.stories.js +2 -2
  54. package/dist/stories/timered-counter-string/grapheme-splitter.stories.js.map +1 -1
  55. package/dist/stories/timered-counter-string/intl-segmenter.stories.js +1 -1
  56. package/dist/stories/timered-counter-string/intl-segmenter.stories.js.map +1 -1
  57. package/dist/timered-counter.esm-browser.js +54 -58
  58. package/dist/timered-counter.esm-browser.js.map +1 -1
  59. package/dist/timered-counter.global.js +48 -52
  60. package/dist/timered-counter.global.js.map +1 -1
  61. package/dist/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +20 -2
@@ -5,7 +5,16 @@
5
5
  {
6
6
  "kind": "javascript-module",
7
7
  "path": "src/index.ts",
8
- "declarations": [],
8
+ "declarations": [
9
+ {
10
+ "kind": "function",
11
+ "name": "registerDecimalJsNumberAdapter"
12
+ },
13
+ {
14
+ "kind": "function",
15
+ "name": "registerGraphemeSplitterStringAdapter"
16
+ }
17
+ ],
9
18
  "exports": [
10
19
  {
11
20
  "kind": "js",
@@ -62,6 +71,22 @@
62
71
  "name": "*",
63
72
  "package": "./timered-counter-adapter.js"
64
73
  }
74
+ },
75
+ {
76
+ "kind": "js",
77
+ "name": "registerDecimalJsNumberAdapter",
78
+ "declaration": {
79
+ "name": "registerDecimalJsNumberAdapter",
80
+ "module": "src/index.ts"
81
+ }
82
+ },
83
+ {
84
+ "kind": "js",
85
+ "name": "registerGraphemeSplitterStringAdapter",
86
+ "declaration": {
87
+ "name": "registerGraphemeSplitterStringAdapter",
88
+ "module": "src/index.ts"
89
+ }
65
90
  }
66
91
  ]
67
92
  },
@@ -191,7 +216,7 @@
191
216
  },
192
217
  {
193
218
  "kind": "method",
194
- "name": "registryAdapter",
219
+ "name": "registerAdapter",
195
220
  "static": true,
196
221
  "parameters": [
197
222
  {
@@ -252,6 +277,18 @@
252
277
  }
253
278
  }
254
279
  ]
280
+ },
281
+ {
282
+ "kind": "function",
283
+ "name": "registerAdapter",
284
+ "parameters": [
285
+ {
286
+ "name": "args",
287
+ "type": {
288
+ "text": "Parameters<(typeof TimeredCounterAdapter)['registerAdapter']>"
289
+ }
290
+ }
291
+ ]
255
292
  }
256
293
  ],
257
294
  "exports": [
@@ -294,6 +331,14 @@
294
331
  "name": "registerStringAdapter",
295
332
  "module": "src/timered-counter-adapter.ts"
296
333
  }
334
+ },
335
+ {
336
+ "kind": "js",
337
+ "name": "registerAdapter",
338
+ "declaration": {
339
+ "name": "registerAdapter",
340
+ "module": "src/timered-counter-adapter.ts"
341
+ }
297
342
  }
298
343
  ]
299
344
  },
@@ -318,7 +363,7 @@
318
363
  {
319
364
  "kind": "field",
320
365
  "name": "precision",
321
- "description": "计数器显示的精度.\n1. 当为单个值时, 表示最小精度.\n2. 当为数组时, 第一个值表示最小精度, 第二个值表示最大精度.",
366
+ "description": "计数器显示的精度.\n1. 当为单个值时, 仅显示该精度的时间部分.\n2. 当为数组时, 第一个值表示最小精度, 第二个值表示最大精度.",
322
367
  "default": "[DurationPartType.Second, DurationPartType.Day]",
323
368
  "attribute": "precision",
324
369
  "reflects": true
@@ -457,6 +502,29 @@
457
502
  "module": "src/mixins/counter-aira.ts"
458
503
  }
459
504
  },
505
+ {
506
+ "kind": "method",
507
+ "name": "shouldRebuildParts",
508
+ "return": {
509
+ "type": {
510
+ "text": "boolean"
511
+ }
512
+ },
513
+ "parameters": [
514
+ {
515
+ "name": "changedProperties",
516
+ "type": {
517
+ "text": "PropertyValues<this>"
518
+ }
519
+ }
520
+ ],
521
+ "description": "判断是否需要重新生成 parts 数据.\n\nprocessPartData 依赖 partsOptions 和 value 生成数据. 因此, 仅当依赖项变化时, 需要重新生成数据.",
522
+ "privacy": "protected",
523
+ "inheritedFrom": {
524
+ "name": "CounterPartsMixin",
525
+ "module": "src/mixins/counter-parts.ts"
526
+ }
527
+ },
460
528
  {
461
529
  "kind": "field",
462
530
  "name": "ariaLabel",
@@ -1029,7 +1097,7 @@
1029
1097
  "attributes": [
1030
1098
  {
1031
1099
  "name": "precision",
1032
- "description": "计数器显示的精度.\n1. 当为单个值时, 表示最小精度.\n2. 当为数组时, 第一个值表示最小精度, 第二个值表示最大精度.",
1100
+ "description": "计数器显示的精度.\n1. 当为单个值时, 仅显示该精度的时间部分.\n2. 当为数组时, 第一个值表示最小精度, 第二个值表示最大精度.",
1033
1101
  "default": "[DurationPartType.Second, DurationPartType.Day]",
1034
1102
  "fieldName": "precision"
1035
1103
  },
@@ -1188,8 +1256,6 @@
1188
1256
  "name": "TimeredCounter",
1189
1257
  "module": "/src/timered-counter.js"
1190
1258
  },
1191
- "tagName": "timered-counter-datetime-duration",
1192
- "customElement": true,
1193
1259
  "events": [
1194
1260
  {
1195
1261
  "name": "timered-counter-animation-start",
@@ -1222,14 +1288,6 @@
1222
1288
  "name": "TimeredCounterDatetimeDuration",
1223
1289
  "module": "src/timered-counter-datetime-duration.ts"
1224
1290
  }
1225
- },
1226
- {
1227
- "kind": "custom-element-definition",
1228
- "name": "timered-counter-datetime-duration",
1229
- "declaration": {
1230
- "name": "TimeredCounterDatetimeDuration",
1231
- "module": "src/timered-counter-datetime-duration.ts"
1232
- }
1233
1291
  }
1234
1292
  ]
1235
1293
  },
@@ -1706,6 +1764,29 @@
1706
1764
  "module": "src/mixins/counter-parts.ts"
1707
1765
  }
1708
1766
  },
1767
+ {
1768
+ "kind": "method",
1769
+ "name": "shouldRebuildParts",
1770
+ "return": {
1771
+ "type": {
1772
+ "text": "boolean"
1773
+ }
1774
+ },
1775
+ "parameters": [
1776
+ {
1777
+ "name": "changedProperties",
1778
+ "type": {
1779
+ "text": "PropertyValues<this>"
1780
+ }
1781
+ }
1782
+ ],
1783
+ "description": "判断是否需要重新生成 parts 数据.\n\nprocessPartData 依赖 partsOptions 和 value 生成数据. 因此, 仅当依赖项变化时, 需要重新生成数据.",
1784
+ "privacy": "protected",
1785
+ "inheritedFrom": {
1786
+ "name": "CounterPartsMixin",
1787
+ "module": "src/mixins/counter-parts.ts"
1788
+ }
1789
+ },
1709
1790
  {
1710
1791
  "kind": "method",
1711
1792
  "name": "processPartData",
@@ -2082,8 +2163,6 @@
2082
2163
  "name": "TimeredCounter",
2083
2164
  "module": "/src/timered-counter.js"
2084
2165
  },
2085
- "tagName": "timered-counter-number",
2086
- "customElement": true,
2087
2166
  "events": [
2088
2167
  {
2089
2168
  "name": "timered-counter-animation-start",
@@ -2116,14 +2195,6 @@
2116
2195
  "name": "TimeredCounterNumber",
2117
2196
  "module": "src/timered-counter-number.ts"
2118
2197
  }
2119
- },
2120
- {
2121
- "kind": "custom-element-definition",
2122
- "name": "timered-counter-number",
2123
- "declaration": {
2124
- "name": "TimeredCounterNumber",
2125
- "module": "src/timered-counter-number.ts"
2126
- }
2127
2198
  }
2128
2199
  ]
2129
2200
  },
@@ -2660,6 +2731,29 @@
2660
2731
  "module": "src/mixins/counter-parts.ts"
2661
2732
  }
2662
2733
  },
2734
+ {
2735
+ "kind": "method",
2736
+ "name": "shouldRebuildParts",
2737
+ "return": {
2738
+ "type": {
2739
+ "text": "boolean"
2740
+ }
2741
+ },
2742
+ "parameters": [
2743
+ {
2744
+ "name": "changedProperties",
2745
+ "type": {
2746
+ "text": "PropertyValues<this>"
2747
+ }
2748
+ }
2749
+ ],
2750
+ "description": "判断是否需要重新生成 parts 数据.\n\nprocessPartData 依赖 partsOptions 和 value 生成数据. 因此, 仅当依赖项变化时, 需要重新生成数据.",
2751
+ "privacy": "protected",
2752
+ "inheritedFrom": {
2753
+ "name": "CounterPartsMixin",
2754
+ "module": "src/mixins/counter-parts.ts"
2755
+ }
2756
+ },
2663
2757
  {
2664
2758
  "kind": "method",
2665
2759
  "name": "processPartData",
@@ -2854,8 +2948,6 @@
2854
2948
  "name": "TimeredCounter",
2855
2949
  "module": "/src/timered-counter.js"
2856
2950
  },
2857
- "tagName": "timered-counter-string",
2858
- "customElement": true,
2859
2951
  "attributes": [
2860
2952
  {
2861
2953
  "name": "aria-label",
@@ -3040,14 +3132,6 @@
3040
3132
  "name": "TimeredCounterString",
3041
3133
  "module": "src/timered-counter-string.ts"
3042
3134
  }
3043
- },
3044
- {
3045
- "kind": "custom-element-definition",
3046
- "name": "timered-counter-string",
3047
- "declaration": {
3048
- "name": "TimeredCounterString",
3049
- "module": "src/timered-counter-string.ts"
3050
- }
3051
3135
  }
3052
3136
  ]
3053
3137
  },
@@ -3512,6 +3596,29 @@
3512
3596
  "module": "src/mixins/counter-parts.ts"
3513
3597
  }
3514
3598
  },
3599
+ {
3600
+ "kind": "method",
3601
+ "name": "shouldRebuildParts",
3602
+ "return": {
3603
+ "type": {
3604
+ "text": "boolean"
3605
+ }
3606
+ },
3607
+ "parameters": [
3608
+ {
3609
+ "name": "changedProperties",
3610
+ "type": {
3611
+ "text": "PropertyValues<this>"
3612
+ }
3613
+ }
3614
+ ],
3615
+ "description": "判断是否需要重新生成 parts 数据.\n\nprocessPartData 依赖 partsOptions 和 value 生成数据. 因此, 仅当依赖项变化时, 需要重新生成数据.",
3616
+ "privacy": "protected",
3617
+ "inheritedFrom": {
3618
+ "name": "CounterPartsMixin",
3619
+ "module": "src/mixins/counter-parts.ts"
3620
+ }
3621
+ },
3515
3622
  {
3516
3623
  "kind": "method",
3517
3624
  "name": "processPartData",
@@ -3713,7 +3820,6 @@
3713
3820
  "name": "LitElement",
3714
3821
  "package": "lit"
3715
3822
  },
3716
- "tagName": "timered-counter",
3717
3823
  "customElement": true,
3718
3824
  "attributes": [
3719
3825
  {
@@ -3877,14 +3983,6 @@
3877
3983
  "name": "TimeredCounter",
3878
3984
  "module": "src/timered-counter.ts"
3879
3985
  }
3880
- },
3881
- {
3882
- "kind": "custom-element-definition",
3883
- "name": "timered-counter",
3884
- "declaration": {
3885
- "name": "TimeredCounter",
3886
- "module": "src/timered-counter.ts"
3887
- }
3888
3986
  }
3889
3987
  ]
3890
3988
  },
@@ -5093,6 +5191,23 @@
5093
5191
  }
5094
5192
  }
5095
5193
  ]
5194
+ },
5195
+ {
5196
+ "kind": "method",
5197
+ "name": "shouldRebuildParts",
5198
+ "return": {
5199
+ "type": {
5200
+ "text": "boolean"
5201
+ }
5202
+ },
5203
+ "parameters": [
5204
+ {
5205
+ "name": "changedProperties",
5206
+ "type": {
5207
+ "text": "PropertyValues<this>"
5208
+ }
5209
+ }
5210
+ ]
5096
5211
  }
5097
5212
  ]
5098
5213
  },
@@ -5195,6 +5310,25 @@
5195
5310
  }
5196
5311
  ]
5197
5312
  },
5313
+ {
5314
+ "kind": "method",
5315
+ "name": "shouldRebuildParts",
5316
+ "return": {
5317
+ "type": {
5318
+ "text": "boolean"
5319
+ }
5320
+ },
5321
+ "parameters": [
5322
+ {
5323
+ "name": "changedProperties",
5324
+ "type": {
5325
+ "text": "PropertyValues<this>"
5326
+ }
5327
+ }
5328
+ ],
5329
+ "description": "判断是否需要重新生成 parts 数据.\n\nprocessPartData 依赖 partsOptions 和 value 生成数据. 因此, 仅当依赖项变化时, 需要重新生成数据.",
5330
+ "privacy": "protected"
5331
+ },
5198
5332
  {
5199
5333
  "kind": "method",
5200
5334
  "name": "processPartData",
@@ -6358,6 +6492,53 @@
6358
6492
  }
6359
6493
  ]
6360
6494
  },
6495
+ {
6496
+ "kind": "javascript-module",
6497
+ "path": "src/utils/grace-define-custom-element.ts",
6498
+ "declarations": [
6499
+ {
6500
+ "kind": "function",
6501
+ "name": "graceDefineCustomElement",
6502
+ "return": {
6503
+ "type": {
6504
+ "text": "void"
6505
+ }
6506
+ },
6507
+ "parameters": [
6508
+ {
6509
+ "name": "tagName",
6510
+ "type": {
6511
+ "text": "string"
6512
+ }
6513
+ },
6514
+ {
6515
+ "name": "constructor",
6516
+ "type": {
6517
+ "text": "CustomElementConstructor"
6518
+ }
6519
+ }
6520
+ ]
6521
+ }
6522
+ ],
6523
+ "exports": [
6524
+ {
6525
+ "kind": "js",
6526
+ "name": "graceDefineCustomElement",
6527
+ "declaration": {
6528
+ "name": "graceDefineCustomElement",
6529
+ "module": "src/utils/grace-define-custom-element.ts"
6530
+ }
6531
+ },
6532
+ {
6533
+ "kind": "custom-element-definition",
6534
+ "name": "tagName",
6535
+ "declaration": {
6536
+ "name": "constructor",
6537
+ "module": "src/utils/grace-define-custom-element.ts"
6538
+ }
6539
+ }
6540
+ ]
6541
+ },
6361
6542
  {
6362
6543
  "kind": "javascript-module",
6363
6544
  "path": "src/utils/iso8601-duration.ts",
@@ -7012,7 +7193,7 @@
7012
7193
  "type": {
7013
7194
  "text": "Meta"
7014
7195
  },
7015
- "default": "{ title: 'TimeredCounter/with decimal.js', component: 'timered-counter', tags: ['autodocs', 'timered-counter'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registryAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); }, }"
7196
+ "default": "{ title: 'TimeredCounter/with decimal.js', component: 'timered-counter', tags: ['autodocs', 'timered-counter'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registerAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); }, }"
7016
7197
  },
7017
7198
  {
7018
7199
  "kind": "variable",
@@ -7204,7 +7385,7 @@
7204
7385
  "type": {
7205
7386
  "text": "StoryObj<TimeredCounterDatetimeDuration>"
7206
7387
  },
7207
- "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 }); }); }, }"
7388
+ "default": "{ args: { className: 'test-target', animationOptions: { duration: 100, }, precision: [DurationPartType.Millisecond, DurationPartType.Day], }, async play(context) { const { canvasElement, step } = context; const counter = canvasElement.querySelector( '.test-target', ) as TimeredCounterDatetimeDuration; const date = new Date('2025-06-10T09:43:36Z'); const list = [ ...range(0, 2).map(v => [date, addMilliseconds(date, v)]), ...range(0, 2).map(v => [date, addSeconds(date, v)]), ...range(0, 2).map(v => [date, addMinutes(date, v)]), ...range(0, 2).map(v => [date, addHours(date, v)]), ...range(0, 2).map(v => [date, addDays(date, v)]), ...range(0, 2).map(v => [date, addMonths(date, v)]), ...range(0, 2).map(v => [date, addYears(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 }); }); }, }"
7208
7389
  },
7209
7390
  {
7210
7391
  "kind": "variable",
@@ -7268,7 +7449,7 @@
7268
7449
  "type": {
7269
7450
  "text": "Meta"
7270
7451
  },
7271
- "default": "{ title: 'TimeredCounterNumber/with decimal.js', component: 'timered-counter-number', tags: ['autodocs', 'timered-counter-number'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registryAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); }, }"
7452
+ "default": "{ title: 'TimeredCounterNumber/with decimal.js', component: 'timered-counter-number', tags: ['autodocs', 'timered-counter-number'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registerAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); }, }"
7272
7453
  },
7273
7454
  {
7274
7455
  "kind": "variable",
@@ -7452,7 +7633,7 @@
7452
7633
  "type": {
7453
7634
  "text": "Meta"
7454
7635
  },
7455
- "default": "{ title: 'TimeredCounterString/with decimal.js', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registryAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); }, }"
7636
+ "default": "{ title: 'TimeredCounterString/with decimal.js', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registerAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); }, }"
7456
7637
  },
7457
7638
  {
7458
7639
  "kind": "variable",
@@ -7540,7 +7721,7 @@
7540
7721
  "type": {
7541
7722
  "text": "Meta"
7542
7723
  },
7543
- "default": "{ title: 'TimeredCounterString/with grapheme-splitter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registryAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.registryAdapter(GraphemeSplitterStringAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); TimeredCounterAdapter.setStringAdapter('grapheme-splitter'); }, }"
7724
+ "default": "{ title: 'TimeredCounterString/with grapheme-splitter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registerAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.registerAdapter(GraphemeSplitterStringAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); TimeredCounterAdapter.setStringAdapter('grapheme-splitter'); }, }"
7544
7725
  },
7545
7726
  {
7546
7727
  "kind": "variable",
@@ -7732,7 +7913,7 @@
7732
7913
  "type": {
7733
7914
  "text": "Meta"
7734
7915
  },
7735
- "default": "{ title: 'TimeredCounterString/with Intl Segmenter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registryAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); TimeredCounterAdapter.setStringAdapter('intl-segmenter'); }, }"
7916
+ "default": "{ title: 'TimeredCounterString/with Intl Segmenter', component: 'timered-counter-string', tags: ['autodocs', 'timered-counter-string'], parameters: { controls: { expanded: true }, }, beforeEach: () => { TimeredCounterAdapter.registerAdapter(DecimalJsNumberAdapter); TimeredCounterAdapter.setNumberAdapter('decimal.js'); TimeredCounterAdapter.setStringAdapter('intl-segmenter'); }, }"
7736
7917
  },
7737
7918
  {
7738
7919
  "kind": "variable",
@@ -8157,7 +8338,6 @@
8157
8338
  "name": "LitElement",
8158
8339
  "package": "lit"
8159
8340
  },
8160
- "tagName": "timered-counter-roller-digit",
8161
8341
  "customElement": true
8162
8342
  }
8163
8343
  ],
@@ -8169,14 +8349,6 @@
8169
8349
  "name": "TimeredCounterRollerDigit",
8170
8350
  "module": "src/transitions/roller/roller-digit.ts"
8171
8351
  }
8172
- },
8173
- {
8174
- "kind": "custom-element-definition",
8175
- "name": "timered-counter-roller-digit",
8176
- "declaration": {
8177
- "name": "TimeredCounterRollerDigit",
8178
- "module": "src/transitions/roller/roller-digit.ts"
8179
- }
8180
8352
  }
8181
8353
  ]
8182
8354
  },
@@ -8443,7 +8615,6 @@
8443
8615
  "name": "LitElement",
8444
8616
  "package": "lit"
8445
8617
  },
8446
- "tagName": "timered-counter-roller",
8447
8618
  "customElement": true
8448
8619
  }
8449
8620
  ],
@@ -8455,14 +8626,6 @@
8455
8626
  "name": "TimeredCounterRoller",
8456
8627
  "module": "src/transitions/roller/roller.ts"
8457
8628
  }
8458
- },
8459
- {
8460
- "kind": "custom-element-definition",
8461
- "name": "timered-counter-roller",
8462
- "declaration": {
8463
- "name": "TimeredCounterRoller",
8464
- "module": "src/transitions/roller/roller.ts"
8465
- }
8466
8629
  }
8467
8630
  ]
8468
8631
  },
@@ -8473,7 +8636,7 @@
8473
8636
  {
8474
8637
  "kind": "variable",
8475
8638
  "name": "rollerStyles",
8476
- "default": "css` :host { 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; } .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; } `"
8639
+ "default": "css` :host { 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; } .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; text-align: center; } .roller-part .roller-part__suffix { display: inline-block; } `"
8477
8640
  },
8478
8641
  {
8479
8642
  "kind": "variable",
@@ -8499,6 +8662,171 @@
8499
8662
  }
8500
8663
  }
8501
8664
  ]
8665
+ },
8666
+ {
8667
+ "kind": "javascript-module",
8668
+ "path": "src/wrappers/vue/format-props.ts",
8669
+ "declarations": [
8670
+ {
8671
+ "kind": "function",
8672
+ "name": "formatProps",
8673
+ "return": {
8674
+ "type": {
8675
+ "text": "P"
8676
+ }
8677
+ },
8678
+ "parameters": [
8679
+ {
8680
+ "name": "props",
8681
+ "type": {
8682
+ "text": "P"
8683
+ }
8684
+ }
8685
+ ]
8686
+ }
8687
+ ],
8688
+ "exports": [
8689
+ {
8690
+ "kind": "js",
8691
+ "name": "formatProps",
8692
+ "declaration": {
8693
+ "name": "formatProps",
8694
+ "module": "src/wrappers/vue/format-props.ts"
8695
+ }
8696
+ }
8697
+ ]
8698
+ },
8699
+ {
8700
+ "kind": "javascript-module",
8701
+ "path": "src/wrappers/vue/index.ts",
8702
+ "declarations": [
8703
+ {
8704
+ "kind": "variable",
8705
+ "name": "TimeredCounterPlugin",
8706
+ "type": {
8707
+ "text": "Plugin"
8708
+ },
8709
+ "default": "{ install: (app: App) => { app.component('TimeredCounterNumber', TimeredCounterNumber); app.component( 'TimeredCounterDatetimeDuration', TimeredCounterDatetimeDuration, ); app.component('TimeredCounterString', TimeredCounterString); }, }"
8710
+ }
8711
+ ],
8712
+ "exports": [
8713
+ {
8714
+ "kind": "js",
8715
+ "name": "TimeredCounterNumber",
8716
+ "declaration": {
8717
+ "name": "TimeredCounterNumber",
8718
+ "module": "src/wrappers/vue/index.ts"
8719
+ }
8720
+ },
8721
+ {
8722
+ "kind": "js",
8723
+ "name": "TimeredCounterString",
8724
+ "declaration": {
8725
+ "name": "TimeredCounterString",
8726
+ "module": "src/wrappers/vue/index.ts"
8727
+ }
8728
+ },
8729
+ {
8730
+ "kind": "js",
8731
+ "name": "TimeredCounterDatetimeDuration",
8732
+ "declaration": {
8733
+ "name": "TimeredCounterDatetimeDuration",
8734
+ "module": "src/wrappers/vue/index.ts"
8735
+ }
8736
+ },
8737
+ {
8738
+ "kind": "js",
8739
+ "name": "default",
8740
+ "declaration": {
8741
+ "name": "TimeredCounterPlugin",
8742
+ "module": "src/wrappers/vue/index.ts"
8743
+ }
8744
+ }
8745
+ ]
8746
+ },
8747
+ {
8748
+ "kind": "javascript-module",
8749
+ "path": "src/wrappers/vue/timered-counter-datetime-duration.ts",
8750
+ "declarations": [
8751
+ {
8752
+ "kind": "function",
8753
+ "name": "TimeredCounterDatetimeDuration",
8754
+ "parameters": [
8755
+ {
8756
+ "name": "props"
8757
+ },
8758
+ {
8759
+ "name": "{ attrs, slots, emit }"
8760
+ }
8761
+ ]
8762
+ }
8763
+ ],
8764
+ "exports": [
8765
+ {
8766
+ "kind": "js",
8767
+ "name": "TimeredCounterDatetimeDuration",
8768
+ "declaration": {
8769
+ "name": "TimeredCounterDatetimeDuration",
8770
+ "module": "src/wrappers/vue/timered-counter-datetime-duration.ts"
8771
+ }
8772
+ }
8773
+ ]
8774
+ },
8775
+ {
8776
+ "kind": "javascript-module",
8777
+ "path": "src/wrappers/vue/timered-counter-number.ts",
8778
+ "declarations": [
8779
+ {
8780
+ "kind": "function",
8781
+ "name": "TimeredCounterNumber",
8782
+ "parameters": [
8783
+ {
8784
+ "name": "props"
8785
+ },
8786
+ {
8787
+ "name": "{ attrs, slots, emit }"
8788
+ }
8789
+ ]
8790
+ }
8791
+ ],
8792
+ "exports": [
8793
+ {
8794
+ "kind": "js",
8795
+ "name": "TimeredCounterNumber",
8796
+ "declaration": {
8797
+ "name": "TimeredCounterNumber",
8798
+ "module": "src/wrappers/vue/timered-counter-number.ts"
8799
+ }
8800
+ }
8801
+ ]
8802
+ },
8803
+ {
8804
+ "kind": "javascript-module",
8805
+ "path": "src/wrappers/vue/timered-counter-string.ts",
8806
+ "declarations": [
8807
+ {
8808
+ "kind": "function",
8809
+ "name": "TimeredCounterString",
8810
+ "parameters": [
8811
+ {
8812
+ "name": "props"
8813
+ },
8814
+ {
8815
+ "name": "{ attrs, slots, emit }"
8816
+ }
8817
+ ]
8818
+ }
8819
+ ],
8820
+ "exports": [
8821
+ {
8822
+ "kind": "js",
8823
+ "name": "TimeredCounterString",
8824
+ "declaration": {
8825
+ "name": "TimeredCounterString",
8826
+ "module": "src/wrappers/vue/timered-counter-string.ts"
8827
+ }
8828
+ }
8829
+ ]
8502
8830
  }
8503
8831
  ]
8504
8832
  }