@adobe/data 0.1.2
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 +310 -0
- package/assembly/index.d.ts +30 -0
- package/assembly/index.js +18 -0
- package/assembly/index.wasm +0 -0
- package/assembly/index.wasm.map +1 -0
- package/assembly-test/assembly.test.d.ts +1 -0
- package/assembly-test/assembly.test.js +29 -0
- package/assembly-test/assembly.test.js.map +1 -0
- package/cache/async-cache.d.ts +15 -0
- package/cache/async-cache.js +23 -0
- package/cache/async-cache.js.map +1 -0
- package/cache/blob-store.d.ts +94 -0
- package/cache/blob-store.js +191 -0
- package/cache/blob-store.js.map +1 -0
- package/cache/blob-store.test.d.ts +1 -0
- package/cache/blob-store.test.js +142 -0
- package/cache/blob-store.test.js.map +1 -0
- package/cache/data-cache.d.ts +38 -0
- package/cache/data-cache.js +96 -0
- package/cache/data-cache.js.map +1 -0
- package/cache/data-cache.test.d.ts +1 -0
- package/cache/data-cache.test.js +50 -0
- package/cache/data-cache.test.js.map +1 -0
- package/cache/expiring-data-cache.d.ts +6 -0
- package/cache/expiring-data-cache.js +49 -0
- package/cache/expiring-data-cache.js.map +1 -0
- package/cache/expiring-data-cache.test.d.ts +1 -0
- package/cache/expiring-data-cache.test.js +62 -0
- package/cache/expiring-data-cache.test.js.map +1 -0
- package/cache/fallback-async-cache.d.ts +7 -0
- package/cache/fallback-async-cache.js +22 -0
- package/cache/fallback-async-cache.js.map +1 -0
- package/cache/functions/bind-functions.d.ts +6 -0
- package/cache/functions/bind-functions.js +33 -0
- package/cache/functions/bind-functions.js.map +1 -0
- package/cache/functions/functions.test.d.ts +1 -0
- package/cache/functions/functions.test.js +79 -0
- package/cache/functions/functions.test.js.map +1 -0
- package/cache/functions/get-cached.d.ts +11 -0
- package/cache/functions/get-cached.js +49 -0
- package/cache/functions/get-cached.js.map +1 -0
- package/cache/functions/get-cached.test.d.ts +1 -0
- package/cache/functions/get-cached.test.js +96 -0
- package/cache/functions/get-cached.test.js.map +1 -0
- package/cache/functions/hashing/blob-to-hash.d.ts +4 -0
- package/cache/functions/hashing/blob-to-hash.js +44 -0
- package/cache/functions/hashing/blob-to-hash.js.map +1 -0
- package/cache/functions/hashing/buffer-to-hash.d.ts +4 -0
- package/cache/functions/hashing/buffer-to-hash.js +33 -0
- package/cache/functions/hashing/buffer-to-hash.js.map +1 -0
- package/cache/functions/hashing/hashing.test.d.ts +1 -0
- package/cache/functions/hashing/hashing.test.js +95 -0
- package/cache/functions/hashing/hashing.test.js.map +1 -0
- package/cache/functions/hashing/index.d.ts +4 -0
- package/cache/functions/hashing/index.js +26 -0
- package/cache/functions/hashing/index.js.map +1 -0
- package/cache/functions/hashing/json-to-hash.d.ts +4 -0
- package/cache/functions/hashing/json-to-hash.js +29 -0
- package/cache/functions/hashing/json-to-hash.js.map +1 -0
- package/cache/functions/hashing/string-to-hash.d.ts +4 -0
- package/cache/functions/hashing/string-to-hash.js +37 -0
- package/cache/functions/hashing/string-to-hash.js.map +1 -0
- package/cache/functions/index.d.ts +5 -0
- package/cache/functions/index.js +29 -0
- package/cache/functions/index.js.map +1 -0
- package/cache/functions/memoize.d.ts +12 -0
- package/cache/functions/memoize.js +48 -0
- package/cache/functions/memoize.js.map +1 -0
- package/cache/functions/omit.d.ts +1 -0
- package/cache/functions/omit.js +29 -0
- package/cache/functions/omit.js.map +1 -0
- package/cache/functions/prevent-parallel-execution.d.ts +7 -0
- package/cache/functions/prevent-parallel-execution.js +25 -0
- package/cache/functions/prevent-parallel-execution.js.map +1 -0
- package/cache/functions/types.d.ts +1 -0
- package/cache/functions/types.js +23 -0
- package/cache/functions/types.js.map +1 -0
- package/cache/get-persistent-cache.d.ts +12 -0
- package/cache/get-persistent-cache.js +23 -0
- package/cache/get-persistent-cache.js.map +1 -0
- package/cache/index.d.ts +3 -0
- package/cache/index.js +25 -0
- package/cache/index.js.map +1 -0
- package/cache/managed-array.d.ts +23 -0
- package/cache/managed-array.js +160 -0
- package/cache/managed-array.js.map +1 -0
- package/cache/managed-async-cache.browser.test.d.ts +1 -0
- package/cache/managed-async-cache.browser.test.js +50 -0
- package/cache/managed-async-cache.browser.test.js.map +1 -0
- package/cache/managed-async-cache.d.ts +4 -0
- package/cache/managed-async-cache.js +45 -0
- package/cache/managed-async-cache.js.map +1 -0
- package/cache/memory-allocator.d.ts +23 -0
- package/cache/memory-allocator.js +94 -0
- package/cache/memory-allocator.js.map +1 -0
- package/cache/memory-async-cache.d.ts +6 -0
- package/cache/memory-async-cache.js +23 -0
- package/cache/memory-async-cache.js.map +1 -0
- package/core/data.d.ts +22 -0
- package/core/data.js +52 -0
- package/core/data.js.map +1 -0
- package/core/data.test.d.ts +1 -0
- package/core/data.test.js +48 -0
- package/core/data.test.js.map +1 -0
- package/core/functions/array-equals.d.ts +1 -0
- package/core/functions/array-equals.js +34 -0
- package/core/functions/array-equals.js.map +1 -0
- package/core/functions/deep-merge.d.ts +31 -0
- package/core/functions/deep-merge.js +51 -0
- package/core/functions/deep-merge.js.map +1 -0
- package/core/functions/deep-merge.test.d.ts +1 -0
- package/core/functions/deep-merge.test.js +94 -0
- package/core/functions/deep-merge.test.js.map +1 -0
- package/core/functions/index.d.ts +4 -0
- package/core/functions/index.js +26 -0
- package/core/functions/index.js.map +1 -0
- package/core/functions/is-async-generator.d.ts +1 -0
- package/core/functions/is-async-generator.js +25 -0
- package/core/functions/is-async-generator.js.map +1 -0
- package/core/functions/is-promise.d.ts +1 -0
- package/core/functions/is-promise.js +26 -0
- package/core/functions/is-promise.js.map +1 -0
- package/core/functions/with-validation.d.ts +5 -0
- package/core/functions/with-validation.js +38 -0
- package/core/functions/with-validation.js.map +1 -0
- package/core/functions/with-validation.test.d.ts +1 -0
- package/core/functions/with-validation.test.js +96 -0
- package/core/functions/with-validation.test.js.map +1 -0
- package/core/index.d.ts +3 -0
- package/core/index.js +25 -0
- package/core/index.js.map +1 -0
- package/core/schema.d.ts +86 -0
- package/core/schema.js +33 -0
- package/core/schema.js.map +1 -0
- package/core/schema.test.d.ts +1 -0
- package/core/schema.test.js +16 -0
- package/core/schema.test.js.map +1 -0
- package/ecs/action-ecs/action-ecs.d.ts +19 -0
- package/ecs/action-ecs/action-ecs.js +203 -0
- package/ecs/action-ecs/action-ecs.js.map +1 -0
- package/ecs/action-ecs/action-ecs.test.d.ts +1 -0
- package/ecs/action-ecs/action-ecs.test.js +362 -0
- package/ecs/action-ecs/action-ecs.test.js.map +1 -0
- package/ecs/action-ecs/action-types.d.ts +106 -0
- package/ecs/action-ecs/action-types.js +19 -0
- package/ecs/action-ecs/action-types.js.map +1 -0
- package/ecs/action-ecs/index.d.ts +2 -0
- package/ecs/action-ecs/index.js +23 -0
- package/ecs/action-ecs/index.js.map +1 -0
- package/ecs/core-ecs/core-ecs-serialization.test.d.ts +1 -0
- package/ecs/core-ecs/core-ecs-serialization.test.js +230 -0
- package/ecs/core-ecs/core-ecs-serialization.test.js.map +1 -0
- package/ecs/core-ecs/core-ecs-types.d.ts +141 -0
- package/ecs/core-ecs/core-ecs-types.js +23 -0
- package/ecs/core-ecs/core-ecs-types.js.map +1 -0
- package/ecs/core-ecs/core-ecs.d.ts +7 -0
- package/ecs/core-ecs/core-ecs.js +492 -0
- package/ecs/core-ecs/core-ecs.js.map +1 -0
- package/ecs/core-ecs/core-ecs.test.d.ts +1 -0
- package/ecs/core-ecs/core-ecs.test.js +404 -0
- package/ecs/core-ecs/core-ecs.test.js.map +1 -0
- package/ecs/core-ecs/index.d.ts +1 -0
- package/ecs/core-ecs/index.js +2 -0
- package/ecs/core-ecs/index.js.map +1 -0
- package/ecs/ecs/ecs-types.d.ts +132 -0
- package/ecs/ecs/ecs-types.js +23 -0
- package/ecs/ecs/ecs-types.js.map +1 -0
- package/ecs/ecs/ecs-where-functions.d.ts +6 -0
- package/ecs/ecs/ecs-where-functions.js +91 -0
- package/ecs/ecs/ecs-where-functions.js.map +1 -0
- package/ecs/ecs/ecs.d.ts +13 -0
- package/ecs/ecs/ecs.js +177 -0
- package/ecs/ecs/ecs.js.map +1 -0
- package/ecs/ecs/ecs.test.d.ts +1 -0
- package/ecs/ecs/ecs.test.js +399 -0
- package/ecs/ecs/ecs.test.js.map +1 -0
- package/ecs/ecs/index.d.ts +3 -0
- package/ecs/ecs/index.js +3 -0
- package/ecs/ecs/index.js.map +1 -0
- package/ecs/index.d.ts +4 -0
- package/ecs/index.js +26 -0
- package/ecs/index.js.map +1 -0
- package/ecs/transaction-ecs/index.d.ts +2 -0
- package/ecs/transaction-ecs/index.js +24 -0
- package/ecs/transaction-ecs/index.js.map +1 -0
- package/ecs/transaction-ecs/transaction-ecs.d.ts +11 -0
- package/ecs/transaction-ecs/transaction-ecs.js +184 -0
- package/ecs/transaction-ecs/transaction-ecs.js.map +1 -0
- package/ecs/transaction-ecs/transaction-ecs.test.d.ts +1 -0
- package/ecs/transaction-ecs/transaction-ecs.test.js +599 -0
- package/ecs/transaction-ecs/transaction-ecs.test.js.map +1 -0
- package/ecs/transaction-ecs/transaction-types.d.ts +135 -0
- package/ecs/transaction-ecs/transaction-types.js +2 -0
- package/ecs/transaction-ecs/transaction-types.js.map +1 -0
- package/ecs/transaction-ecs/transactions.d.ts +5 -0
- package/ecs/transaction-ecs/transactions.js +158 -0
- package/ecs/transaction-ecs/transactions.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +23 -0
- package/index.js.map +1 -0
- package/observe/create-observable-event.d.ts +10 -0
- package/observe/create-observable-event.js +22 -0
- package/observe/create-observable-event.js.map +1 -0
- package/observe/create-observable-state.d.ts +7 -0
- package/observe/create-observable-state.js +27 -0
- package/observe/create-observable-state.js.map +1 -0
- package/observe/create-persisted-state.d.ts +11 -0
- package/observe/create-persisted-state.js +31 -0
- package/observe/create-persisted-state.js.map +1 -0
- package/observe/create-persisted-state.test.d.ts +1 -0
- package/observe/create-persisted-state.test.js +124 -0
- package/observe/create-persisted-state.test.js.map +1 -0
- package/observe/from-array.d.ts +5 -0
- package/observe/from-array.js +30 -0
- package/observe/from-array.js.map +1 -0
- package/observe/from-constant.d.ts +5 -0
- package/observe/from-constant.js +12 -0
- package/observe/from-constant.js.map +1 -0
- package/observe/from-element-id.d.ts +7 -0
- package/observe/from-element-id.js +70 -0
- package/observe/from-element-id.js.map +1 -0
- package/observe/from-element-properties-and-events.d.ts +2 -0
- package/observe/from-element-properties-and-events.js +18 -0
- package/observe/from-element-properties-and-events.js.map +1 -0
- package/observe/from-element-property.d.ts +11 -0
- package/observe/from-element-property.js +60 -0
- package/observe/from-element-property.js.map +1 -0
- package/observe/from-promise-with-error.d.ts +7 -0
- package/observe/from-promise-with-error.js +27 -0
- package/observe/from-promise-with-error.js.map +1 -0
- package/observe/from-promise.d.ts +6 -0
- package/observe/from-promise.js +22 -0
- package/observe/from-promise.js.map +1 -0
- package/observe/from-properties.d.ts +10 -0
- package/observe/from-properties.js +33 -0
- package/observe/from-properties.js.map +1 -0
- package/observe/index.d.ts +27 -0
- package/observe/index.js +49 -0
- package/observe/index.js.map +1 -0
- package/observe/observe.test.d.ts +7 -0
- package/observe/observe.test.js +417 -0
- package/observe/observe.test.js.map +1 -0
- package/observe/to-promise.d.ts +8 -0
- package/observe/to-promise.js +18 -0
- package/observe/to-promise.js.map +1 -0
- package/observe/to-properties.d.ts +11 -0
- package/observe/to-properties.js +9 -0
- package/observe/to-properties.js.map +1 -0
- package/observe/types.d.ts +17 -0
- package/observe/types.js +2 -0
- package/observe/types.js.map +1 -0
- package/observe/with-async-map.d.ts +6 -0
- package/observe/with-async-map.js +12 -0
- package/observe/with-async-map.js.map +1 -0
- package/observe/with-cache.d.ts +6 -0
- package/observe/with-cache.js +33 -0
- package/observe/with-cache.js.map +1 -0
- package/observe/with-copy.d.ts +5 -0
- package/observe/with-copy.js +10 -0
- package/observe/with-copy.js.map +1 -0
- package/observe/with-deduplicate-data.d.ts +7 -0
- package/observe/with-deduplicate-data.js +18 -0
- package/observe/with-deduplicate-data.js.map +1 -0
- package/observe/with-deduplicate.d.ts +6 -0
- package/observe/with-deduplicate.js +19 -0
- package/observe/with-deduplicate.js.map +1 -0
- package/observe/with-default.d.ts +6 -0
- package/observe/with-default.js +21 -0
- package/observe/with-default.js.map +1 -0
- package/observe/with-map-data.d.ts +7 -0
- package/observe/with-map-data.js +32 -0
- package/observe/with-map-data.js.map +1 -0
- package/observe/with-map.d.ts +5 -0
- package/observe/with-map.js +11 -0
- package/observe/with-map.js.map +1 -0
- package/observe/with-optional.d.ts +5 -0
- package/observe/with-optional.js +20 -0
- package/observe/with-optional.js.map +1 -0
- package/observe/with-unwrap.d.ts +5 -0
- package/observe/with-unwrap.js +26 -0
- package/observe/with-unwrap.js.map +1 -0
- package/package.json +105 -0
- package/perftest/ecs-perf.d.ts +49 -0
- package/perftest/ecs-perf.js +230 -0
- package/perftest/ecs-perf.js.map +1 -0
- package/perftest/helper-functions.d.ts +1 -0
- package/perftest/helper-functions.js +31 -0
- package/perftest/helper-functions.js.map +1 -0
- package/perftest/horizon-perf.d.ts +22 -0
- package/perftest/horizon-perf.js +126 -0
- package/perftest/horizon-perf.js.map +1 -0
- package/perftest/index.d.ts +1 -0
- package/perftest/index.js +35 -0
- package/perftest/index.js.map +1 -0
- package/perftest/perf-test.d.ts +18 -0
- package/perftest/perf-test.js +124 -0
- package/perftest/perf-test.js.map +1 -0
- package/perftest/vanilla-perf.d.ts +38 -0
- package/perftest/vanilla-perf.js +128 -0
- package/perftest/vanilla-perf.js.map +1 -0
- package/schemas/index.d.ts +1 -0
- package/schemas/index.js +23 -0
- package/schemas/index.js.map +1 -0
- package/schemas/schemas.d.ts +45 -0
- package/schemas/schemas.js +39 -0
- package/schemas/schemas.js.map +1 -0
- package/service/add-observable-actions.d.ts +29 -0
- package/service/add-observable-actions.js +108 -0
- package/service/add-observable-actions.js.map +1 -0
- package/service/index.d.ts +4 -0
- package/service/index.js +26 -0
- package/service/index.js.map +1 -0
- package/service/progressive-result.d.ts +96 -0
- package/service/progressive-result.js +99 -0
- package/service/progressive-result.js.map +1 -0
- package/service/sequential-action.d.ts +18 -0
- package/service/sequential-action.js +45 -0
- package/service/sequential-action.js.map +1 -0
- package/service/service.d.ts +4 -0
- package/service/service.js +26 -0
- package/service/service.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.js +23 -0
- package/types/index.js.map +1 -0
- package/types/types.d.ts +61 -0
- package/types/types.js +27 -0
- package/types/types.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-array.js","sourceRoot":"","sources":["../../src/observe/from-array.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;GAEG;AAEH,MAAM,UAAU,SAAS,CACvB,gBAA8B;IAE9B,OAAO,OAAO,CACZ,cAAc,CACZ,MAAM,CAAC,WAAW,CAChB,gBAAgB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,CAAC,CAC5E,CACF,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-constant.js","sourceRoot":"","sources":["../../src/observe/from-constant.ts"],"names":[],"mappings":"AAuBA;;GAEG;AAEH,MAAM,UAAU,YAAY,CAAI,KAAQ;IACtC,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,OAAO,GAAG,EAAE;YACV,uBAAuB;QACzB,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Observe } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Uses DOM MutationObserver to watch for the addition or removal of an element with a specific id.
|
|
4
|
+
* @param id The id of the element to watch for.
|
|
5
|
+
* @returns a new Observe<Element | null> which yields null if element does not exist.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fromElementId<T extends HTMLElement = HTMLElement>(ancestor: HTMLElement | ShadowRoot, id: string): Observe<T | null>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
import { fromConstant } from "./from-constant.js";
|
|
23
|
+
/**
|
|
24
|
+
* Uses DOM MutationObserver to watch for the addition or removal of an element with a specific id.
|
|
25
|
+
* @param id The id of the element to watch for.
|
|
26
|
+
* @returns a new Observe<Element | null> which yields null if element does not exist.
|
|
27
|
+
*/
|
|
28
|
+
export function fromElementId(ancestor, id) {
|
|
29
|
+
if (id === "") {
|
|
30
|
+
return fromConstant(null);
|
|
31
|
+
}
|
|
32
|
+
return (observer) => {
|
|
33
|
+
let lastElement = null;
|
|
34
|
+
const notify = () => {
|
|
35
|
+
const newElement = document.getElementById(id);
|
|
36
|
+
if (!lastElement || newElement !== lastElement) {
|
|
37
|
+
lastElement = newElement;
|
|
38
|
+
observer(newElement);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
notify();
|
|
42
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
43
|
+
let changed = false;
|
|
44
|
+
for (const mutation of mutations) {
|
|
45
|
+
if (mutation.type === "childList") {
|
|
46
|
+
for (const node of mutation.addedNodes) {
|
|
47
|
+
if (node.id === id) {
|
|
48
|
+
changed = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (!changed) {
|
|
52
|
+
for (const node of mutation.removedNodes) {
|
|
53
|
+
if (node.id === id) {
|
|
54
|
+
changed = true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (changed) {
|
|
61
|
+
notify();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
mutationObserver.observe(ancestor, { childList: true, subtree: true });
|
|
65
|
+
return () => {
|
|
66
|
+
mutationObserver.disconnect();
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=from-element-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-element-id.js","sourceRoot":"","sources":["../../src/observe/from-element-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD;;;;GAIG;AAEH,MAAM,UAAU,aAAa,CAC3B,QAAkC,EAClC,EAAU;IAEV,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACd,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,IAAI,WAAW,GAAa,IAAI,CAAC;QACjC,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,MAAM,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAa,CAAC;YAC3D,IAAI,CAAC,WAAW,IAAI,UAAU,KAAK,WAAW,EAAE,CAAC;gBAC/C,WAAW,GAAG,UAAU,CAAC;gBACzB,QAAQ,CAAC,UAAU,CAAC,CAAC;YACvB,CAAC;QACH,CAAC,CAAC;QACF,MAAM,EAAE,CAAC;QACT,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE;YAC1D,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBACjC,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;oBAClC,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;wBACvC,IAAK,IAAU,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;4BAC1B,OAAO,GAAG,IAAI,CAAC;wBACjB,CAAC;oBACH,CAAC;oBACD,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;4BACzC,IAAK,IAAU,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;gCAC1B,OAAO,GAAG,IAAI,CAAC;4BACjB,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YACD,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,EAAE,CAAC;YACX,CAAC;QACH,CAAC,CAAC,CAAC;QACH,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACvE,OAAO,GAAG,EAAE;YACV,gBAAgB,CAAC,UAAU,EAAE,CAAC;QAChC,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// private helper function to create an observable from an element property and events.
|
|
2
|
+
export function fromElementPropertyAndEvents(element, property, events) {
|
|
3
|
+
return (observer) => {
|
|
4
|
+
const listener = () => {
|
|
5
|
+
observer(element[property]);
|
|
6
|
+
};
|
|
7
|
+
for (const event of events) {
|
|
8
|
+
element.addEventListener(event, listener);
|
|
9
|
+
}
|
|
10
|
+
observer(element[property]);
|
|
11
|
+
return () => {
|
|
12
|
+
for (const event of events) {
|
|
13
|
+
element.removeEventListener(event, listener);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=from-element-properties-and-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-element-properties-and-events.js","sourceRoot":"","sources":["../../src/observe/from-element-properties-and-events.ts"],"names":[],"mappings":"AAuBA,wFAAwF;AACxF,MAAM,UAAU,4BAA4B,CAI1C,OAAU,EAAE,QAAW,EAAE,MAAW;IACpC,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC;QAEF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC5C,CAAC;QAED,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE5B,OAAO,GAAG,EAAE;YACV,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBAC3B,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observe } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Returns an observable that will notify observers when the element property changes.
|
|
4
|
+
* If there are any events provided, then the observer will be notified when the event is triggered.
|
|
5
|
+
* If there are not then a dom mutation observer will be used to watch for changes.
|
|
6
|
+
* @param element The element to watch a property for changes.
|
|
7
|
+
* @param property The property on the element to watch for changes.
|
|
8
|
+
* @param events The events that will trigger a new notification of changed values.
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function fromElementProperty<T extends HTMLElement, K extends keyof T, E extends keyof HTMLElementEventMap>(element: T, property: K, events?: E[]): Observe<T[K]>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
import { fromElementPropertyAndEvents } from "./from-element-properties-and-events.js";
|
|
23
|
+
// private helper function to create an observable from an element property and a mutation observer.
|
|
24
|
+
function fromElementPropertyAndMutationObserver(element, property) {
|
|
25
|
+
return (observer) => {
|
|
26
|
+
observer(element[property]);
|
|
27
|
+
const mutationObserver = new MutationObserver((mutations) => {
|
|
28
|
+
// this should only be called when the property changes.
|
|
29
|
+
// check that this specific property was changed
|
|
30
|
+
for (const mutation of mutations) {
|
|
31
|
+
if (mutation.attributeName === property) {
|
|
32
|
+
observer(element[property]);
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
mutationObserver.observe(element, { attributes: true });
|
|
38
|
+
return () => {
|
|
39
|
+
mutationObserver.disconnect();
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Returns an observable that will notify observers when the element property changes.
|
|
45
|
+
* If there are any events provided, then the observer will be notified when the event is triggered.
|
|
46
|
+
* If there are not then a dom mutation observer will be used to watch for changes.
|
|
47
|
+
* @param element The element to watch a property for changes.
|
|
48
|
+
* @param property The property on the element to watch for changes.
|
|
49
|
+
* @param events The events that will trigger a new notification of changed values.
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
export function fromElementProperty(element, property, events = []) {
|
|
53
|
+
if (events.length > 0) {
|
|
54
|
+
return fromElementPropertyAndEvents(element, property, events);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return fromElementPropertyAndMutationObserver(element, property);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=from-element-property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-element-property.js","sourceRoot":"","sources":["../../src/observe/from-element-property.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAGvF,qGAAqG;AACrG,SAAS,sCAAsC,CAG7C,OAAU,EAAE,QAAW;IACvB,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5B,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE;YAC1D,yDAAyD;YACzD,iDAAiD;YACjD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBACjC,IAAI,QAAQ,CAAC,aAAa,KAAK,QAAQ,EAAE,CAAC;oBACxC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAC5B,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QACH,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,OAAO,GAAG,EAAE;YACV,gBAAgB,CAAC,UAAU,EAAE,CAAC;QAChC,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAIjC,OAAU,EAAE,QAAW,EAAE,SAAc,EAAE;IACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,4BAA4B,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;SAAM,CAAC;QACN,OAAO,sCAAsC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Observe } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new Observer that will notify observers exactly once when the promise is resolved.
|
|
4
|
+
* In the event of an error, the observer will be notified with the error.
|
|
5
|
+
* Note that the promise is only created when the first observer is added so it is lazy.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fromPromiseWithError<T, E extends Error>(promiseFactory: () => Promise<T>): Observe<T | E>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new Observer that will notify observers exactly once when the promise is resolved.
|
|
3
|
+
* In the event of an error, the observer will be notified with the error.
|
|
4
|
+
* Note that the promise is only created when the first observer is added so it is lazy.
|
|
5
|
+
*/
|
|
6
|
+
export function fromPromiseWithError(promiseFactory) {
|
|
7
|
+
let promise = undefined;
|
|
8
|
+
return (observer) => {
|
|
9
|
+
let cancelled = false;
|
|
10
|
+
promise = promise ?? promiseFactory();
|
|
11
|
+
promise
|
|
12
|
+
.then((value) => {
|
|
13
|
+
if (!cancelled) {
|
|
14
|
+
observer(value);
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
.catch((error) => {
|
|
18
|
+
if (!cancelled) {
|
|
19
|
+
observer(error);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return () => {
|
|
23
|
+
cancelled = true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=from-promise-with-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-promise-with-error.js","sourceRoot":"","sources":["../../src/observe/from-promise-with-error.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAClC,cAAgC;IAEhC,IAAI,OAAO,GAA2B,SAAS,CAAC;IAChD,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,OAAO,GAAG,OAAO,IAAI,cAAc,EAAE,CAAC;QACtC,OAAO;aACJ,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;YACd,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAQ,EAAE,EAAE;YAClB,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;QACH,CAAC,CAAC,CAAC;QACL,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Observe } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new Observer that will notify observers exactly once when the promise is resolved.
|
|
4
|
+
* Note that the promise is only created when the first observer is added so it is lazy.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fromPromise<T>(promiseFactory: () => Promise<T>): Observe<T>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new Observer that will notify observers exactly once when the promise is resolved.
|
|
3
|
+
* Note that the promise is only created when the first observer is added so it is lazy.
|
|
4
|
+
*/
|
|
5
|
+
export function fromPromise(promiseFactory) {
|
|
6
|
+
let promise = undefined;
|
|
7
|
+
return (observer) => {
|
|
8
|
+
let cancelled = false;
|
|
9
|
+
promise = promise ?? promiseFactory();
|
|
10
|
+
promise.then((value) => {
|
|
11
|
+
if (!cancelled) {
|
|
12
|
+
observer(value);
|
|
13
|
+
}
|
|
14
|
+
}, (reject) => {
|
|
15
|
+
console.error(`Error in Observe fromPromise`, reject);
|
|
16
|
+
});
|
|
17
|
+
return () => {
|
|
18
|
+
cancelled = true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=from-promise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-promise.js","sourceRoot":"","sources":["../../src/observe/from-promise.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,UAAU,WAAW,CACzB,cAAgC;IAEhC,IAAI,OAAO,GAA2B,SAAS,CAAC;IAChD,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,OAAO,GAAG,OAAO,IAAI,cAAc,EAAE,CAAC;QACtC,OAAO,CAAC,IAAI,CACV,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;QACH,CAAC,EACD,CAAC,MAAM,EAAE,EAAE;YACT,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;QACxD,CAAC,CACF,CAAC;QACF,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observe } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new Observe function that combines every named observe function into a single observe function with a value this is an object with the same keys.
|
|
4
|
+
* No result is provided until every required observe function has provided a value. If they all provide a value synchronously, then a result will be provided synchronously.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fromProperties<T extends {
|
|
7
|
+
[K: string]: Observe<unknown>;
|
|
8
|
+
}>(observeProperties: T): Observe<{
|
|
9
|
+
readonly [K in keyof T]: T[K] extends Observe<infer U> ? U : never;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new Observe function that combines every named observe function into a single observe function with a value this is an object with the same keys.
|
|
3
|
+
* No result is provided until every required observe function has provided a value. If they all provide a value synchronously, then a result will be provided synchronously.
|
|
4
|
+
*/
|
|
5
|
+
export function fromProperties(observeProperties) {
|
|
6
|
+
return (observer) => {
|
|
7
|
+
const values = new Map();
|
|
8
|
+
let initializing = true;
|
|
9
|
+
const maybeNotify = () => {
|
|
10
|
+
if (values.size === Object.keys(observeProperties).length) {
|
|
11
|
+
observer(Object.fromEntries(values));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const unobservers = Object.entries(observeProperties)
|
|
15
|
+
.map(([name, observable]) => {
|
|
16
|
+
return observable((value) => {
|
|
17
|
+
values.set(name, value);
|
|
18
|
+
if (!initializing) {
|
|
19
|
+
maybeNotify();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
})
|
|
23
|
+
.filter(Boolean);
|
|
24
|
+
initializing = false;
|
|
25
|
+
maybeNotify();
|
|
26
|
+
return () => {
|
|
27
|
+
for (const unobserve of unobservers) {
|
|
28
|
+
unobserve();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=from-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-properties.js","sourceRoot":"","sources":["../../src/observe/from-properties.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAG5B,iBAAoB;IAOpB,OAAO,CAAC,QAAkC,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAC9C,IAAI,YAAY,GAAG,IAAI,CAAC;QACxB,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,EAAE,CAAC;gBAC1D,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAqB,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC;aAClD,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE;YAC1B,OAAO,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC1B,MAAM,CAAC,GAAG,CAAC,IAAe,EAAE,KAAmB,CAAC,CAAC;gBACjD,IAAI,CAAC,YAAY,EAAE,CAAC;oBAClB,WAAW,EAAE,CAAC;gBAChB,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,MAAM,CAAC,OAAO,CAAC,CAAC;QAEnB,YAAY,GAAG,KAAK,CAAC;QACrB,WAAW,EAAE,CAAC;QAEd,OAAO,GAAG,EAAE;YACV,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE,CAAC;gBACpC,SAAS,EAAE,CAAC;YACd,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TESTING SOME INDEX DOCUMENTATION HERE.
|
|
3
|
+
*/
|
|
4
|
+
export * from "./create-observable-event.js";
|
|
5
|
+
export * from "./create-observable-state.js";
|
|
6
|
+
export * from "./create-persisted-state.js";
|
|
7
|
+
export * from "./from-constant.js";
|
|
8
|
+
export * from "./from-element-id.js";
|
|
9
|
+
export * from "./from-element-properties-and-events.js";
|
|
10
|
+
export * from "./from-element-property.js";
|
|
11
|
+
export * from "./from-array.js";
|
|
12
|
+
export * from "./from-properties.js";
|
|
13
|
+
export * from "./from-promise-with-error.js";
|
|
14
|
+
export * from "./from-promise.js";
|
|
15
|
+
export * from "./to-promise.js";
|
|
16
|
+
export * from "./to-properties.js";
|
|
17
|
+
export * from "./types.js";
|
|
18
|
+
export * from "./with-cache.js";
|
|
19
|
+
export * from "./with-copy.js";
|
|
20
|
+
export * from "./with-deduplicate-data.js";
|
|
21
|
+
export * from "./with-deduplicate.js";
|
|
22
|
+
export * from "./with-default.js";
|
|
23
|
+
export * from "./with-async-map.js";
|
|
24
|
+
export * from "./with-map.js";
|
|
25
|
+
export * from "./with-map-data.js";
|
|
26
|
+
export * from "./with-optional.js";
|
|
27
|
+
export * from "./with-unwrap.js";
|
package/observe/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
/**
|
|
23
|
+
* TESTING SOME INDEX DOCUMENTATION HERE.
|
|
24
|
+
*/
|
|
25
|
+
export * from "./create-observable-event.js";
|
|
26
|
+
export * from "./create-observable-state.js";
|
|
27
|
+
export * from "./create-persisted-state.js";
|
|
28
|
+
export * from "./from-constant.js";
|
|
29
|
+
export * from "./from-element-id.js";
|
|
30
|
+
export * from "./from-element-properties-and-events.js";
|
|
31
|
+
export * from "./from-element-property.js";
|
|
32
|
+
export * from "./from-array.js";
|
|
33
|
+
export * from "./from-properties.js";
|
|
34
|
+
export * from "./from-promise-with-error.js";
|
|
35
|
+
export * from "./from-promise.js";
|
|
36
|
+
export * from "./to-promise.js";
|
|
37
|
+
export * from "./to-properties.js";
|
|
38
|
+
export * from "./types.js";
|
|
39
|
+
export * from "./with-cache.js";
|
|
40
|
+
export * from "./with-copy.js";
|
|
41
|
+
export * from "./with-deduplicate-data.js";
|
|
42
|
+
export * from "./with-deduplicate.js";
|
|
43
|
+
export * from "./with-default.js";
|
|
44
|
+
export * from "./with-async-map.js";
|
|
45
|
+
export * from "./with-map.js";
|
|
46
|
+
export * from "./with-map-data.js";
|
|
47
|
+
export * from "./with-optional.js";
|
|
48
|
+
export * from "./with-unwrap.js";
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/observe/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX;;GAEG;AACH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yCAAyC,CAAC;AACxD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|