@nil-/doc 0.2.15 → 0.2.17
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/CHANGELOG.md +15 -0
- package/components/block/Block.svelte +3 -2
- package/components/block/Controls.svelte +6 -2
- package/components/block/Controls.svelte.d.ts +1 -0
- package/components/block/Params.svelte +16 -7
- package/components/block/Params.svelte.d.ts +3 -2
- package/components/block/Template.svelte +29 -25
- package/components/block/Template.svelte.d.ts +2 -1
- package/components/block/context.d.ts +16 -4
- package/components/block/context.js +4 -1
- package/components/block/controls/Component.svelte +4 -2
- package/components/block/controls/Component.svelte.d.ts +2 -2
- package/components/block/controls/Controls.svelte +1 -1
- package/components/block/controls/Controls.svelte.d.ts +2 -2
- package/components/block/controls/Number.svelte +3 -2
- package/components/block/controls/Object.svelte +0 -1
- package/components/block/controls/Object.svelte.d.ts +2 -1
- package/components/block/controls/Range.svelte +3 -2
- package/components/block/controls/Select.svelte +3 -2
- package/components/block/controls/Switch.svelte +3 -2
- package/components/block/controls/Text.svelte +3 -2
- package/components/block/controls/Tuple.svelte +0 -1
- package/components/block/controls/Tuple.svelte.d.ts +2 -1
- package/components/block/controls/misc/Styler.svelte +4 -0
- package/components/block/controls/misc/defaulter.d.ts +4 -3
- package/components/block/controls/misc/defaulter.js +9 -6
- package/components/block/utils.d.ts +6 -0
- package/components/block/utils.js +39 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @nil-/doc
|
|
2
2
|
|
|
3
|
+
## 0.2.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- af86341: [doc] moved default mapping in a common lib
|
|
8
|
+
[doc] fix typing
|
|
9
|
+
[doc] if Param's tag is not provided, use stringified id
|
|
10
|
+
|
|
11
|
+
## 0.2.16
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 650eb4b: [doc] revived proper ordering of params
|
|
16
|
+
[doc] each param now has its own defaults (which is resolved from template's default and pram's props)
|
|
17
|
+
|
|
3
18
|
## 0.2.15
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
<script>import { initCurrent,
|
|
1
|
+
<script>import { initParams, initCurrent, initDefaults, initControls, initControlsState } from "./context";
|
|
2
2
|
import { inRoot } from "../context";
|
|
3
3
|
initParams();
|
|
4
4
|
initCurrent();
|
|
5
|
-
initControls();
|
|
6
5
|
initDefaults();
|
|
6
|
+
initControls();
|
|
7
|
+
initControlsState();
|
|
7
8
|
const r = inRoot();
|
|
8
9
|
</script>
|
|
9
10
|
<style>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
<script>import { getControls } from "./context";
|
|
2
|
+
<script>import { getControls, getControlsState } from "./context";
|
|
3
3
|
export let props = [];
|
|
4
|
-
|
|
4
|
+
export let expand = false;
|
|
5
|
+
const controls = getControls();
|
|
6
|
+
$controls = props;
|
|
7
|
+
const state = getControlsState();
|
|
8
|
+
$: $state.expand = expand;
|
|
5
9
|
</script>
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
<script>import {
|
|
3
|
-
|
|
2
|
+
<script>import { onMount } from "svelte";
|
|
3
|
+
import { getParams, getDefaults } from "./context";
|
|
4
|
+
import { resolve } from "./utils";
|
|
5
|
+
export let tag = undefined;
|
|
4
6
|
export let props = {};
|
|
5
7
|
const defaults = getDefaults();
|
|
6
8
|
const params = getParams();
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
|
|
9
|
+
onMount(() => defaults.subscribe((d) => {
|
|
10
|
+
if (d != null) {
|
|
11
|
+
params.update((p) => [
|
|
12
|
+
...p,
|
|
13
|
+
{
|
|
14
|
+
id: p.length,
|
|
15
|
+
tag: tag ?? `${p.length}`,
|
|
16
|
+
values: resolve(d, props),
|
|
17
|
+
defaults: resolve(d, props)
|
|
18
|
+
}
|
|
19
|
+
]);
|
|
10
20
|
}
|
|
11
|
-
}
|
|
12
|
-
$: set(tag, props);
|
|
21
|
+
}));
|
|
13
22
|
</script>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type ValueType } from "./context";
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
tag
|
|
5
|
-
props?: Record<string,
|
|
5
|
+
tag?: string | undefined;
|
|
6
|
+
props?: Record<string, ValueType> | undefined;
|
|
6
7
|
};
|
|
7
8
|
events: {
|
|
8
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -33,30 +33,25 @@
|
|
|
33
33
|
</style>
|
|
34
34
|
<svelte:window on:click={() => ($current = null)} />
|
|
35
35
|
|
|
36
|
-
<script>import {
|
|
37
|
-
import {
|
|
36
|
+
<script>import { getParams, getCurrent, getDefaults } from "./context";
|
|
37
|
+
import { getControls, getControlsState } from "./context";
|
|
38
|
+
import { resolve } from "./utils";
|
|
38
39
|
import Controls from "./controls/Controls.svelte";
|
|
40
|
+
import { beforeUpdate } from "svelte";
|
|
39
41
|
import { slide } from "svelte/transition";
|
|
40
42
|
const params = getParams();
|
|
41
43
|
const current = getCurrent();
|
|
42
44
|
const controls = getControls();
|
|
43
|
-
|
|
44
|
-
getDefaults()
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const temporary = { ...d };
|
|
51
|
-
for (const key of keys) {
|
|
52
|
-
if (key in p && p[key] !== undefined) {
|
|
53
|
-
temporary[key] = p[key];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return temporary;
|
|
45
|
+
const controlsState = getControlsState();
|
|
46
|
+
const defaultsStore = getDefaults();
|
|
47
|
+
export let defaults = undefined;
|
|
48
|
+
export let noreset = false;
|
|
49
|
+
function reset() {
|
|
50
|
+
$params = [];
|
|
51
|
+
$defaultsStore = defaults;
|
|
57
52
|
}
|
|
53
|
+
$: $defaultsStore, reset();
|
|
58
54
|
let hovered = null;
|
|
59
|
-
export let noreset = false;
|
|
60
55
|
/**
|
|
61
56
|
* This flag is to rerender the whole slot component.
|
|
62
57
|
* If the control is disabled, we use the default value provided from the defaults field.
|
|
@@ -70,30 +65,39 @@ export let noreset = false;
|
|
|
70
65
|
*/
|
|
71
66
|
let key = false;
|
|
72
67
|
beforeUpdate(() => (key = !key));
|
|
68
|
+
const resolveArgs = (resolve);
|
|
73
69
|
</script>
|
|
74
70
|
<div class="template">
|
|
75
|
-
{#each
|
|
71
|
+
{#each $params as param (param.id)}
|
|
76
72
|
<div
|
|
77
73
|
class="instance"
|
|
78
|
-
on:click|stopPropagation={() => ($current =
|
|
79
|
-
on:mouseenter={() => (hovered =
|
|
74
|
+
on:click|stopPropagation={() => ($current = param.id)}
|
|
75
|
+
on:mouseenter={() => (hovered = param.id)}
|
|
80
76
|
on:mouseleave={() => (hovered = null)}
|
|
81
77
|
on:keypress={null}
|
|
82
78
|
>
|
|
83
79
|
{#if noreset}
|
|
84
80
|
<div class="content nil-doc-scrollable">
|
|
85
|
-
<slot
|
|
81
|
+
<slot
|
|
82
|
+
id={param.id}
|
|
83
|
+
tag={param.tag}
|
|
84
|
+
props={resolveArgs(param.defaults, param.values)}
|
|
85
|
+
/>
|
|
86
86
|
</div>
|
|
87
87
|
{:else}
|
|
88
88
|
{#key key}
|
|
89
89
|
<div class="content nil-doc-scrollable">
|
|
90
|
-
<slot
|
|
90
|
+
<slot
|
|
91
|
+
id={param.id}
|
|
92
|
+
tag={param.tag}
|
|
93
|
+
props={resolveArgs(param.defaults, param.values)}
|
|
94
|
+
/>
|
|
91
95
|
</div>
|
|
92
96
|
{/key}
|
|
93
97
|
{/if}
|
|
94
|
-
{#if $controls.length > 0 && ($current ===
|
|
95
|
-
<div class="misc nil-doc-scrollable" transition:slide>
|
|
96
|
-
<Controls infos={$controls} bind:values={
|
|
98
|
+
{#if $controls.length > 0 && ($controlsState.expand || $current === param.id || hovered === param.id)}
|
|
99
|
+
<div class="misc nil-doc-scrollable" transition:slide|local>
|
|
100
|
+
<Controls infos={$controls} bind:values={param.values} />
|
|
97
101
|
</div>
|
|
98
102
|
{/if}
|
|
99
103
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare class __sveltets_Render<Args> {
|
|
3
3
|
props(): {
|
|
4
|
-
defaults
|
|
4
|
+
defaults?: Args | undefined;
|
|
5
5
|
noreset?: boolean | undefined;
|
|
6
6
|
};
|
|
7
7
|
events(): {} & {
|
|
@@ -9,6 +9,7 @@ declare class __sveltets_Render<Args> {
|
|
|
9
9
|
};
|
|
10
10
|
slots(): {
|
|
11
11
|
default: {
|
|
12
|
+
id: number;
|
|
12
13
|
tag: string;
|
|
13
14
|
props: Args;
|
|
14
15
|
};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { Control } from "./controls/types";
|
|
2
2
|
import type { Writable } from "svelte/store";
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export type ValueType = undefined | boolean | number | string | ValueType[] | {
|
|
4
|
+
[key: string]: ValueType;
|
|
5
|
+
};
|
|
6
|
+
export type Params = {
|
|
7
|
+
id: number;
|
|
8
|
+
tag: string;
|
|
9
|
+
values: Record<string, ValueType>;
|
|
10
|
+
defaults: Record<string, ValueType>;
|
|
11
|
+
};
|
|
12
|
+
export type ControlState = {
|
|
13
|
+
expand: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare const initCurrent: () => Writable<number | null>, getCurrent: () => Writable<number | null>;
|
|
16
|
+
export declare const initParams: () => Writable<Params[]>, getParams: () => Writable<Params[]>;
|
|
6
17
|
export declare const initControls: () => Writable<Control[]>, getControls: () => Writable<Control[]>;
|
|
7
|
-
export declare const initDefaults: () => Writable<
|
|
18
|
+
export declare const initDefaults: () => Writable<Record<string, ValueType> | null>, getDefaults: () => Writable<Record<string, ValueType> | null>;
|
|
19
|
+
export declare const initControlsState: () => Writable<ControlState>, getControlsState: () => Writable<ControlState>;
|
|
@@ -8,6 +8,9 @@ function create(defaulter) {
|
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
export const { init: initCurrent, get: getCurrent } = create(() => null);
|
|
11
|
-
export const { init: initParams, get: getParams } = create(() =>
|
|
11
|
+
export const { init: initParams, get: getParams } = create(() => []);
|
|
12
12
|
export const { init: initControls, get: getControls } = create(() => []);
|
|
13
13
|
export const { init: initDefaults, get: getDefaults } = create(() => null);
|
|
14
|
+
export const { init: initControlsState, get: getControlsState } = create(() => ({
|
|
15
|
+
expand: false
|
|
16
|
+
}));
|
|
@@ -6,10 +6,12 @@ import Switch from "./Switch.svelte";
|
|
|
6
6
|
import Select from "./Select.svelte";
|
|
7
7
|
import Tuple from "./Tuple.svelte";
|
|
8
8
|
import Object from "./Object.svelte";
|
|
9
|
-
|
|
9
|
+
// by use, info type is mapped to the value type
|
|
10
|
+
// unfortunately i can't use typescript in the markup part of svelte
|
|
10
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
12
|
export let value;
|
|
12
|
-
export let
|
|
13
|
+
export let info;
|
|
14
|
+
export let depth;
|
|
13
15
|
export let disabled = false;
|
|
14
16
|
</script>
|
|
15
17
|
{#if info.type === "object"}
|
|
@@ -2,9 +2,9 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Control } from "./types";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
info: Control;
|
|
6
5
|
value: any;
|
|
7
|
-
|
|
6
|
+
info: Control;
|
|
7
|
+
depth: number;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { Control } from "./types";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ValueType } from "../context";
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
infos: Control[];
|
|
7
|
-
values:
|
|
7
|
+
values: Record<string, ValueType>;
|
|
8
8
|
};
|
|
9
9
|
events: {
|
|
10
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
<script>
|
|
2
|
+
<script>import { getDefault } from "./misc/defaulter";
|
|
3
|
+
export let value;
|
|
3
4
|
export let info;
|
|
4
5
|
export let depth;
|
|
5
6
|
export let disabled = false;
|
|
6
|
-
let ivalue = value ??
|
|
7
|
+
let ivalue = value ?? getDefault(info);
|
|
7
8
|
let enabled = value !== undefined;
|
|
8
9
|
$: value = enabled && !disabled ? ivalue : undefined;
|
|
9
10
|
</script>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<script>import Component from "./Component.svelte";
|
|
3
3
|
import Header from "./misc/GroupHeader.svelte";
|
|
4
4
|
import { getObjectDefaults } from "./misc/defaulter";
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
5
|
export let value;
|
|
7
6
|
export let info;
|
|
8
7
|
export let depth;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { ControlObject } from "./types";
|
|
3
|
+
import type { ValueType } from "../context";
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
|
-
value: Record<string,
|
|
6
|
+
value: Record<string, ValueType> | undefined;
|
|
6
7
|
info: ControlObject;
|
|
7
8
|
depth: number;
|
|
8
9
|
disabled?: boolean | undefined;
|
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
}
|
|
17
17
|
</style>
|
|
18
18
|
|
|
19
|
-
<script>
|
|
19
|
+
<script>import { getDefault } from "./misc/defaulter";
|
|
20
|
+
export let value;
|
|
20
21
|
export let info;
|
|
21
22
|
export let depth;
|
|
22
23
|
export let disabled = false;
|
|
23
|
-
let ivalue = value ?? info
|
|
24
|
+
let ivalue = value ?? getDefault(info);
|
|
24
25
|
let enabled = value !== undefined;
|
|
25
26
|
$: value = enabled && !disabled ? ivalue : undefined;
|
|
26
27
|
</script>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
<script>
|
|
2
|
+
<script>import { getDefault } from "./misc/defaulter";
|
|
3
|
+
export let value;
|
|
3
4
|
export let info;
|
|
4
5
|
export let depth;
|
|
5
6
|
export let disabled = false;
|
|
6
|
-
let ivalue = value ?? (info
|
|
7
|
+
let ivalue = value ?? getDefault(info);
|
|
7
8
|
let enabled = value !== undefined;
|
|
8
9
|
$: value = enabled && !disabled ? ivalue : undefined;
|
|
9
10
|
</script>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
<script>
|
|
2
|
+
<script>import { getDefault } from "./misc/defaulter";
|
|
3
|
+
export let value;
|
|
3
4
|
export let info;
|
|
4
5
|
export let depth;
|
|
5
6
|
export let disabled = false;
|
|
6
|
-
let ivalue = value ??
|
|
7
|
+
let ivalue = value ?? getDefault(info);
|
|
7
8
|
let enabled = value !== undefined;
|
|
8
9
|
$: value = enabled && !disabled ? ivalue : undefined;
|
|
9
10
|
</script>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
<script>
|
|
2
|
+
<script>import { getDefault } from "./misc/defaulter";
|
|
3
|
+
export let value;
|
|
3
4
|
export let info;
|
|
4
5
|
export let depth;
|
|
5
6
|
export let disabled = false;
|
|
6
|
-
let ivalue = value ??
|
|
7
|
+
let ivalue = value ?? getDefault(info);
|
|
7
8
|
let ienabled = value !== undefined;
|
|
8
9
|
$: value = ienabled && !disabled ? ivalue : undefined;
|
|
9
10
|
</script>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<script>import Component from "./Component.svelte";
|
|
3
3
|
import Header from "./misc/GroupHeader.svelte";
|
|
4
4
|
import { getTupleDefaults } from "./misc/defaulter";
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
5
|
export let value;
|
|
7
6
|
export let info;
|
|
8
7
|
export let depth;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { ControlTuple } from "./types";
|
|
3
|
+
import type { ValueType } from "../context";
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
|
-
value:
|
|
6
|
+
value: ValueType[] | undefined;
|
|
6
7
|
info: ControlTuple;
|
|
7
8
|
depth: number;
|
|
8
9
|
disabled?: boolean | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { ValueType } from "../../context";
|
|
1
2
|
import type { Control, ControlTuple, ControlObject } from "../types";
|
|
2
|
-
export declare function getObjectDefaults(info: ControlObject): Record<string,
|
|
3
|
-
export declare function getTupleDefaults(i: ControlTuple):
|
|
4
|
-
export declare function getDefault(i: Control):
|
|
3
|
+
export declare function getObjectDefaults(info: ControlObject): Record<string, ValueType>;
|
|
4
|
+
export declare function getTupleDefaults(i: ControlTuple): ValueType[];
|
|
5
|
+
export declare function getDefault(i: Control): ValueType;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export function getObjectDefaults(info) {
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
2
|
const ret = {};
|
|
4
3
|
for (const i of info.values) {
|
|
5
4
|
ret[i.name] = getDefault(i);
|
|
@@ -13,16 +12,21 @@ export function getTupleDefaults(i) {
|
|
|
13
12
|
}
|
|
14
13
|
return ret;
|
|
15
14
|
}
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
15
|
export function getDefault(i) {
|
|
16
|
+
if (i.type === "switch") {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
18
19
|
if (i.type === "number") {
|
|
19
20
|
return 0;
|
|
20
21
|
}
|
|
21
22
|
if (i.type === "range") {
|
|
22
23
|
return i.min;
|
|
23
24
|
}
|
|
24
|
-
if (i.type === "
|
|
25
|
-
return
|
|
25
|
+
if (i.type === "text") {
|
|
26
|
+
return "";
|
|
27
|
+
}
|
|
28
|
+
if (i.type === "select") {
|
|
29
|
+
return i.values.length > 0 ? i.values[0] : "";
|
|
26
30
|
}
|
|
27
31
|
if (i.type === "tuple") {
|
|
28
32
|
return [...getTupleDefaults(i)];
|
|
@@ -30,6 +34,5 @@ export function getDefault(i) {
|
|
|
30
34
|
if (i.type === "object") {
|
|
31
35
|
return getObjectDefaults(i);
|
|
32
36
|
}
|
|
33
|
-
|
|
34
|
-
return "";
|
|
37
|
+
return undefined;
|
|
35
38
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
function resolveArray(d, p) {
|
|
2
|
+
if (d === undefined) {
|
|
3
|
+
return undefined;
|
|
4
|
+
}
|
|
5
|
+
const ret = [];
|
|
6
|
+
for (const i in d) {
|
|
7
|
+
if (d[i] instanceof Array) {
|
|
8
|
+
ret.push(resolveArray(d[i], p[i] ?? []));
|
|
9
|
+
}
|
|
10
|
+
else if (d[i] instanceof Object) {
|
|
11
|
+
ret.push(resolveObject(d[i], p[i] ?? {}));
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
ret.push(p[i] ?? d[i]);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return ret;
|
|
18
|
+
}
|
|
19
|
+
function resolveObject(d, p) {
|
|
20
|
+
if (d === undefined) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
const ret = {};
|
|
24
|
+
for (const [key, value] of Object.entries(d)) {
|
|
25
|
+
if (value instanceof Array) {
|
|
26
|
+
ret[key] = resolveArray(value, p[key] ?? []);
|
|
27
|
+
}
|
|
28
|
+
else if (value instanceof Object) {
|
|
29
|
+
ret[key] = resolveObject(value, p[key] ?? {});
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
ret[key] = p[key] ?? value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return ret;
|
|
36
|
+
}
|
|
37
|
+
export function resolve(d, p) {
|
|
38
|
+
return resolveObject(d ?? {}, p);
|
|
39
|
+
}
|