@iota-uz/sdk 0.45.0 → 0.47.0
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-bXr7ekeZ.js → CascadePanel-BlYJd18G.js} +1 -1
- package/dist/lens/{ChartDataEquivalent-ZsncHfTF.js → ChartDataEquivalent-B6xSOdzC.js} +1 -1
- package/dist/lens/{ChartPanel-Cku9c87t.js → ChartPanel-BIJjrs5D.js} +159 -159
- package/dist/lens/{CoveragePanel-DE3fi5c7.js → CoveragePanel-CHtXDMtt.js} +1 -1
- package/dist/lens/{GaugePanel-DwR4zylR.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-DJSiLZSz.js → MapPanel-Cw4ELCiM.js} +3 -3
- package/dist/lens/{MetricFlowPanel-Dsp_ntas.js → MetricFlowPanel-Gr5wi3nI.js} +2 -2
- package/dist/lens/{MetricHierarchyPanel-BYcy4FNw.js → MetricHierarchyPanel-VLA_5LXX.js} +2 -2
- package/dist/lens/{MetricRelationshipPanel-Gh5RKIu1.js → MetricRelationshipPanel-DFP566_c.js} +2 -2
- package/dist/lens/{PrintReport-RnKpLle9.js → PrintReport-C0OV1iHP.js} +5 -5
- package/dist/lens/{QualityChip-BxAn3wh6.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-CZZIKpwb.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 +14 -0
- package/dist/lens/contract/types.d.ts.map +1 -1
- package/dist/lens/{dashboardEdit-BLzL02OH.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/formula/FormulaTip.d.ts +5 -0
- package/dist/lens/formula/FormulaTip.d.ts.map +1 -1
- package/dist/lens/formula/FormulaView.d.ts.map +1 -1
- package/dist/lens/formula/PanelFormula.d.ts +2 -0
- package/dist/lens/formula/PanelFormula.d.ts.map +1 -1
- package/dist/lens/formula/element.d.ts.map +1 -1
- package/dist/lens/formula/values.d.ts +10 -1
- package/dist/lens/formula/values.d.ts.map +1 -1
- package/dist/lens/index-DR7Hf8Km.js +19805 -0
- package/dist/lens/{index-Dm3Y4NDq.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-DCaRpfvv.js → install-B2lTK6uo.js} +1 -1
- package/dist/lens/{install-pvJpTP1f.js → install-BXr4Mnc0.js} +1 -1
- package/dist/lens/{install-C48hgC9S.js → install-CicNQ_ks.js} +1 -1
- package/dist/lens/{install-DB0eod1K.js → install-d8A0WPiw.js} +1 -1
- package/dist/lens/{keys-BAkGzg_y.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-j8VKR0tY.js → prefetch-C9kxuIs8.js} +2 -2
- package/dist/lens/{prefetchPanels-vwQqxrs4.js → prefetchPanels-gbY9RIqL.js} +1 -1
- package/dist/lens/{print-CuBcYmVF.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-BSDq-uby.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-DU_ydQ1x.js +0 -980
- package/dist/lens/index-BJIuggdQ.js +0 -18403
- package/dist/lens/runtime/recovery.d.ts +0 -26
- package/dist/lens/runtime/recovery.d.ts.map +0 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Locator, Page, TestInfo } from '@playwright/test';
|
|
2
|
+
import { type WaitOptions } from './wait.js';
|
|
3
|
+
export type ComponentCase = {
|
|
4
|
+
id: string;
|
|
5
|
+
state: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
theme: 'light' | 'dark';
|
|
8
|
+
viewport: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type ReadinessOptions = WaitOptions & {
|
|
14
|
+
/** Attribute that must equal "true" on the root. Default `data-component-ready`. */
|
|
15
|
+
readinessAttribute?: string;
|
|
16
|
+
/** Charts that must each expose `data-chart-ready="true"` before the component counts as ready. */
|
|
17
|
+
charts?: Locator;
|
|
18
|
+
};
|
|
19
|
+
export type ReadinessState = {
|
|
20
|
+
rootCount: number;
|
|
21
|
+
readiness: string | null;
|
|
22
|
+
visible: boolean;
|
|
23
|
+
fonts: string;
|
|
24
|
+
charts: (string | null)[] | null;
|
|
25
|
+
html: string;
|
|
26
|
+
};
|
|
27
|
+
/** Rejects a component readiness wait and retains what the page looked like when the budget ran out. */
|
|
28
|
+
export declare class ReadinessError extends Error {
|
|
29
|
+
readonly attribute: string;
|
|
30
|
+
readonly state: ReadinessState;
|
|
31
|
+
constructor(attribute: string, state: ReadinessState);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Explicit host readiness: one visible root with the readiness marker, loaded fonts and, when
|
|
35
|
+
* given, every chart ready. A timeout rejects with {@link ReadinessError}; there is no suppression
|
|
36
|
+
* and no fallback to network idleness or a fixed delay.
|
|
37
|
+
*/
|
|
38
|
+
export declare function expectComponentReady(page: Page, root: Locator, options?: ReadinessOptions): Promise<void>;
|
|
39
|
+
export declare function expectFontsReady(page: Page, options?: WaitOptions): Promise<void>;
|
|
40
|
+
export declare function expectChartsReady(charts: Locator, options?: WaitOptions & {
|
|
41
|
+
allowEmpty?: boolean;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Adapter over an existing fixture host. `cases` discovers the declared cases; `navigate` renders
|
|
45
|
+
* the real exported component with production CSS/fonts/JS for one case (applying locale, theme
|
|
46
|
+
* and state) and returns its root. Mocks belong only at the host's declared backend boundary.
|
|
47
|
+
*/
|
|
48
|
+
export interface ComponentHost<C extends ComponentCase = ComponentCase> {
|
|
49
|
+
cases(): Promise<readonly C[]> | readonly C[];
|
|
50
|
+
navigate(page: Page, componentCase: C): Promise<Locator>;
|
|
51
|
+
readiness?: Omit<ReadinessOptions, 'timeoutMs'>;
|
|
52
|
+
}
|
|
53
|
+
export declare function openComponentCase<C extends ComponentCase>(page: Page, host: ComponentHost<C>, componentCase: C, options?: WaitOptions): Promise<Locator>;
|
|
54
|
+
export declare function componentCase<C extends ComponentCase>(host: ComponentHost<C>, id: string): Promise<C>;
|
|
55
|
+
export type CaseDimensions = {
|
|
56
|
+
states?: readonly string[];
|
|
57
|
+
locales?: readonly string[];
|
|
58
|
+
themes?: readonly ('light' | 'dark')[];
|
|
59
|
+
viewports?: readonly {
|
|
60
|
+
width: number;
|
|
61
|
+
height: number;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Checks that every declared state/locale/theme/viewport appears in at least one case and that
|
|
66
|
+
* case IDs are unique, so hosts cover each dimension without the full Cartesian product.
|
|
67
|
+
*/
|
|
68
|
+
export declare function assertCaseCoverage(cases: readonly ComponentCase[], dimensions: CaseDimensions): void;
|
|
69
|
+
/**
|
|
70
|
+
* Attaches a screenshot to the report for diagnosis only. It is never compared; approved
|
|
71
|
+
* baselines use `expect(...).toHaveScreenshot` in the host's VR runner.
|
|
72
|
+
*/
|
|
73
|
+
export declare function attachDiagnosticScreenshot(target: Page | Locator, testInfo: TestInfo, name: string): Promise<void>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { deadline, waitForCondition } from './wait.js';
|
|
2
|
+
/** Rejects a component readiness wait and retains what the page looked like when the budget ran out. */
|
|
3
|
+
export class ReadinessError extends Error {
|
|
4
|
+
attribute;
|
|
5
|
+
state;
|
|
6
|
+
constructor(attribute, state) {
|
|
7
|
+
super(`Component not ready: ${attribute}=${JSON.stringify(state.readiness)}, roots=${state.rootCount}, visible=${state.visible}, fonts=${state.fonts}${state.charts ? `, charts=${JSON.stringify(state.charts)}` : ''}\n${state.html}`);
|
|
8
|
+
this.attribute = attribute;
|
|
9
|
+
this.state = state;
|
|
10
|
+
this.name = 'ReadinessError';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** One atomic page-side snapshot; locator reads that auto-wait could outlive the budget if the root detaches. */
|
|
14
|
+
async function readinessState(page, root, attribute, charts) {
|
|
15
|
+
const [snapshot, chartStates] = await Promise.all([
|
|
16
|
+
root.evaluateAll((elements, attribute) => {
|
|
17
|
+
const element = elements.length === 1 ? elements[0] : null;
|
|
18
|
+
const rect = element?.getBoundingClientRect();
|
|
19
|
+
const style = element ? getComputedStyle(element) : null;
|
|
20
|
+
return {
|
|
21
|
+
rootCount: elements.length,
|
|
22
|
+
readiness: element?.getAttribute(attribute) ?? null,
|
|
23
|
+
visible: Boolean(rect && rect.width > 0 && rect.height > 0 && style?.visibility !== 'hidden'),
|
|
24
|
+
fonts: document.fonts.status,
|
|
25
|
+
html: element?.outerHTML.slice(0, 600) ?? '',
|
|
26
|
+
};
|
|
27
|
+
}, attribute),
|
|
28
|
+
charts ? charts.evaluateAll(elements => elements.map(element => element.getAttribute('data-chart-ready'))) : Promise.resolve(null),
|
|
29
|
+
]);
|
|
30
|
+
return { ...snapshot, charts: chartStates };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Explicit host readiness: one visible root with the readiness marker, loaded fonts and, when
|
|
34
|
+
* given, every chart ready. A timeout rejects with {@link ReadinessError}; there is no suppression
|
|
35
|
+
* and no fallback to network idleness or a fixed delay.
|
|
36
|
+
*/
|
|
37
|
+
export async function expectComponentReady(page, root, options = {}) {
|
|
38
|
+
const attribute = options.readinessAttribute ?? 'data-component-ready';
|
|
39
|
+
const remaining = deadline(options);
|
|
40
|
+
const ready = (state) => state.rootCount === 1 && state.readiness === 'true' && state.visible && state.fonts === 'loaded'
|
|
41
|
+
&& (state.charts === null || (state.charts.length > 0 && state.charts.every(chart => chart === 'true')));
|
|
42
|
+
let last;
|
|
43
|
+
await waitForCondition(async () => ready(last = await readinessState(page, root, attribute, options.charts)), remaining(), () => new ReadinessError(attribute, last));
|
|
44
|
+
}
|
|
45
|
+
export async function expectFontsReady(page, options = {}) {
|
|
46
|
+
await page.waitForFunction(() => document.fonts.status === 'loaded', undefined, { timeout: deadline(options)() });
|
|
47
|
+
}
|
|
48
|
+
export async function expectChartsReady(charts, options = {}) {
|
|
49
|
+
const remaining = deadline(options);
|
|
50
|
+
await waitForCondition(async () => charts.evaluateAll((elements, allowEmpty) => (allowEmpty || elements.length > 0) && elements.every(element => element.getAttribute('data-chart-ready') === 'true'), options.allowEmpty ?? false), remaining(), () => new Error('Chart readiness missing'));
|
|
51
|
+
if (!options.allowEmpty)
|
|
52
|
+
await charts.first().waitFor({ state: 'visible', timeout: remaining() });
|
|
53
|
+
}
|
|
54
|
+
export async function openComponentCase(page, host, componentCase, options = {}) {
|
|
55
|
+
await page.setViewportSize(componentCase.viewport);
|
|
56
|
+
const root = await host.navigate(page, componentCase);
|
|
57
|
+
await expectComponentReady(page, root, { ...host.readiness, ...options });
|
|
58
|
+
return root;
|
|
59
|
+
}
|
|
60
|
+
export async function componentCase(host, id) {
|
|
61
|
+
const found = (await host.cases()).find(candidate => candidate.id === id);
|
|
62
|
+
if (!found)
|
|
63
|
+
throw new Error(`Unknown component case ${id}`);
|
|
64
|
+
return found;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Checks that every declared state/locale/theme/viewport appears in at least one case and that
|
|
68
|
+
* case IDs are unique, so hosts cover each dimension without the full Cartesian product.
|
|
69
|
+
*/
|
|
70
|
+
export function assertCaseCoverage(cases, dimensions) {
|
|
71
|
+
const ids = new Set();
|
|
72
|
+
for (const c of cases) {
|
|
73
|
+
if (ids.has(c.id))
|
|
74
|
+
throw new Error(`Duplicate component case ${c.id}`);
|
|
75
|
+
ids.add(c.id);
|
|
76
|
+
}
|
|
77
|
+
const missing = [];
|
|
78
|
+
const check = (name, values, key, format) => {
|
|
79
|
+
for (const value of values ?? [])
|
|
80
|
+
if (!cases.some(c => key(c) === format(value)))
|
|
81
|
+
missing.push(`${name} ${format(value)}`);
|
|
82
|
+
};
|
|
83
|
+
check('state', dimensions.states, c => c.state, v => v);
|
|
84
|
+
check('locale', dimensions.locales, c => c.locale, v => v);
|
|
85
|
+
check('theme', dimensions.themes, c => c.theme, v => v);
|
|
86
|
+
check('viewport', dimensions.viewports, c => `${c.viewport.width}x${c.viewport.height}`, v => `${v.width}x${v.height}`);
|
|
87
|
+
if (missing.length)
|
|
88
|
+
throw new Error(`Component cases do not cover: ${missing.join(', ')}`);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Attaches a screenshot to the report for diagnosis only. It is never compared; approved
|
|
92
|
+
* baselines use `expect(...).toHaveScreenshot` in the host's VR runner.
|
|
93
|
+
*/
|
|
94
|
+
export async function attachDiagnosticScreenshot(target, testInfo, name) {
|
|
95
|
+
await testInfo.attach(`diagnostic-${name}`, { body: await target.screenshot(), contentType: 'image/png' });
|
|
96
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Locator, Page, Response } from '@playwright/test';
|
|
2
|
+
import { type WaitOptions } from './wait.js';
|
|
3
|
+
export type RequestMatch = {
|
|
4
|
+
method: string;
|
|
5
|
+
pathname: string;
|
|
6
|
+
};
|
|
7
|
+
export type ResponseMatch = RequestMatch | ((response: Response) => boolean);
|
|
8
|
+
export type ValidationResult = {
|
|
9
|
+
controlName: string;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
export type HtmxSettledOptions = WaitOptions & {
|
|
13
|
+
/** Consumer readiness for the (possibly replaced) target, evaluated after every correlated swap settled; receives the remaining budget. */
|
|
14
|
+
ready?: (target: Locator, options: {
|
|
15
|
+
timeoutMs: number;
|
|
16
|
+
}) => Promise<unknown>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Registers the response wait before the action. A missing response rejects; there is no
|
|
20
|
+
* success path after the timeout, so callers must not wrap this in a catch that continues.
|
|
21
|
+
*/
|
|
22
|
+
export declare function actionAndResponse(page: Page, match: ResponseMatch, action: () => Promise<unknown>, options?: WaitOptions): Promise<Response>;
|
|
23
|
+
/**
|
|
24
|
+
* Waits for every HTMX request whose target is, contains, or is inside the CSS selector `target`
|
|
25
|
+
* (after HX-Retarget): each must swap and settle. Refusals, send errors, load errors and HTMX
|
|
26
|
+
* timeouts reject; so does a response that navigates (HX-Redirect/HX-Refresh/HX-Location),
|
|
27
|
+
* which callers wait for with `page.waitForURL` instead. Requests started while earlier ones are
|
|
28
|
+
* still pending are included; ones triggered later (delays, intersect) need their own call.
|
|
29
|
+
* Every observed request must first answer (beforeSwap or a terminal event) because HX-Retarget
|
|
30
|
+
* can move it into the scope; an unrelated slow request started during the wait (a long poll)
|
|
31
|
+
* therefore delays completion until it answers or the budget ends.
|
|
32
|
+
* Afterwards at least one element must match `target`, none of the matches may carry transient
|
|
33
|
+
* swap classes, and `ready` runs with the remaining budget. The budget starts after `action`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function actionAndHtmxSettled(page: Page, target: string, action: () => Promise<unknown>, options?: HtmxSettledOptions): Promise<void>;
|
|
36
|
+
/** Follows the matching production HTMX XHR through afterSettle; server refusals and send errors reject. */
|
|
37
|
+
export declare function actionAndHtmxResponse(page: Page, match: ResponseMatch, action: () => Promise<unknown>, options?: WaitOptions): Promise<Response>;
|
|
38
|
+
/**
|
|
39
|
+
* Expects the browser to refuse the form natively: waits for the invalid event, checks that the
|
|
40
|
+
* reported control is still :invalid, and that neither a submit event, an HTMX request from the
|
|
41
|
+
* form, nor a network request to the form's submission URL happened during the interaction.
|
|
42
|
+
* Completion does not depend on a network timeout.
|
|
43
|
+
*/
|
|
44
|
+
export declare function actionAndValidationRefusal(page: Page, form: Locator, action: () => Promise<unknown>, options?: WaitOptions): Promise<ValidationResult>;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { deadline, timeout } from './wait.js';
|
|
2
|
+
function describe(match) {
|
|
3
|
+
return typeof match === 'function' ? 'matching response' : `${match.method.toUpperCase()} ${match.pathname}`;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Registers the response wait before the action. A missing response rejects; there is no
|
|
7
|
+
* success path after the timeout, so callers must not wrap this in a catch that continues.
|
|
8
|
+
*/
|
|
9
|
+
export async function actionAndResponse(page, match, action, options = {}) {
|
|
10
|
+
const ms = timeout(options);
|
|
11
|
+
const response = page.waitForResponse(r => typeof match === 'function' ? match(r) : r.request().method() === match.method.toUpperCase() && new URL(r.url()).pathname === match.pathname, { timeout: ms })
|
|
12
|
+
.catch((cause) => { throw new Error(`No ${describe(match)} response within ${ms}ms`, { cause }); });
|
|
13
|
+
const [result] = await Promise.all([response, Promise.resolve().then(action)]);
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Observes production HTMX lifecycle events for every request started after installation.
|
|
18
|
+
* Listeners are attached to the requesting element, the target and every element HTMX swapped
|
|
19
|
+
* in, as well as the document, because a node detached before its event fires no longer bubbles.
|
|
20
|
+
* The target (and scope membership) is refreshed at beforeSwap so HX-Retarget and beforeSwap
|
|
21
|
+
* overrides are followed. A request is complete when its swap settled, or when it loaded without
|
|
22
|
+
* producing swapped content (empty replacement, `hx-swap="none"`), which HTMX never follows with
|
|
23
|
+
* afterSettle. HX-Redirect, HX-Refresh and HX-Location responses are recorded as navigations.
|
|
24
|
+
*/
|
|
25
|
+
async function installHtmxObserver(page, scope) {
|
|
26
|
+
const key = `sdk-htmx-${crypto.randomUUID()}`;
|
|
27
|
+
await page.evaluate(({ key, scope }) => {
|
|
28
|
+
if (scope !== null)
|
|
29
|
+
document.querySelector(scope); // Throws for selectors that are not CSS.
|
|
30
|
+
const terminal = ['htmx:beforeSwap', 'htmx:afterSwap', 'htmx:afterOnLoad', 'htmx:afterSettle', 'htmx:responseError', 'htmx:sendError', 'htmx:sendAbort', 'htmx:timeout', 'htmx:swapError', 'htmx:onLoadError'];
|
|
31
|
+
const records = [];
|
|
32
|
+
const requests = new WeakMap();
|
|
33
|
+
const observed = new Set();
|
|
34
|
+
const observe = (element) => {
|
|
35
|
+
if (!(element instanceof Element) || observed.has(element))
|
|
36
|
+
return;
|
|
37
|
+
observed.add(element);
|
|
38
|
+
for (const type of terminal)
|
|
39
|
+
element.addEventListener(type, update);
|
|
40
|
+
};
|
|
41
|
+
const inScope = (element) => scope === null || (element instanceof Element && (element.matches(scope) || element.closest(scope) !== null || element.querySelector(scope) !== null));
|
|
42
|
+
const navigation = /^(HX-Redirect|HX-Refresh|HX-Location):/im;
|
|
43
|
+
function update(event) {
|
|
44
|
+
const d = event.detail;
|
|
45
|
+
const record = d?.xhr && requests.get(d.xhr);
|
|
46
|
+
if (!record || record.failed || record.aborted || record.settled)
|
|
47
|
+
return;
|
|
48
|
+
record.url = d.xhr.responseURL || record.url;
|
|
49
|
+
record.status = d.xhr.status;
|
|
50
|
+
if (event.type === 'htmx:afterSettle')
|
|
51
|
+
record.settled = true;
|
|
52
|
+
else if (event.type === 'htmx:beforeSwap') {
|
|
53
|
+
record.swapDecided = true;
|
|
54
|
+
if (d.target instanceof Element) {
|
|
55
|
+
record.target = d.target;
|
|
56
|
+
record.scoped = inScope(d.target);
|
|
57
|
+
observe(d.target);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (event.type === 'htmx:afterSwap') {
|
|
61
|
+
record.swapped = true;
|
|
62
|
+
observe(event.target);
|
|
63
|
+
}
|
|
64
|
+
else if (event.type === 'htmx:afterOnLoad') {
|
|
65
|
+
record.loaded = true;
|
|
66
|
+
if (navigation.test(d.xhr.getAllResponseHeaders()))
|
|
67
|
+
record.navigated = true;
|
|
68
|
+
}
|
|
69
|
+
else if (event.type === 'htmx:sendAbort')
|
|
70
|
+
record.aborted = true;
|
|
71
|
+
else
|
|
72
|
+
record.failed = true;
|
|
73
|
+
}
|
|
74
|
+
const before = (event) => {
|
|
75
|
+
const d = event.detail;
|
|
76
|
+
if (!d?.xhr || requests.has(d.xhr))
|
|
77
|
+
return;
|
|
78
|
+
const target = d.target ?? d.elt;
|
|
79
|
+
const record = { url: new URL(d.requestConfig.path, location.href).href, method: String(d.requestConfig.verb).toUpperCase(), status: 0, settled: false, failed: false, aborted: false, navigated: false, scoped: inScope(target), swapped: false, loaded: false, swapDecided: false, target: target instanceof Element ? target : null };
|
|
80
|
+
records.push(record);
|
|
81
|
+
requests.set(d.xhr, record);
|
|
82
|
+
observe(d.elt);
|
|
83
|
+
observe(d.target);
|
|
84
|
+
};
|
|
85
|
+
// A delayed swap keeps htmx-swapping on a connected target until it runs.
|
|
86
|
+
const complete = (r) => r.settled || r.navigated || (r.loaded && !r.swapped && !(r.target?.isConnected && r.target.classList.contains('htmx-swapping')));
|
|
87
|
+
document.addEventListener('htmx:beforeRequest', before);
|
|
88
|
+
for (const type of terminal)
|
|
89
|
+
document.addEventListener(type, update);
|
|
90
|
+
window[key] = {
|
|
91
|
+
records: () => records.map(r => ({ url: r.url, method: r.method, status: r.status, settled: complete(r), failed: r.failed, aborted: r.aborted, navigated: r.navigated, scoped: r.scoped,
|
|
92
|
+
// Scope is final once beforeSwap ran or the request ended; HX-Retarget may still move it before that.
|
|
93
|
+
decided: r.swapDecided || r.loaded || r.settled || r.failed || r.aborted || r.navigated })),
|
|
94
|
+
dispose: () => {
|
|
95
|
+
document.removeEventListener('htmx:beforeRequest', before);
|
|
96
|
+
for (const type of terminal)
|
|
97
|
+
document.removeEventListener(type, update);
|
|
98
|
+
for (const element of observed)
|
|
99
|
+
for (const type of terminal)
|
|
100
|
+
element.removeEventListener(type, update);
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}, { key, scope });
|
|
104
|
+
return key;
|
|
105
|
+
}
|
|
106
|
+
async function disposeObserver(page, key) {
|
|
107
|
+
await page.evaluate(key => { window[key]?.dispose(); delete window[key]; }, key).catch(() => { });
|
|
108
|
+
}
|
|
109
|
+
/** Records of the observer, or null when the document that held it was replaced by a navigation. */
|
|
110
|
+
async function observedRecords(page, key) {
|
|
111
|
+
return page.evaluate(key => window[key]?.records() ?? null, key).catch(() => null);
|
|
112
|
+
}
|
|
113
|
+
const settling = '.htmx-swapping, .htmx-settling, .htmx-added';
|
|
114
|
+
/**
|
|
115
|
+
* Waits for every HTMX request whose target is, contains, or is inside the CSS selector `target`
|
|
116
|
+
* (after HX-Retarget): each must swap and settle. Refusals, send errors, load errors and HTMX
|
|
117
|
+
* timeouts reject; so does a response that navigates (HX-Redirect/HX-Refresh/HX-Location),
|
|
118
|
+
* which callers wait for with `page.waitForURL` instead. Requests started while earlier ones are
|
|
119
|
+
* still pending are included; ones triggered later (delays, intersect) need their own call.
|
|
120
|
+
* Every observed request must first answer (beforeSwap or a terminal event) because HX-Retarget
|
|
121
|
+
* can move it into the scope; an unrelated slow request started during the wait (a long poll)
|
|
122
|
+
* therefore delays completion until it answers or the budget ends.
|
|
123
|
+
* Afterwards at least one element must match `target`, none of the matches may carry transient
|
|
124
|
+
* swap classes, and `ready` runs with the remaining budget. The budget starts after `action`.
|
|
125
|
+
*/
|
|
126
|
+
export async function actionAndHtmxSettled(page, target, action, options = {}) {
|
|
127
|
+
timeout(options);
|
|
128
|
+
const key = await installHtmxObserver(page, target);
|
|
129
|
+
try {
|
|
130
|
+
await action();
|
|
131
|
+
const remaining = deadline(options);
|
|
132
|
+
const scopedRecords = async () => (await observedRecords(page, key))?.filter(r => r.scoped) ?? null;
|
|
133
|
+
try {
|
|
134
|
+
await page.waitForFunction(key => {
|
|
135
|
+
const records = window[key].records();
|
|
136
|
+
const scoped = records.filter(r => r.scoped);
|
|
137
|
+
if (scoped.some(r => r.failed || r.navigated))
|
|
138
|
+
return true;
|
|
139
|
+
return records.every(r => r.decided) && scoped.length > 0 && scoped.every(r => r.settled || r.aborted || r.failed);
|
|
140
|
+
}, key, { timeout: remaining() });
|
|
141
|
+
}
|
|
142
|
+
catch (cause) {
|
|
143
|
+
const seen = await scopedRecords();
|
|
144
|
+
if (seen === null)
|
|
145
|
+
throw new Error(`Page navigated while waiting for HTMX settlement of ${target}`, { cause });
|
|
146
|
+
const undecided = (await observedRecords(page, key))?.filter(r => !r.decided) ?? [];
|
|
147
|
+
if (seen.length === 0 && undecided.length > 0)
|
|
148
|
+
throw new Error(`HTMX requests that may still retarget into ${target} did not respond: ${JSON.stringify(undecided)}`, { cause });
|
|
149
|
+
if (seen.length === 0)
|
|
150
|
+
throw new Error(`Action issued no HTMX request targeted ${target}`, { cause });
|
|
151
|
+
throw new Error(`HTMX requests for ${target} did not settle: ${JSON.stringify(seen)}`, { cause });
|
|
152
|
+
}
|
|
153
|
+
const scoped = await scopedRecords();
|
|
154
|
+
if (scoped === null)
|
|
155
|
+
throw new Error(`Page navigated while waiting for HTMX settlement of ${target}`);
|
|
156
|
+
const failure = scoped.find(r => r.failed);
|
|
157
|
+
if (failure)
|
|
158
|
+
throw new Error(`HTMX request failed: ${failure.status} ${failure.method} ${failure.url}`);
|
|
159
|
+
const navigated = scoped.find(r => r.navigated);
|
|
160
|
+
if (navigated)
|
|
161
|
+
throw new Error(`HTMX response navigates instead of swapping ${target}: ${navigated.method} ${navigated.url}; wait for the URL instead`);
|
|
162
|
+
if (!scoped.some(r => r.settled))
|
|
163
|
+
throw new Error(`HTMX requests for ${target} were all aborted`);
|
|
164
|
+
await page.waitForFunction(({ target, settling }) => {
|
|
165
|
+
const elements = Array.from(document.querySelectorAll(target));
|
|
166
|
+
return elements.length > 0 && elements.every(element => !element.matches(settling) && element.querySelector(settling) === null);
|
|
167
|
+
}, { target, settling }, { timeout: remaining() });
|
|
168
|
+
await options.ready?.(page.locator(target), { timeoutMs: remaining() });
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
await disposeObserver(page, key);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/** Follows the matching production HTMX XHR through afterSettle; server refusals and send errors reject. */
|
|
175
|
+
export async function actionAndHtmxResponse(page, match, action, options = {}) {
|
|
176
|
+
const remaining = deadline(options);
|
|
177
|
+
const key = await installHtmxObserver(page, null);
|
|
178
|
+
try {
|
|
179
|
+
const response = await actionAndResponse(page, match, action, { timeoutMs: remaining() });
|
|
180
|
+
const identity = { url: response.url(), method: response.request().method(), status: response.status() };
|
|
181
|
+
await page.waitForFunction(({ key, identity }) => {
|
|
182
|
+
const records = window[key].records().filter(r => r.url === identity.url && r.method === identity.method);
|
|
183
|
+
return records.some(r => !r.aborted && (r.settled || r.failed)) && records.every(r => r.settled || r.failed || r.aborted);
|
|
184
|
+
}, { key, identity }, { timeout: remaining() });
|
|
185
|
+
const failure = await page.evaluate(({ key, identity }) => {
|
|
186
|
+
const records = window[key].records().filter(r => r.url === identity.url && r.method === identity.method && !r.aborted);
|
|
187
|
+
const latest = records.at(-1);
|
|
188
|
+
return latest?.failed ? latest.status : null;
|
|
189
|
+
}, { key, identity });
|
|
190
|
+
if (failure !== null)
|
|
191
|
+
throw new Error(`HTMX request failed: ${failure} ${response.url()}`);
|
|
192
|
+
if (!response.ok())
|
|
193
|
+
throw new Error(`HTMX request failed: ${response.status()} ${response.url()}`);
|
|
194
|
+
return response;
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
await disposeObserver(page, key);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Expects the browser to refuse the form natively: waits for the invalid event, checks that the
|
|
202
|
+
* reported control is still :invalid, and that neither a submit event, an HTMX request from the
|
|
203
|
+
* form, nor a network request to the form's submission URL happened during the interaction.
|
|
204
|
+
* Completion does not depend on a network timeout.
|
|
205
|
+
*/
|
|
206
|
+
export async function actionAndValidationRefusal(page, form, action, options = {}) {
|
|
207
|
+
timeout(options);
|
|
208
|
+
const key = `sdk-validation-${crypto.randomUUID()}`;
|
|
209
|
+
const submission = await form.evaluate((element, key) => {
|
|
210
|
+
const f = element;
|
|
211
|
+
const state = { invalid: null, control: null, submitted: false, htmx: false };
|
|
212
|
+
const invalid = (event) => {
|
|
213
|
+
if (state.invalid)
|
|
214
|
+
return;
|
|
215
|
+
const control = event.target;
|
|
216
|
+
state.control = control;
|
|
217
|
+
state.invalid = { controlName: control.name, message: control.validationMessage };
|
|
218
|
+
};
|
|
219
|
+
const submit = () => { state.submitted = true; };
|
|
220
|
+
const htmx = (event) => {
|
|
221
|
+
const elt = event.detail?.elt;
|
|
222
|
+
if (elt instanceof Element && (elt === f || f.contains(elt) || elt.form === f))
|
|
223
|
+
state.htmx = true;
|
|
224
|
+
};
|
|
225
|
+
f.addEventListener('invalid', invalid, true);
|
|
226
|
+
f.addEventListener('submit', submit);
|
|
227
|
+
document.addEventListener('htmx:beforeRequest', htmx);
|
|
228
|
+
window[key] = { state, dispose: () => {
|
|
229
|
+
f.removeEventListener('invalid', invalid, true);
|
|
230
|
+
f.removeEventListener('submit', submit);
|
|
231
|
+
document.removeEventListener('htmx:beforeRequest', htmx);
|
|
232
|
+
} };
|
|
233
|
+
// The form and each submitter may declare where submission goes; getAttribute avoids
|
|
234
|
+
// properties shadowed by controls named "action" or "method".
|
|
235
|
+
const verbs = ['post', 'put', 'patch', 'delete', 'get'];
|
|
236
|
+
const candidates = [];
|
|
237
|
+
const resolve = (path) => new URL(path ?? location.href, location.href).href;
|
|
238
|
+
// HTML method attributes (enumerated, ASCII case-insensitive, not trimmed): POST and DIALOG are recognised; missing, empty, padded or invalid values mean GET.
|
|
239
|
+
const method = (value) => { const v = (value ?? '').toLowerCase(); return v === 'post' || v === 'dialog' ? v.toUpperCase() : 'GET'; };
|
|
240
|
+
for (const element of [f, ...Array.from(f.querySelectorAll('button:not([type]), button[type="submit"], input[type="submit"], input[type="image"]'))]) {
|
|
241
|
+
for (const verb of verbs)
|
|
242
|
+
if (element.hasAttribute(`hx-${verb}`))
|
|
243
|
+
candidates.push({ url: resolve(element.getAttribute(`hx-${verb}`)), method: verb.toUpperCase() });
|
|
244
|
+
if (element !== f && (element.hasAttribute('formaction') || element.hasAttribute('formmethod')))
|
|
245
|
+
candidates.push({ url: resolve(element.getAttribute('formaction') ?? f.getAttribute('action')), method: element.hasAttribute('formmethod') ? method(element.getAttribute('formmethod')) : method(f.getAttribute('method')) });
|
|
246
|
+
}
|
|
247
|
+
if (!verbs.some(verb => f.hasAttribute(`hx-${verb}`)))
|
|
248
|
+
candidates.push({ url: resolve(f.getAttribute('action')), method: method(f.getAttribute('method')) });
|
|
249
|
+
return candidates;
|
|
250
|
+
}, key);
|
|
251
|
+
const path = (url) => url.split(/[?#]/)[0];
|
|
252
|
+
let request = null;
|
|
253
|
+
const observe = (r) => {
|
|
254
|
+
if (submission.some(candidate => path(r.url()) === path(candidate.url) && r.method() === candidate.method))
|
|
255
|
+
request ??= `${r.method()} ${r.url()}`;
|
|
256
|
+
};
|
|
257
|
+
page.on('request', observe);
|
|
258
|
+
try {
|
|
259
|
+
await action();
|
|
260
|
+
const remaining = deadline(options);
|
|
261
|
+
try {
|
|
262
|
+
await page.waitForFunction(key => window[key].state.invalid !== null || window[key].state.submitted || window[key].state.htmx, key, { timeout: remaining() });
|
|
263
|
+
}
|
|
264
|
+
catch (cause) {
|
|
265
|
+
throw new Error('Expected a native invalid event; none was dispatched', { cause });
|
|
266
|
+
}
|
|
267
|
+
// A page round trip delivers request events the interaction already caused.
|
|
268
|
+
const state = await page.evaluate(key => {
|
|
269
|
+
const s = window[key].state;
|
|
270
|
+
return { invalid: s.invalid, submitted: s.submitted, htmx: s.htmx, stillInvalid: s.control instanceof Element && s.control.matches(':invalid') };
|
|
271
|
+
}, key);
|
|
272
|
+
if (request)
|
|
273
|
+
throw new Error(`Native validation unexpectedly issued a submission request: ${request}`);
|
|
274
|
+
if (state.submitted || state.htmx)
|
|
275
|
+
throw new Error('Expected native validation refusal without submission');
|
|
276
|
+
if (!state.stillInvalid)
|
|
277
|
+
throw new Error(`Control ${state.invalid.controlName} reported invalid but is not :invalid`);
|
|
278
|
+
return state.invalid;
|
|
279
|
+
}
|
|
280
|
+
finally {
|
|
281
|
+
page.off('request', observe);
|
|
282
|
+
await page.evaluate(key => { window[key]?.dispose(); delete window[key]; }, key).catch(() => { });
|
|
283
|
+
}
|
|
284
|
+
}
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,39 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export type RequestMatch = {
|
|
6
|
-
method: string;
|
|
7
|
-
pathname: string;
|
|
8
|
-
};
|
|
9
|
-
export type ResponseMatch = RequestMatch | ((response: Response) => boolean);
|
|
10
|
-
export type ValidationResult = {
|
|
11
|
-
controlName: string;
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
export type ComponentCase = {
|
|
15
|
-
id: string;
|
|
16
|
-
state: string;
|
|
17
|
-
locale: string;
|
|
18
|
-
theme: 'light' | 'dark';
|
|
19
|
-
viewport: {
|
|
20
|
-
width: number;
|
|
21
|
-
height: number;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export declare function actionAndResponse(page: Page, match: ResponseMatch, action: () => Promise<unknown>, options?: WaitOptions): Promise<Response>;
|
|
25
|
-
/** Installs the event observer before the action and follows replacement targets by selector. */
|
|
26
|
-
export declare function actionAndHtmxSettled(page: Page, target: string, action: () => Promise<unknown>, options?: WaitOptions): Promise<void>;
|
|
27
|
-
export declare function actionAndValidationRefusal(page: Page, form: Locator, action: () => Promise<unknown>): Promise<ValidationResult>;
|
|
28
|
-
export declare function expectComponentReady(page: Page, root: Locator, options?: WaitOptions & {
|
|
29
|
-
readinessAttribute?: string;
|
|
30
|
-
}): Promise<void>;
|
|
31
|
-
export interface ComponentHost {
|
|
32
|
-
cases(): Promise<readonly ComponentCase[]>;
|
|
33
|
-
navigate(page: Page, componentCase: ComponentCase): Promise<Locator>;
|
|
34
|
-
}
|
|
35
|
-
export declare function openComponentCase(page: Page, host: ComponentHost, componentCase: ComponentCase, options?: WaitOptions): Promise<Locator>;
|
|
36
|
-
export declare function actionAndHtmxResponse(page: Page, match: ResponseMatch, action: () => Promise<unknown>, options?: WaitOptions): Promise<Response>;
|
|
1
|
+
export { type WaitOptions } from './wait.js';
|
|
2
|
+
export { actionAndResponse, actionAndHtmxSettled, actionAndHtmxResponse, actionAndValidationRefusal, type RequestMatch, type ResponseMatch, type ValidationResult, type HtmxSettledOptions } from './htmx.js';
|
|
3
|
+
export { expectComponentReady, expectFontsReady, expectChartsReady, openComponentCase, componentCase, assertCaseCoverage, attachDiagnosticScreenshot, ReadinessError, type ComponentCase, type ComponentHost, type ReadinessOptions, type ReadinessState, type CaseDimensions } from './components.js';
|
|
37
4
|
export interface EnvironmentDescriptor {
|
|
38
5
|
runId: string;
|
|
39
6
|
baseURL: string;
|
|
@@ -58,8 +25,4 @@ export type IdentityLease<Key, State> = (identity: Key) => Promise<State>;
|
|
|
58
25
|
export { createEnvironmentTest, createEnvironmentLeaseTest, type EnvironmentLeaseInfo } from './fixtures.js';
|
|
59
26
|
export { createProcessEnvironmentDriver, DriverError, type DriverDescriptor } from './driver.js';
|
|
60
27
|
export { acquireEnvironmentLease, withEnvironmentLease, preservingCleanup, type EnvironmentLease, type LeaseOptions } from './lease.js';
|
|
61
|
-
export
|
|
62
|
-
export declare function expectChartsReady(charts: Locator, options?: WaitOptions & {
|
|
63
|
-
allowEmpty?: boolean;
|
|
64
|
-
}): Promise<void>;
|
|
65
|
-
export { createHttpScenarioControl, ScenarioControlError, type ScenarioInput, type ScenarioResult } from './scenarios.js';
|
|
28
|
+
export { createHttpScenarioControl, createHttpTestControls, ScenarioControlError, JobWaitError, type ScenarioInput, type ScenarioResult, type EntityRef, type ExecutionStatus, type WaitResult, type ProviderStep, type ProviderCall, type ScenarioManifest } from './scenarios.js';
|