@sparkle-learning/core 0.0.31 → 0.0.34
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.
- package/dist/cjs/PrivateRoute-482697a6.js +35 -0
- package/dist/cjs/{PrivateRoute-043bb7d3.js → auth.service-f878f6ab.js} +0 -30
- package/dist/cjs/dom-utils-b8befdd5.js +63 -0
- package/dist/cjs/header-mobile-collapse_2.cjs.entry.js +112 -0
- package/dist/cjs/{icons-b8a2231a.js → icons-80d477f6.js} +0 -0
- package/dist/cjs/index-07e8aa51.js +3071 -0
- package/dist/cjs/index.cjs.js +6 -5
- package/dist/cjs/injectHistory-77d41284.js +9 -0
- package/dist/cjs/ion-avatar.cjs.entry.js +25 -0
- package/dist/cjs/ion-button_3.cjs.entry.js +383 -0
- package/dist/cjs/ion-card_2.cjs.entry.js +93 -0
- package/dist/cjs/ion-checkbox_4.cjs.entry.js +370 -0
- package/dist/cjs/ion-col_3.cjs.entry.js +155 -0
- package/dist/cjs/ion-icon_2.cjs.entry.js +397 -0
- package/dist/cjs/ion-input_2.cjs.entry.js +316 -0
- package/dist/cjs/ion-label_2.cjs.entry.js +126 -0
- package/dist/cjs/ion-range.cjs.entry.js +445 -0
- package/dist/cjs/ion-spinner.cjs.entry.js +64 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/match-path-84c9f7ca.js +511 -0
- package/dist/cjs/sparkle-card_3.cjs.entry.js +91 -0
- package/dist/cjs/sparkle-code.cjs.entry.js +1 -1
- package/dist/cjs/sparkle-core.cjs.js +1 -1
- package/dist/cjs/sparkle-course-root.cjs.entry.js +145 -0
- package/dist/cjs/sparkle-dropdown.cjs.entry.js +61 -0
- package/dist/cjs/{header-mobile-collapse_61.cjs.entry.js → sparkle-export-lessons_6.cjs.entry.js} +8863 -17664
- package/dist/cjs/sparkle-facilitator-header_19.cjs.entry.js +2129 -0
- package/dist/cjs/sparkle-feedback.cjs.entry.js +2 -1
- package/dist/cjs/sparkle-goal-progress.cjs.entry.js +19 -0
- package/dist/cjs/sparkle-gww-item.cjs.entry.js +74 -0
- package/dist/cjs/sparkle-intro.cjs.entry.js +26 -0
- package/dist/cjs/sparkle-menu-collapsible.cjs.entry.js +1 -1
- package/dist/cjs/sparkle-menu-toggle_3.cjs.entry.js +236 -0
- package/dist/cjs/sparkle-validation-error.cjs.entry.js +21 -0
- package/dist/cjs/stencil-route-link.cjs.entry.js +77 -0
- package/dist/cjs/stencil-router-redirect.cjs.entry.js +32 -0
- package/dist/cjs/student.service-7af424fe.js +61 -0
- package/dist/cjs/user.store-3d29139d.js +21 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/layout/page/page.js +0 -2
- package/dist/collection/components/sparkle-intro/sparkle-intro.css +15 -0
- package/dist/collection/components/sparkle-intro/sparkle-intro.js +35 -0
- package/dist/collection/models/course.model.js +6 -0
- package/dist/esm/PrivateRoute-f59ba6b5.js +33 -0
- package/dist/esm/{animation-b306f6c2.js → animation-7b083379.js} +1 -1
- package/dist/esm/{PrivateRoute-b9937c45.js → auth.service-7ab0ac58.js} +3 -32
- package/dist/esm/{auth.store-3ed2389e.js → auth.store-98fad96d.js} +2 -2
- package/dist/esm/dom-utils-8e73e88b.js +55 -0
- package/dist/esm/{facilitator.service-ec0a9739.js → facilitator.service-1524bf89.js} +1 -1
- package/dist/esm/{feed.service-33b83cb7.js → feed.service-4900fc62.js} +2 -2
- package/dist/esm/{framework-delegate-3bc58c27.js → framework-delegate-518bd233.js} +1 -1
- package/dist/esm/header-mobile-collapse_2.entry.js +107 -0
- package/dist/esm/{helpers-39367fe1.js → helpers-9d0930de.js} +1 -1
- package/dist/esm/{icons-5debfbaf.js → icons-05b6ce86.js} +1 -1
- package/dist/esm/{index-c26d8655.js → index-8de9446b.js} +3 -3
- package/dist/esm/index-c92f99d4.js +3067 -0
- package/dist/esm/{index-dc61f152.js → index-ea26196a.js} +1 -1
- package/dist/esm/{index-9594837e.js → index-fa5e93c5.js} +2 -2
- package/dist/esm/{index.es-97dd8174.js → index.es-89cff481.js} +3 -3
- package/dist/esm/index.js +5 -4
- package/dist/esm/injectHistory-52d0c7eb.js +7 -0
- package/dist/esm/{input-shims-cc98ea92.js → input-shims-7f04e044.js} +1 -1
- package/dist/esm/ion-accordion.entry.js +2 -2
- package/dist/esm/ion-action-sheet_4.entry.js +5 -5
- package/dist/esm/ion-app.entry.js +3 -3
- package/dist/esm/ion-avatar.entry.js +21 -0
- package/dist/esm/ion-back-button.entry.js +2 -2
- package/dist/esm/ion-breadcrumb.entry.js +2 -2
- package/dist/esm/ion-button_3.entry.js +377 -0
- package/dist/esm/ion-card_2.entry.js +88 -0
- package/dist/esm/ion-checkbox_4.entry.js +363 -0
- package/dist/esm/ion-col_3.entry.js +149 -0
- package/dist/esm/ion-content_2.entry.js +1 -1
- package/dist/esm/ion-datetime.entry.js +2 -2
- package/dist/esm/ion-fab-button.entry.js +1 -1
- package/dist/esm/ion-footer.entry.js +1 -1
- package/dist/esm/ion-icon_2.entry.js +392 -0
- package/dist/esm/ion-img.entry.js +1 -1
- package/dist/esm/ion-infinite-scroll.entry.js +1 -1
- package/dist/esm/ion-input_2.entry.js +311 -0
- package/dist/esm/ion-item-options.entry.js +1 -1
- package/dist/esm/ion-item-sliding.entry.js +1 -1
- package/dist/esm/ion-label_2.entry.js +121 -0
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu-button.entry.js +5 -5
- package/dist/esm/ion-menu-toggle.entry.js +4 -4
- package/dist/esm/ion-menu.entry.js +4 -4
- package/dist/esm/ion-modal.entry.js +5 -5
- package/dist/esm/ion-nav.entry.js +4 -4
- package/dist/esm/ion-picker-column-internal_2.entry.js +1 -1
- package/dist/esm/ion-picker-column.entry.js +1 -1
- package/dist/esm/ion-picker.entry.js +3 -3
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-range.entry.js +441 -0
- package/dist/esm/ion-refresher-content.entry.js +1 -1
- package/dist/esm/ion-refresher.entry.js +2 -2
- package/dist/esm/ion-reorder-group.entry.js +1 -1
- package/dist/esm/ion-reorder.entry.js +1 -1
- package/dist/esm/ion-router-outlet.entry.js +4 -4
- package/dist/esm/ion-router.entry.js +1 -1
- package/dist/esm/ion-searchbar.entry.js +2 -2
- package/dist/esm/ion-segment-button.entry.js +1 -1
- package/dist/esm/ion-segment.entry.js +1 -1
- package/dist/esm/ion-select_2.entry.js +2 -2
- package/dist/esm/ion-slides.entry.js +1 -1
- package/dist/esm/ion-spinner.entry.js +60 -0
- package/dist/esm/ion-tab.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +1 -1
- package/dist/esm/ion-virtual-scroll.entry.js +1 -1
- package/dist/esm/{ios.transition-b4ca8a33.js → ios.transition-db4f4ca6.js} +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/match-path-36fdf5c7.js +499 -0
- package/dist/esm/{md.transition-ca5e0322.js → md.transition-8294b503.js} +3 -3
- package/dist/esm/{menu-toggle-util-7fa22c2f.js → menu-toggle-util-06adade3.js} +1 -1
- package/dist/esm/{overlays-34cfa9e0.js → overlays-5c777f10.js} +2 -2
- package/dist/esm/{purify-ffce2b4c.js → purify-eb68cf1d.js} +1 -1
- package/dist/esm/sparkle-animation-player.entry.js +1 -1
- package/dist/esm/sparkle-card_3.entry.js +85 -0
- package/dist/esm/sparkle-code.entry.js +1 -1
- package/dist/esm/sparkle-core.js +1 -1
- package/dist/esm/sparkle-course-root.entry.js +141 -0
- package/dist/esm/sparkle-dropdown.entry.js +57 -0
- package/dist/esm/{header-mobile-collapse_61.entry.js → sparkle-export-lessons_6.entry.js} +8858 -17604
- package/dist/esm/sparkle-facilitator-header_19.entry.js +2107 -0
- package/dist/esm/sparkle-facilitator-notes-form.entry.js +4 -4
- package/dist/esm/sparkle-feedback.entry.js +5 -4
- package/dist/esm/sparkle-goal-form.entry.js +5 -5
- package/dist/esm/sparkle-goal-progress.entry.js +15 -0
- package/dist/esm/sparkle-gww-item.entry.js +70 -0
- package/dist/esm/sparkle-intro.entry.js +22 -0
- package/dist/esm/sparkle-menu-collapsible.entry.js +1 -1
- package/dist/esm/sparkle-menu-toggle_3.entry.js +230 -0
- package/dist/esm/sparkle-validation-error.entry.js +17 -0
- package/dist/esm/{status-tap-6351a0cb.js → status-tap-e8c0c752.js} +1 -1
- package/dist/esm/stencil-route-link.entry.js +73 -0
- package/dist/esm/stencil-router-redirect.entry.js +28 -0
- package/dist/esm/{student.service-29b688ba.js → student.service-c2f44f3a.js} +3 -18
- package/dist/esm/{swipe-back-34251834.js → swipe-back-9a3b2cdd.js} +1 -1
- package/dist/esm/{tap-click-13f1fb0d.js → tap-click-cca25060.js} +1 -1
- package/dist/esm/user.store-e6ff7558.js +19 -0
- package/dist/esm/{util-6ef753e9.js → util-a831d09d.js} +1 -1
- package/dist/sparkle-core/index.esm.js +1 -1
- package/dist/sparkle-core/p-021fde3c.entry.js +1 -0
- package/dist/sparkle-core/p-034306e2.js +1 -0
- package/dist/sparkle-core/{p-6c90bde6.entry.js → p-034aa29f.entry.js} +1 -1
- package/dist/sparkle-core/p-06c0cce3.entry.js +1 -0
- package/dist/sparkle-core/{p-9cfdeb18.entry.js → p-08923b40.entry.js} +1 -1
- package/dist/sparkle-core/{p-513794b0.js → p-0ad99881.js} +1 -1
- package/dist/sparkle-core/{p-95004267.entry.js → p-11234d0f.entry.js} +1 -1
- package/dist/sparkle-core/{p-9a17f2ad.js → p-1133fcbd.js} +2 -2
- package/dist/sparkle-core/{p-faa912d7.entry.js → p-1551190a.entry.js} +1 -1
- package/dist/sparkle-core/p-1728ead7.js +1 -0
- package/dist/sparkle-core/{p-ae1f145d.entry.js → p-1e8c22e0.entry.js} +1 -1
- package/dist/sparkle-core/p-232cc3bc.js +1 -0
- package/dist/sparkle-core/{p-289a35ed.entry.js → p-28950db0.entry.js} +1 -1
- package/dist/sparkle-core/p-2af82cc1.entry.js +1 -0
- package/dist/sparkle-core/p-2bd4c60e.js +1 -0
- package/dist/sparkle-core/p-2f437793.entry.js +348 -0
- package/dist/sparkle-core/p-330ccc7c.entry.js +1 -0
- package/dist/sparkle-core/{p-838fa86d.entry.js → p-337f92b0.entry.js} +1 -1
- package/dist/sparkle-core/{p-857f3696.entry.js → p-35c5c110.entry.js} +1 -1
- package/dist/sparkle-core/p-3ff617d5.js +1 -0
- package/dist/sparkle-core/{p-7c38a70b.js → p-401feeb0.js} +1 -1
- package/dist/sparkle-core/{p-5a3d0e6b.js → p-4028676b.js} +1 -1
- package/dist/sparkle-core/{p-1cef8572.js → p-41124baa.js} +1 -1
- package/dist/sparkle-core/{p-0187adef.entry.js → p-41af3793.entry.js} +1 -1
- package/dist/sparkle-core/p-43a7391b.entry.js +1 -0
- package/dist/sparkle-core/{p-855ca600.js → p-44c23f72.js} +1 -1
- package/dist/sparkle-core/{p-c1376096.entry.js → p-4550e10f.entry.js} +1 -1
- package/dist/sparkle-core/{p-660e0742.js → p-4a72626a.js} +1 -1
- package/dist/sparkle-core/{p-e1cba44b.entry.js → p-4ba57978.entry.js} +1 -1
- package/dist/sparkle-core/{p-935e7cfc.js → p-4bd4dab2.js} +1 -1
- package/dist/sparkle-core/{p-d5b05ece.entry.js → p-4ef4b8bd.entry.js} +1 -1
- package/dist/sparkle-core/{p-55ae49e1.js → p-4f144efa.js} +1 -1
- package/dist/sparkle-core/{p-713590fc.js → p-52d4715a.js} +1 -1
- package/dist/sparkle-core/{p-bca0e465.entry.js → p-52f1d1ca.entry.js} +1 -1
- package/dist/sparkle-core/{p-7e61973d.entry.js → p-5a98d42e.entry.js} +1 -1
- package/dist/sparkle-core/{p-82e98d07.entry.js → p-5e4ec238.entry.js} +1 -1
- package/dist/sparkle-core/{p-0146afa0.entry.js → p-5ec7fd67.entry.js} +1 -1
- package/dist/sparkle-core/p-618f6f82.entry.js +1 -0
- package/dist/sparkle-core/p-65ca1fb2.entry.js +1 -0
- package/dist/sparkle-core/{p-a080e768.entry.js → p-663fafa9.entry.js} +1 -1
- package/dist/sparkle-core/p-67f71099.entry.js +4 -0
- package/dist/sparkle-core/{p-6e88764b.entry.js → p-6a16b9ef.entry.js} +2 -2
- package/dist/sparkle-core/p-6b6a8f0a.entry.js +1 -0
- package/dist/sparkle-core/p-6c5b5ea2.entry.js +1 -0
- package/dist/sparkle-core/{p-941eaa3a.entry.js → p-6ebf52fb.entry.js} +1 -1
- package/dist/sparkle-core/p-6f45db93.js +1 -0
- package/dist/sparkle-core/p-74106ca8.entry.js +1 -0
- package/dist/sparkle-core/{p-6fbe3ca3.entry.js → p-7568dcab.entry.js} +1 -1
- package/dist/sparkle-core/p-7703bae9.entry.js +1 -0
- package/dist/sparkle-core/p-77c23496.entry.js +1 -0
- package/dist/sparkle-core/p-79606a41.entry.js +1 -0
- package/dist/sparkle-core/p-7976e88c.entry.js +1 -0
- package/dist/sparkle-core/p-7c1f59ec.js +1 -0
- package/dist/sparkle-core/p-7de0a22b.entry.js +1 -0
- package/dist/sparkle-core/p-848fe770.entry.js +1 -0
- package/dist/sparkle-core/{p-cbbeed67.entry.js → p-85429b12.entry.js} +1 -1
- package/dist/sparkle-core/{p-64e72f8f.js → p-86d099f1.js} +2 -2
- package/dist/sparkle-core/{p-389500fd.js → p-87549bb7.js} +2 -2
- package/dist/sparkle-core/{p-1b78dea1.entry.js → p-8c470e28.entry.js} +1 -1
- package/dist/sparkle-core/{p-50aac721.entry.js → p-90466494.entry.js} +1 -1
- package/dist/sparkle-core/p-954c89c2.entry.js +1 -0
- package/dist/sparkle-core/{p-f4001fdf.js → p-95d01c4c.js} +1 -1
- package/dist/sparkle-core/{p-6ee40949.js → p-987c64eb.js} +1 -1
- package/dist/sparkle-core/{p-1af044f7.js → p-a7832a51.js} +1 -1
- package/dist/sparkle-core/p-a89dea80.entry.js +1 -0
- package/dist/sparkle-core/{p-6c6145cd.js → p-b17dd6df.js} +2 -2
- package/dist/sparkle-core/{p-5ff6416d.entry.js → p-b21d0d9f.entry.js} +1 -1
- package/dist/sparkle-core/p-b7dafaae.entry.js +1 -0
- package/dist/sparkle-core/{p-c3986a52.entry.js → p-bd062288.entry.js} +1 -1
- package/dist/sparkle-core/{p-c1279cc9.entry.js → p-beb401e3.entry.js} +1 -1
- package/dist/sparkle-core/p-bef34cfe.entry.js +1 -0
- package/dist/sparkle-core/{p-6bf07a28.js → p-c1c59771.js} +1 -1
- package/dist/sparkle-core/p-c4104929.entry.js +1 -0
- package/dist/sparkle-core/{p-173d5461.entry.js → p-c748f64e.entry.js} +1 -1
- package/dist/sparkle-core/{p-d4a435f8.entry.js → p-c753207f.entry.js} +1 -1
- package/dist/sparkle-core/{p-18e62133.entry.js → p-c8ae9e47.entry.js} +1 -1
- package/dist/sparkle-core/p-c8ed0575.js +1 -0
- package/dist/sparkle-core/{p-8fe2e51f.entry.js → p-c96b24bd.entry.js} +2 -2
- package/dist/sparkle-core/p-ce13171b.entry.js +1 -0
- package/dist/sparkle-core/{p-5c9aa1f9.entry.js → p-d00f550b.entry.js} +1 -1
- package/dist/sparkle-core/p-d394eed1.entry.js +1 -0
- package/dist/sparkle-core/p-d48e95c1.entry.js +1 -0
- package/dist/sparkle-core/p-d4b1a14a.entry.js +1 -0
- package/dist/sparkle-core/{p-b81e20fe.entry.js → p-d56efeac.entry.js} +1 -1
- package/dist/sparkle-core/{p-932bfb69.entry.js → p-d59a5984.entry.js} +1 -1
- package/dist/sparkle-core/p-d8aff730.entry.js +1 -0
- package/dist/sparkle-core/{p-5d2e54ee.entry.js → p-da8921d0.entry.js} +1 -1
- package/dist/sparkle-core/{p-a1cab0f3.js → p-e08059b6.js} +2 -2
- package/dist/sparkle-core/p-e1aee41e.entry.js +1 -0
- package/dist/sparkle-core/{p-5598650a.entry.js → p-ec4d22e3.entry.js} +1 -1
- package/dist/sparkle-core/{p-eb70a23c.entry.js → p-ed3eed72.entry.js} +1 -1
- package/dist/sparkle-core/{p-a7cc0052.entry.js → p-ee0717e1.entry.js} +1 -1
- package/dist/sparkle-core/p-ef2dace6.js +4 -0
- package/dist/sparkle-core/{p-2ee6a5f9.entry.js → p-f1106984.entry.js} +1 -1
- package/dist/sparkle-core/p-f61ca75c.entry.js +1 -0
- package/dist/sparkle-core/{p-e225581a.js → p-f6bafe1d.js} +1 -1
- package/dist/sparkle-core/{p-1df05176.js → p-ff4d6858.js} +1 -1
- package/dist/sparkle-core/sparkle-core.esm.js +1 -1
- package/dist/types/components/sparkle-intro/sparkle-intro.d.ts +7 -0
- package/dist/types/components.d.ts +13 -0
- package/dist/types/models/course.model.d.ts +1 -8
- package/package.json +2 -2
- package/dist/cjs/student.service-744c3155.js +0 -77
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/button/button.css +0 -49
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/card/card.css +0 -208
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/cards/cards.css +0 -31
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/code/code.css +0 -245
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/dropdown/dropdown.css +0 -115
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header-mobile-collapse/header-mobile-collapse.css +0 -255
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/header/header.css +0 -232
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/collapsible/collapsible.css +0 -3
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu-toggle/menu-toggle.css +0 -25
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/menu/menu.css +0 -71
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/nav/nav.css +0 -194
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/notfound-page/notfound-page.css +0 -4
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/overlay/overlay.css +0 -67
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/page-footer/page-footer.css +0 -18
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/pagination/pagination.css +0 -89
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/select/select.css +0 -52
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sidebar/sidebar.css +0 -98
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/sparkle-lower-content-nav/sparkle-lower-content-nav.css +0 -8
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/table-of-contents/table-of-contents.css +0 -37
- package/dist/node_modules/@sparkle-learning/components/dist/collection/components/tabs/tabs.css +0 -64
- package/dist/sparkle-core/p-03189863.js +0 -1
- package/dist/sparkle-core/p-1339830f.entry.js +0 -1
- package/dist/sparkle-core/p-145e40f5.entry.js +0 -1
- package/dist/sparkle-core/p-547b70c6.entry.js +0 -1
- package/dist/sparkle-core/p-6bbabb80.entry.js +0 -1
- package/dist/sparkle-core/p-950effe7.entry.js +0 -1
- package/dist/sparkle-core/p-d8d3524a.js +0 -1
- package/dist/sparkle-core/p-df0070c5.entry.js +0 -352
- package/dist/sparkle-core/p-e0fced48.entry.js +0 -1
- package/dist/sparkle-core/p-e72d4450.js +0 -4
- package/dist/sparkle-core/p-fc933591.entry.js +0 -1
@@ -0,0 +1,511 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* TS adaption of https://github.com/pillarjs/path-to-regexp/blob/master/index.js
|
5
|
+
*/
|
6
|
+
/**
|
7
|
+
* Default configs.
|
8
|
+
*/
|
9
|
+
const DEFAULT_DELIMITER = '/';
|
10
|
+
const DEFAULT_DELIMITERS = './';
|
11
|
+
/**
|
12
|
+
* The main path matching regexp utility.
|
13
|
+
*/
|
14
|
+
const PATH_REGEXP = new RegExp([
|
15
|
+
// Match escaped characters that would otherwise appear in future matches.
|
16
|
+
// This allows the user to escape special characters that won't transform.
|
17
|
+
'(\\\\.)',
|
18
|
+
// Match Express-style parameters and un-named parameters with a prefix
|
19
|
+
// and optional suffixes. Matches appear as:
|
20
|
+
//
|
21
|
+
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?"]
|
22
|
+
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined]
|
23
|
+
'(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?'
|
24
|
+
].join('|'), 'g');
|
25
|
+
/**
|
26
|
+
* Parse a string for the raw tokens.
|
27
|
+
*/
|
28
|
+
const parse = (str, options) => {
|
29
|
+
var tokens = [];
|
30
|
+
var key = 0;
|
31
|
+
var index = 0;
|
32
|
+
var path = '';
|
33
|
+
var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER;
|
34
|
+
var delimiters = (options && options.delimiters) || DEFAULT_DELIMITERS;
|
35
|
+
var pathEscaped = false;
|
36
|
+
var res;
|
37
|
+
while ((res = PATH_REGEXP.exec(str)) !== null) {
|
38
|
+
var m = res[0];
|
39
|
+
var escaped = res[1];
|
40
|
+
var offset = res.index;
|
41
|
+
path += str.slice(index, offset);
|
42
|
+
index = offset + m.length;
|
43
|
+
// Ignore already escaped sequences.
|
44
|
+
if (escaped) {
|
45
|
+
path += escaped[1];
|
46
|
+
pathEscaped = true;
|
47
|
+
continue;
|
48
|
+
}
|
49
|
+
var prev = '';
|
50
|
+
var next = str[index];
|
51
|
+
var name = res[2];
|
52
|
+
var capture = res[3];
|
53
|
+
var group = res[4];
|
54
|
+
var modifier = res[5];
|
55
|
+
if (!pathEscaped && path.length) {
|
56
|
+
var k = path.length - 1;
|
57
|
+
if (delimiters.indexOf(path[k]) > -1) {
|
58
|
+
prev = path[k];
|
59
|
+
path = path.slice(0, k);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
// Push the current path onto the tokens.
|
63
|
+
if (path) {
|
64
|
+
tokens.push(path);
|
65
|
+
path = '';
|
66
|
+
pathEscaped = false;
|
67
|
+
}
|
68
|
+
var partial = prev !== '' && next !== undefined && next !== prev;
|
69
|
+
var repeat = modifier === '+' || modifier === '*';
|
70
|
+
var optional = modifier === '?' || modifier === '*';
|
71
|
+
var delimiter = prev || defaultDelimiter;
|
72
|
+
var pattern = capture || group;
|
73
|
+
tokens.push({
|
74
|
+
name: name || key++,
|
75
|
+
prefix: prev,
|
76
|
+
delimiter: delimiter,
|
77
|
+
optional: optional,
|
78
|
+
repeat: repeat,
|
79
|
+
partial: partial,
|
80
|
+
pattern: pattern ? escapeGroup(pattern) : '[^' + escapeString(delimiter) + ']+?'
|
81
|
+
});
|
82
|
+
}
|
83
|
+
// Push any remaining characters.
|
84
|
+
if (path || index < str.length) {
|
85
|
+
tokens.push(path + str.substr(index));
|
86
|
+
}
|
87
|
+
return tokens;
|
88
|
+
};
|
89
|
+
/**
|
90
|
+
* Escape a regular expression string.
|
91
|
+
*/
|
92
|
+
const escapeString = (str) => {
|
93
|
+
return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1');
|
94
|
+
};
|
95
|
+
/**
|
96
|
+
* Escape the capturing group by escaping special characters and meaning.
|
97
|
+
*/
|
98
|
+
const escapeGroup = (group) => {
|
99
|
+
return group.replace(/([=!:$/()])/g, '\\$1');
|
100
|
+
};
|
101
|
+
/**
|
102
|
+
* Get the flags for a regexp from the options.
|
103
|
+
*/
|
104
|
+
const flags = (options) => {
|
105
|
+
return options && options.sensitive ? '' : 'i';
|
106
|
+
};
|
107
|
+
/**
|
108
|
+
* Pull out keys from a regexp.
|
109
|
+
*/
|
110
|
+
const regexpToRegexp = (path, keys) => {
|
111
|
+
if (!keys)
|
112
|
+
return path;
|
113
|
+
// Use a negative lookahead to match only capturing groups.
|
114
|
+
var groups = path.source.match(/\((?!\?)/g);
|
115
|
+
if (groups) {
|
116
|
+
for (var i = 0; i < groups.length; i++) {
|
117
|
+
keys.push({
|
118
|
+
name: i,
|
119
|
+
prefix: null,
|
120
|
+
delimiter: null,
|
121
|
+
optional: false,
|
122
|
+
repeat: false,
|
123
|
+
partial: false,
|
124
|
+
pattern: null
|
125
|
+
});
|
126
|
+
}
|
127
|
+
}
|
128
|
+
return path;
|
129
|
+
};
|
130
|
+
/**
|
131
|
+
* Transform an array into a regexp.
|
132
|
+
*/
|
133
|
+
const arrayToRegexp = (path, keys, options) => {
|
134
|
+
var parts = [];
|
135
|
+
for (var i = 0; i < path.length; i++) {
|
136
|
+
parts.push(pathToRegexp(path[i], keys, options).source);
|
137
|
+
}
|
138
|
+
return new RegExp('(?:' + parts.join('|') + ')', flags(options));
|
139
|
+
};
|
140
|
+
/**
|
141
|
+
* Create a path regexp from string input.
|
142
|
+
*/
|
143
|
+
const stringToRegexp = (path, keys, options) => {
|
144
|
+
return tokensToRegExp(parse(path, options), keys, options);
|
145
|
+
};
|
146
|
+
/**
|
147
|
+
* Expose a function for taking tokens and returning a RegExp.
|
148
|
+
*/
|
149
|
+
const tokensToRegExp = (tokens, keys, options) => {
|
150
|
+
options = options || {};
|
151
|
+
var strict = options.strict;
|
152
|
+
var end = options.end !== false;
|
153
|
+
var delimiter = escapeString(options.delimiter || DEFAULT_DELIMITER);
|
154
|
+
var delimiters = options.delimiters || DEFAULT_DELIMITERS;
|
155
|
+
var endsWith = [].concat(options.endsWith || []).map(escapeString).concat('$').join('|');
|
156
|
+
var route = '';
|
157
|
+
var isEndDelimited = false;
|
158
|
+
// Iterate over the tokens and create our regexp string.
|
159
|
+
for (var i = 0; i < tokens.length; i++) {
|
160
|
+
var token = tokens[i];
|
161
|
+
if (typeof token === 'string') {
|
162
|
+
route += escapeString(token);
|
163
|
+
isEndDelimited = i === tokens.length - 1 && delimiters.indexOf(token[token.length - 1]) > -1;
|
164
|
+
}
|
165
|
+
else {
|
166
|
+
var prefix = escapeString(token.prefix || '');
|
167
|
+
var capture = token.repeat
|
168
|
+
? '(?:' + token.pattern + ')(?:' + prefix + '(?:' + token.pattern + '))*'
|
169
|
+
: token.pattern;
|
170
|
+
if (keys)
|
171
|
+
keys.push(token);
|
172
|
+
if (token.optional) {
|
173
|
+
if (token.partial) {
|
174
|
+
route += prefix + '(' + capture + ')?';
|
175
|
+
}
|
176
|
+
else {
|
177
|
+
route += '(?:' + prefix + '(' + capture + '))?';
|
178
|
+
}
|
179
|
+
}
|
180
|
+
else {
|
181
|
+
route += prefix + '(' + capture + ')';
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
if (end) {
|
186
|
+
if (!strict)
|
187
|
+
route += '(?:' + delimiter + ')?';
|
188
|
+
route += endsWith === '$' ? '$' : '(?=' + endsWith + ')';
|
189
|
+
}
|
190
|
+
else {
|
191
|
+
if (!strict)
|
192
|
+
route += '(?:' + delimiter + '(?=' + endsWith + '))?';
|
193
|
+
if (!isEndDelimited)
|
194
|
+
route += '(?=' + delimiter + '|' + endsWith + ')';
|
195
|
+
}
|
196
|
+
return new RegExp('^' + route, flags(options));
|
197
|
+
};
|
198
|
+
/**
|
199
|
+
* Normalize the given path string, returning a regular expression.
|
200
|
+
*
|
201
|
+
* An empty array can be passed in for the keys, which will hold the
|
202
|
+
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
203
|
+
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
204
|
+
*/
|
205
|
+
const pathToRegexp = (path, keys, options) => {
|
206
|
+
if (path instanceof RegExp) {
|
207
|
+
return regexpToRegexp(path, keys);
|
208
|
+
}
|
209
|
+
if (Array.isArray(path)) {
|
210
|
+
return arrayToRegexp(path, keys, options);
|
211
|
+
}
|
212
|
+
return stringToRegexp(path, keys, options);
|
213
|
+
};
|
214
|
+
|
215
|
+
const hasBasename = (path, prefix) => {
|
216
|
+
return (new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i')).test(path);
|
217
|
+
};
|
218
|
+
const stripBasename = (path, prefix) => {
|
219
|
+
return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
|
220
|
+
};
|
221
|
+
const stripTrailingSlash = (path) => {
|
222
|
+
return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
|
223
|
+
};
|
224
|
+
const addLeadingSlash = (path) => {
|
225
|
+
return path.charAt(0) === '/' ? path : '/' + path;
|
226
|
+
};
|
227
|
+
const stripLeadingSlash = (path) => {
|
228
|
+
return path.charAt(0) === '/' ? path.substr(1) : path;
|
229
|
+
};
|
230
|
+
const parsePath = (path) => {
|
231
|
+
let pathname = path || '/';
|
232
|
+
let search = '';
|
233
|
+
let hash = '';
|
234
|
+
const hashIndex = pathname.indexOf('#');
|
235
|
+
if (hashIndex !== -1) {
|
236
|
+
hash = pathname.substr(hashIndex);
|
237
|
+
pathname = pathname.substr(0, hashIndex);
|
238
|
+
}
|
239
|
+
const searchIndex = pathname.indexOf('?');
|
240
|
+
if (searchIndex !== -1) {
|
241
|
+
search = pathname.substr(searchIndex);
|
242
|
+
pathname = pathname.substr(0, searchIndex);
|
243
|
+
}
|
244
|
+
return {
|
245
|
+
pathname,
|
246
|
+
search: search === '?' ? '' : search,
|
247
|
+
hash: hash === '#' ? '' : hash,
|
248
|
+
query: {},
|
249
|
+
key: ''
|
250
|
+
};
|
251
|
+
};
|
252
|
+
const createPath = (location) => {
|
253
|
+
const { pathname, search, hash } = location;
|
254
|
+
let path = pathname || '/';
|
255
|
+
if (search && search !== '?') {
|
256
|
+
path += (search.charAt(0) === '?' ? search : `?${search}`);
|
257
|
+
}
|
258
|
+
if (hash && hash !== '#') {
|
259
|
+
path += (hash.charAt(0) === '#' ? hash : `#${hash}`);
|
260
|
+
}
|
261
|
+
return path;
|
262
|
+
};
|
263
|
+
const parseQueryString = (query) => {
|
264
|
+
if (!query) {
|
265
|
+
return {};
|
266
|
+
}
|
267
|
+
return (/^[?#]/.test(query) ? query.slice(1) : query)
|
268
|
+
.split('&')
|
269
|
+
.reduce((params, param) => {
|
270
|
+
let [key, value] = param.split('=');
|
271
|
+
params[key] = value ? decodeURIComponent(value.replace(/\+/g, ' ')) : '';
|
272
|
+
return params;
|
273
|
+
}, {});
|
274
|
+
};
|
275
|
+
|
276
|
+
const isAbsolute = (pathname) => {
|
277
|
+
return pathname.charAt(0) === '/';
|
278
|
+
};
|
279
|
+
const createKey = (keyLength) => {
|
280
|
+
return Math.random().toString(36).substr(2, keyLength);
|
281
|
+
};
|
282
|
+
// About 1.5x faster than the two-arg version of Array#splice()
|
283
|
+
const spliceOne = (list, index) => {
|
284
|
+
for (let i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
|
285
|
+
list[i] = list[k];
|
286
|
+
}
|
287
|
+
list.pop();
|
288
|
+
};
|
289
|
+
// This implementation is based heavily on node's url.parse
|
290
|
+
const resolvePathname = (to, from = '') => {
|
291
|
+
let fromParts = from && from.split('/') || [];
|
292
|
+
let hasTrailingSlash;
|
293
|
+
let up = 0;
|
294
|
+
const toParts = to && to.split('/') || [];
|
295
|
+
const isToAbs = to && isAbsolute(to);
|
296
|
+
const isFromAbs = from && isAbsolute(from);
|
297
|
+
const mustEndAbs = isToAbs || isFromAbs;
|
298
|
+
if (to && isAbsolute(to)) {
|
299
|
+
// to is absolute
|
300
|
+
fromParts = toParts;
|
301
|
+
}
|
302
|
+
else if (toParts.length) {
|
303
|
+
// to is relative, drop the filename
|
304
|
+
fromParts.pop();
|
305
|
+
fromParts = fromParts.concat(toParts);
|
306
|
+
}
|
307
|
+
if (!fromParts.length) {
|
308
|
+
return '/';
|
309
|
+
}
|
310
|
+
if (fromParts.length) {
|
311
|
+
const last = fromParts[fromParts.length - 1];
|
312
|
+
hasTrailingSlash = (last === '.' || last === '..' || last === '');
|
313
|
+
}
|
314
|
+
else {
|
315
|
+
hasTrailingSlash = false;
|
316
|
+
}
|
317
|
+
for (let i = fromParts.length; i >= 0; i--) {
|
318
|
+
const part = fromParts[i];
|
319
|
+
if (part === '.') {
|
320
|
+
spliceOne(fromParts, i);
|
321
|
+
}
|
322
|
+
else if (part === '..') {
|
323
|
+
spliceOne(fromParts, i);
|
324
|
+
up++;
|
325
|
+
}
|
326
|
+
else if (up) {
|
327
|
+
spliceOne(fromParts, i);
|
328
|
+
up--;
|
329
|
+
}
|
330
|
+
}
|
331
|
+
if (!mustEndAbs) {
|
332
|
+
for (; up--; up) {
|
333
|
+
fromParts.unshift('..');
|
334
|
+
}
|
335
|
+
}
|
336
|
+
if (mustEndAbs && fromParts[0] !== '' && (!fromParts[0] || !isAbsolute(fromParts[0]))) {
|
337
|
+
fromParts.unshift('');
|
338
|
+
}
|
339
|
+
let result = fromParts.join('/');
|
340
|
+
if (hasTrailingSlash && result.substr(-1) !== '/') {
|
341
|
+
result += '/';
|
342
|
+
}
|
343
|
+
return result;
|
344
|
+
};
|
345
|
+
const valueEqual = (a, b) => {
|
346
|
+
if (a === b) {
|
347
|
+
return true;
|
348
|
+
}
|
349
|
+
if (a == null || b == null) {
|
350
|
+
return false;
|
351
|
+
}
|
352
|
+
if (Array.isArray(a)) {
|
353
|
+
return Array.isArray(b) && a.length === b.length && a.every((item, index) => {
|
354
|
+
return valueEqual(item, b[index]);
|
355
|
+
});
|
356
|
+
}
|
357
|
+
const aType = typeof a;
|
358
|
+
const bType = typeof b;
|
359
|
+
if (aType !== bType) {
|
360
|
+
return false;
|
361
|
+
}
|
362
|
+
if (aType === 'object') {
|
363
|
+
const aValue = a.valueOf();
|
364
|
+
const bValue = b.valueOf();
|
365
|
+
if (aValue !== a || bValue !== b) {
|
366
|
+
return valueEqual(aValue, bValue);
|
367
|
+
}
|
368
|
+
const aKeys = Object.keys(a);
|
369
|
+
const bKeys = Object.keys(b);
|
370
|
+
if (aKeys.length !== bKeys.length) {
|
371
|
+
return false;
|
372
|
+
}
|
373
|
+
return aKeys.every((key) => {
|
374
|
+
return valueEqual(a[key], b[key]);
|
375
|
+
});
|
376
|
+
}
|
377
|
+
return false;
|
378
|
+
};
|
379
|
+
const locationsAreEqual = (a, b) => {
|
380
|
+
return a.pathname === b.pathname &&
|
381
|
+
a.search === b.search &&
|
382
|
+
a.hash === b.hash &&
|
383
|
+
a.key === b.key &&
|
384
|
+
valueEqual(a.state, b.state);
|
385
|
+
};
|
386
|
+
const createLocation = (path, state, key, currentLocation) => {
|
387
|
+
let location;
|
388
|
+
if (typeof path === 'string') {
|
389
|
+
// Two-arg form: push(path, state)
|
390
|
+
location = parsePath(path);
|
391
|
+
if (state !== undefined) {
|
392
|
+
location.state = state;
|
393
|
+
}
|
394
|
+
}
|
395
|
+
else {
|
396
|
+
// One-arg form: push(location)
|
397
|
+
location = Object.assign({ pathname: '' }, path);
|
398
|
+
if (location.search && location.search.charAt(0) !== '?') {
|
399
|
+
location.search = '?' + location.search;
|
400
|
+
}
|
401
|
+
if (location.hash && location.hash.charAt(0) !== '#') {
|
402
|
+
location.hash = '#' + location.hash;
|
403
|
+
}
|
404
|
+
if (state !== undefined && location.state === undefined) {
|
405
|
+
location.state = state;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
try {
|
409
|
+
location.pathname = decodeURI(location.pathname);
|
410
|
+
}
|
411
|
+
catch (e) {
|
412
|
+
if (e instanceof URIError) {
|
413
|
+
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' +
|
414
|
+
'This is likely caused by an invalid percent-encoding.');
|
415
|
+
}
|
416
|
+
else {
|
417
|
+
throw e;
|
418
|
+
}
|
419
|
+
}
|
420
|
+
location.key = key;
|
421
|
+
if (currentLocation) {
|
422
|
+
// Resolve incomplete/relative pathname relative to current location.
|
423
|
+
if (!location.pathname) {
|
424
|
+
location.pathname = currentLocation.pathname;
|
425
|
+
}
|
426
|
+
else if (location.pathname.charAt(0) !== '/') {
|
427
|
+
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
428
|
+
}
|
429
|
+
}
|
430
|
+
else {
|
431
|
+
// When there is no prior location and pathname is empty, set it to /
|
432
|
+
if (!location.pathname) {
|
433
|
+
location.pathname = '/';
|
434
|
+
}
|
435
|
+
}
|
436
|
+
location.query = parseQueryString(location.search || '');
|
437
|
+
return location;
|
438
|
+
};
|
439
|
+
|
440
|
+
let cacheCount = 0;
|
441
|
+
const patternCache = {};
|
442
|
+
const cacheLimit = 10000;
|
443
|
+
// Memoized function for creating the path match regex
|
444
|
+
const compilePath = (pattern, options) => {
|
445
|
+
const cacheKey = `${options.end}${options.strict}`;
|
446
|
+
const cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});
|
447
|
+
const cachePattern = JSON.stringify(pattern);
|
448
|
+
if (cache[cachePattern]) {
|
449
|
+
return cache[cachePattern];
|
450
|
+
}
|
451
|
+
const keys = [];
|
452
|
+
const re = pathToRegexp(pattern, keys, options);
|
453
|
+
const compiledPattern = { re, keys };
|
454
|
+
if (cacheCount < cacheLimit) {
|
455
|
+
cache[cachePattern] = compiledPattern;
|
456
|
+
cacheCount += 1;
|
457
|
+
}
|
458
|
+
return compiledPattern;
|
459
|
+
};
|
460
|
+
/**
|
461
|
+
* Public API for matching a URL pathname to a path pattern.
|
462
|
+
*/
|
463
|
+
const matchPath = (pathname, options = {}) => {
|
464
|
+
if (typeof options === 'string') {
|
465
|
+
options = { path: options };
|
466
|
+
}
|
467
|
+
const { path = '/', exact = false, strict = false } = options;
|
468
|
+
const { re, keys } = compilePath(path, { end: exact, strict });
|
469
|
+
const match = re.exec(pathname);
|
470
|
+
if (!match) {
|
471
|
+
return null;
|
472
|
+
}
|
473
|
+
const [url, ...values] = match;
|
474
|
+
const isExact = pathname === url;
|
475
|
+
if (exact && !isExact) {
|
476
|
+
return null;
|
477
|
+
}
|
478
|
+
return {
|
479
|
+
path,
|
480
|
+
url: path === '/' && url === '' ? '/' : url,
|
481
|
+
isExact,
|
482
|
+
params: keys.reduce((memo, key, index) => {
|
483
|
+
memo[key.name] = values[index];
|
484
|
+
return memo;
|
485
|
+
}, {})
|
486
|
+
};
|
487
|
+
};
|
488
|
+
const matchesAreEqual = (a, b) => {
|
489
|
+
if (a == null && b == null) {
|
490
|
+
return true;
|
491
|
+
}
|
492
|
+
if (b == null) {
|
493
|
+
return false;
|
494
|
+
}
|
495
|
+
return a && b &&
|
496
|
+
a.path === b.path &&
|
497
|
+
a.url === b.url &&
|
498
|
+
valueEqual(a.params, b.params);
|
499
|
+
};
|
500
|
+
|
501
|
+
exports.addLeadingSlash = addLeadingSlash;
|
502
|
+
exports.createKey = createKey;
|
503
|
+
exports.createLocation = createLocation;
|
504
|
+
exports.createPath = createPath;
|
505
|
+
exports.hasBasename = hasBasename;
|
506
|
+
exports.locationsAreEqual = locationsAreEqual;
|
507
|
+
exports.matchPath = matchPath;
|
508
|
+
exports.matchesAreEqual = matchesAreEqual;
|
509
|
+
exports.stripBasename = stripBasename;
|
510
|
+
exports.stripLeadingSlash = stripLeadingSlash;
|
511
|
+
exports.stripTrailingSlash = stripTrailingSlash;
|
@@ -0,0 +1,91 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-bae2a754.js');
|
6
|
+
const icons = require('./icons-80d477f6.js');
|
7
|
+
|
8
|
+
const cardCss = "sparkle-card{display:block;font-size:12px;max-width:30em}.Card{background-color:var(--background);border-radius:4px;box-shadow:0px 0.175em 0.5em rgba(2, 8, 20, 0.1), 0px 0.085em 0.175em rgba(2, 8, 20, 0.08);color:var(--text-color--light);display:flex;flex-direction:column;font-size:inherit;font-weight:normal;height:100%;justify-content:flex-start;line-height:1.6;transition:box-shadow 150ms ease, transform 150ms ease;width:100%;overflow:hidden}.Card-with-image{grid-row:span 2}.Card-without-image{font-size:12px}.Card-container{padding:1.65em 2em 1.65em}.Card-image{width:100%;height:auto}.Card-icon,.Card-iconset__container{width:48px;height:48px;margin-bottom:1.2em;border-radius:50%;object-fit:cover;background:rgb(246, 248, 251)}.Card-icon-hover{display:none}.Card-iconset__container{position:relative}.Card-iconset__container .Card-icon{position:absolute;opacity:0;transition:0.8s opacity}.Card-iconset__container .Card-icon--active{opacity:1}.Card-ionicon{width:48px;height:48px;float:left;margin-right:1em}@media (hover: hover){.Card[href]:hover{box-shadow:0 0.35em 1.175em rgba(2, 8, 20, 0.1), 0 0.175em 0.5em rgba(2, 8, 20, 0.08);transform:translateY(-1px)}.Card[href]:hover .Card-icon-default{display:none}.Card[href]:hover .Card-icon-hover{display:block}}.Card-content>*:first-child{margin-top:0}.Card-content>*:last-child{margin-bottom:0}.Card-content>*{margin:0 0 0.65em}.Card-header{color:var(--text-color--dark);font-size:1.4em;font-weight:500;line-height:1.4;margin-bottom:0.45em}.Card-without-image .Card-header{margin-bottom:0.3em}.Card-header>svg{fill:currentColor;height:1em;margin-bottom:-0.125em;width:auto}.Card-size-lg{font-size:14px}.Card-size-lg .Card-icon,.Card-size-lg .Card-ionicon,.Card-size-lg .Card-iconset__container{width:80px;height:80px}.Card-size-lg.Card-without-image .Card-header{font-size:20px}sparkle-card.disabled,sparkle-card[disabled]{position:relative}sparkle-card.disabled::after,sparkle-card[disabled]::after{position:absolute;top:0;right:0;left:0;bottom:0;background:rgba(232, 232, 232, 0.5);pointer-events:none;content:''}aside sparkle-card{max-width:240px}aside .Card-container{display:grid;grid-template-columns:minmax(0, max-content) 1fr;grid-template-rows:minmax(0, min-content);grid-template-areas:'icon title'\r\n 'icon body'}aside .Card-icon{width:32px;height:32px;margin-right:16px;margin-bottom:0;grid-area:icon}aside .Card-header{grid-area:title}aside .Card-header::after{background-image:url('/docs/assets/img/new-tab.svg');display:inline-block;height:13px;width:13px;background-size:13px 13px;margin-left:4px;content:''}aside .Card-content{grid-area:body;max-height:42px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}aside .Card-icon+.Card-content{margin-top:-6px}.markdown-content p sparkle-card{margin-top:1em}";
|
9
|
+
|
10
|
+
const SparkleCard = class {
|
11
|
+
constructor(hostRef) {
|
12
|
+
index.registerInstance(this, hostRef);
|
13
|
+
this.activeIndex = 0;
|
14
|
+
this.rotationTime = 6000; // 4 seconds
|
15
|
+
}
|
16
|
+
hostData() {
|
17
|
+
return {
|
18
|
+
class: {
|
19
|
+
'Card-with-image': typeof this.img !== 'undefined',
|
20
|
+
'Card-without-image': typeof this.img === 'undefined',
|
21
|
+
'Card-size-lg': this.size === 'lg',
|
22
|
+
}
|
23
|
+
};
|
24
|
+
}
|
25
|
+
componentWillLoad() {
|
26
|
+
if (typeof this.iconset !== 'undefined') {
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
this.activeIndex = 0;
|
30
|
+
this.rotationTime = 4000 + (Math.random() * 2000); // 4 - 6 seconds - randomize it a bit
|
31
|
+
// make the first transiton happen a bit faster
|
32
|
+
setInterval(this.tic.bind(this), this.rotationTime);
|
33
|
+
setTimeout(this.tic.bind(this), this.rotationTime / 3);
|
34
|
+
}
|
35
|
+
componentWillUnload() {
|
36
|
+
clearInterval(this.interval);
|
37
|
+
}
|
38
|
+
tic() {
|
39
|
+
if (typeof this.iconset !== 'undefined' && this.activeIndex >= this.iconset.split(',').length - 1) {
|
40
|
+
return this.activeIndex = 0;
|
41
|
+
}
|
42
|
+
this.activeIndex++;
|
43
|
+
}
|
44
|
+
__stencil_render() {
|
45
|
+
const isStatic = typeof this.href === 'undefined';
|
46
|
+
const isOutbound = typeof this.href !== 'undefined' ? /^http/.test(this.href) : false;
|
47
|
+
const header = this.header === 'undefined' ? null : (index.h("header", { class: "Card-header" }, this.header, " ", isOutbound ? index.h(icons.Outbound, null) : null));
|
48
|
+
const hoverIcon = this.hoverIcon || this.icon;
|
49
|
+
const content = [
|
50
|
+
this.img && index.h("img", { src: this.img, class: "Card-image" }),
|
51
|
+
index.h("div", { class: "Card-container" }, this.icon && index.h("img", { src: this.icon, class: "Card-icon Card-icon-default" }), hoverIcon && index.h("img", { src: hoverIcon, class: "Card-icon Card-icon-hover" }), this.ionicon && index.h("ion-icon", { name: this.ionicon, class: "Card-ionicon" }), this.iconset && index.h("div", { class: "Card-iconset__container" }, this.iconset.split(',').map((icon, index$1) => index.h("img", { src: icon, class: `Card-icon ${index$1 === this.activeIndex ? 'Card-icon--active' : ''}`, "data-index": index$1 }))), header, index.h("div", { class: "Card-content" }, index.h("slot", null)))
|
52
|
+
];
|
53
|
+
if (isStatic) {
|
54
|
+
return (index.h("div", { class: "Card" }, content));
|
55
|
+
}
|
56
|
+
if (isOutbound) {
|
57
|
+
return (index.h("a", { class: "Card", href: this.href }, content));
|
58
|
+
}
|
59
|
+
return (index.h("stencil-route-link", { url: this.href, anchorClass: "Card" }, content));
|
60
|
+
}
|
61
|
+
render() { return index.h(index.Host, this.hostData(), this.__stencil_render()); }
|
62
|
+
};
|
63
|
+
SparkleCard.style = cardCss;
|
64
|
+
|
65
|
+
const cardsCss = "sparkle-cards{display:grid;font-size:12px;grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));grid-gap:1.35rem}sparkle-cards>sparkle-card{font-size:inherit;max-width:none}sparkle-cards>sparkle-card.tall{grid-row:span 2}sparkle-cards>sparkle-card.wide{grid-column:span 2}sparkle-cards.prioritized>sparkle-card:nth-child(-n+5){font-size:1.25em}sparkle-cards.prioritized>sparkle-card:first-child{grid-row:span 2}sparkle-cards.max-measure>sparkle-card{max-width:50%}";
|
66
|
+
|
67
|
+
const SparkleCards = class {
|
68
|
+
constructor(hostRef) {
|
69
|
+
index.registerInstance(this, hostRef);
|
70
|
+
}
|
71
|
+
render() {
|
72
|
+
return index.h("slot", null);
|
73
|
+
}
|
74
|
+
};
|
75
|
+
SparkleCards.style = cardsCss;
|
76
|
+
|
77
|
+
const sparkleGoalItemCss = ":host{display:block}.Card-content{padding-top:8px}.goal-header{display:flex;justify-content:flex-end;margin-top:-40px !important}";
|
78
|
+
|
79
|
+
const SparkleGoalItem = class {
|
80
|
+
constructor(hostRef) {
|
81
|
+
index.registerInstance(this, hostRef);
|
82
|
+
}
|
83
|
+
render() {
|
84
|
+
return (index.h(index.Host, null, index.h("sparkle-card", { header: this.goal.Name, icon: this.goal.CategoryIcon }, index.h("div", { class: "goal-header" }, index.h("ion-button", { size: "small", color: "primary", onClick: () => this.onEditGoal() }, "Edit")), index.h("p", null, this.goal.Description), index.h("sparkle-goal-progress", { percentage: this.goal.Percentage.toString() }))));
|
85
|
+
}
|
86
|
+
};
|
87
|
+
SparkleGoalItem.style = sparkleGoalItemCss;
|
88
|
+
|
89
|
+
exports.sparkle_card = SparkleCard;
|
90
|
+
exports.sparkle_cards = SparkleCards;
|
91
|
+
exports.sparkle_goal_item = SparkleGoalItem;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-bae2a754.js');
|
6
|
-
const icons = require('./icons-
|
6
|
+
const icons = require('./icons-80d477f6.js');
|
7
7
|
|
8
8
|
const codeCss = "code[class*=\"language-\"],pre[class*=\"language-\"]{color:#4d4d4c;background:none;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=\"language-\"],:not(pre)>code[class*=\"language-\"]{background:hsl(30, 20%, 25%)}pre[class*=\"language-\"]{padding:1em;margin:.5em 0;overflow:auto;border:.3em solid hsl(30, 20%, 40%);border-radius:.5em;box-shadow:1px 1px .5em black inset}:not(pre)>code[class*=\"language-\"]{padding:.15em .2em .05em;border-radius:.3em;border:.13em solid hsl(30, 20%, 40%);box-shadow:1px 1px .3em -.1em black inset;white-space:normal}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#8c9296}.token.punctuation{opacity:.7}.namespace{opacity:.7}.token.tag{color:#91c5ff}.token.tag .token.tag{color:#2b90ff}.token.property,.token.attr-name,.token.boolean,.token.number,.token.constant,.token.symbol{color:#8454ff}.token.selector,.token.char,.token.function,.token.builtin,.token.inserted{color:#ff6810}.token.operator,.token.string,.token.entity,.token.url,.token.attr-value,.language-css .token.string,.style .token.string,.token.variable{color:#42b983}.token.atrule{color:#ffbb01}.token.regex,.token.keyword,.token.important{color:#f55073}.token.important,.token.bold{font-weight:bold}.token.italic{font-style:italic}.token.entity{cursor:help}.token.deleted{color:red}sparkle-code[language=\"shell\"]>pre{background-color:var(--text-color--dark);border-radius:7px}sparkle-code[language=\"shell\"]:before{display:none}sparkle-code[language=\"shell\"] code{color:rgba(255, 255, 255, 0.7);font-size:13px}sparkle-code[language=\"shell\"] .token{color:inherit}sparkle-code[language=\"shell\"] .token.prompt{color:#fb96f9;user-select:none}sparkle-code[language=\"shell\"] .token.comment{color:rgba(255, 255, 255, 0.45)}sparkle-code{display:block;position:relative}sparkle-code:before{color:#bdc5d1;content:attr(language);font-family:var(--code-font-family);font-size:10px;letter-spacing:0.05em;line-height:1;padding:0.75em;position:absolute;right:0;text-transform:uppercase;top:0}sparkle-code[language=\"shell\"] pre{white-space:pre-wrap}.code-text__copy{position:absolute;right:0;top:-1.6rem;height:20px}.code-text__copy-link,.code-text__copy-confirmation{padding:4px 5px;font-size:12px;line-height:12px;font-weight:600;position:absolute;right:0;top:0}.code-text__copy-link{transition:0.2s transform ,\r\n 0.2s opacity,\r\n 0.2s color;color:#70A4FF;background-color:#E0EEFF;border-radius:4px;display:inline-block;cursor:pointer;opacity:1;transform:translate3d(0,0,0);z-index:5}.code-text__copy-link:hover{color:var(--blue)}.code-text__copy-confirmation{transition:0.2s transform ,\r\n 0.2s opacity;color:#0ec254;opacity:0;transform:translate3d(0,5px,0);z-index:1;display:flex;align-items:center;height:20px;padding:0}.code-text__copy-confirmation svg{fill:#0ec254;margin-right:-4px}.show-confirmation .code-text__copy-link{opacity:0;transform:translate3d(0,-5px,0);pointer-events:none}.show-confirmation .code-text__copy-confirmation{opacity:1;transform:translate3d(0,0,0)}";
|
9
9
|
|