sveld 0.37.4 → 0.37.5
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 +21 -1
- package/lib/browser.d.ts +9 -0
- package/lib/browser.js +100 -100
- package/lib/{chunk-nxa0q3f3.js → chunk-8s0hjkmq.js} +3 -3
- package/lib/{chunk-yzb9k33r.js → chunk-a2krprqa.js} +1 -1
- package/lib/chunk-bxzbn9eg.js +1 -0
- package/lib/chunk-k2w5f49f.js +331 -0
- package/lib/chunk-x9qsjgpb.js +6 -0
- package/lib/chunk-znjmdeca.js +1 -0
- package/lib/cli-entry.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/lib/chunk-49hdrj4n.js +0 -6
- package/lib/chunk-7e36grhy.js +0 -1
- package/lib/chunk-rftengvg.js +0 -331
- package/lib/chunk-w37f2cq2.js +0 -1
package/README.md
CHANGED
|
@@ -2187,7 +2187,27 @@ Chained references are also resolved:
|
|
|
2187
2187
|
count?: number;
|
|
2188
2188
|
```
|
|
2189
2189
|
|
|
2190
|
-
Resolution follows up to 5 levels of indirection. Beyond that, the last resolved identifier name is used as the default value.
|
|
2190
|
+
Resolution follows up to 5 levels of indirection. Beyond that, the last resolved identifier name is used as the default value.
|
|
2191
|
+
|
|
2192
|
+
A named import resolves when the imported module (followed through re-exports) declares it as an `export const` with a string, number, boolean, or static template literal:
|
|
2193
|
+
|
|
2194
|
+
```svelte
|
|
2195
|
+
<script>
|
|
2196
|
+
// timing.js: export const TOOLTIP_LEAVE_DELAY_MS = 300;
|
|
2197
|
+
import { TOOLTIP_LEAVE_DELAY_MS } from "./timing.js";
|
|
2198
|
+
|
|
2199
|
+
export let leaveDelayMs = TOOLTIP_LEAVE_DELAY_MS;
|
|
2200
|
+
</script>
|
|
2201
|
+
```
|
|
2202
|
+
|
|
2203
|
+
```ts
|
|
2204
|
+
/**
|
|
2205
|
+
* @default 300
|
|
2206
|
+
*/
|
|
2207
|
+
leaveDelayMs?: number;
|
|
2208
|
+
```
|
|
2209
|
+
|
|
2210
|
+
Any other identifier that cannot be resolved (an `export let`, a computed value, a package import) is used as-is, and its type falls back to `any`.
|
|
2191
2211
|
|
|
2192
2212
|
When an explicit `@default` annotation is provided, it always takes precedence over the resolved value.
|
|
2193
2213
|
|
package/lib/browser.d.ts
CHANGED
|
@@ -37,6 +37,13 @@ interface PendingCallDefaultCandidate {
|
|
|
37
37
|
importedName?: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
interface PendingConstDefaultCandidate {
|
|
41
|
+
propName: string;
|
|
42
|
+
location: "props" | "moduleExports";
|
|
43
|
+
importSource: string;
|
|
44
|
+
importedName: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
interface PendingContextKeyCandidate {
|
|
41
48
|
importSource: string;
|
|
42
49
|
importedName: string;
|
|
@@ -60,6 +67,8 @@ interface ParsedComponentTypeScriptMetadata {
|
|
|
60
67
|
referencesComponentGenerics?: boolean;
|
|
61
68
|
/** Unresolved CallExpression defaults for the cross-file pass in `generateBundle`. */
|
|
62
69
|
pendingCallDefaultCandidates?: PendingCallDefaultCandidate[];
|
|
70
|
+
/** Imported-identifier defaults for the cross-file pass in `generateBundle`. */
|
|
71
|
+
pendingConstDefaultCandidates?: PendingConstDefaultCandidate[];
|
|
63
72
|
/** Unresolved `setContext` import keys for the cross-file pass in `generateBundle`. */
|
|
64
73
|
pendingContextKeyCandidates?: PendingContextKeyCandidate[];
|
|
65
74
|
}
|