timered-counter 1.2.0 → 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 (54) hide show
  1. package/custom-elements.json +264 -64
  2. package/dist/custom-elements.json +264 -64
  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/timered-counter-adapter.d.ts +2 -1
  7. package/dist/src/timered-counter-adapter.js +4 -1
  8. package/dist/src/timered-counter-adapter.js.map +1 -1
  9. package/dist/src/timered-counter-datetime-duration.js +5 -7
  10. package/dist/src/timered-counter-datetime-duration.js.map +1 -1
  11. package/dist/src/timered-counter-number.js +5 -7
  12. package/dist/src/timered-counter-number.js.map +1 -1
  13. package/dist/src/timered-counter-string.js +4 -8
  14. package/dist/src/timered-counter-string.js.map +1 -1
  15. package/dist/src/timered-counter.js +5 -7
  16. package/dist/src/timered-counter.js.map +1 -1
  17. package/dist/src/transitions/roller/roller-digit.js +5 -7
  18. package/dist/src/transitions/roller/roller-digit.js.map +1 -1
  19. package/dist/src/transitions/roller/roller.js +5 -7
  20. package/dist/src/transitions/roller/roller.js.map +1 -1
  21. package/dist/src/utils/grace-define-custom-element.d.ts +1 -0
  22. package/dist/src/utils/grace-define-custom-element.js +10 -0
  23. package/dist/src/utils/grace-define-custom-element.js.map +1 -0
  24. package/dist/src/wrappers/vue/format-props.d.ts +1 -0
  25. package/dist/src/wrappers/vue/format-props.js +22 -0
  26. package/dist/src/wrappers/vue/format-props.js.map +1 -0
  27. package/dist/src/wrappers/vue/index.d.ts +14 -0
  28. package/dist/src/wrappers/vue/index.js +13 -0
  29. package/dist/src/wrappers/vue/index.js.map +1 -0
  30. package/dist/src/wrappers/vue/timered-counter-datetime-duration.d.ts +14 -0
  31. package/dist/src/wrappers/vue/timered-counter-datetime-duration.js +39 -0
  32. package/dist/src/wrappers/vue/timered-counter-datetime-duration.js.map +1 -0
  33. package/dist/src/wrappers/vue/timered-counter-number.d.ts +14 -0
  34. package/dist/src/wrappers/vue/timered-counter-number.js +39 -0
  35. package/dist/src/wrappers/vue/timered-counter-number.js.map +1 -0
  36. package/dist/src/wrappers/vue/timered-counter-string.d.ts +14 -0
  37. package/dist/src/wrappers/vue/timered-counter-string.js +38 -0
  38. package/dist/src/wrappers/vue/timered-counter-string.js.map +1 -0
  39. package/dist/stories/timered-counter/decimaljs.stories.js +1 -1
  40. package/dist/stories/timered-counter/decimaljs.stories.js.map +1 -1
  41. package/dist/stories/timered-counter-number/decimaljs.stories.js +1 -1
  42. package/dist/stories/timered-counter-number/decimaljs.stories.js.map +1 -1
  43. package/dist/stories/timered-counter-string/decimaljs.stories.js +1 -1
  44. package/dist/stories/timered-counter-string/decimaljs.stories.js.map +1 -1
  45. package/dist/stories/timered-counter-string/grapheme-splitter.stories.js +2 -2
  46. package/dist/stories/timered-counter-string/grapheme-splitter.stories.js.map +1 -1
  47. package/dist/stories/timered-counter-string/intl-segmenter.stories.js +1 -1
  48. package/dist/stories/timered-counter-string/intl-segmenter.stories.js.map +1 -1
  49. package/dist/timered-counter.esm-browser.js +53 -58
  50. package/dist/timered-counter.esm-browser.js.map +1 -1
  51. package/dist/timered-counter.global.js +47 -52
  52. package/dist/timered-counter.global.js.map +1 -1
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. 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
  },
@@ -1211,8 +1256,6 @@
1211
1256
  "name": "TimeredCounter",
1212
1257
  "module": "/src/timered-counter.js"
1213
1258
  },
1214
- "tagName": "timered-counter-datetime-duration",
1215
- "customElement": true,
1216
1259
  "events": [
1217
1260
  {
1218
1261
  "name": "timered-counter-animation-start",
@@ -1245,14 +1288,6 @@
1245
1288
  "name": "TimeredCounterDatetimeDuration",
1246
1289
  "module": "src/timered-counter-datetime-duration.ts"
1247
1290
  }
1248
- },
1249
- {
1250
- "kind": "custom-element-definition",
1251
- "name": "timered-counter-datetime-duration",
1252
- "declaration": {
1253
- "name": "TimeredCounterDatetimeDuration",
1254
- "module": "src/timered-counter-datetime-duration.ts"
1255
- }
1256
1291
  }
1257
1292
  ]
1258
1293
  },
@@ -2128,8 +2163,6 @@
2128
2163
  "name": "TimeredCounter",
2129
2164
  "module": "/src/timered-counter.js"
2130
2165
  },
2131
- "tagName": "timered-counter-number",
2132
- "customElement": true,
2133
2166
  "events": [
2134
2167
  {
2135
2168
  "name": "timered-counter-animation-start",
@@ -2162,14 +2195,6 @@
2162
2195
  "name": "TimeredCounterNumber",
2163
2196
  "module": "src/timered-counter-number.ts"
2164
2197
  }
2165
- },
2166
- {
2167
- "kind": "custom-element-definition",
2168
- "name": "timered-counter-number",
2169
- "declaration": {
2170
- "name": "TimeredCounterNumber",
2171
- "module": "src/timered-counter-number.ts"
2172
- }
2173
2198
  }
2174
2199
  ]
2175
2200
  },
@@ -2923,8 +2948,6 @@
2923
2948
  "name": "TimeredCounter",
2924
2949
  "module": "/src/timered-counter.js"
2925
2950
  },
2926
- "tagName": "timered-counter-string",
2927
- "customElement": true,
2928
2951
  "attributes": [
2929
2952
  {
2930
2953
  "name": "aria-label",
@@ -3109,14 +3132,6 @@
3109
3132
  "name": "TimeredCounterString",
3110
3133
  "module": "src/timered-counter-string.ts"
3111
3134
  }
3112
- },
3113
- {
3114
- "kind": "custom-element-definition",
3115
- "name": "timered-counter-string",
3116
- "declaration": {
3117
- "name": "TimeredCounterString",
3118
- "module": "src/timered-counter-string.ts"
3119
- }
3120
3135
  }
3121
3136
  ]
3122
3137
  },
@@ -3805,7 +3820,6 @@
3805
3820
  "name": "LitElement",
3806
3821
  "package": "lit"
3807
3822
  },
3808
- "tagName": "timered-counter",
3809
3823
  "customElement": true,
3810
3824
  "attributes": [
3811
3825
  {
@@ -3969,14 +3983,6 @@
3969
3983
  "name": "TimeredCounter",
3970
3984
  "module": "src/timered-counter.ts"
3971
3985
  }
3972
- },
3973
- {
3974
- "kind": "custom-element-definition",
3975
- "name": "timered-counter",
3976
- "declaration": {
3977
- "name": "TimeredCounter",
3978
- "module": "src/timered-counter.ts"
3979
- }
3980
3986
  }
3981
3987
  ]
3982
3988
  },
@@ -6486,6 +6492,53 @@
6486
6492
  }
6487
6493
  ]
6488
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
+ },
6489
6542
  {
6490
6543
  "kind": "javascript-module",
6491
6544
  "path": "src/utils/iso8601-duration.ts",
@@ -7140,7 +7193,7 @@
7140
7193
  "type": {
7141
7194
  "text": "Meta"
7142
7195
  },
7143
- "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'); }, }"
7144
7197
  },
7145
7198
  {
7146
7199
  "kind": "variable",
@@ -7396,7 +7449,7 @@
7396
7449
  "type": {
7397
7450
  "text": "Meta"
7398
7451
  },
7399
- "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'); }, }"
7400
7453
  },
7401
7454
  {
7402
7455
  "kind": "variable",
@@ -7580,7 +7633,7 @@
7580
7633
  "type": {
7581
7634
  "text": "Meta"
7582
7635
  },
7583
- "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'); }, }"
7584
7637
  },
7585
7638
  {
7586
7639
  "kind": "variable",
@@ -7668,7 +7721,7 @@
7668
7721
  "type": {
7669
7722
  "text": "Meta"
7670
7723
  },
7671
- "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'); }, }"
7672
7725
  },
7673
7726
  {
7674
7727
  "kind": "variable",
@@ -7860,7 +7913,7 @@
7860
7913
  "type": {
7861
7914
  "text": "Meta"
7862
7915
  },
7863
- "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'); }, }"
7864
7917
  },
7865
7918
  {
7866
7919
  "kind": "variable",
@@ -8285,7 +8338,6 @@
8285
8338
  "name": "LitElement",
8286
8339
  "package": "lit"
8287
8340
  },
8288
- "tagName": "timered-counter-roller-digit",
8289
8341
  "customElement": true
8290
8342
  }
8291
8343
  ],
@@ -8297,14 +8349,6 @@
8297
8349
  "name": "TimeredCounterRollerDigit",
8298
8350
  "module": "src/transitions/roller/roller-digit.ts"
8299
8351
  }
8300
- },
8301
- {
8302
- "kind": "custom-element-definition",
8303
- "name": "timered-counter-roller-digit",
8304
- "declaration": {
8305
- "name": "TimeredCounterRollerDigit",
8306
- "module": "src/transitions/roller/roller-digit.ts"
8307
- }
8308
8352
  }
8309
8353
  ]
8310
8354
  },
@@ -8571,7 +8615,6 @@
8571
8615
  "name": "LitElement",
8572
8616
  "package": "lit"
8573
8617
  },
8574
- "tagName": "timered-counter-roller",
8575
8618
  "customElement": true
8576
8619
  }
8577
8620
  ],
@@ -8583,14 +8626,6 @@
8583
8626
  "name": "TimeredCounterRoller",
8584
8627
  "module": "src/transitions/roller/roller.ts"
8585
8628
  }
8586
- },
8587
- {
8588
- "kind": "custom-element-definition",
8589
- "name": "timered-counter-roller",
8590
- "declaration": {
8591
- "name": "TimeredCounterRoller",
8592
- "module": "src/transitions/roller/roller.ts"
8593
- }
8594
8629
  }
8595
8630
  ]
8596
8631
  },
@@ -8627,6 +8662,171 @@
8627
8662
  }
8628
8663
  }
8629
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
+ ]
8630
8830
  }
8631
8831
  ]
8632
8832
  }