@nexus-cross/connect-kit-core 1.1.4-beta.5 → 1.3.0-beta.1
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/dist/core/theme/tokens.d.ts +6 -62
- package/dist/core/theme/tokens.d.ts.map +1 -1
- package/dist/core/theme/tokens.js +5 -135
- package/dist/core/theme/tokens.js.map +1 -1
- package/dist/core/types/index.d.ts +7 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Theme
|
|
3
|
-
* to:
|
|
4
|
-
* - crossy-sdk's `SDKConfig.{theme, themeTokens}` (passed straight
|
|
5
|
-
* through, same semantic keys)
|
|
6
|
-
* - `--cck-*` CSS variables consumed by `@nexus-cross/dapp-ui`'s
|
|
7
|
-
* WalletInfo / WalletPortfolio / WalletConnectModal / AppLauncher
|
|
8
|
-
* stylesheets (they reference `var(--cck-<key>, <fallback>)` for
|
|
9
|
-
* every token below)
|
|
2
|
+
* Theme-mode resolution.
|
|
10
3
|
*
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
4
|
+
* Color/typography/layout tokens now live in
|
|
5
|
+
* `@nexus-cross/crossx-design-system` and are published as `--ds-*` CSS
|
|
6
|
+
* variables by `@nexus-cross/connect-kit-react`'s `CrossConnectKitProvider`.
|
|
7
|
+
* Core keeps only the pure mode resolver, which has no env/SDK coupling.
|
|
13
8
|
*/
|
|
14
|
-
import type {
|
|
15
|
-
/**
|
|
16
|
-
* Baseline palette. Light and dark default values mirror
|
|
17
|
-
* `crossy-sdk-js`'s `THEMES.light` / `THEMES.dark`.
|
|
18
|
-
*/
|
|
19
|
-
export declare const DEFAULT_THEME_TOKENS: Record<ThemeMode, Required<ColorOverrides>>;
|
|
20
|
-
/**
|
|
21
|
-
* Merge user overrides onto the default palette for a given mode.
|
|
22
|
-
* Undefined/empty values fall through to the default — matching
|
|
23
|
-
* crossy-sdk's `resolveTokens` behavior so `@nexus-cross/connect-kit`
|
|
24
|
-
* renders the same resolved palette the embedded modal does.
|
|
25
|
-
*/
|
|
26
|
-
export declare function resolveColorTokens(mode: ThemeMode, overrides?: ColorOverrides): Required<ColorOverrides>;
|
|
9
|
+
import type { ThemeMode } from '../types/index.js';
|
|
27
10
|
/**
|
|
28
11
|
* Resolve the effective {@link ThemeMode} that should be applied.
|
|
29
12
|
* When `autoDetect` is true (and a `window` is available), reads
|
|
@@ -32,43 +15,4 @@ export declare function resolveColorTokens(mode: ThemeMode, overrides?: ColorOve
|
|
|
32
15
|
export declare function resolveThemeMode(explicit: ThemeMode | Partial<{
|
|
33
16
|
mode: ThemeMode;
|
|
34
17
|
}> | undefined, autoDetect: boolean | undefined): ThemeMode;
|
|
35
|
-
/**
|
|
36
|
-
* `ColorOverrides` key → CSS variable name under the shared `--cck-*`
|
|
37
|
-
* namespace.
|
|
38
|
-
*
|
|
39
|
-
* The dapp-ui feature stylesheets (`wallet-info/styles/theme.css`,
|
|
40
|
-
* `wallet-portfolio/styles/portfolio.css`, `wallet-connect-modal/
|
|
41
|
-
* styles/theme.css`, `app-launcher/styles/theme.css`) reference these
|
|
42
|
-
* names via `var(--cck-<key>, <fallback>)`, so emitting them on
|
|
43
|
-
* `:root` (or any ancestor) recolors every surface at once.
|
|
44
|
-
*/
|
|
45
|
-
export declare const CCK_VAR: Record<keyof ColorOverrides, string>;
|
|
46
|
-
/**
|
|
47
|
-
* Serialize `{ light, dark }` token sets to a self-contained CSS string
|
|
48
|
-
* attached to a root (e.g. `:root` or `[data-ckit-root]`). Both modes
|
|
49
|
-
* are always emitted — one inside `[data-cck-theme="light"]` and one
|
|
50
|
-
* inside `[data-cck-theme="dark"]` — so flipping
|
|
51
|
-
* `document.documentElement.dataset.ckitTheme` is enough to switch
|
|
52
|
-
* palettes without re-rendering the `<style>` tag.
|
|
53
|
-
*
|
|
54
|
-
* The caller is responsible for setting `data-cck-theme` (and
|
|
55
|
-
* optionally `data-theme` on the same element) to match the active
|
|
56
|
-
* mode. `CrossConnectKitProvider` in `@nexus-cross/connect-kit-react` does
|
|
57
|
-
* both.
|
|
58
|
-
*/
|
|
59
|
-
export declare function buildThemeCssText(tokens: ThemeTokens | undefined,
|
|
60
|
-
/** Selector scope. Defaults to `:root` so the variables are globally available. */
|
|
61
|
-
scope?: string): string;
|
|
62
|
-
/**
|
|
63
|
-
* Convenience: flatten a resolved token set to a `CSSProperties`-style
|
|
64
|
-
* inline-style object. Useful when a DApp wants to apply the palette to
|
|
65
|
-
* a single subtree rather than the documentElement.
|
|
66
|
-
*
|
|
67
|
-
* ```tsx
|
|
68
|
-
* <div style={themeTokensToInlineStyle('dark', tokens.dark)}>
|
|
69
|
-
* ...
|
|
70
|
-
* </div>
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
export declare function themeTokensToInlineStyle(mode: ThemeMode, overrides?: ColorOverrides): Record<string, string>;
|
|
74
18
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/core/theme/tokens.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/core/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC,GAAG,SAAS,EAC9D,UAAU,EAAE,OAAO,GAAG,SAAS,GAC9B,SAAS,CAeX"}
|
|
@@ -1,68 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Theme
|
|
3
|
-
* to:
|
|
4
|
-
* - crossy-sdk's `SDKConfig.{theme, themeTokens}` (passed straight
|
|
5
|
-
* through, same semantic keys)
|
|
6
|
-
* - `--cck-*` CSS variables consumed by `@nexus-cross/dapp-ui`'s
|
|
7
|
-
* WalletInfo / WalletPortfolio / WalletConnectModal / AppLauncher
|
|
8
|
-
* stylesheets (they reference `var(--cck-<key>, <fallback>)` for
|
|
9
|
-
* every token below)
|
|
2
|
+
* Theme-mode resolution.
|
|
10
3
|
*
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
4
|
+
* Color/typography/layout tokens now live in
|
|
5
|
+
* `@nexus-cross/crossx-design-system` and are published as `--ds-*` CSS
|
|
6
|
+
* variables by `@nexus-cross/connect-kit-react`'s `CrossConnectKitProvider`.
|
|
7
|
+
* Core keeps only the pure mode resolver, which has no env/SDK coupling.
|
|
13
8
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* Baseline palette. Light and dark default values mirror
|
|
16
|
-
* `crossy-sdk-js`'s `THEMES.light` / `THEMES.dark`.
|
|
17
|
-
*/
|
|
18
|
-
export const DEFAULT_THEME_TOKENS = {
|
|
19
|
-
light: {
|
|
20
|
-
primary: '#019D92',
|
|
21
|
-
secondary: '#E70077',
|
|
22
|
-
onPrimary: '#FFFFFF',
|
|
23
|
-
borderDefault: 'rgba(18, 18, 18, 0.05)',
|
|
24
|
-
borderSubtle: 'rgba(18, 18, 18, 0.1)',
|
|
25
|
-
textIconPrimary: '#121212',
|
|
26
|
-
textIconSecondary: 'rgba(18, 18, 18, 0.7)',
|
|
27
|
-
textIconTertiary: 'rgba(18, 18, 18, 0.5)',
|
|
28
|
-
surfaceDefault: 'rgba(18, 18, 18, 0.05)',
|
|
29
|
-
surfaceSubtle: 'rgba(18, 18, 18, 0.1)',
|
|
30
|
-
bg: '#FFFFFF',
|
|
31
|
-
error: '#E70077',
|
|
32
|
-
},
|
|
33
|
-
dark: {
|
|
34
|
-
primary: '#019D92',
|
|
35
|
-
secondary: '#E70077',
|
|
36
|
-
onPrimary: '#FFFFFF',
|
|
37
|
-
borderDefault: 'rgba(255, 255, 255, 0.05)',
|
|
38
|
-
borderSubtle: 'rgba(255, 255, 255, 0.1)',
|
|
39
|
-
textIconPrimary: '#FFFFFF',
|
|
40
|
-
textIconSecondary: 'rgba(255, 255, 255, 0.7)',
|
|
41
|
-
textIconTertiary: 'rgba(255, 255, 255, 0.5)',
|
|
42
|
-
surfaceDefault: 'rgba(255, 255, 255, 0.05)',
|
|
43
|
-
surfaceSubtle: 'rgba(255, 255, 255, 0.1)',
|
|
44
|
-
bg: '#121212',
|
|
45
|
-
error: '#E70077',
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Merge user overrides onto the default palette for a given mode.
|
|
50
|
-
* Undefined/empty values fall through to the default — matching
|
|
51
|
-
* crossy-sdk's `resolveTokens` behavior so `@nexus-cross/connect-kit`
|
|
52
|
-
* renders the same resolved palette the embedded modal does.
|
|
53
|
-
*/
|
|
54
|
-
export function resolveColorTokens(mode, overrides) {
|
|
55
|
-
const base = DEFAULT_THEME_TOKENS[mode];
|
|
56
|
-
if (!overrides)
|
|
57
|
-
return { ...base };
|
|
58
|
-
const merged = { ...base };
|
|
59
|
-
Object.keys(base).forEach((key) => {
|
|
60
|
-
const v = overrides[key];
|
|
61
|
-
if (typeof v === 'string' && v.length > 0)
|
|
62
|
-
merged[key] = v;
|
|
63
|
-
});
|
|
64
|
-
return merged;
|
|
65
|
-
}
|
|
66
9
|
/**
|
|
67
10
|
* Resolve the effective {@link ThemeMode} that should be applied.
|
|
68
11
|
* When `autoDetect` is true (and a `window` is available), reads
|
|
@@ -86,77 +29,4 @@ export function resolveThemeMode(explicit, autoDetect) {
|
|
|
86
29
|
}
|
|
87
30
|
return 'dark';
|
|
88
31
|
}
|
|
89
|
-
/**
|
|
90
|
-
* `ColorOverrides` key → CSS variable name under the shared `--cck-*`
|
|
91
|
-
* namespace.
|
|
92
|
-
*
|
|
93
|
-
* The dapp-ui feature stylesheets (`wallet-info/styles/theme.css`,
|
|
94
|
-
* `wallet-portfolio/styles/portfolio.css`, `wallet-connect-modal/
|
|
95
|
-
* styles/theme.css`, `app-launcher/styles/theme.css`) reference these
|
|
96
|
-
* names via `var(--cck-<key>, <fallback>)`, so emitting them on
|
|
97
|
-
* `:root` (or any ancestor) recolors every surface at once.
|
|
98
|
-
*/
|
|
99
|
-
export const CCK_VAR = {
|
|
100
|
-
primary: '--cck-primary',
|
|
101
|
-
secondary: '--cck-secondary',
|
|
102
|
-
onPrimary: '--cck-on-primary',
|
|
103
|
-
borderDefault: '--cck-border-default',
|
|
104
|
-
borderSubtle: '--cck-border-subtle',
|
|
105
|
-
textIconPrimary: '--cck-texticon-primary',
|
|
106
|
-
textIconSecondary: '--cck-texticon-secondary',
|
|
107
|
-
textIconTertiary: '--cck-texticon-tertiary',
|
|
108
|
-
surfaceDefault: '--cck-surface-default',
|
|
109
|
-
surfaceSubtle: '--cck-surface-subtle',
|
|
110
|
-
bg: '--cck-surface-bg',
|
|
111
|
-
error: '--cck-error',
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Serialize `{ light, dark }` token sets to a self-contained CSS string
|
|
115
|
-
* attached to a root (e.g. `:root` or `[data-ckit-root]`). Both modes
|
|
116
|
-
* are always emitted — one inside `[data-cck-theme="light"]` and one
|
|
117
|
-
* inside `[data-cck-theme="dark"]` — so flipping
|
|
118
|
-
* `document.documentElement.dataset.ckitTheme` is enough to switch
|
|
119
|
-
* palettes without re-rendering the `<style>` tag.
|
|
120
|
-
*
|
|
121
|
-
* The caller is responsible for setting `data-cck-theme` (and
|
|
122
|
-
* optionally `data-theme` on the same element) to match the active
|
|
123
|
-
* mode. `CrossConnectKitProvider` in `@nexus-cross/connect-kit-react` does
|
|
124
|
-
* both.
|
|
125
|
-
*/
|
|
126
|
-
export function buildThemeCssText(tokens,
|
|
127
|
-
/** Selector scope. Defaults to `:root` so the variables are globally available. */
|
|
128
|
-
scope = ':root') {
|
|
129
|
-
const light = resolveColorTokens('light', tokens?.light);
|
|
130
|
-
const dark = resolveColorTokens('dark', tokens?.dark);
|
|
131
|
-
const emit = (mode, values) => {
|
|
132
|
-
const lines = [];
|
|
133
|
-
Object.keys(values).forEach((key) => {
|
|
134
|
-
lines.push(` ${CCK_VAR[key]}: ${values[key]};`);
|
|
135
|
-
});
|
|
136
|
-
// Two selectors so it works whether the DApp tags the documentElement
|
|
137
|
-
// (`<html data-cck-theme="dark">`) or a deeper wrapper.
|
|
138
|
-
return (`${scope}[data-cck-theme="${mode}"],\n` +
|
|
139
|
-
`[data-cck-theme="${mode}"] {\n${lines.join('\n')}\n}`);
|
|
140
|
-
};
|
|
141
|
-
return `${emit('light', light)}\n${emit('dark', dark)}`;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Convenience: flatten a resolved token set to a `CSSProperties`-style
|
|
145
|
-
* inline-style object. Useful when a DApp wants to apply the palette to
|
|
146
|
-
* a single subtree rather than the documentElement.
|
|
147
|
-
*
|
|
148
|
-
* ```tsx
|
|
149
|
-
* <div style={themeTokensToInlineStyle('dark', tokens.dark)}>
|
|
150
|
-
* ...
|
|
151
|
-
* </div>
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
export function themeTokensToInlineStyle(mode, overrides) {
|
|
155
|
-
const values = resolveColorTokens(mode, overrides);
|
|
156
|
-
const out = {};
|
|
157
|
-
Object.keys(values).forEach((key) => {
|
|
158
|
-
out[CCK_VAR[key]] = values[key];
|
|
159
|
-
});
|
|
160
|
-
return out;
|
|
161
|
-
}
|
|
162
32
|
//# sourceMappingURL=tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/core/theme/tokens.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/core/theme/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAA8D,EAC9D,UAA+B;IAE/B,IAAI,UAAU,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACrE,IAAI,CAAC;YACH,OAAO,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO;gBAC9D,CAAC,CAAC,MAAM;gBACR,CAAC,CAAC,OAAO,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,kBAAkB;QACpB,CAAC;IACH,CAAC;IACD,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAClD,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;QACnE,OAAO,QAAQ,CAAC,IAAI,IAAI,MAAM,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -197,6 +197,13 @@ export interface CrossConnectKitConfig {
|
|
|
197
197
|
wallets?: WalletId[];
|
|
198
198
|
/** Enable SSR hydration support (Next.js App Router) */
|
|
199
199
|
ssr?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* fiat→crypto 결제 표면(WalletInfo Buy 버튼, `useOnRamp` 훅) 활성화 토글.
|
|
202
|
+
* default false. true이면 embedded-wallet-gateway의 `/onramp/*` 엔드포인트로
|
|
203
|
+
* 라우팅된다 — DApp 식별자는 `crossProjectId`를 `X-Project-Id` 헤더로
|
|
204
|
+
* 그대로 사용한다. 엔드포인트 URL/provider 이름/secret은 노출하지 않는다.
|
|
205
|
+
*/
|
|
206
|
+
onRampEnabled?: boolean;
|
|
200
207
|
}
|
|
201
208
|
export interface AppMetadata {
|
|
202
209
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":"AAIA;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AAC;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAMD,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export type { BalancePort } from './core/ports/BalancePort.js';
|
|
|
7
7
|
export type { OAuthPort, OAuthProvider } from './core/ports/OAuthPort.js';
|
|
8
8
|
export type { ConnectorType, WalletId, WalletDescriptor, ConnectorResult, Account, ChainBalance, WalletState, ModalView, Theme, ThemeMode, ColorOverrides, ThemeTokens, PinKeyboardMode, PinKeyboardOption, CrossConnectKitConfig, AppMetadata, NetworkConfig, Unsubscribe, } from './core/types/index.js';
|
|
9
9
|
export { ConnectionStatus } from './core/types/index.js';
|
|
10
|
-
export {
|
|
10
|
+
export { resolveThemeMode } from './core/theme/tokens.js';
|
|
11
11
|
export { formatBalance, formatWei } from './core/utils/balance.js';
|
|
12
|
+
export type { OnRampPort, OnRampProviderId, OnRampOpenParams, OnRampSession, OnRampStatus, OnRampStatusEvent, OnRampDisallowReason, OnRampEligibility, OnRampErrorCode, } from '@nexus-cross/onramp';
|
|
13
|
+
export { OnRampError, normalizeDisallowReason } from '@nexus-cross/onramp';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,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D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKnE,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { ConnectionStatus } from './core/types/index.js';
|
|
2
|
-
// Theme
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
export {
|
|
2
|
+
// Theme-mode resolver. Color/typography/layout tokens live in
|
|
3
|
+
// `@nexus-cross/crossx-design-system` (published as `--ds-*`); core only
|
|
4
|
+
// resolves which mode is active.
|
|
5
|
+
export { resolveThemeMode } from './core/theme/tokens.js';
|
|
6
6
|
// Utilities
|
|
7
7
|
export { formatBalance, formatWei } from './core/utils/balance.js';
|
|
8
|
+
export { OnRampError, normalizeDisallowReason } from '@nexus-cross/onramp';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,yEAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,8DAA8D;AAC9D,yEAAyE;AACzE,iCAAiC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAgBnE,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cross/connect-kit-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-beta.1",
|
|
4
4
|
"description": "Core domain logic for @nexus-cross/connect-kit — types, ports, utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"registry": "https://registry.npmjs.org",
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@nexus-cross/onramp": "0.1.0"
|
|
23
|
+
},
|
|
21
24
|
"license": "MIT",
|
|
22
25
|
"scripts": {
|
|
23
26
|
"build": "tsc",
|