@iota-uz/sdk 0.46.0 → 0.47.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.
- package/README.md +5 -0
- package/dist/client-host/identity.d.ts +4 -4
- package/dist/client-host/identity.js +2 -2
- package/dist/lens/{CascadePanel-Bha4qY7J.js → CascadePanel-BlYJd18G.js} +1 -1
- package/dist/lens/{ChartDataEquivalent-Bwgn4yYB.js → ChartDataEquivalent-B6xSOdzC.js} +1 -1
- package/dist/lens/{ChartPanel-BZpzBuwl.js → ChartPanel-BIJjrs5D.js} +159 -159
- package/dist/lens/{CoveragePanel-D40AuKkD.js → CoveragePanel-CHtXDMtt.js} +1 -1
- package/dist/lens/{GaugePanel-C9k2TuJH.js → GaugePanel-By0TOJPa.js} +1 -1
- package/dist/lens/LensDashboard.d.ts +13 -0
- package/dist/lens/LensDashboard.d.ts.map +1 -1
- package/dist/lens/{MapPanel-ZYxfDsPM.js → MapPanel-Cw4ELCiM.js} +3 -3
- package/dist/lens/{MetricFlowPanel-CmESLoLK.js → MetricFlowPanel-Gr5wi3nI.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-UZVuJ5P2.js → MetricHierarchyPanel-VLA_5LXX.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-CXLdScAy.js → MetricRelationshipPanel-DFP566_c.js} +2 -2
- package/dist/lens/{PrintReport-lrfdCTZO.js → PrintReport-C0OV1iHP.js} +5 -5
- package/dist/lens/{QualityChip-BYz-DHfs.js → QualityChip-DTi-0jdh.js} +1 -1
- package/dist/lens/SaveInvestigation-CX1Abyl8.js +309 -0
- package/dist/lens/TablePanel-BusKU7cU.js +994 -0
- package/dist/lens/{adapter-CeAqYWqm.js → adapter-CQg4-M7p.js} +7 -7
- package/dist/lens/contract/schemas.d.ts +2 -0
- package/dist/lens/contract/schemas.d.ts.map +1 -1
- package/dist/lens/contract/types.d.ts +12 -0
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/{dashboardEdit-DKVE_6J_.js → dashboardEdit-CJgCVfi_.js} +1 -1
- package/dist/lens/explore/DrillOverlay.d.ts +38 -0
- package/dist/lens/explore/DrillOverlay.d.ts.map +1 -1
- package/dist/lens/explore/ExplorePanel.d.ts.map +1 -1
- package/dist/lens/explore/SaveInvestigation.d.ts +21 -0
- package/dist/lens/explore/SaveInvestigation.d.ts.map +1 -0
- package/dist/lens/explore/drillHost.d.ts +25 -0
- package/dist/lens/explore/drillHost.d.ts.map +1 -0
- package/dist/lens/explore/investigation.d.ts +174 -0
- package/dist/lens/explore/investigation.d.ts.map +1 -0
- package/dist/lens/explore/provenanceLabels.d.ts +10 -0
- package/dist/lens/explore/provenanceLabels.d.ts.map +1 -0
- package/dist/lens/index-DR7Hf8Km.js +19805 -0
- package/dist/lens/{index-DkVTXC8W.js → index-DZFw4cqF.js} +1 -1
- package/dist/lens/index.d.ts +7 -1
- package/dist/lens/index.d.ts.map +1 -1
- package/dist/lens/index.js +67 -53
- package/dist/lens/{install-CQ_iMuAE.js → install-B2lTK6uo.js} +1 -1
- package/dist/lens/{install-Ch0_qifK.js → install-BXr4Mnc0.js} +1 -1
- package/dist/lens/{install-CKmxqMe1.js → install-CicNQ_ks.js} +1 -1
- package/dist/lens/{install-BwD_xNlp.js → install-d8A0WPiw.js} +1 -1
- package/dist/lens/{keys-BBmWdfaH.js → keys-C-Akc9lZ.js} +2 -2
- package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
- package/dist/lens/panels/TablePanel.d.ts.map +1 -1
- package/dist/lens/panels/actions.d.ts.map +1 -1
- package/dist/lens/panels/panelFailure.d.ts.map +1 -1
- package/dist/lens/{prefetch-BXoUIIgq.js → prefetch-C9kxuIs8.js} +2 -2
- package/dist/lens/{prefetchPanels-a-zs_bDm.js → prefetchPanels-gbY9RIqL.js} +1 -1
- package/dist/lens/{print-CpgWJxDG.js → print-CllsAP3d.js} +1 -1
- package/dist/lens/reports/ReportCompositionEditor.d.ts +8 -2
- package/dist/lens/reports/ReportCompositionEditor.d.ts.map +1 -1
- package/dist/lens/reports/ReportDefinitionEditor.d.ts +54 -0
- package/dist/lens/reports/ReportDefinitionEditor.d.ts.map +1 -0
- package/dist/lens/reports/ReportPicker.d.ts +6 -0
- package/dist/lens/reports/ReportPicker.d.ts.map +1 -1
- package/dist/lens/reports/dashboardEdit.d.ts +3 -0
- package/dist/lens/reports/dashboardEdit.d.ts.map +1 -1
- package/dist/lens/reports/editing.d.ts +35 -0
- package/dist/lens/reports/editing.d.ts.map +1 -1
- package/dist/lens/reports/picker.d.ts +4 -1
- package/dist/lens/reports/picker.d.ts.map +1 -1
- package/dist/lens/runtime/index.d.ts +0 -1
- package/dist/lens/runtime/index.d.ts.map +1 -1
- package/dist/lens/runtime/messages.d.ts +2 -2
- package/dist/lens/runtime/messages.d.ts.map +1 -1
- package/dist/lens/runtime/provider.d.ts +5 -1
- package/dist/lens/runtime/provider.d.ts.map +1 -1
- package/dist/lens/runtime/returnContext.d.ts +62 -0
- package/dist/lens/runtime/returnContext.d.ts.map +1 -0
- package/dist/lens/runtime/tableSummary.d.ts +9 -0
- package/dist/lens/runtime/tableSummary.d.ts.map +1 -0
- package/dist/lens/{scales-BLf9OweG.js → scales-CO6Q9RtG.js} +1 -1
- package/dist/lens/style.css +1 -1
- package/dist/runtime/README.md +24 -0
- package/dist/runtime/assert.d.ts +51 -0
- package/dist/runtime/assert.js +172 -0
- package/dist/runtime/build/README.txt +1 -0
- package/dist/runtime/build/extract.mjs +342 -0
- package/dist/runtime/build/shared-exports.json +388 -0
- package/dist/runtime/build/test-child.mjs +136 -0
- package/dist/runtime/build/theme/tailwind.config.js +121 -0
- package/dist/runtime/build/theme/theme.css +462 -0
- package/dist/runtime/build/theme/utilities.css +1 -0
- package/dist/runtime/build/vendor/lib/lib.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.decorators.d.ts +384 -0
- package/dist/runtime/build/vendor/lib/lib.decorators.legacy.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.dom.asynciterable.d.ts +41 -0
- package/dist/runtime/build/vendor/lib/lib.dom.d.ts +28983 -0
- package/dist/runtime/build/vendor/lib/lib.dom.iterable.d.ts +491 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.collection.d.ts +147 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.core.d.ts +597 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.generator.d.ts +77 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.iterable.d.ts +590 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.promise.d.ts +81 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.proxy.d.ts +128 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.reflect.d.ts +144 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.symbol.d.ts +46 -0
- package/dist/runtime/build/vendor/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.array.include.d.ts +116 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.full.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2016.intl.d.ts +31 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.date.d.ts +31 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.full.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.intl.d.ts +44 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.object.d.ts +49 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.string.d.ts +45 -0
- package/dist/runtime/build/vendor/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.intl.d.ts +83 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.promise.d.ts +30 -0
- package/dist/runtime/build/vendor/lib/lib.es2018.regexp.d.ts +37 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.array.d.ts +79 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.intl.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.object.d.ts +33 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.string.d.ts +37 -0
- package/dist/runtime/build/vendor/lib/lib.es2019.symbol.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.bigint.d.ts +731 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.d.ts +27 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.date.d.ts +42 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.intl.d.ts +474 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.number.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.promise.d.ts +47 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.string.d.ts +44 -0
- package/dist/runtime/build/vendor/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.intl.d.ts +166 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.promise.d.ts +48 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.string.d.ts +33 -0
- package/dist/runtime/build/vendor/lib/lib.es2021.weakref.d.ts +78 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.array.d.ts +121 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.error.d.ts +75 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.intl.d.ts +121 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.object.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.regexp.d.ts +39 -0
- package/dist/runtime/build/vendor/lib/lib.es2022.string.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.array.d.ts +924 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.collection.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.d.ts +22 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2023.intl.d.ts +56 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.collection.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.d.ts +26 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.object.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.promise.d.ts +35 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.regexp.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/dist/runtime/build/vendor/lib/lib.es2024.string.d.ts +29 -0
- package/dist/runtime/build/vendor/lib/lib.es5.d.ts +4585 -0
- package/dist/runtime/build/vendor/lib/lib.es6.d.ts +23 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.array.d.ts +35 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.collection.d.ts +96 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.d.ts +25 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.decorators.d.ts +28 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.disposable.d.ts +193 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.full.d.ts +24 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.intl.d.ts +21 -0
- package/dist/runtime/build/vendor/lib/lib.esnext.iterator.d.ts +148 -0
- package/dist/runtime/build/vendor/node-types/assert/strict.d.ts +111 -0
- package/dist/runtime/build/vendor/node-types/assert.d.ts +1115 -0
- package/dist/runtime/build/vendor/node-types/async_hooks.d.ts +619 -0
- package/dist/runtime/build/vendor/node-types/buffer.buffer.d.ts +477 -0
- package/dist/runtime/build/vendor/node-types/buffer.d.ts +1941 -0
- package/dist/runtime/build/vendor/node-types/child_process.d.ts +1480 -0
- package/dist/runtime/build/vendor/node-types/cluster.d.ts +578 -0
- package/dist/runtime/build/vendor/node-types/compatibility/iterators.d.ts +21 -0
- package/dist/runtime/build/vendor/node-types/console.d.ts +453 -0
- package/dist/runtime/build/vendor/node-types/constants.d.ts +21 -0
- package/dist/runtime/build/vendor/node-types/crypto.d.ts +5484 -0
- package/dist/runtime/build/vendor/node-types/dgram.d.ts +715 -0
- package/dist/runtime/build/vendor/node-types/diagnostics_channel.d.ts +576 -0
- package/dist/runtime/build/vendor/node-types/dns/promises.d.ts +503 -0
- package/dist/runtime/build/vendor/node-types/dns.d.ts +923 -0
- package/dist/runtime/build/vendor/node-types/domain.d.ts +166 -0
- package/dist/runtime/build/vendor/node-types/events.d.ts +967 -0
- package/dist/runtime/build/vendor/node-types/fs/promises.d.ts +1354 -0
- package/dist/runtime/build/vendor/node-types/fs.d.ts +4777 -0
- package/dist/runtime/build/vendor/node-types/globals.d.ts +170 -0
- package/dist/runtime/build/vendor/node-types/globals.typedarray.d.ts +41 -0
- package/dist/runtime/build/vendor/node-types/http.d.ts +2246 -0
- package/dist/runtime/build/vendor/node-types/http2.d.ts +2882 -0
- package/dist/runtime/build/vendor/node-types/https.d.ts +585 -0
- package/dist/runtime/build/vendor/node-types/index.d.ts +101 -0
- package/dist/runtime/build/vendor/node-types/inspector.d.ts +323 -0
- package/dist/runtime/build/vendor/node-types/inspector.generated.d.ts +4406 -0
- package/dist/runtime/build/vendor/node-types/module.d.ts +844 -0
- package/dist/runtime/build/vendor/node-types/net.d.ts +1197 -0
- package/dist/runtime/build/vendor/node-types/os.d.ts +507 -0
- package/dist/runtime/build/vendor/node-types/package.json +140 -0
- package/dist/runtime/build/vendor/node-types/path.d.ts +200 -0
- package/dist/runtime/build/vendor/node-types/perf_hooks.d.ts +1054 -0
- package/dist/runtime/build/vendor/node-types/process.d.ts +2101 -0
- package/dist/runtime/build/vendor/node-types/punycode.d.ts +117 -0
- package/dist/runtime/build/vendor/node-types/querystring.d.ts +152 -0
- package/dist/runtime/build/vendor/node-types/readline/promises.d.ts +161 -0
- package/dist/runtime/build/vendor/node-types/readline.d.ts +600 -0
- package/dist/runtime/build/vendor/node-types/repl.d.ts +438 -0
- package/dist/runtime/build/vendor/node-types/sea.d.ts +162 -0
- package/dist/runtime/build/vendor/node-types/sqlite.d.ts +1182 -0
- package/dist/runtime/build/vendor/node-types/stream/consumers.d.ts +45 -0
- package/dist/runtime/build/vendor/node-types/stream/promises.d.ts +90 -0
- package/dist/runtime/build/vendor/node-types/stream/web.d.ts +596 -0
- package/dist/runtime/build/vendor/node-types/stream.d.ts +1707 -0
- package/dist/runtime/build/vendor/node-types/string_decoder.d.ts +67 -0
- package/dist/runtime/build/vendor/node-types/test.d.ts +2656 -0
- package/dist/runtime/build/vendor/node-types/timers/promises.d.ts +108 -0
- package/dist/runtime/build/vendor/node-types/timers.d.ts +285 -0
- package/dist/runtime/build/vendor/node-types/tls.d.ts +1314 -0
- package/dist/runtime/build/vendor/node-types/trace_events.d.ts +197 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/buffer.buffer.d.ts +473 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/compatibility/float16array.d.ts +71 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/globals.typedarray.d.ts +36 -0
- package/dist/runtime/build/vendor/node-types/ts5.6/index.d.ts +103 -0
- package/dist/runtime/build/vendor/node-types/ts5.7/compatibility/float16array.d.ts +72 -0
- package/dist/runtime/build/vendor/node-types/ts5.7/index.d.ts +103 -0
- package/dist/runtime/build/vendor/node-types/tty.d.ts +209 -0
- package/dist/runtime/build/vendor/node-types/url.d.ts +1103 -0
- package/dist/runtime/build/vendor/node-types/util.d.ts +2379 -0
- package/dist/runtime/build/vendor/node-types/v8.d.ts +1010 -0
- package/dist/runtime/build/vendor/node-types/vm.d.ts +1160 -0
- package/dist/runtime/build/vendor/node-types/wasi.d.ts +202 -0
- package/dist/runtime/build/vendor/node-types/web-globals/abortcontroller.d.ts +34 -0
- package/dist/runtime/build/vendor/node-types/web-globals/crypto.d.ts +32 -0
- package/dist/runtime/build/vendor/node-types/web-globals/domexception.d.ts +68 -0
- package/dist/runtime/build/vendor/node-types/web-globals/events.d.ts +97 -0
- package/dist/runtime/build/vendor/node-types/web-globals/fetch.d.ts +62 -0
- package/dist/runtime/build/vendor/node-types/web-globals/navigator.d.ts +25 -0
- package/dist/runtime/build/vendor/node-types/web-globals/storage.d.ts +24 -0
- package/dist/runtime/build/vendor/node-types/web-globals/streams.d.ts +22 -0
- package/dist/runtime/build/vendor/node-types/worker_threads.d.ts +894 -0
- package/dist/runtime/build/vendor/node-types/zlib.d.ts +768 -0
- package/dist/runtime/build/vendor/node_modules/csstype/LICENSE +19 -0
- package/dist/runtime/build/vendor/node_modules/csstype/index.d.ts +22569 -0
- package/dist/runtime/build/vendor/node_modules/csstype/index.js.flow +6863 -0
- package/dist/runtime/build/vendor/node_modules/csstype/package.json +70 -0
- package/dist/runtime/build/vendor/node_modules/seroval/LICENSE +7 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/development/index.cjs +4232 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/cjs/production/index.cjs +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/development/index.mjs +4209 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/esm/production/index.mjs +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/Serializer.d.ts +28 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/base-primitives.d.ts +28 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/compat.d.ts +15 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constants.d.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/constructors.d.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/async-parser.d.ts +20 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/deserializer.d.ts +52 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/parser.d.ts +62 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/serializer.d.ts +103 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/context/sync-parser.d.ts +61 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/cross/index.d.ts +24 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/errors.d.ts +47 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/function-string.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/keys.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/literals.d.ts +10 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/node.d.ts +8 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/opaque-reference.d.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/plugin.d.ts +52 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/reference.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/sequence.d.ts +11 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/special-reference.d.ts +16 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/stream.d.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/string.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/symbols.d.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/tree/index.d.ts +21 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/types.d.ts +233 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/error.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-identifier.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/get-object-flag.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/is-valid-identifier.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/promise-to-result.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/typed-array.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/core/utils/valid-properties.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval/dist/types/index.d.ts +18 -0
- package/dist/runtime/build/vendor/node_modules/seroval/package.json +67 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/Serializer.ts +119 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/base-primitives.ts +537 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/compat.ts +23 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/constants.ts +202 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/constructors.ts +265 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/async-parser.ts +666 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/deserializer.ts +832 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/parser.ts +335 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/serializer.ts +1524 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/context/sync-parser.ts +943 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/cross/index.ts +190 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/errors.ts +196 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/function-string.ts +31 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/keys.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/literals.ts +43 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/node.ts +40 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/opaque-reference.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/plugin.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/reference.ts +66 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/sequence.ts +59 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/special-reference.ts +42 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/stream.ts +71 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/string.ts +86 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/symbols.ts +20 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/tree/index.ts +134 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/types.ts +377 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/error.ts +73 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-identifier.ts +18 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/get-object-flag.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/is-valid-identifier.ts +12 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/promise-to-result.ts +9 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/typed-array.ts +56 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/core/utils/valid-properties.ts +34 -0
- package/dist/runtime/build/vendor/node_modules/seroval/src/index.ts +36 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/LICENSE +7 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/development/web.cjs +826 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/cjs/production/web.cjs +1 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/development/web.mjs +803 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/esm/production/web.mjs +1 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/abort-signal.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/blob.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/custom-event.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/dom-exception.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/event.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/file.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/form-data.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/headers.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/image-data.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/index.d.ts +15 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/readable-stream.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/request.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/response.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url-search-params.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/dist/types/web/url.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/package.json +70 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/abort-signal.ts +131 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/blob.ts +41 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/custom-event.ts +66 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/dom-exception.ts +57 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/event.ts +62 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/file.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/form-data.ts +105 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/headers.ts +49 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/image-data.ts +74 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/index.ts +14 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/readable-stream.ts +148 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/request.ts +82 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/response.ts +65 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url-search-params.ts +40 -0
- package/dist/runtime/build/vendor/node_modules/seroval-plugins/web/url.ts +37 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.cjs +824 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/server.js +770 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.cjs +1808 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/dist/solid.js +1753 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/jsx-runtime.d.ts +1 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/package.json +243 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.cjs +133 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/server.js +121 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.cjs +463 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/dist/store.js +454 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/package.json +46 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/index.d.ts +12 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/modifiers.d.ts +6 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/mutable.d.ts +5 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/server.d.ts +17 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/store/types/store.d.ts +108 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/index.d.ts +23 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/jsx.d.ts +4253 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/array.d.ts +44 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/observable.d.ts +36 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/scheduler.d.ts +10 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/reactive/signal.d.ts +581 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/Suspense.d.ts +26 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/component.d.ts +111 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/flow.d.ts +118 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/hydration.d.ts +24 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/render/index.d.ts +4 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/index.d.ts +3 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/reactive.d.ts +98 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/types/server/rendering.d.ts +160 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.cjs +900 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/server.js +786 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.cjs +884 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/dist/web.js +772 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/package.json +46 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.cjs +12 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/dist/storage.js +10 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/package.json +15 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/storage/types/index.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/client.d.ts +93 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/core.d.ts +2 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/index.d.ts +50 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/jsx.d.ts +1 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server-mock.d.ts +65 -0
- package/dist/runtime/build/vendor/node_modules/solid-js/web/types/server.d.ts +187 -0
- package/dist/runtime/build/worker.mjs +293415 -0
- package/dist/runtime/catalog/sdk-natives.json +655 -0
- package/dist/runtime/cli/iota-ext.mjs +1028 -0
- package/dist/runtime/client-host/entry.d.ts +10 -0
- package/dist/runtime/client-host/entry.js +124 -0
- package/dist/runtime/client-host/hooks.d.ts +43 -0
- package/dist/runtime/client-host/hooks.js +94 -0
- package/dist/runtime/client-host/index.d.ts +9 -0
- package/dist/runtime/client-host/index.js +9 -0
- package/dist/runtime/client-host/islands.d.ts +44 -0
- package/dist/runtime/client-host/islands.js +165 -0
- package/dist/runtime/client-host/kit.d.ts +10 -0
- package/dist/runtime/client-host/kit.js +37 -0
- package/dist/runtime/client-host/page.d.ts +53 -0
- package/dist/runtime/client-host/page.js +217 -0
- package/dist/runtime/client-host/params.d.ts +8 -0
- package/dist/runtime/client-host/params.js +36 -0
- package/dist/runtime/client-host/protocol.d.ts +78 -0
- package/dist/runtime/client-host/protocol.js +26 -0
- package/dist/runtime/client-host/shared.d.ts +12 -0
- package/dist/runtime/client-host/shared.js +49 -0
- package/dist/runtime/client-host/shell.d.ts +88 -0
- package/dist/runtime/client-host/shell.js +195 -0
- package/dist/runtime/client-host/slots.d.ts +54 -0
- package/dist/runtime/client-host/slots.js +90 -0
- package/dist/runtime/client-host/styles.d.ts +7 -0
- package/dist/runtime/client-host/styles.js +61 -0
- package/dist/runtime/client-host/transport.d.ts +45 -0
- package/dist/runtime/client-host/transport.js +115 -0
- package/dist/runtime/client.d.ts +226 -0
- package/dist/runtime/client.js +121 -0
- package/dist/runtime/contracts.d.ts +204 -0
- package/dist/runtime/contracts.js +195 -0
- package/dist/runtime/docs/authoring.md +1609 -0
- package/dist/runtime/docs/example/docs/en/admin/limits.md +10 -0
- package/dist/runtime/docs/example/docs/en/getting-started.md +13 -0
- package/dist/runtime/docs/example/docs/en/points.md +9 -0
- package/dist/runtime/docs/example/docs/ru/getting-started.md +12 -0
- package/dist/runtime/docs/example/package.json +27 -0
- package/dist/runtime/docs/example/src/ClientScreen.tsx +10 -0
- package/dist/runtime/docs/example/src/RedemptionScreen.tsx +7 -0
- package/dist/runtime/docs/example/src/RewardsScreen.module.css +13 -0
- package/dist/runtime/docs/example/src/RewardsScreen.tsx +51 -0
- package/dist/runtime/docs/example/src/client.tsx +40 -0
- package/dist/runtime/docs/example/src/contracts.ts +132 -0
- package/dist/runtime/docs/example/src/css-modules.d.ts +5 -0
- package/dist/runtime/docs/example/src/server.test.ts +156 -0
- package/dist/runtime/docs/example/src/server.ts +188 -0
- package/dist/runtime/docs/example/tsconfig.json +16 -0
- package/dist/runtime/entity.d.ts +237 -0
- package/dist/runtime/entity.js +201 -0
- package/dist/runtime/fakes.d.ts +80 -0
- package/dist/runtime/fakes.js +88 -0
- package/dist/runtime/fixtures.d.ts +34 -0
- package/dist/runtime/fixtures.js +60 -0
- package/dist/runtime/help.d.ts +22 -0
- package/dist/runtime/help.js +51 -0
- package/dist/runtime/host/context.mjs +392 -0
- package/dist/runtime/host/errors.mjs +64 -0
- package/dist/runtime/host/loader.mjs +28 -0
- package/dist/runtime/host/protocol.mjs +4 -0
- package/dist/runtime/host/register.mjs +8 -0
- package/dist/runtime/host/sdk/assert.mjs +153 -0
- package/dist/runtime/host/sdk/client-host/hooks.mjs +86 -0
- package/dist/runtime/host/sdk/client-host/protocol.mjs +30 -0
- package/dist/runtime/host/sdk/client-host/slots.mjs +82 -0
- package/dist/runtime/host/sdk/client-host/styles.mjs +45 -0
- package/dist/runtime/host/sdk/client-host/transport.mjs +102 -0
- package/dist/runtime/host/sdk/client.mjs +115 -0
- package/dist/runtime/host/sdk/contracts.mjs +185 -0
- package/dist/runtime/host/sdk/entity.mjs +183 -0
- package/dist/runtime/host/sdk/fakes.mjs +88 -0
- package/dist/runtime/host/sdk/fixtures.mjs +56 -0
- package/dist/runtime/host/sdk/help.mjs +37 -0
- package/dist/runtime/host/sdk/index.mjs +83 -0
- package/dist/runtime/host/sdk/kit.mjs +11 -0
- package/dist/runtime/host/sdk/manifest.mjs +276 -0
- package/dist/runtime/host/sdk/model.mjs +4 -0
- package/dist/runtime/host/sdk/resource.mjs +34 -0
- package/dist/runtime/host/sdk/schema.mjs +75 -0
- package/dist/runtime/host/sdk/server.mjs +43 -0
- package/dist/runtime/host/sdk/testhost.mjs +992 -0
- package/dist/runtime/host/sdk/testing.mjs +21 -0
- package/dist/runtime/host/sdk/wire.mjs +207 -0
- package/dist/runtime/host/worker.mjs +252 -0
- package/dist/runtime/index.d.ts +10 -0
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/kit.d.ts +5 -0
- package/dist/runtime/kit.js +14 -0
- package/dist/runtime/manifest.d.ts +17 -0
- package/dist/runtime/manifest.js +323 -0
- package/dist/runtime/model.d.ts +224 -0
- package/dist/runtime/model.js +3 -0
- package/dist/runtime/resource.d.ts +31 -0
- package/dist/runtime/resource.js +35 -0
- package/dist/runtime/schema.d.ts +97 -0
- package/dist/runtime/schema.js +73 -0
- package/dist/runtime/server.d.ts +445 -0
- package/dist/runtime/server.js +41 -0
- package/dist/runtime/testhost.d.ts +216 -0
- package/dist/runtime/testhost.js +1146 -0
- package/dist/runtime/testing.d.ts +10 -0
- package/dist/runtime/testing.js +7 -0
- package/dist/runtime/wire.d.ts +26 -0
- package/dist/runtime/wire.js +236 -0
- package/dist/sdk-identity.cjs +3 -3
- package/dist/sdk-identity.js +3 -3
- package/dist/sdk-identity.json +2 -2
- package/dist/solid-ui/embedded-css.d.ts +2 -0
- package/dist/solid-ui/embedded-css.js +1 -0
- package/dist/solid-ui/embedded.css +2 -0
- package/dist/testing/components.d.ts +73 -0
- package/dist/testing/components.js +96 -0
- package/dist/testing/htmx.d.ts +44 -0
- package/dist/testing/htmx.js +284 -0
- package/dist/testing/index.d.ts +4 -41
- package/dist/testing/index.js +3 -206
- package/dist/testing/scenarios.d.ts +83 -0
- package/dist/testing/scenarios.js +74 -0
- package/dist/testing/wait.d.ts +7 -0
- package/dist/testing/wait.js +19 -0
- package/package.json +33 -2
- package/dist/lens/TablePanel-C09tzJOL.js +0 -980
- package/dist/lens/index-DcVtZneD.js +0 -18473
- package/dist/lens/runtime/recovery.d.ts +0 -26
- package/dist/lens/runtime/recovery.d.ts.map +0 -1
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { batch, $PROXY, $TRACK, getListener, createSignal } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
const $RAW = Symbol("store-raw"),
|
|
4
|
+
$NODE = Symbol("store-node"),
|
|
5
|
+
$HAS = Symbol("store-has"),
|
|
6
|
+
$SELF = Symbol("store-self");
|
|
7
|
+
function wrap$1(value) {
|
|
8
|
+
let p = value[$PROXY];
|
|
9
|
+
if (!p) {
|
|
10
|
+
Object.defineProperty(value, $PROXY, {
|
|
11
|
+
value: p = new Proxy(value, proxyTraps$1)
|
|
12
|
+
});
|
|
13
|
+
if (!Array.isArray(value)) {
|
|
14
|
+
const keys = Object.keys(value),
|
|
15
|
+
desc = Object.getOwnPropertyDescriptors(value),
|
|
16
|
+
proto = Object.getPrototypeOf(value);
|
|
17
|
+
const isClass = proto !== null && value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype;
|
|
18
|
+
if (isClass) {
|
|
19
|
+
const descriptors = Object.getOwnPropertyDescriptors(proto);
|
|
20
|
+
keys.push(...Object.keys(descriptors));
|
|
21
|
+
Object.assign(desc, descriptors);
|
|
22
|
+
}
|
|
23
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
24
|
+
const prop = keys[i];
|
|
25
|
+
if (isClass && prop === "constructor") continue;
|
|
26
|
+
if (desc[prop].get) {
|
|
27
|
+
Object.defineProperty(value, prop, {
|
|
28
|
+
configurable: true,
|
|
29
|
+
enumerable: desc[prop].enumerable,
|
|
30
|
+
get: desc[prop].get.bind(p)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return p;
|
|
37
|
+
}
|
|
38
|
+
function isWrappable(obj) {
|
|
39
|
+
let proto;
|
|
40
|
+
return obj != null && typeof obj === "object" && (obj[$PROXY] || !(proto = Object.getPrototypeOf(obj)) || proto === Object.prototype || Array.isArray(obj));
|
|
41
|
+
}
|
|
42
|
+
function unwrap(item, set = new Set()) {
|
|
43
|
+
let result, unwrapped, v, prop;
|
|
44
|
+
if (result = item != null && item[$RAW]) return result;
|
|
45
|
+
if (!isWrappable(item) || set.has(item)) return item;
|
|
46
|
+
if (Array.isArray(item)) {
|
|
47
|
+
if (Object.isFrozen(item)) item = item.slice(0);else set.add(item);
|
|
48
|
+
for (let i = 0, l = item.length; i < l; i++) {
|
|
49
|
+
v = item[i];
|
|
50
|
+
if ((unwrapped = unwrap(v, set)) !== v) item[i] = unwrapped;
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
if (Object.isFrozen(item)) item = Object.assign({}, item);else set.add(item);
|
|
54
|
+
const keys = Object.keys(item),
|
|
55
|
+
desc = Object.getOwnPropertyDescriptors(item);
|
|
56
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
57
|
+
prop = keys[i];
|
|
58
|
+
if (desc[prop].get) continue;
|
|
59
|
+
v = item[prop];
|
|
60
|
+
if ((unwrapped = unwrap(v, set)) !== v) item[prop] = unwrapped;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return item;
|
|
64
|
+
}
|
|
65
|
+
function getNodes(target, symbol) {
|
|
66
|
+
let nodes = target[symbol];
|
|
67
|
+
if (!nodes) Object.defineProperty(target, symbol, {
|
|
68
|
+
value: nodes = Object.create(null)
|
|
69
|
+
});
|
|
70
|
+
return nodes;
|
|
71
|
+
}
|
|
72
|
+
function getNode(nodes, property, value) {
|
|
73
|
+
if (nodes[property]) return nodes[property];
|
|
74
|
+
const [s, set] = createSignal(value, {
|
|
75
|
+
equals: false,
|
|
76
|
+
internal: true
|
|
77
|
+
});
|
|
78
|
+
s.$ = set;
|
|
79
|
+
return nodes[property] = s;
|
|
80
|
+
}
|
|
81
|
+
function proxyDescriptor$1(target, property) {
|
|
82
|
+
const desc = Reflect.getOwnPropertyDescriptor(target, property);
|
|
83
|
+
if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE) return desc;
|
|
84
|
+
delete desc.value;
|
|
85
|
+
delete desc.writable;
|
|
86
|
+
desc.get = () => target[$PROXY][property];
|
|
87
|
+
return desc;
|
|
88
|
+
}
|
|
89
|
+
function trackSelf(target) {
|
|
90
|
+
getListener() && getNode(getNodes(target, $NODE), $SELF)();
|
|
91
|
+
}
|
|
92
|
+
function ownKeys(target) {
|
|
93
|
+
trackSelf(target);
|
|
94
|
+
return Reflect.ownKeys(target);
|
|
95
|
+
}
|
|
96
|
+
const proxyTraps$1 = {
|
|
97
|
+
get(target, property, receiver) {
|
|
98
|
+
if (property === $RAW) return target;
|
|
99
|
+
if (property === $PROXY) return receiver;
|
|
100
|
+
if (property === $TRACK) {
|
|
101
|
+
trackSelf(target);
|
|
102
|
+
return receiver;
|
|
103
|
+
}
|
|
104
|
+
const nodes = getNodes(target, $NODE);
|
|
105
|
+
const tracked = nodes[property];
|
|
106
|
+
let value = tracked ? tracked() : target[property];
|
|
107
|
+
if (property === $NODE || property === $HAS || property === "__proto__") return value;
|
|
108
|
+
if (!tracked) {
|
|
109
|
+
const desc = Object.getOwnPropertyDescriptor(target, property);
|
|
110
|
+
if (getListener() && (typeof value !== "function" || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();
|
|
111
|
+
}
|
|
112
|
+
return isWrappable(value) ? wrap$1(value) : value;
|
|
113
|
+
},
|
|
114
|
+
has(target, property) {
|
|
115
|
+
if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return true;
|
|
116
|
+
getListener() && getNode(getNodes(target, $HAS), property)();
|
|
117
|
+
return property in target;
|
|
118
|
+
},
|
|
119
|
+
set() {
|
|
120
|
+
return true;
|
|
121
|
+
},
|
|
122
|
+
deleteProperty() {
|
|
123
|
+
return true;
|
|
124
|
+
},
|
|
125
|
+
ownKeys: ownKeys,
|
|
126
|
+
getOwnPropertyDescriptor: proxyDescriptor$1
|
|
127
|
+
};
|
|
128
|
+
function setProperty(state, property, value, deleting = false) {
|
|
129
|
+
if (property === "__proto__") {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (!deleting && state[property] === value) return;
|
|
133
|
+
const prev = state[property],
|
|
134
|
+
len = state.length;
|
|
135
|
+
if (value === undefined) {
|
|
136
|
+
delete state[property];
|
|
137
|
+
if (state[$HAS] && state[$HAS][property] && prev !== undefined) state[$HAS][property].$();
|
|
138
|
+
} else {
|
|
139
|
+
state[property] = value;
|
|
140
|
+
if (state[$HAS] && state[$HAS][property] && prev === undefined) state[$HAS][property].$();
|
|
141
|
+
}
|
|
142
|
+
let nodes = getNodes(state, $NODE),
|
|
143
|
+
node;
|
|
144
|
+
if (node = getNode(nodes, property, prev)) node.$(() => value);
|
|
145
|
+
if (Array.isArray(state) && state.length !== len) {
|
|
146
|
+
for (let i = state.length; i < len; i++) (node = nodes[i]) && node.$();
|
|
147
|
+
(node = getNode(nodes, "length", len)) && node.$(state.length);
|
|
148
|
+
}
|
|
149
|
+
(node = nodes[$SELF]) && node.$();
|
|
150
|
+
}
|
|
151
|
+
function mergeStoreNode(state, value) {
|
|
152
|
+
const keys = Object.keys(value);
|
|
153
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
154
|
+
const key = keys[i];
|
|
155
|
+
if (isUnsafeKey$1(key)) continue;
|
|
156
|
+
setProperty(state, key, value[key]);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function isUnsafeKey$1(property) {
|
|
160
|
+
return property === "__proto__" || property === "constructor" || property === "prototype";
|
|
161
|
+
}
|
|
162
|
+
function updateArray(current, next) {
|
|
163
|
+
if (typeof next === "function") next = next(current);
|
|
164
|
+
next = unwrap(next);
|
|
165
|
+
if (Array.isArray(next)) {
|
|
166
|
+
if (current === next) return;
|
|
167
|
+
let i = 0,
|
|
168
|
+
len = next.length;
|
|
169
|
+
for (; i < len; i++) {
|
|
170
|
+
const value = next[i];
|
|
171
|
+
if (current[i] !== value) setProperty(current, i, value);
|
|
172
|
+
}
|
|
173
|
+
setProperty(current, "length", len);
|
|
174
|
+
} else mergeStoreNode(current, next);
|
|
175
|
+
}
|
|
176
|
+
function updatePath(current, path, traversed = []) {
|
|
177
|
+
let part,
|
|
178
|
+
prev = current;
|
|
179
|
+
if (path.length > 1) {
|
|
180
|
+
part = path.shift();
|
|
181
|
+
const partType = typeof part,
|
|
182
|
+
isArray = Array.isArray(current);
|
|
183
|
+
if (partType === "string" && (part === "__proto__" || path.length > 1 && isUnsafeKey$1(part))) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (Array.isArray(part)) {
|
|
187
|
+
for (let i = 0; i < part.length; i++) {
|
|
188
|
+
updatePath(current, [part[i]].concat(path), traversed);
|
|
189
|
+
}
|
|
190
|
+
return;
|
|
191
|
+
} else if (isArray && partType === "function") {
|
|
192
|
+
for (let i = 0; i < current.length; i++) {
|
|
193
|
+
if (part(current[i], i)) updatePath(current, [i].concat(path), traversed);
|
|
194
|
+
}
|
|
195
|
+
return;
|
|
196
|
+
} else if (isArray && partType === "object") {
|
|
197
|
+
const {
|
|
198
|
+
from = 0,
|
|
199
|
+
to = current.length - 1,
|
|
200
|
+
by = 1
|
|
201
|
+
} = part;
|
|
202
|
+
for (let i = from; i <= to; i += by) {
|
|
203
|
+
updatePath(current, [i].concat(path), traversed);
|
|
204
|
+
}
|
|
205
|
+
return;
|
|
206
|
+
} else if (path.length > 1) {
|
|
207
|
+
updatePath(current[part], path, [part].concat(traversed));
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
prev = current[part];
|
|
211
|
+
traversed = [part].concat(traversed);
|
|
212
|
+
}
|
|
213
|
+
let value = path[0];
|
|
214
|
+
if (typeof value === "function") {
|
|
215
|
+
value = value(prev, traversed);
|
|
216
|
+
if (value === prev) return;
|
|
217
|
+
}
|
|
218
|
+
if (part === undefined && value == undefined) return;
|
|
219
|
+
value = unwrap(value);
|
|
220
|
+
if (part === undefined || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {
|
|
221
|
+
mergeStoreNode(prev, value);
|
|
222
|
+
} else setProperty(current, part, value);
|
|
223
|
+
}
|
|
224
|
+
function createStore(...[store, options]) {
|
|
225
|
+
const unwrappedStore = unwrap(store || {});
|
|
226
|
+
const isArray = Array.isArray(unwrappedStore);
|
|
227
|
+
const wrappedStore = wrap$1(unwrappedStore);
|
|
228
|
+
function setStore(...args) {
|
|
229
|
+
batch(() => {
|
|
230
|
+
isArray && args.length === 1 ? updateArray(unwrappedStore, args[0]) : updatePath(unwrappedStore, args);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return [wrappedStore, setStore];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function proxyDescriptor(target, property) {
|
|
237
|
+
const desc = Reflect.getOwnPropertyDescriptor(target, property);
|
|
238
|
+
if (!desc || desc.get || desc.set || !desc.configurable || property === $PROXY || property === $NODE) return desc;
|
|
239
|
+
delete desc.value;
|
|
240
|
+
delete desc.writable;
|
|
241
|
+
desc.get = () => target[$PROXY][property];
|
|
242
|
+
desc.set = v => target[$PROXY][property] = v;
|
|
243
|
+
return desc;
|
|
244
|
+
}
|
|
245
|
+
const proxyTraps = {
|
|
246
|
+
get(target, property, receiver) {
|
|
247
|
+
if (property === $RAW) return target;
|
|
248
|
+
if (property === $PROXY) return receiver;
|
|
249
|
+
if (property === $TRACK) {
|
|
250
|
+
trackSelf(target);
|
|
251
|
+
return receiver;
|
|
252
|
+
}
|
|
253
|
+
const nodes = getNodes(target, $NODE);
|
|
254
|
+
const tracked = nodes[property];
|
|
255
|
+
let value = tracked ? tracked() : target[property];
|
|
256
|
+
if (property === $NODE || property === $HAS || property === "__proto__") return value;
|
|
257
|
+
if (!tracked) {
|
|
258
|
+
const desc = Object.getOwnPropertyDescriptor(target, property);
|
|
259
|
+
const isFunction = typeof value === "function";
|
|
260
|
+
if (getListener() && (!isFunction || Object.prototype.hasOwnProperty.call(target, property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) {
|
|
261
|
+
return (...args) => batch(() => Array.prototype[property].apply(receiver, args));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return isWrappable(value) ? wrap(value) : value;
|
|
265
|
+
},
|
|
266
|
+
has(target, property) {
|
|
267
|
+
if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return true;
|
|
268
|
+
getListener() && getNode(getNodes(target, $HAS), property)();
|
|
269
|
+
return property in target;
|
|
270
|
+
},
|
|
271
|
+
set(target, property, value) {
|
|
272
|
+
batch(() => setProperty(target, property, unwrap(value)));
|
|
273
|
+
return true;
|
|
274
|
+
},
|
|
275
|
+
deleteProperty(target, property) {
|
|
276
|
+
batch(() => setProperty(target, property, undefined, true));
|
|
277
|
+
return true;
|
|
278
|
+
},
|
|
279
|
+
ownKeys: ownKeys,
|
|
280
|
+
getOwnPropertyDescriptor: proxyDescriptor
|
|
281
|
+
};
|
|
282
|
+
function wrap(value) {
|
|
283
|
+
let p = value[$PROXY];
|
|
284
|
+
if (!p) {
|
|
285
|
+
Object.defineProperty(value, $PROXY, {
|
|
286
|
+
value: p = new Proxy(value, proxyTraps)
|
|
287
|
+
});
|
|
288
|
+
const keys = Object.keys(value),
|
|
289
|
+
desc = Object.getOwnPropertyDescriptors(value);
|
|
290
|
+
const proto = Object.getPrototypeOf(value);
|
|
291
|
+
const isClass = proto !== null && value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype;
|
|
292
|
+
if (isClass) {
|
|
293
|
+
let curProto = proto;
|
|
294
|
+
while (curProto != null) {
|
|
295
|
+
const descriptors = Object.getOwnPropertyDescriptors(curProto);
|
|
296
|
+
keys.push(...Object.keys(descriptors));
|
|
297
|
+
Object.assign(desc, descriptors);
|
|
298
|
+
curProto = Object.getPrototypeOf(curProto);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
302
|
+
const prop = keys[i];
|
|
303
|
+
if (isClass && prop === "constructor") continue;
|
|
304
|
+
if (desc[prop].get) {
|
|
305
|
+
const get = desc[prop].get.bind(p);
|
|
306
|
+
Object.defineProperty(value, prop, {
|
|
307
|
+
get,
|
|
308
|
+
configurable: true
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
if (desc[prop].set) {
|
|
312
|
+
const og = desc[prop].set,
|
|
313
|
+
set = v => batch(() => og.call(p, v));
|
|
314
|
+
Object.defineProperty(value, prop, {
|
|
315
|
+
set,
|
|
316
|
+
configurable: true
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return p;
|
|
322
|
+
}
|
|
323
|
+
function createMutable(state, options) {
|
|
324
|
+
const unwrappedStore = unwrap(state || {});
|
|
325
|
+
const wrappedStore = wrap(unwrappedStore);
|
|
326
|
+
return wrappedStore;
|
|
327
|
+
}
|
|
328
|
+
function modifyMutable(state, modifier) {
|
|
329
|
+
batch(() => modifier(unwrap(state)));
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const $ROOT = Symbol("store-root");
|
|
333
|
+
function isUnsafeKey(property) {
|
|
334
|
+
return property === "__proto__" || property === "constructor" || property === "prototype";
|
|
335
|
+
}
|
|
336
|
+
function applyState(target, parent, property, merge, key) {
|
|
337
|
+
if (isUnsafeKey(property)) return;
|
|
338
|
+
const previous = parent[property];
|
|
339
|
+
if (target === previous) return;
|
|
340
|
+
const isArray = Array.isArray(target);
|
|
341
|
+
if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || isArray !== Array.isArray(previous) || key && target[key] !== previous[key])) {
|
|
342
|
+
setProperty(parent, property, target);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
if (isArray) {
|
|
346
|
+
if (target.length && previous.length && (!merge || key && target[0] && target[0][key] != null)) {
|
|
347
|
+
let i, j, start, end, newEnd, item, newIndicesNext, keyVal;
|
|
348
|
+
for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start] && target[start] && previous[start][key] && previous[start][key] === target[start][key]); start++) {
|
|
349
|
+
applyState(target[start], previous, start, merge, key);
|
|
350
|
+
}
|
|
351
|
+
const temp = new Array(target.length),
|
|
352
|
+
newIndices = new Map();
|
|
353
|
+
for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[end] && target[newEnd] && previous[end][key] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {
|
|
354
|
+
temp[newEnd] = previous[end];
|
|
355
|
+
}
|
|
356
|
+
if (start > newEnd || start > end) {
|
|
357
|
+
for (j = start; j <= newEnd; j++) setProperty(previous, j, target[j]);
|
|
358
|
+
for (; j < target.length; j++) {
|
|
359
|
+
setProperty(previous, j, temp[j]);
|
|
360
|
+
applyState(target[j], previous, j, merge, key);
|
|
361
|
+
}
|
|
362
|
+
if (previous.length > target.length) setProperty(previous, "length", target.length);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
newIndicesNext = new Array(newEnd + 1);
|
|
366
|
+
for (j = newEnd; j >= start; j--) {
|
|
367
|
+
item = target[j];
|
|
368
|
+
keyVal = key && item ? item[key] : item;
|
|
369
|
+
i = newIndices.get(keyVal);
|
|
370
|
+
newIndicesNext[j] = i === undefined ? -1 : i;
|
|
371
|
+
newIndices.set(keyVal, j);
|
|
372
|
+
}
|
|
373
|
+
for (i = start; i <= end; i++) {
|
|
374
|
+
item = previous[i];
|
|
375
|
+
keyVal = key && item ? item[key] : item;
|
|
376
|
+
j = newIndices.get(keyVal);
|
|
377
|
+
if (j !== undefined && j !== -1) {
|
|
378
|
+
temp[j] = previous[i];
|
|
379
|
+
j = newIndicesNext[j];
|
|
380
|
+
newIndices.set(keyVal, j);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
for (j = start; j < target.length; j++) {
|
|
384
|
+
if (j in temp) {
|
|
385
|
+
setProperty(previous, j, temp[j]);
|
|
386
|
+
applyState(target[j], previous, j, merge, key);
|
|
387
|
+
} else setProperty(previous, j, target[j]);
|
|
388
|
+
}
|
|
389
|
+
} else {
|
|
390
|
+
for (let i = 0, len = target.length; i < len; i++) {
|
|
391
|
+
applyState(target[i], previous, i, merge, key);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
if (previous.length > target.length) setProperty(previous, "length", target.length);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const targetKeys = Object.keys(target);
|
|
398
|
+
for (let i = 0, len = targetKeys.length; i < len; i++) {
|
|
399
|
+
if (isUnsafeKey(targetKeys[i])) continue;
|
|
400
|
+
applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key);
|
|
401
|
+
}
|
|
402
|
+
const previousKeys = Object.keys(previous);
|
|
403
|
+
for (let i = 0, len = previousKeys.length; i < len; i++) {
|
|
404
|
+
if (target[previousKeys[i]] === undefined) setProperty(previous, previousKeys[i], undefined);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
function reconcile(value, options = {}) {
|
|
408
|
+
const {
|
|
409
|
+
merge,
|
|
410
|
+
key = "id"
|
|
411
|
+
} = options,
|
|
412
|
+
v = unwrap(value);
|
|
413
|
+
return state => {
|
|
414
|
+
if (!isWrappable(state) || !isWrappable(v)) return v;
|
|
415
|
+
const res = applyState(v, {
|
|
416
|
+
[$ROOT]: state
|
|
417
|
+
}, $ROOT, merge, key);
|
|
418
|
+
return res === undefined ? state : res;
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
const producers = new WeakMap();
|
|
422
|
+
const setterTraps = {
|
|
423
|
+
get(target, property) {
|
|
424
|
+
if (property === $RAW) return target;
|
|
425
|
+
const value = target[property];
|
|
426
|
+
if (property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return value;
|
|
427
|
+
let proxy;
|
|
428
|
+
return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value;
|
|
429
|
+
},
|
|
430
|
+
set(target, property, value) {
|
|
431
|
+
setProperty(target, property, unwrap(value));
|
|
432
|
+
return true;
|
|
433
|
+
},
|
|
434
|
+
deleteProperty(target, property) {
|
|
435
|
+
setProperty(target, property, undefined, true);
|
|
436
|
+
return true;
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
function produce(fn) {
|
|
440
|
+
return state => {
|
|
441
|
+
if (isWrappable(state)) {
|
|
442
|
+
let proxy;
|
|
443
|
+
if (!(proxy = producers.get(state))) {
|
|
444
|
+
producers.set(state, proxy = new Proxy(state, setterTraps));
|
|
445
|
+
}
|
|
446
|
+
fn(proxy);
|
|
447
|
+
}
|
|
448
|
+
return state;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
const DEV = undefined;
|
|
453
|
+
|
|
454
|
+
export { $RAW, DEV, createMutable, createStore, modifyMutable, produce, reconcile, unwrap };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-js/store",
|
|
3
|
+
"main": "./dist/server.cjs",
|
|
4
|
+
"module": "./dist/server.js",
|
|
5
|
+
"unpkg": "./dist/store.cjs",
|
|
6
|
+
"types": "./types/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"worker": {
|
|
12
|
+
"types": "./types/index.d.ts",
|
|
13
|
+
"import": "./dist/server.js",
|
|
14
|
+
"require": "./dist/server.cjs"
|
|
15
|
+
},
|
|
16
|
+
"browser": {
|
|
17
|
+
"development": {
|
|
18
|
+
"types": "./types/index.d.ts",
|
|
19
|
+
"import": "./dist/dev.js",
|
|
20
|
+
"require": "./dist/dev.cjs"
|
|
21
|
+
},
|
|
22
|
+
"types": "./types/index.d.ts",
|
|
23
|
+
"import": "./dist/store.js",
|
|
24
|
+
"require": "./dist/store.cjs"
|
|
25
|
+
},
|
|
26
|
+
"deno": {
|
|
27
|
+
"types": "./types/index.d.ts",
|
|
28
|
+
"import": "./dist/server.js",
|
|
29
|
+
"require": "./dist/server.cjs"
|
|
30
|
+
},
|
|
31
|
+
"node": {
|
|
32
|
+
"types": "./types/index.d.ts",
|
|
33
|
+
"import": "./dist/server.js",
|
|
34
|
+
"require": "./dist/server.cjs"
|
|
35
|
+
},
|
|
36
|
+
"development": {
|
|
37
|
+
"types": "./types/index.d.ts",
|
|
38
|
+
"import": "./dist/dev.js",
|
|
39
|
+
"require": "./dist/dev.cjs"
|
|
40
|
+
},
|
|
41
|
+
"types": "./types/index.d.ts",
|
|
42
|
+
"import": "./dist/store.js",
|
|
43
|
+
"require": "./dist/store.cjs"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { $RAW, createStore, unwrap } from "./store.js";
|
|
2
|
+
export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StoreReturn, StorePathRange, StoreSetter } from "./store.js";
|
|
3
|
+
export * from "./mutable.js";
|
|
4
|
+
export * from "./modifiers.js";
|
|
5
|
+
import { $NODE, isWrappable } from "./store.js";
|
|
6
|
+
export declare const DEV: {
|
|
7
|
+
readonly $NODE: typeof $NODE;
|
|
8
|
+
readonly isWrappable: typeof isWrappable;
|
|
9
|
+
readonly hooks: {
|
|
10
|
+
onStoreNodeUpdate: import("./store.js").OnStoreNodeUpdate | null;
|
|
11
|
+
};
|
|
12
|
+
} | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Store, StoreReturn } from "./store.js";
|
|
2
|
+
export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StoreReturn, StorePathRange, StoreSetter } from "./store.js";
|
|
3
|
+
export declare const $RAW: unique symbol;
|
|
4
|
+
export declare function isWrappable(obj: any): boolean;
|
|
5
|
+
export declare function unwrap<T>(item: T): T;
|
|
6
|
+
export declare function setProperty(state: any, property: PropertyKey, value: any, force?: boolean): void;
|
|
7
|
+
export declare function updatePath(current: any, path: any[], traversed?: PropertyKey[]): void;
|
|
8
|
+
export declare function createStore<T>(state: T | Store<T>): StoreReturn<T>;
|
|
9
|
+
export declare function createMutable<T>(state: T | Store<T>): T;
|
|
10
|
+
export declare function modifyMutable<T>(state: T, modifier: (state: T) => T): void;
|
|
11
|
+
type ReconcileOptions = {
|
|
12
|
+
key?: string | null;
|
|
13
|
+
merge?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function reconcile<T extends U, U extends object>(value: T, options?: ReconcileOptions): (state: U) => T;
|
|
16
|
+
export declare function produce<T>(fn: (state: T) => void): (state: T) => T;
|
|
17
|
+
export declare const DEV: undefined;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export declare const IS_DEV: string | boolean;
|
|
2
|
+
export declare const $RAW: unique symbol, $NODE: unique symbol, $HAS: unique symbol, $SELF: unique symbol;
|
|
3
|
+
export declare const DevHooks: {
|
|
4
|
+
onStoreNodeUpdate: OnStoreNodeUpdate | null;
|
|
5
|
+
};
|
|
6
|
+
type DataNode = {
|
|
7
|
+
(): any;
|
|
8
|
+
$(value?: any): void;
|
|
9
|
+
};
|
|
10
|
+
export type DataNodes = Record<PropertyKey, DataNode | undefined>;
|
|
11
|
+
export type OnStoreNodeUpdate = (state: StoreNode, property: PropertyKey, value: StoreNode | NotWrappable, prev: StoreNode | NotWrappable) => void;
|
|
12
|
+
export interface StoreNode {
|
|
13
|
+
[$NODE]?: DataNodes;
|
|
14
|
+
[key: PropertyKey]: any;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace SolidStore {
|
|
17
|
+
interface Unwrappable {
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export type NotWrappable = string | number | bigint | symbol | boolean | Function | null | undefined | SolidStore.Unwrappable[keyof SolidStore.Unwrappable];
|
|
21
|
+
export type Store<T> = T;
|
|
22
|
+
export declare function isWrappable<T>(obj: T | NotWrappable): obj is T;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the underlying data in the store without a proxy.
|
|
25
|
+
* @param item store proxy object
|
|
26
|
+
* @example
|
|
27
|
+
* ```js
|
|
28
|
+
* const initial = {z...};
|
|
29
|
+
* const [state, setState] = createStore(initial);
|
|
30
|
+
* initial === state; // => false
|
|
31
|
+
* initial === unwrap(state); // => true
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function unwrap<T>(item: T, set?: Set<unknown>): T;
|
|
35
|
+
export declare function getNodes(target: StoreNode, symbol: typeof $NODE | typeof $HAS): DataNodes;
|
|
36
|
+
export declare function getNode(nodes: DataNodes, property: PropertyKey, value?: any): DataNode;
|
|
37
|
+
export declare function proxyDescriptor(target: StoreNode, property: PropertyKey): TypedPropertyDescriptor<any> | undefined;
|
|
38
|
+
export declare function trackSelf(target: StoreNode): void;
|
|
39
|
+
export declare function ownKeys(target: StoreNode): (string | symbol)[];
|
|
40
|
+
export declare function setProperty(state: StoreNode, property: PropertyKey, value: any, deleting?: boolean): void;
|
|
41
|
+
export declare function updatePath(current: StoreNode, path: any[], traversed?: PropertyKey[]): void;
|
|
42
|
+
/** @deprecated */
|
|
43
|
+
export type DeepReadonly<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
|
|
44
|
+
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
45
|
+
};
|
|
46
|
+
/** @deprecated */
|
|
47
|
+
export type DeepMutable<T> = 0 extends 1 & T ? T : T extends NotWrappable ? T : {
|
|
48
|
+
-readonly [K in keyof T]: DeepMutable<T[K]>;
|
|
49
|
+
};
|
|
50
|
+
export type CustomPartial<T> = T extends readonly unknown[] ? "0" extends keyof T ? {
|
|
51
|
+
[K in Extract<keyof T, `${number}`>]?: T[K];
|
|
52
|
+
} : {
|
|
53
|
+
[x: number]: T[number];
|
|
54
|
+
} : Partial<T>;
|
|
55
|
+
export type PickMutable<T> = {
|
|
56
|
+
[K in keyof T as (<U>() => U extends {
|
|
57
|
+
[V in K]: T[V];
|
|
58
|
+
} ? 1 : 2) extends <U>() => U extends {
|
|
59
|
+
-readonly [V in K]: T[V];
|
|
60
|
+
} ? 1 : 2 ? K : never]: T[K];
|
|
61
|
+
};
|
|
62
|
+
export type StorePathRange = {
|
|
63
|
+
from?: number;
|
|
64
|
+
to?: number;
|
|
65
|
+
by?: number;
|
|
66
|
+
};
|
|
67
|
+
export type ArrayFilterFn<T> = (item: T, index: number) => boolean;
|
|
68
|
+
export type StoreSetter<T, U extends PropertyKey[] = []> = T | CustomPartial<T> | ((prevState: T, traversed: U) => T | CustomPartial<T>);
|
|
69
|
+
export type Part<T, K extends KeyOf<T> = KeyOf<T>> = K | ([K] extends [never] ? never : readonly K[]) | ([T] extends [readonly unknown[]] ? ArrayFilterFn<T[number]> | StorePathRange : never);
|
|
70
|
+
type W<T> = Exclude<T, NotWrappable>;
|
|
71
|
+
type KeyOf<T> = number extends keyof T ? 0 extends 1 & T ? keyof T : [T] extends [never] ? never : [
|
|
72
|
+
T
|
|
73
|
+
] extends [readonly unknown[]] ? number : keyof T : keyof T;
|
|
74
|
+
type MutableKeyOf<T> = KeyOf<T> & keyof PickMutable<T>;
|
|
75
|
+
type Rest<T, U extends PropertyKey[], K extends KeyOf<T> = KeyOf<T>> = [T] extends [never] ? never : K extends MutableKeyOf<T> ? [Part<T, K>, ...RestSetterOrContinue<T[K], [K, ...U]>] : K extends KeyOf<T> ? [Part<T, K>, ...RestContinue<T[K], [K, ...U]>] : never;
|
|
76
|
+
type RestContinue<T, U extends PropertyKey[]> = 0 extends 1 & T ? [...Part<any>[], StoreSetter<any, PropertyKey[]>] : Rest<W<T>, U>;
|
|
77
|
+
type RestSetterOrContinue<T, U extends PropertyKey[]> = [StoreSetter<T, U>] | RestContinue<T, U>;
|
|
78
|
+
export interface SetStoreFunction<T> {
|
|
79
|
+
<K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>, K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>, K7 extends MutableKeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>, k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>, setter: StoreSetter<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7], [
|
|
80
|
+
K7,
|
|
81
|
+
K6,
|
|
82
|
+
K5,
|
|
83
|
+
K4,
|
|
84
|
+
K3,
|
|
85
|
+
K2,
|
|
86
|
+
K1
|
|
87
|
+
]>): void;
|
|
88
|
+
<K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>, K6 extends MutableKeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>, setter: StoreSetter<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6], [K6, K5, K4, K3, K2, K1]>): void;
|
|
89
|
+
<K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends MutableKeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, setter: StoreSetter<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5], [K5, K4, K3, K2, K1]>): void;
|
|
90
|
+
<K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends MutableKeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, setter: StoreSetter<W<W<W<W<T>[K1]>[K2]>[K3]>[K4], [K4, K3, K2, K1]>): void;
|
|
91
|
+
<K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends MutableKeyOf<W<W<W<T>[K1]>[K2]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, setter: StoreSetter<W<W<W<T>[K1]>[K2]>[K3], [K3, K2, K1]>): void;
|
|
92
|
+
<K1 extends KeyOf<W<T>>, K2 extends MutableKeyOf<W<W<T>[K1]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, setter: StoreSetter<W<W<T>[K1]>[K2], [K2, K1]>): void;
|
|
93
|
+
<K1 extends MutableKeyOf<W<T>>>(k1: Part<W<T>, K1>, setter: StoreSetter<W<T>[K1], [K1]>): void;
|
|
94
|
+
(setter: StoreSetter<T, []>): void;
|
|
95
|
+
<K1 extends KeyOf<W<T>>, K2 extends KeyOf<W<W<T>[K1]>>, K3 extends KeyOf<W<W<W<T>[K1]>[K2]>>, K4 extends KeyOf<W<W<W<W<T>[K1]>[K2]>[K3]>>, K5 extends KeyOf<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>>, K6 extends KeyOf<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>>, K7 extends KeyOf<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>>>(k1: Part<W<T>, K1>, k2: Part<W<W<T>[K1]>, K2>, k3: Part<W<W<W<T>[K1]>[K2]>, K3>, k4: Part<W<W<W<W<T>[K1]>[K2]>[K3]>, K4>, k5: Part<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>, K5>, k6: Part<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>, K6>, k7: Part<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>, K7>, ...rest: Rest<W<W<W<W<W<W<W<T>[K1]>[K2]>[K3]>[K4]>[K5]>[K6]>[K7], [K7, K6, K5, K4, K3, K2, K1]>): void;
|
|
96
|
+
}
|
|
97
|
+
export type StoreReturn<T> = [get: Store<T>, set: SetStoreFunction<T>];
|
|
98
|
+
/**
|
|
99
|
+
* Creates a reactive store that can be read through a proxy object and written with a setter function
|
|
100
|
+
*
|
|
101
|
+
* @description https://docs.solidjs.com/reference/store-utilities/create-store
|
|
102
|
+
*/
|
|
103
|
+
export declare function createStore<T extends object = {}>(...[store, options]: {} extends T ? [store?: T | Store<T>, options?: {
|
|
104
|
+
name?: string;
|
|
105
|
+
}] : [store: T | Store<T>, options?: {
|
|
106
|
+
name?: string;
|
|
107
|
+
}]): StoreReturn<T>;
|
|
108
|
+
export {};
|