@warp-drive/ember 0.0.1 → 0.0.3
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/LICENSE.md +19 -7
- package/README.md +2 -2
- package/dist/index.js +489 -7
- package/dist/index.js.map +1 -1
- package/logos/NCC-1701-a-blue.svg +4 -0
- package/logos/NCC-1701-a-gold.svg +4 -0
- package/logos/NCC-1701-a-gold_100.svg +1 -0
- package/logos/NCC-1701-a-gold_base-64.txt +1 -0
- package/logos/NCC-1701-a.svg +4 -0
- package/logos/README.md +4 -0
- package/logos/docs-badge.svg +2 -0
- package/logos/ember-data-logo-dark.svg +12 -0
- package/logos/ember-data-logo-light.svg +12 -0
- package/logos/github-header.svg +444 -0
- package/logos/social1.png +0 -0
- package/logos/social2.png +0 -0
- package/logos/warp-drive-logo-dark.svg +4 -0
- package/logos/warp-drive-logo-gold.svg +4 -0
- package/package.json +41 -62
- package/unstable-preview-types/-private/await.d.ts +53 -1
- package/unstable-preview-types/-private/await.d.ts.map +1 -1
- package/unstable-preview-types/-private/promise-state.d.ts +78 -0
- package/unstable-preview-types/-private/promise-state.d.ts.map +1 -1
- package/unstable-preview-types/-private/request-state.d.ts +94 -0
- package/unstable-preview-types/-private/request-state.d.ts.map +1 -1
- package/unstable-preview-types/-private/request.d.ts +309 -6
- package/unstable-preview-types/-private/request.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +20 -1
- package/unstable-preview-types/index.d.ts.map +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 324 32">
|
|
2
|
+
<path fill="#110819"
|
|
3
|
+
d="M321.58 29.54a41.7 41.7 0 0 1-7.26 1.72c-2.4.36-4.87.53-7.4.53-3.21 0-6.09-.34-8.6-1.03a18.5 18.5 0 0 1-6.34-3.03 13.07 13.07 0 0 1-3.94-4.83c-.9-1.9-1.35-4.06-1.35-6.47a14.32 14.32 0 0 1 5.22-11.19 18.14 18.14 0 0 1 6.06-3.3c2.36-.81 5-1.21 7.9-1.21 2.68 0 5.13.36 7.35 1.1 2.24.71 4.15 1.78 5.74 3.2a14.28 14.28 0 0 1 3.72 5.24 18.12 18.12 0 0 1 1.33 7.17v1.98h-29.1a7.5 7.5 0 0 0 1.28 2.56c.6.77 1.4 1.43 2.42 1.97 1.02.55 2.27.97 3.74 1.27 1.5.3 3.27.45 5.33.45a35.35 35.35 0 0 0 8.23-.96c1.22-.3 2.31-.64 3.29-1 .99-.35 1.78-.7 2.38-1.07v6.9Zm-5.5-15.96a6.73 6.73 0 0 0-.66-2.26 5.82 5.82 0 0 0-1.72-2.13 9.46 9.46 0 0 0-3.1-1.54 15.6 15.6 0 0 0-4.77-.63c-1.79 0-3.33.23-4.64.67-1.3.44-2.4 1-3.29 1.65a8.37 8.37 0 0 0-2.04 2.13c-.48.76-.8 1.46-.94 2.1h21.16ZM271.84 31h-9.28L247.63 1.48h8.9l10.74 22.22 10.72-22.22h8.9L271.83 31ZM234.8 31V1.48h7.97V31h-7.97ZM229.73 8.16l-.94-.28c-.4-.13-.88-.25-1.42-.36a17.88 17.88 0 0 0-3.8-.45c-1.44 0-2.78.18-4.02.53-1.23.35-2.39.81-3.46 1.4a19.48 19.48 0 0 0-3 1.98c-.92.73-1.77 1.48-2.54 2.25V31h-7.97V1.48h7.97v4.8c.96-.72 1.94-1.41 2.94-2.07a25.36 25.36 0 0 1 3.16-1.78 18.9 18.9 0 0 1 3.48-1.23 15.39 15.39 0 0 1 5.44-.39 25 25 0 0 1 4.16.67v6.68ZM197.05 16.22c0 1.89-.2 3.57-.62 5.05a12.7 12.7 0 0 1-1.76 3.82 11.07 11.07 0 0 1-2.7 2.77 13.77 13.77 0 0 1-3.51 1.83c-1.29.46-2.68.8-4.17 1-1.49.21-3.04.31-4.66.31H160.9V1.48h18.69c1.62 0 3.17.1 4.66.32 1.49.2 2.88.53 4.17 1 1.3.45 2.48 1.06 3.54 1.82 1.06.74 1.96 1.67 2.7 2.77a12.7 12.7 0 0 1 1.77 3.82c.42 1.46.62 3.13.62 5Zm-8.03 0c0-1.42-.19-2.65-.56-3.7a5.64 5.64 0 0 0-1.76-2.57 7.66 7.66 0 0 0-3.16-1.53c-1.3-.34-2.9-.52-4.77-.52h-9.9v16.68h9.9c1.88 0 3.47-.17 4.77-.5a7.86 7.86 0 0 0 3.16-1.54c.81-.7 1.4-1.58 1.76-2.63.37-1.04.56-2.27.56-3.7ZM153.98 10.55c0 1.47-.25 2.78-.73 3.9a6.82 6.82 0 0 1-2.26 2.86 10.95 10.95 0 0 1-4 1.77 25.6 25.6 0 0 1-5.86.58h-13.26V31h-2.68V1.48h15.94c2.3 0 4.25.2 5.87.6 1.63.39 2.96.96 4 1.72a6.67 6.67 0 0 1 2.25 2.84c.48 1.13.73 2.43.73 3.9Zm-2.77 0c0-1.4-.24-2.54-.71-3.4a4.53 4.53 0 0 0-2.15-1.97c-.96-.48-2.19-.8-3.68-.95a50.43 50.43 0 0 0-5.26-.24h-11.54v13.15h11.54l2.51.02c.9 0 1.8-.04 2.67-.12.87-.1 1.7-.27 2.5-.5.8-.24 1.5-.6 2.1-1.1a5.05 5.05 0 0 0 1.46-1.9 7 7 0 0 0 .56-3ZM119.76 3.76c-.41-.13-1-.27-1.74-.41-.73-.16-1.67-.24-2.83-.24-1.6 0-3.12.2-4.54.6a17.94 17.94 0 0 0-7.28 3.96 23.73 23.73 0 0 0-2.8 2.83V31H97.9V1.48h2.69V7.5c.96-1 2-1.9 3.11-2.73a21.54 21.54 0 0 1 7.48-3.53 17.47 17.47 0 0 1 5.6-.47c.4.02.77.04 1.1.09a16.6 16.6 0 0 1 1.9.26v2.64ZM85.52 31v-3.27c-1.03.56-2.2 1.08-3.53 1.55a40.4 40.4 0 0 1-13.13 2.3c-1.91 0-3.64-.17-5.17-.52a12.2 12.2 0 0 1-3.87-1.52A7.38 7.38 0 0 1 57.37 27a7.06 7.06 0 0 1-.86-3.52c0-1.32.33-2.48 1-3.48a8.81 8.81 0 0 1 2.85-2.64c1.23-.76 2.71-1.4 4.45-1.91 1.74-.53 3.7-.98 5.84-1.34 2.15-.37 4.47-.67 6.96-.9 2.5-.24 5.14-.44 7.9-.6v-2.26c0-.91-.16-1.72-.5-2.42a5.54 5.54 0 0 0-1.45-1.83 7.97 7.97 0 0 0-2.17-1.31c-.83-.36-1.73-.65-2.7-.86a33.97 33.97 0 0 0-13.54.21c-1.03.25-2.02.53-2.96.86-.95.33-1.9.68-2.86 1.06V2.92c1.99-.53 4.1-.99 6.36-1.38 2.26-.4 4.66-.6 7.2-.6 2.14 0 4.15.19 6.01.56 1.86.36 3.48.94 4.86 1.74A9.16 9.16 0 0 1 87 6.36a8.55 8.55 0 0 1 1.18 4.62V31h-2.66Zm0-16c-4.69.25-8.69.62-12.01 1.09-3.31.47-6.02 1.05-8.12 1.74-2.1.69-3.66 1.49-4.64 2.4a4.18 4.18 0 0 0-1.46 3.12c0 .95.23 1.78.7 2.52a5.86 5.86 0 0 0 2.09 1.84c.9.49 2 .86 3.29 1.12 1.28.24 2.73.37 4.34.37a29.36 29.36 0 0 0 5.95-.6 36.6 36.6 0 0 0 5.71-1.57c.86-.32 1.64-.66 2.34-1.01a11.3 11.3 0 0 0 1.8-1.1v-9.93ZM28.65 1.48l10.53 27.37L50.09 1.48h2.99L41.2 31h-4L26.84 4.34 16.51 31h-4L.63 1.48h2.99l10.91 27.37 10.5-27.37h3.62Z" />
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 324 32">
|
|
2
|
+
<path fill="#FFC474"
|
|
3
|
+
d="M321.58 29.54a41.7 41.7 0 0 1-7.26 1.72c-2.4.36-4.87.53-7.4.53-3.21 0-6.09-.34-8.6-1.03a18.5 18.5 0 0 1-6.34-3.03 13.07 13.07 0 0 1-3.94-4.83c-.9-1.9-1.35-4.06-1.35-6.47a14.32 14.32 0 0 1 5.22-11.19 18.14 18.14 0 0 1 6.06-3.3c2.36-.81 5-1.21 7.9-1.21 2.68 0 5.13.36 7.35 1.1 2.24.71 4.15 1.78 5.74 3.2a14.28 14.28 0 0 1 3.72 5.24 18.12 18.12 0 0 1 1.33 7.17v1.98h-29.1a7.5 7.5 0 0 0 1.28 2.56c.6.77 1.4 1.43 2.42 1.97 1.02.55 2.27.97 3.74 1.27 1.5.3 3.27.45 5.33.45a35.35 35.35 0 0 0 8.23-.96c1.22-.3 2.31-.64 3.29-1 .99-.35 1.78-.7 2.38-1.07v6.9Zm-5.5-15.96a6.73 6.73 0 0 0-.66-2.26 5.82 5.82 0 0 0-1.72-2.13 9.46 9.46 0 0 0-3.1-1.54 15.6 15.6 0 0 0-4.77-.63c-1.79 0-3.33.23-4.64.67-1.3.44-2.4 1-3.29 1.65a8.37 8.37 0 0 0-2.04 2.13c-.48.76-.8 1.46-.94 2.1h21.16ZM271.84 31h-9.28L247.63 1.48h8.9l10.74 22.22 10.72-22.22h8.9L271.83 31ZM234.8 31V1.48h7.97V31h-7.97ZM229.73 8.16l-.94-.28c-.4-.13-.88-.25-1.42-.36a17.88 17.88 0 0 0-3.8-.45c-1.44 0-2.78.18-4.02.53-1.23.35-2.39.81-3.46 1.4a19.48 19.48 0 0 0-3 1.98c-.92.73-1.77 1.48-2.54 2.25V31h-7.97V1.48h7.97v4.8c.96-.72 1.94-1.41 2.94-2.07a25.36 25.36 0 0 1 3.16-1.78 18.9 18.9 0 0 1 3.48-1.23 15.39 15.39 0 0 1 5.44-.39 25 25 0 0 1 4.16.67v6.68ZM197.05 16.22c0 1.89-.2 3.57-.62 5.05a12.7 12.7 0 0 1-1.76 3.82 11.07 11.07 0 0 1-2.7 2.77 13.77 13.77 0 0 1-3.51 1.83c-1.29.46-2.68.8-4.17 1-1.49.21-3.04.31-4.66.31H160.9V1.48h18.69c1.62 0 3.17.1 4.66.32 1.49.2 2.88.53 4.17 1 1.3.45 2.48 1.06 3.54 1.82 1.06.74 1.96 1.67 2.7 2.77a12.7 12.7 0 0 1 1.77 3.82c.42 1.46.62 3.13.62 5Zm-8.03 0c0-1.42-.19-2.65-.56-3.7a5.64 5.64 0 0 0-1.76-2.57 7.66 7.66 0 0 0-3.16-1.53c-1.3-.34-2.9-.52-4.77-.52h-9.9v16.68h9.9c1.88 0 3.47-.17 4.77-.5a7.86 7.86 0 0 0 3.16-1.54c.81-.7 1.4-1.58 1.76-2.63.37-1.04.56-2.27.56-3.7ZM153.98 10.55c0 1.47-.25 2.78-.73 3.9a6.82 6.82 0 0 1-2.26 2.86 10.95 10.95 0 0 1-4 1.77 25.6 25.6 0 0 1-5.86.58h-13.26V31h-2.68V1.48h15.94c2.3 0 4.25.2 5.87.6 1.63.39 2.96.96 4 1.72a6.67 6.67 0 0 1 2.25 2.84c.48 1.13.73 2.43.73 3.9Zm-2.77 0c0-1.4-.24-2.54-.71-3.4a4.53 4.53 0 0 0-2.15-1.97c-.96-.48-2.19-.8-3.68-.95a50.43 50.43 0 0 0-5.26-.24h-11.54v13.15h11.54l2.51.02c.9 0 1.8-.04 2.67-.12.87-.1 1.7-.27 2.5-.5.8-.24 1.5-.6 2.1-1.1a5.05 5.05 0 0 0 1.46-1.9 7 7 0 0 0 .56-3ZM119.76 3.76c-.41-.13-1-.27-1.74-.41-.73-.16-1.67-.24-2.83-.24-1.6 0-3.12.2-4.54.6a17.94 17.94 0 0 0-7.28 3.96 23.73 23.73 0 0 0-2.8 2.83V31H97.9V1.48h2.69V7.5c.96-1 2-1.9 3.11-2.73a21.54 21.54 0 0 1 7.48-3.53 17.47 17.47 0 0 1 5.6-.47c.4.02.77.04 1.1.09a16.6 16.6 0 0 1 1.9.26v2.64ZM85.52 31v-3.27c-1.03.56-2.2 1.08-3.53 1.55a40.4 40.4 0 0 1-13.13 2.3c-1.91 0-3.64-.17-5.17-.52a12.2 12.2 0 0 1-3.87-1.52A7.38 7.38 0 0 1 57.37 27a7.06 7.06 0 0 1-.86-3.52c0-1.32.33-2.48 1-3.48a8.81 8.81 0 0 1 2.85-2.64c1.23-.76 2.71-1.4 4.45-1.91 1.74-.53 3.7-.98 5.84-1.34 2.15-.37 4.47-.67 6.96-.9 2.5-.24 5.14-.44 7.9-.6v-2.26c0-.91-.16-1.72-.5-2.42a5.54 5.54 0 0 0-1.45-1.83 7.97 7.97 0 0 0-2.17-1.31c-.83-.36-1.73-.65-2.7-.86a33.97 33.97 0 0 0-13.54.21c-1.03.25-2.02.53-2.96.86-.95.33-1.9.68-2.86 1.06V2.92c1.99-.53 4.1-.99 6.36-1.38 2.26-.4 4.66-.6 7.2-.6 2.14 0 4.15.19 6.01.56 1.86.36 3.48.94 4.86 1.74A9.16 9.16 0 0 1 87 6.36a8.55 8.55 0 0 1 1.18 4.62V31h-2.66Zm0-16c-4.69.25-8.69.62-12.01 1.09-3.31.47-6.02 1.05-8.12 1.74-2.1.69-3.66 1.49-4.64 2.4a4.18 4.18 0 0 0-1.46 3.12c0 .95.23 1.78.7 2.52a5.86 5.86 0 0 0 2.09 1.84c.9.49 2 .86 3.29 1.12 1.28.24 2.73.37 4.34.37a29.36 29.36 0 0 0 5.95-.6 36.6 36.6 0 0 0 5.71-1.57c.86-.32 1.64-.66 2.34-1.01a11.3 11.3 0 0 0 1.8-1.1v-9.93ZM28.65 1.48l10.53 27.37L50.09 1.48h2.99L41.2 31h-4L26.84 4.34 16.51 31h-4L.63 1.48h2.99l10.91 27.37 10.5-27.37h3.62Z" />
|
|
4
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-drive/ember",
|
|
3
3
|
"description": "Data bindings and utilities for Ember applications using WarpDrive",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Chris Thoburn <runspired@users.noreply.github.com>",
|
|
7
7
|
"repository": {
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"dist",
|
|
21
21
|
"README.md",
|
|
22
22
|
"LICENSE.md",
|
|
23
|
-
"
|
|
24
|
-
"ember-data-logo-light.svg"
|
|
23
|
+
"logos"
|
|
25
24
|
],
|
|
26
25
|
"exports": {
|
|
27
26
|
".": {
|
|
@@ -36,37 +35,17 @@
|
|
|
36
35
|
},
|
|
37
36
|
"peerDependencies": {
|
|
38
37
|
"ember-source": "3.28.12 || ^4.0.4 || ^5.0.0 || ^6.0.0",
|
|
39
|
-
"@ember-
|
|
40
|
-
"@ember-data/
|
|
41
|
-
"@ember-data/request
|
|
42
|
-
"@
|
|
38
|
+
"@ember/test-waiters": "^3.1.0 || ^4.0.0",
|
|
39
|
+
"@ember-data/store": "5.3.13",
|
|
40
|
+
"@ember-data/request": "5.3.13",
|
|
41
|
+
"@ember-data/request-utils": "5.3.13",
|
|
42
|
+
"@warp-drive/core-types": "0.0.3",
|
|
43
43
|
"ember-provide-consume-context": "^0.7.0",
|
|
44
|
-
"@ember-data/tracking": "
|
|
44
|
+
"@ember-data/tracking": "5.3.13"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"@
|
|
49
|
-
"@warp-drive/build-config": "0.0.1"
|
|
50
|
-
},
|
|
51
|
-
"dependenciesMeta": {
|
|
52
|
-
"@ember-data/store": {
|
|
53
|
-
"injected": true
|
|
54
|
-
},
|
|
55
|
-
"@ember-data/request": {
|
|
56
|
-
"injected": true
|
|
57
|
-
},
|
|
58
|
-
"@ember-data/request-utils": {
|
|
59
|
-
"injected": true
|
|
60
|
-
},
|
|
61
|
-
"@warp-drive/core-types": {
|
|
62
|
-
"injected": true
|
|
63
|
-
},
|
|
64
|
-
"@ember-data/tracking": {
|
|
65
|
-
"injected": true
|
|
66
|
-
},
|
|
67
|
-
"@warp-drive/build-config": {
|
|
68
|
-
"injected": true
|
|
69
|
-
}
|
|
47
|
+
"@embroider/macros": "^1.16.12",
|
|
48
|
+
"@warp-drive/build-config": "0.0.3"
|
|
70
49
|
},
|
|
71
50
|
"peerDependenciesMeta": {
|
|
72
51
|
"ember-provide-consume-context": {
|
|
@@ -74,38 +53,38 @@
|
|
|
74
53
|
}
|
|
75
54
|
},
|
|
76
55
|
"devDependencies": {
|
|
77
|
-
"@babel/core": "^7.
|
|
78
|
-
"@babel/plugin-transform-typescript": "^7.
|
|
79
|
-
"@babel/preset-env": "^7.
|
|
80
|
-
"@babel/preset-typescript": "^7.
|
|
81
|
-
"@babel/runtime": "^7.
|
|
82
|
-
"@glimmer/component": "^
|
|
56
|
+
"@babel/core": "^7.26.10",
|
|
57
|
+
"@babel/plugin-transform-typescript": "^7.27.0",
|
|
58
|
+
"@babel/preset-env": "^7.26.9",
|
|
59
|
+
"@babel/preset-typescript": "^7.27.0",
|
|
60
|
+
"@babel/runtime": "^7.27.0",
|
|
61
|
+
"@glimmer/component": "^2.0.0",
|
|
83
62
|
"@glimmer/tracking": "^1.1.2",
|
|
84
|
-
"@glimmer/validator": "^0.
|
|
85
|
-
"@glint/core": "1.5.
|
|
86
|
-
"@glint/environment-ember-loose": "1.5.
|
|
87
|
-
"@glint/environment-ember-template-imports": "1.5.
|
|
88
|
-
"@glint/template": "1.5.
|
|
89
|
-
"decorator-transforms": "^2.
|
|
90
|
-
"@embroider/addon-dev": "^7.1.
|
|
91
|
-
"@ember-data/request": "5.3.
|
|
92
|
-
"@ember-data/request-utils": "5.3.
|
|
93
|
-
"@ember-data/store": "5.3.
|
|
94
|
-
"@ember-data/tracking": "5.3.
|
|
95
|
-
"@ember/test-helpers": "5.
|
|
96
|
-
"@
|
|
97
|
-
"@warp-drive/
|
|
98
|
-
"
|
|
99
|
-
"ember-template-
|
|
100
|
-
"ember-
|
|
101
|
-
"
|
|
102
|
-
"rollup": "^4.
|
|
103
|
-
"typescript": "^5.
|
|
104
|
-
"vite": "^5.
|
|
63
|
+
"@glimmer/validator": "^0.94.8",
|
|
64
|
+
"@glint/core": "1.5.2",
|
|
65
|
+
"@glint/environment-ember-loose": "1.5.2",
|
|
66
|
+
"@glint/environment-ember-template-imports": "1.5.2",
|
|
67
|
+
"@glint/template": "1.5.2",
|
|
68
|
+
"decorator-transforms": "^2.3.0",
|
|
69
|
+
"@embroider/addon-dev": "^7.1.3",
|
|
70
|
+
"@ember-data/request": "5.3.13",
|
|
71
|
+
"@ember-data/request-utils": "5.3.13",
|
|
72
|
+
"@ember-data/store": "5.3.13",
|
|
73
|
+
"@ember-data/tracking": "5.3.13",
|
|
74
|
+
"@ember/test-helpers": "5.2.0",
|
|
75
|
+
"@ember/test-waiters": "^4.1.0",
|
|
76
|
+
"@warp-drive/core-types": "0.0.3",
|
|
77
|
+
"@warp-drive/internal-config": "5.3.13",
|
|
78
|
+
"babel-plugin-ember-template-compilation": "^2.4.1",
|
|
79
|
+
"ember-template-imports": "^4.3.0",
|
|
80
|
+
"ember-source": "~6.3.0",
|
|
81
|
+
"rollup": "^4.39.0",
|
|
82
|
+
"typescript": "^5.8.3",
|
|
83
|
+
"vite": "^5.4.15",
|
|
105
84
|
"ember-provide-consume-context": "^0.7.0"
|
|
106
85
|
},
|
|
107
86
|
"engines": {
|
|
108
|
-
"node": ">= 18.20.
|
|
87
|
+
"node": ">= 18.20.8"
|
|
109
88
|
},
|
|
110
89
|
"volta": {
|
|
111
90
|
"extends": "../../package.json"
|
|
@@ -113,7 +92,6 @@
|
|
|
113
92
|
"ember-addon": {
|
|
114
93
|
"main": "addon-main.cjs",
|
|
115
94
|
"type": "addon",
|
|
116
|
-
"preventDownleveling": true,
|
|
117
95
|
"version": 2
|
|
118
96
|
},
|
|
119
97
|
"ember": {
|
|
@@ -127,9 +105,10 @@
|
|
|
127
105
|
}
|
|
128
106
|
},
|
|
129
107
|
"scripts": {
|
|
130
|
-
"_lint": "eslint . --quiet --cache --cache-strategy=content",
|
|
131
108
|
"build:glint": "glint && glint --build",
|
|
132
109
|
"build:pkg": "vite build;",
|
|
133
|
-
"sync
|
|
110
|
+
"sync": "echo \"syncing\"",
|
|
111
|
+
"_temporarily_deactivated_lint": "eslint . --quiet --cache --cache-strategy=content",
|
|
112
|
+
"start": "vite"
|
|
134
113
|
}
|
|
135
114
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
declare module '@warp-drive/ember/-private/await' {
|
|
2
|
+
/**
|
|
3
|
+
* @module @warp-drive/ember
|
|
4
|
+
*/
|
|
5
|
+
import type Owner from '@ember/owner';
|
|
2
6
|
import Component from '@glimmer/component';
|
|
3
7
|
import type { Awaitable } from '@ember-data/request';
|
|
4
8
|
export const and: (x: unknown, y: unknown) => boolean;
|
|
@@ -7,8 +11,21 @@ declare module '@warp-drive/ember/-private/await' {
|
|
|
7
11
|
error: E;
|
|
8
12
|
};
|
|
9
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The `<Throw />` component is used to throw an error in a template.
|
|
16
|
+
*
|
|
17
|
+
* That's all it does. So don't use it unless the application should
|
|
18
|
+
* throw an error if it reaches this point in the template.
|
|
19
|
+
*
|
|
20
|
+
* ```hbs
|
|
21
|
+
* <Throw @error={{anError}} />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @class <Throw />
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
10
27
|
export class Throw<T> extends Component<ThrowSignature<T>> {
|
|
11
|
-
constructor(owner:
|
|
28
|
+
constructor(owner: Owner, args: ThrowSignature<T>['Args']);
|
|
12
29
|
}
|
|
13
30
|
interface AwaitSignature<T, E = Error | string | object> {
|
|
14
31
|
Args: {
|
|
@@ -20,6 +37,41 @@ declare module '@warp-drive/ember/-private/await' {
|
|
|
20
37
|
success: [value: T];
|
|
21
38
|
};
|
|
22
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* The <Await /> component allow you to utilize reactive control flow
|
|
42
|
+
* for asynchronous states in your application.
|
|
43
|
+
*
|
|
44
|
+
* Await is ideal for handling "boundaries", outside which some state is
|
|
45
|
+
* still allowed to be unresolved and within which it MUST be resolved.
|
|
46
|
+
*
|
|
47
|
+
* ```gjs
|
|
48
|
+
* import { Await } from '@warp-drive/ember';
|
|
49
|
+
*
|
|
50
|
+
* <template>
|
|
51
|
+
* <Await @promise={{@request}}>
|
|
52
|
+
* <:pending>
|
|
53
|
+
* <Spinner />
|
|
54
|
+
* </:pending>
|
|
55
|
+
*
|
|
56
|
+
* <:error as |error|>
|
|
57
|
+
* <ErrorForm @error={{error}} />
|
|
58
|
+
* </:error>
|
|
59
|
+
*
|
|
60
|
+
* <:success as |result|>
|
|
61
|
+
* <h1>{{result.title}}</h1>
|
|
62
|
+
* </:success>
|
|
63
|
+
* </Await>
|
|
64
|
+
* </template>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* The <Await /> component requires that error states are properly handled.
|
|
68
|
+
*
|
|
69
|
+
* If no error block is provided and the promise rejects, the error will
|
|
70
|
+
* be thrown.
|
|
71
|
+
*
|
|
72
|
+
* @class <Await />
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
23
75
|
export class Await<T, E> extends Component<AwaitSignature<T, E>> {
|
|
24
76
|
get state(): import("@warp-drive/ember/-private/promise-state.ts").PromiseState<T, E>;
|
|
25
77
|
get error(): E;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"await.d.ts","sourceRoot":"","sources":["../../src/-private/await.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"await.d.ts","sourceRoot":"","sources":["../../src/-private/await.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,eAAO,MAAM,GAAG,GAAI,GAAG,OAAO,EAAE,GAAG,OAAO,YAAoB,CAAC;AAC/D,UAAU,cAAc,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM;IAClD,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC,CAAC;KACV,CAAC;CACH;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,KAAK,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBAC5C,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;CAU1D;AAED,UAAU,cAAc,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM;IACrD,IAAI,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACvC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAClB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACrB,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,KAAK,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9D,IAAI,KAAK,oDAER;IAED,IAAI,KAAK,IACoB,CAAC,CAC7B;IAED,IAAI,MAAM,IACoB,CAAC,CAC9B;CAqBF"}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
declare module '@warp-drive/ember/-private/promise-state' {
|
|
2
2
|
import type { Awaitable } from '@ember-data/request';
|
|
3
|
+
/**
|
|
4
|
+
* PromiseState provides a reactive wrapper for a promise which allows you write declarative
|
|
5
|
+
* code around a promise's control flow. It is useful in both Template and JavaScript contexts,
|
|
6
|
+
* allowing you to quickly derive behaviors and data from pending, error and success states.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* interface PromiseState<T = unknown, E = unknown> {
|
|
10
|
+
* isPending: boolean;
|
|
11
|
+
* isSuccess: boolean;
|
|
12
|
+
* isError: boolean;
|
|
13
|
+
* result: T | null;
|
|
14
|
+
* error: E | null;
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* To get the state of a promise, use `getPromiseState`.
|
|
19
|
+
*
|
|
20
|
+
* @class PromiseState
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
3
23
|
export class PromiseState<T = unknown, E = unknown> {
|
|
4
24
|
result: T | null;
|
|
5
25
|
error: E | null;
|
|
@@ -8,6 +28,64 @@ declare module '@warp-drive/ember/-private/promise-state' {
|
|
|
8
28
|
isError: boolean;
|
|
9
29
|
constructor(promise: Promise<T> | Awaitable<T, E>);
|
|
10
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns a reactive state-machine for the provided promise or awaitable.
|
|
33
|
+
*
|
|
34
|
+
* Repeat calls to `getPromiseState` with the same promise will return the same state object
|
|
35
|
+
* making is safe and easy to use in templates and JavaScript code to produce reactive
|
|
36
|
+
* behaviors around promises.
|
|
37
|
+
*
|
|
38
|
+
* `getPromiseState` can be used in both JavaScript and Template contexts.
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* import { getPromiseState } from '@warp-drive/ember';
|
|
42
|
+
*
|
|
43
|
+
* const state = getPromiseState(promise);
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* For instance, we could write a getter on a component that updates whenever
|
|
47
|
+
* the promise state advances or the promise changes, by combining the function
|
|
48
|
+
* with the use of `@cached`
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* class Component {
|
|
52
|
+
* @cached
|
|
53
|
+
* get title() {
|
|
54
|
+
* const state = getPromiseState(this.args.request);
|
|
55
|
+
* if (state.isPending) {
|
|
56
|
+
* return 'loading...';
|
|
57
|
+
* }
|
|
58
|
+
* if (state.isError) { return null; }
|
|
59
|
+
* return state.result.title;
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* Or in a template as a helper:
|
|
65
|
+
*
|
|
66
|
+
* ```gjs
|
|
67
|
+
* import { getPromiseState } from '@warp-drive/ember';
|
|
68
|
+
*
|
|
69
|
+
* <template>
|
|
70
|
+
* {{#let (getPromiseState @request) as |state|}}
|
|
71
|
+
* {{#if state.isPending}} <Spinner />
|
|
72
|
+
* {{else if state.isError}} <ErrorForm @error={{state.error}} />
|
|
73
|
+
* {{else}}
|
|
74
|
+
* <h1>{{state.result.title}}</h1>
|
|
75
|
+
* {{/if}}
|
|
76
|
+
* {{/let}}
|
|
77
|
+
* </template>
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* If looking to use in a template, consider also the `<Await />` component.
|
|
81
|
+
*
|
|
82
|
+
* @method getPromiseState
|
|
83
|
+
* @for @warp-drive/ember
|
|
84
|
+
* @static
|
|
85
|
+
* @public
|
|
86
|
+
* @param {Promise<T> | Awaitable<T, E>} promise
|
|
87
|
+
* @return {PromiseState<T, E>}
|
|
88
|
+
*/
|
|
11
89
|
export function getPromiseState<T = unknown, E = unknown>(promise: Promise<T> | Awaitable<T, E>): PromiseState<T, E>;
|
|
12
90
|
}
|
|
13
91
|
//# sourceMappingURL=promise-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promise-state.d.ts","sourceRoot":"","sources":["../../src/-private/promise-state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"promise-state.d.ts","sourceRoot":"","sources":["../../src/-private/promise-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKrD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO;IACvC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAQ;IACxB,KAAK,EAAE,CAAC,GAAG,IAAI,CAAQ;IACvB,SAAS,UAAQ;IACjB,SAAS,UAAS;IAClB,OAAO,UAAS;gBAEb,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;CA8BlD;AAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAUnH"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
declare module '@warp-drive/ember/-private/request-state' {
|
|
2
2
|
import type { Future, ImmutableRequestInfo, ResponseInfo, StructuredErrorDocument } from '@ember-data/request';
|
|
3
|
+
/**
|
|
4
|
+
* Lazily consumes the stream of a request, providing a number of
|
|
5
|
+
* reactive properties that can be used to build UIs that respond
|
|
6
|
+
* to the progress of a request.
|
|
7
|
+
*
|
|
8
|
+
* @class RequestLoadingState
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
3
11
|
export class RequestLoadingState {
|
|
4
12
|
_stream: TransformStream | null;
|
|
5
13
|
_future: Future<unknown>;
|
|
@@ -37,6 +45,34 @@ declare module '@warp-drive/ember/-private/request-state' {
|
|
|
37
45
|
constructor(future: Future<unknown>);
|
|
38
46
|
abort: () => void;
|
|
39
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* RequestState extends the concept of PromiseState to provide a reactive
|
|
50
|
+
* wrapper for a request `Future` which allows you write declarative code
|
|
51
|
+
* around a Future's control flow.
|
|
52
|
+
*
|
|
53
|
+
* It is useful in both Template and JavaScript contexts, allowing you
|
|
54
|
+
* to quickly derive behaviors and data from pending, error and success
|
|
55
|
+
* states.
|
|
56
|
+
*
|
|
57
|
+
* The key difference between a Promise and a Future is that Futures provide
|
|
58
|
+
* access to a stream of their content, the identity of the request (if any)
|
|
59
|
+
* as well as the ability to attempt to abort the request.
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* interface Future<T> extends Promise<T>> {
|
|
63
|
+
* getStream(): Promise<ReadableStream>;
|
|
64
|
+
* abort(): void;
|
|
65
|
+
* lid: StableDocumentIdentifier | null;
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* These additional APIs allow us to craft even richer state experiences.
|
|
70
|
+
*
|
|
71
|
+
* To get the state of a request, use `getRequestState`.
|
|
72
|
+
*
|
|
73
|
+
* @class RequestState
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
40
76
|
export class RequestState<T = unknown, RT = unknown> {
|
|
41
77
|
#private;
|
|
42
78
|
result: RT | null;
|
|
@@ -50,6 +86,64 @@ declare module '@warp-drive/ember/-private/request-state' {
|
|
|
50
86
|
get loadingState(): RequestLoadingState;
|
|
51
87
|
constructor(future: Future<RT>);
|
|
52
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
*
|
|
92
|
+
* `getRequestState` can be used in both JavaScript and Template contexts.
|
|
93
|
+
*
|
|
94
|
+
* ```ts
|
|
95
|
+
* import { getRequestState } from '@warp-drive/ember';
|
|
96
|
+
*
|
|
97
|
+
* const state = getRequestState(future);
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* For instance, we could write a getter on a component that updates whenever
|
|
101
|
+
* the request state advances or the future changes, by combining the function
|
|
102
|
+
* with the use of `@cached`
|
|
103
|
+
*
|
|
104
|
+
* ```ts
|
|
105
|
+
* class Component {
|
|
106
|
+
* @cached
|
|
107
|
+
* get title() {
|
|
108
|
+
* const state = getRequestState(this.args.request);
|
|
109
|
+
* if (state.isPending) {
|
|
110
|
+
* return 'loading...';
|
|
111
|
+
* }
|
|
112
|
+
* if (state.isError) { return null; }
|
|
113
|
+
* return state.result.title;
|
|
114
|
+
* }
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* Or in a template as a helper:
|
|
119
|
+
*
|
|
120
|
+
* ```gjs
|
|
121
|
+
* import { getRequestState } from '@warp-drive/ember';
|
|
122
|
+
*
|
|
123
|
+
* <template>
|
|
124
|
+
* {{#let (getRequestState @request) as |state|}}
|
|
125
|
+
* {{#if state.isPending}}
|
|
126
|
+
* <Spinner />
|
|
127
|
+
* {{else if state.isError}}
|
|
128
|
+
* <ErrorForm @error={{state.error}} />
|
|
129
|
+
* {{else}}
|
|
130
|
+
* <h1>{{state.result.title}}</h1>
|
|
131
|
+
* {{/if}}
|
|
132
|
+
* {{/let}}
|
|
133
|
+
* </template>
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* If looking to use in a template, consider also the `<Request />` component
|
|
137
|
+
* which offers a numbe of additional capabilities for requests *beyond* what
|
|
138
|
+
* `RequestState` provides.
|
|
139
|
+
*
|
|
140
|
+
* @method getRequestState
|
|
141
|
+
* @for @warp-drive/ember
|
|
142
|
+
* @static
|
|
143
|
+
* @public
|
|
144
|
+
* @param future
|
|
145
|
+
* @return {RequestState}
|
|
146
|
+
*/
|
|
53
147
|
export function getRequestState<RT, T>(future: Future<RT>): RequestState<T, RT>;
|
|
54
148
|
}
|
|
55
149
|
//# sourceMappingURL=request-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-state.d.ts","sourceRoot":"","sources":["../../src/-private/request-state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-state.d.ts","sourceRoot":"","sources":["../../src/-private/request-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,MAAM,EACN,oBAAoB,EACpB,YAAY,EAEZ,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAiE7B;;;;;;;GAOG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,EAAE,eAAe,GAAG,IAAI,CAAQ;IACvC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACzB,UAAU,UAAS;IACnB,QAAQ;IAgCR,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAQ;IAC5B,SAAS,SAAK;IACd,YAAY,SAAK;IAEjB,UAAU,SAAK;IACf,QAAQ,SAAK;IACb,eAAe,SAAK;IAEpB,UAAU,UAAQ;IAClB,UAAU,UAAS;IACnB,WAAW,UAAS;IACpB,YAAY,UAAS;IACrB,UAAU,UAAS;IACnB,MAAM,EAAE,KAAK,GAAG,IAAI,CAAQ;IAErC,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,IAAI,QAAQ,IAAI,MAAM,CAGrB;IAED,IAAI,MAAM,IAAI,cAAc,GAAG,IAAI,CASlC;IAED,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,IAAI,WAAW,IAAI,MAAM,CAGxB;IAED,IAAI,SAAS,IAAI,MAAM,CAGtB;IAED,IAAI,OAAO,IAAI,MAAM,CAGpB;IAED,IAAI,cAAc,IAAI,MAAM,CAG3B;IAED,IAAI,UAAU,IAAI,OAAO,CAGxB;IAED,IAAI,WAAW,IAAI,OAAO,CAGzB;IAED,IAAI,SAAS,IAAI,OAAO,CAGvB;IAED,IAAI,KAAK,IAAI,KAAK,GAAG,IAAI,CAGxB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,KAAK,IAAI,MAAM,CAGlB;gBAEW,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC;IAInC,KAAK,QAAO,IAAI,CAEd;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,EAAE,GAAG,OAAO;;IAIxC,MAAM,EAAE,EAAE,GAAG,IAAI,CAAQ;IACzB,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAAQ;IAC7C,SAAS,UAAQ;IACjB,SAAS,UAAS;IAClB,OAAO,UAAS;IAChB,OAAO,EAAE,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAQ;IACnD,QAAQ,EAAE,QAAQ,GAAG,YAAY,GAAG,IAAI,CAAQ;IAEzD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,YAAY,wBAMf;gBAEW,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CAqC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,EAAE,CAAC,CAS9E"}
|