@tetsuo-ai/marketplace-react 0.4.1 → 0.5.0
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 +56 -0
- package/README.md +93 -47
- package/dist/chunk-7NKRSPPN.js +227 -0
- package/dist/chunk-7NKRSPPN.js.map +1 -0
- package/dist/{chunk-JVXGNW3Q.js → chunk-CDDHUFMG.js} +6 -5
- package/dist/chunk-CDDHUFMG.js.map +1 -0
- package/dist/chunk-FIDFPM5A.cjs +40 -0
- package/dist/chunk-FIDFPM5A.cjs.map +1 -0
- package/dist/chunk-IJKWKY4H.cjs +1370 -0
- package/dist/chunk-IJKWKY4H.cjs.map +1 -0
- package/dist/chunk-JTSG5FGC.cjs +397 -0
- package/dist/chunk-JTSG5FGC.cjs.map +1 -0
- package/dist/chunk-ONC6L3IX.cjs +97 -0
- package/dist/chunk-ONC6L3IX.cjs.map +1 -0
- package/dist/chunk-R76EUYDI.cjs +233 -0
- package/dist/chunk-R76EUYDI.cjs.map +1 -0
- package/dist/{chunk-XLA7DARS.js → chunk-RG5JZ6JL.js} +159 -36
- package/dist/chunk-RG5JZ6JL.js.map +1 -0
- package/dist/components/index.cjs +158 -1594
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +2 -2
- package/dist/hooks/index.cjs +656 -509
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +63 -29
- package/dist/hooks/index.d.ts +63 -29
- package/dist/hooks/index.js +619 -196
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index-CmVz0OOm.d.ts → index-BAyr1ODZ.d.ts} +28 -3
- package/dist/{index-DAZzhuO4.d.cts → index-C20NVU7_.d.cts} +28 -3
- package/dist/index.cjs +284 -1833
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +64 -4
- package/dist/index.js.map +1 -1
- package/dist/signers/index.cjs +22 -161
- package/dist/signers/index.cjs.map +1 -1
- package/dist/signers/index.d.cts +16 -11
- package/dist/signers/index.d.ts +16 -11
- package/dist/signers/index.js +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/theme/agenc-tailwind-preset.cjs +134 -108
- package/dist/{types-jvISR6bc.d.cts → types-B10rndEI.d.cts} +16 -7
- package/dist/{types-jvISR6bc.d.ts → types-B10rndEI.d.ts} +16 -7
- package/dist/{useAgentTrackRecord-DPt3SfYz.d.cts → useAgentTrackRecord-Ch7gHTFj.d.cts} +1 -1
- package/dist/{useAgentTrackRecord-DPt3SfYz.d.ts → useAgentTrackRecord-Ch7gHTFj.d.ts} +1 -1
- package/package.json +6 -3
- package/src/components/HireCheckoutModal.tsx +5 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/internal.ts +178 -24
- package/src/hooks/useAgentTrackRecord.ts +5 -2
- package/src/hooks/useCompletionBond.ts +56 -21
- package/src/hooks/useDispute.ts +46 -9
- package/src/hooks/useHire.ts +113 -23
- package/src/hooks/useHumanlessHireFlow.ts +335 -115
- package/src/hooks/useListing.ts +2 -2
- package/src/hooks/useListings.ts +2 -2
- package/src/hooks/useRateHire.ts +32 -5
- package/src/hooks/useReferrerEarnings.ts +4 -1
- package/src/hooks/useSubmissionReview.ts +95 -32
- package/src/hooks/useTaskActivation.ts +51 -9
- package/src/hooks/useTaskGuarantee.ts +4 -1
- package/src/hooks/useTaskLifecycle.ts +104 -24
- package/src/hooks/useTaskStatus.ts +121 -26
- package/src/hooks/useTaskWork.ts +76 -12
- package/src/hooks/useWalletSigner.ts +11 -16
- package/src/index.ts +3 -0
- package/src/provider/AgencProvider.tsx +95 -3
- package/src/provider/referrer.ts +1 -1
- package/src/signers/README.md +13 -7
- package/src/signers/index.ts +6 -1
- package/src/signers/strings.ts +13 -1
- package/src/signers/types.ts +16 -5
- package/src/signers/wallet-account.ts +115 -29
- package/src/signers/wallet-adapter.ts +38 -4
- package/src/theme/agenc-tailwind-preset.cjs +134 -108
- package/src/types.ts +27 -1
- package/dist/chunk-JVXGNW3Q.js.map +0 -1
- package/dist/chunk-ON6XR4XO.js +0 -128
- package/dist/chunk-ON6XR4XO.js.map +0 -1
- package/dist/chunk-XLA7DARS.js.map +0 -1
package/dist/signers/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { W as WalletStandardAccountLike, S as SignerFromWalletAccountOptions, E as EmbeddedWalletConnection } from '../types-
|
|
2
|
-
export { a as EmbeddedWalletProvider,
|
|
1
|
+
import { W as WalletStandardAccountLike, S as SignerFromWalletAccountOptions, C as ChainBoundTransactionSigner, b as SolanaWalletNetwork, E as EmbeddedWalletConnection } from '../types-B10rndEI.js';
|
|
2
|
+
export { a as EmbeddedWalletProvider, c as WalletStandardSignTransaction } from '../types-B10rndEI.js';
|
|
3
3
|
import { TransactionSigner } from '@solana/kit';
|
|
4
4
|
export { TransactionSigner } from '@solana/kit';
|
|
5
5
|
|
|
6
|
+
/** Map an AgenC provider network to the Wallet Standard chain identifier. */
|
|
7
|
+
declare function walletStandardChainForNetwork(network: SolanaWalletNetwork): string;
|
|
6
8
|
/**
|
|
7
9
|
* Bridge a Wallet Standard account into a kit {@link TransactionSigner}.
|
|
8
10
|
*
|
|
@@ -12,12 +14,9 @@ export { TransactionSigner } from '@solana/kit';
|
|
|
12
14
|
* the `solana:signTransaction` feature. The returned signer is a
|
|
13
15
|
* {@link TransactionPartialSigner}, the exact shape the SDK client expects.
|
|
14
16
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* re-assembles and submits. (If a wallet rewrites the message such that the
|
|
19
|
-
* fee-payer's own prior signing is invalidated, that is a wallet contract the
|
|
20
|
-
* SDK's single-fee-payer flow already assumes won't happen for the payer.)
|
|
17
|
+
* The SDK client re-assembles and submits the ORIGINAL transaction. This bridge
|
|
18
|
+
* therefore accepts only byte-identical returned message bytes and verifies the
|
|
19
|
+
* extracted signature over them.
|
|
21
20
|
*
|
|
22
21
|
* SSR-safe: constructs no browser globals; the wallet round-trip only runs when
|
|
23
22
|
* a transaction is actually signed.
|
|
@@ -35,7 +34,7 @@ export { TransactionSigner } from '@solana/kit';
|
|
|
35
34
|
* // -> pass `signer` to <AgencProvider config={{ signer, rpcUrl }}>.
|
|
36
35
|
* ```
|
|
37
36
|
*/
|
|
38
|
-
declare function signerFromWalletAccount(account: WalletStandardAccountLike, options?: SignerFromWalletAccountOptions):
|
|
37
|
+
declare function signerFromWalletAccount(account: WalletStandardAccountLike, options?: SignerFromWalletAccountOptions): ChainBoundTransactionSigner;
|
|
39
38
|
|
|
40
39
|
/**
|
|
41
40
|
* The web3.js v1 `VersionedTransaction` surface this shim needs: a static
|
|
@@ -125,7 +124,13 @@ declare function signerFromEmbeddedWallet(connection: EmbeddedWalletConnection):
|
|
|
125
124
|
/** English `signer.*` strings used by the wallet/embedded adapters. */
|
|
126
125
|
declare const EN_SIGNER_STRINGS: {
|
|
127
126
|
readonly "signer.walletNoSignFeature": "Wallet account {address} does not expose a solana:signTransaction feature. Pass options.signTransaction explicitly, or use a Wallet Standard account that supports transaction signing.";
|
|
128
|
-
readonly "signer.walletNoSignature": "The wallet returned no signature for account {address}. The wallet may have rejected
|
|
127
|
+
readonly "signer.walletNoSignature": "The wallet returned no signature for account {address}. The wallet may have rejected the signing request.";
|
|
128
|
+
readonly "signer.walletResponseCount": "Wallet returned {got} signed transactions; expected {expected} ordered outputs, one per input.";
|
|
129
|
+
readonly "signer.walletModifiedTransaction": "Wallet modified the transaction message for account {address}. AgenC cannot attach a signature over different bytes to the original transaction.";
|
|
130
|
+
readonly "signer.walletInvalidSignature": "Wallet returned an invalid signature for account {address} over the requested transaction message.";
|
|
131
|
+
readonly "signer.walletChainRequired": "Wallet account {address} exposes {count} Solana chains. Select exactly one with options.chain or options.network.";
|
|
132
|
+
readonly "signer.walletChainUnsupported": "Wallet account {address} does not support requested chain {chain}.";
|
|
133
|
+
readonly "signer.walletChainNetworkMismatch": "Requested chain {chain} does not match options.network {network} ({expected}).";
|
|
129
134
|
readonly "signer.embeddedSignatureCount": "Embedded wallet returned {got} signatures for {expected} transactions; expected one per transaction.";
|
|
130
135
|
readonly "signer.walletAdapterDisconnected": "The wallet adapter is not connected (publicKey is null). Connect the wallet before creating a signer.";
|
|
131
136
|
readonly "signer.walletAdapterNoSign": "The wallet adapter does not expose signTransaction. Use a wallet that supports transaction signing, or migrate to the Wallet Standard path (signerFromWalletAccount).";
|
|
@@ -133,4 +138,4 @@ declare const EN_SIGNER_STRINGS: {
|
|
|
133
138
|
/** A `signer.*` message id. */
|
|
134
139
|
type SignerStringId = keyof typeof EN_SIGNER_STRINGS;
|
|
135
140
|
|
|
136
|
-
export { EN_SIGNER_STRINGS, EmbeddedWalletConnection, SignerFromWalletAccountOptions, type SignerFromWalletAdapterOptions, type SignerStringId, type VersionedTransactionCtor, type VersionedTransactionLike, type WalletAdapterLike, WalletStandardAccountLike, signerFromEmbeddedWallet, signerFromWalletAccount, signerFromWalletAdapter };
|
|
141
|
+
export { ChainBoundTransactionSigner, EN_SIGNER_STRINGS, EmbeddedWalletConnection, SignerFromWalletAccountOptions, type SignerFromWalletAdapterOptions, type SignerStringId, SolanaWalletNetwork, type VersionedTransactionCtor, type VersionedTransactionLike, type WalletAdapterLike, WalletStandardAccountLike, signerFromEmbeddedWallet, signerFromWalletAccount, signerFromWalletAdapter, walletStandardChainForNetwork };
|
package/dist/signers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { EN_SIGNER_STRINGS, signerFromEmbeddedWallet, signerFromWalletAccount, signerFromWalletAdapter } from '../chunk-
|
|
1
|
+
export { EN_SIGNER_STRINGS, signerFromEmbeddedWallet, signerFromWalletAccount, signerFromWalletAdapter, walletStandardChainForNetwork } from '../chunk-7NKRSPPN.js';
|
|
2
2
|
import '../chunk-H6PJIDQR.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/testing/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyPairSigner } from '@solana/kit';
|
|
2
|
-
import { E as EmbeddedWalletConnection, a as EmbeddedWalletProvider } from '../types-
|
|
2
|
+
import { E as EmbeddedWalletConnection, a as EmbeddedWalletProvider } from '../types-B10rndEI.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Local-keypair MOCK embedded-wallet adapter (PLAN_2 D-1 test seam).
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyPairSigner } from '@solana/kit';
|
|
2
|
-
import { E as EmbeddedWalletConnection, a as EmbeddedWalletProvider } from '../types-
|
|
2
|
+
import { E as EmbeddedWalletConnection, a as EmbeddedWalletProvider } from '../types-B10rndEI.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Local-keypair MOCK embedded-wallet adapter (PLAN_2 D-1 test seam).
|
|
@@ -8,15 +8,19 @@
|
|
|
8
8
|
* Reason: cross-repo imports are impossible in CI; consumers read the
|
|
9
9
|
* AgenC Tailwind preset FROM this package via
|
|
10
10
|
* "@tetsuo-ai/marketplace-react/tailwind-preset".
|
|
11
|
+
* Local adaptation: export Tailwind's dependency-free plugin descriptor shape
|
|
12
|
+
* directly so importing this optional preset never requires
|
|
13
|
+
* Tailwind from the React package itself.
|
|
11
14
|
* Resync: copy tokens/tailwind.config.cjs from agenc-ui-design-skill
|
|
12
|
-
* HEAD
|
|
15
|
+
* HEAD, preserve the local plugin-descriptor adaptation, and
|
|
16
|
+
* update the commit line above.
|
|
13
17
|
* ============================================================================
|
|
14
18
|
*/
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* Tetsuo.ai / AgenC Tailwind config fragment.
|
|
18
22
|
*
|
|
19
|
-
* Drop-in extension for an existing Tailwind v3
|
|
23
|
+
* Drop-in extension for an existing Tailwind v3 project (works alongside
|
|
20
24
|
* shadcn/ui's default config). Colors are sRGB hex.
|
|
21
25
|
*
|
|
22
26
|
* Usage in your tailwind.config.{js,cjs,ts}:
|
|
@@ -33,142 +37,164 @@
|
|
|
33
37
|
* };
|
|
34
38
|
*/
|
|
35
39
|
|
|
36
|
-
const plugin = require('tailwindcss/plugin');
|
|
37
|
-
|
|
38
40
|
const colors = {
|
|
39
41
|
// AgenC neon (canonical product palette)
|
|
40
42
|
agenc: {
|
|
41
|
-
void:
|
|
42
|
-
surface:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
violet:
|
|
46
|
-
magenta:
|
|
47
|
-
orange:
|
|
48
|
-
cyan:
|
|
49
|
-
grid:
|
|
50
|
-
text:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
success:
|
|
54
|
-
warning:
|
|
55
|
-
danger:
|
|
56
|
-
border:
|
|
57
|
-
|
|
43
|
+
void: "#0A0612",
|
|
44
|
+
surface: "#16102A",
|
|
45
|
+
"surface-2": "#221638",
|
|
46
|
+
"surface-3": "#2E1A4A",
|
|
47
|
+
violet: "#7B3FFF",
|
|
48
|
+
magenta: "#FF2E93",
|
|
49
|
+
orange: "#FF6B1A",
|
|
50
|
+
cyan: "#48C8EF",
|
|
51
|
+
grid: "#3A1F66",
|
|
52
|
+
text: "#F5F0FF",
|
|
53
|
+
"text-muted": "#B8A8D9",
|
|
54
|
+
"text-dim": "#6E5C8F",
|
|
55
|
+
success: "#3FFFA0",
|
|
56
|
+
warning: "#FFC53F",
|
|
57
|
+
danger: "#FF3D3D",
|
|
58
|
+
border: "#2E1A4A",
|
|
59
|
+
"border-strong": "#4A2E7A",
|
|
58
60
|
},
|
|
59
61
|
// Tetsuo.ai noir (marketing / community)
|
|
60
62
|
tetsuo: {
|
|
61
|
-
noir:
|
|
62
|
-
|
|
63
|
-
paper:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
blood:
|
|
67
|
-
cyan:
|
|
68
|
-
magenta:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
noir: "#0A0A0A",
|
|
64
|
+
"noir-2": "#141414",
|
|
65
|
+
paper: "#F8F5E9",
|
|
66
|
+
"akira-red": "#E30426",
|
|
67
|
+
"akira-red-bright": "#FA1232",
|
|
68
|
+
blood: "#7A0000",
|
|
69
|
+
cyan: "#48C8EF",
|
|
70
|
+
magenta: "#D01D7D",
|
|
71
|
+
"synth-pink": "#EF5EC2",
|
|
72
|
+
"synth-pink-soft": "#F3A8CE",
|
|
73
|
+
"synth-purple": "#7B3FFF",
|
|
74
|
+
"synth-eggplant": "#441535",
|
|
73
75
|
},
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
const backgroundImage = {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
"agenc-gradient":
|
|
80
|
+
"linear-gradient(135deg, #7B3FFF 0%, #FF2E93 60%, #FF6B1A 100%)",
|
|
81
|
+
"agenc-gradient-cool": "linear-gradient(135deg, #48C8EF 0%, #7B3FFF 100%)",
|
|
82
|
+
"agenc-gradient-text":
|
|
83
|
+
"linear-gradient(90deg, #7B3FFF 0%, #FF2E93 50%, #FF6B1A 100%)",
|
|
84
|
+
"tetsuo-gradient-glitch": "linear-gradient(90deg, #48C8EF 0%, #D01D7D 100%)",
|
|
85
|
+
"tetsuo-gradient-synth":
|
|
86
|
+
"linear-gradient(135deg, #441535 0%, #D01D7D 50%, #EF5EC2 100%)",
|
|
83
87
|
// Synthwave grid floor — pair with a perspective transform on a child
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
"agenc-grid-floor":
|
|
89
|
+
"linear-gradient(transparent 95%, #3A1F66 95%), linear-gradient(90deg, transparent 95%, #3A1F66 95%)",
|
|
86
90
|
};
|
|
87
91
|
|
|
88
92
|
const boxShadow = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
"glow-violet":
|
|
94
|
+
"0 0 24px rgba(123, 63, 255, 0.4), 0 0 48px rgba(123, 63, 255, 0.2)",
|
|
95
|
+
"glow-magenta":
|
|
96
|
+
"0 0 24px rgba(255, 46, 147, 0.4), 0 0 48px rgba(255, 46, 147, 0.2)",
|
|
97
|
+
"glow-cyan":
|
|
98
|
+
"0 0 24px rgba(72, 200, 239, 0.4), 0 0 48px rgba(72, 200, 239, 0.2)",
|
|
99
|
+
"glow-orange":
|
|
100
|
+
"0 0 24px rgba(255, 107, 26, 0.4), 0 0 48px rgba(255, 107, 26, 0.2)",
|
|
101
|
+
"glow-akira":
|
|
102
|
+
"0 0 24px rgba(227, 4, 38, 0.5), 0 0 64px rgba(227, 4, 38, 0.25)",
|
|
94
103
|
};
|
|
95
104
|
|
|
96
105
|
const fontFamily = {
|
|
97
106
|
// Display: jagged / glitch / cyberpunk. Pick one and load via @font-face.
|
|
98
|
-
|
|
107
|
+
"agenc-display": [
|
|
108
|
+
'"Audiowide"',
|
|
109
|
+
'"Major Mono Display"',
|
|
110
|
+
"system-ui",
|
|
111
|
+
"sans-serif",
|
|
112
|
+
],
|
|
99
113
|
// Body: clean geometric sans
|
|
100
|
-
|
|
114
|
+
"agenc-body": ['"Geist"', '"Inter"', "system-ui", "sans-serif"],
|
|
101
115
|
// Mono: for HUD / status / readouts
|
|
102
|
-
|
|
116
|
+
"agenc-mono": [
|
|
117
|
+
'"JetBrains Mono"',
|
|
118
|
+
'"IBM Plex Mono"',
|
|
119
|
+
"ui-monospace",
|
|
120
|
+
"monospace",
|
|
121
|
+
],
|
|
103
122
|
};
|
|
104
123
|
|
|
105
124
|
const fontSize = {
|
|
106
125
|
// Display scale skews dramatic — these are AgenC-specific overrides.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
126
|
+
"display-xs": ["2rem", { lineHeight: "1.05", letterSpacing: "-0.02em" }],
|
|
127
|
+
"display-sm": ["2.5rem", { lineHeight: "1.05", letterSpacing: "-0.02em" }],
|
|
128
|
+
"display-md": ["3.5rem", { lineHeight: "1.0", letterSpacing: "-0.03em" }],
|
|
129
|
+
"display-lg": ["5rem", { lineHeight: "0.95", letterSpacing: "-0.04em" }],
|
|
130
|
+
"display-xl": ["7rem", { lineHeight: "0.9", letterSpacing: "-0.04em" }],
|
|
112
131
|
};
|
|
113
132
|
|
|
114
133
|
// Plugin: utilities that aren't trivially expressible as theme extensions.
|
|
115
|
-
const tetsuoPlugin =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
textShadow: '3px 0 0 #48C8EF, -3px 0 0 #D01D7D, 0 0 8px rgba(255,255,255,0.15)',
|
|
127
|
-
},
|
|
128
|
-
// Neon-stroked outline text
|
|
129
|
-
'.text-neon-stroke': {
|
|
130
|
-
color: 'transparent',
|
|
131
|
-
WebkitTextStroke: '1.5px #FF2E93',
|
|
132
|
-
textShadow: '0 0 12px rgba(255, 46, 147, 0.6)',
|
|
133
|
-
},
|
|
134
|
-
// Scanline overlay — apply to a positioned container.
|
|
135
|
-
'.bg-scanlines': {
|
|
136
|
-
backgroundImage:
|
|
137
|
-
'repeating-linear-gradient(0deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.18) 2px, rgba(0,0,0,0.18) 3px)',
|
|
138
|
-
},
|
|
139
|
-
// CRT vignette
|
|
140
|
-
'.bg-vignette': {
|
|
141
|
-
backgroundImage:
|
|
142
|
-
'radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.55) 100%)',
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
addComponents({
|
|
147
|
-
// HUD frame: corner brackets only, transparent middle.
|
|
148
|
-
'.hud-frame': {
|
|
149
|
-
position: 'relative',
|
|
150
|
-
padding: '24px',
|
|
151
|
-
'&::before, &::after': {
|
|
152
|
-
content: '""',
|
|
153
|
-
position: 'absolute',
|
|
154
|
-
width: '24px',
|
|
155
|
-
height: '24px',
|
|
156
|
-
borderColor: '#7B3FFF',
|
|
157
|
-
borderStyle: 'solid',
|
|
134
|
+
const tetsuoPlugin = {
|
|
135
|
+
// Tailwind v3's `plugin(handler)` helper returns exactly this
|
|
136
|
+
// `{ handler, config }` descriptor. Keeping the descriptor local prevents an
|
|
137
|
+
// optional preset export from creating a runtime dependency on Tailwind.
|
|
138
|
+
handler({ addUtilities, addComponents }) {
|
|
139
|
+
addUtilities({
|
|
140
|
+
// Chromatic aberration glitch text — drop on any text element.
|
|
141
|
+
".text-glitch": {
|
|
142
|
+
position: "relative",
|
|
143
|
+
color: "#F8F5E9",
|
|
144
|
+
textShadow: "2px 0 0 #48C8EF, -2px 0 0 #D01D7D",
|
|
158
145
|
},
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
146
|
+
".text-glitch-strong": {
|
|
147
|
+
position: "relative",
|
|
148
|
+
color: "#F8F5E9",
|
|
149
|
+
textShadow:
|
|
150
|
+
"3px 0 0 #48C8EF, -3px 0 0 #D01D7D, 0 0 8px rgba(255,255,255,0.15)",
|
|
163
151
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
152
|
+
// Neon-stroked outline text
|
|
153
|
+
".text-neon-stroke": {
|
|
154
|
+
color: "transparent",
|
|
155
|
+
WebkitTextStroke: "1.5px #FF2E93",
|
|
156
|
+
textShadow: "0 0 12px rgba(255, 46, 147, 0.6)",
|
|
168
157
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
158
|
+
// Scanline overlay — apply to a positioned container.
|
|
159
|
+
".bg-scanlines": {
|
|
160
|
+
backgroundImage:
|
|
161
|
+
"repeating-linear-gradient(0deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.18) 2px, rgba(0,0,0,0.18) 3px)",
|
|
162
|
+
},
|
|
163
|
+
// CRT vignette
|
|
164
|
+
".bg-vignette": {
|
|
165
|
+
backgroundImage:
|
|
166
|
+
"radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.55) 100%)",
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
addComponents({
|
|
171
|
+
// HUD frame: corner brackets only, transparent middle.
|
|
172
|
+
".hud-frame": {
|
|
173
|
+
position: "relative",
|
|
174
|
+
padding: "24px",
|
|
175
|
+
"&::before, &::after": {
|
|
176
|
+
content: '""',
|
|
177
|
+
position: "absolute",
|
|
178
|
+
width: "24px",
|
|
179
|
+
height: "24px",
|
|
180
|
+
borderColor: "#7B3FFF",
|
|
181
|
+
borderStyle: "solid",
|
|
182
|
+
},
|
|
183
|
+
"&::before": {
|
|
184
|
+
top: "0",
|
|
185
|
+
left: "0",
|
|
186
|
+
borderWidth: "2px 0 0 2px",
|
|
187
|
+
},
|
|
188
|
+
"&::after": {
|
|
189
|
+
bottom: "0",
|
|
190
|
+
right: "0",
|
|
191
|
+
borderWidth: "0 2px 2px 0",
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
config: undefined,
|
|
197
|
+
};
|
|
172
198
|
|
|
173
199
|
module.exports = {
|
|
174
200
|
theme: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction, SignatureBytes } from '@solana/kit';
|
|
1
|
+
import { TransactionSigner, Transaction, SignatureBytes } from '@solana/kit';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Signer-adapter contracts for `@tetsuo-ai/marketplace-react`.
|
|
@@ -33,8 +33,8 @@ import { Transaction, SignatureBytes } from '@solana/kit';
|
|
|
33
33
|
*
|
|
34
34
|
* Given one or more `{ transaction }` wire-format inputs, it returns one
|
|
35
35
|
* `{ signedTransaction }` output per input (a fully serialized, signed
|
|
36
|
-
* transaction
|
|
37
|
-
*
|
|
36
|
+
* transaction. The bridge rejects a returned message that differs from the
|
|
37
|
+
* requested message because the SDK submits the original transaction bytes.
|
|
38
38
|
*/
|
|
39
39
|
type WalletStandardSignTransaction = (...inputs: ReadonlyArray<{
|
|
40
40
|
/** Serialized transaction (wire format) to sign. */
|
|
@@ -61,21 +61,30 @@ type WalletStandardSignTransaction = (...inputs: ReadonlyArray<{
|
|
|
61
61
|
interface WalletStandardAccountLike {
|
|
62
62
|
/** Base58 account address (becomes the signer's `address`). */
|
|
63
63
|
readonly address: string;
|
|
64
|
-
/** CAIP-2 chains this account supports (used to
|
|
64
|
+
/** CAIP-2 chains this account supports (used to validate chain selection). */
|
|
65
65
|
readonly chains?: readonly string[];
|
|
66
66
|
/** Raw Wallet Standard feature bag, when resolvable off the account. */
|
|
67
67
|
readonly features?: Readonly<Record<string, {
|
|
68
68
|
readonly signTransaction?: WalletStandardSignTransaction;
|
|
69
69
|
} | unknown>>;
|
|
70
70
|
}
|
|
71
|
+
/** Provider networks that map to Wallet Standard Solana chain identifiers. */
|
|
72
|
+
type SolanaWalletNetwork = "localnet" | "devnet" | "mainnet";
|
|
73
|
+
/** A kit signer whose Wallet Standard chain can be validated by a provider. */
|
|
74
|
+
type ChainBoundTransactionSigner = TransactionSigner & {
|
|
75
|
+
readonly chain: string;
|
|
76
|
+
};
|
|
71
77
|
/** Options for {@link signerFromWalletAccount}. */
|
|
72
78
|
interface SignerFromWalletAccountOptions {
|
|
73
79
|
/**
|
|
74
80
|
* CAIP-2 chain id forwarded to the wallet on each sign (e.g.
|
|
75
|
-
* `"solana:devnet"`, `"solana:mainnet"`).
|
|
76
|
-
* `solana:*` chain
|
|
81
|
+
* `"solana:devnet"`, `"solana:mainnet"`). When omitted, `network` maps to a
|
|
82
|
+
* chain; otherwise the account must expose exactly one `solana:*` chain.
|
|
83
|
+
* Ambiguous or unsupported selections fail closed.
|
|
77
84
|
*/
|
|
78
85
|
chain?: string;
|
|
86
|
+
/** Provider network to bind to a Wallet Standard chain. */
|
|
87
|
+
network?: SolanaWalletNetwork;
|
|
79
88
|
/**
|
|
80
89
|
* Explicit `solana:signTransaction` feature method. Overrides any feature
|
|
81
90
|
* resolved off `account.features`. This is the seam tests and non-Wallet-
|
|
@@ -132,4 +141,4 @@ interface EmbeddedWalletConnection {
|
|
|
132
141
|
signTransactions(transactions: readonly Transaction[]): Promise<readonly SignatureBytes[]>;
|
|
133
142
|
}
|
|
134
143
|
|
|
135
|
-
export type { EmbeddedWalletConnection as E, SignerFromWalletAccountOptions as S, WalletStandardAccountLike as W, EmbeddedWalletProvider as a,
|
|
144
|
+
export type { ChainBoundTransactionSigner as C, EmbeddedWalletConnection as E, SignerFromWalletAccountOptions as S, WalletStandardAccountLike as W, EmbeddedWalletProvider as a, SolanaWalletNetwork as b, WalletStandardSignTransaction as c };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction, SignatureBytes } from '@solana/kit';
|
|
1
|
+
import { TransactionSigner, Transaction, SignatureBytes } from '@solana/kit';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Signer-adapter contracts for `@tetsuo-ai/marketplace-react`.
|
|
@@ -33,8 +33,8 @@ import { Transaction, SignatureBytes } from '@solana/kit';
|
|
|
33
33
|
*
|
|
34
34
|
* Given one or more `{ transaction }` wire-format inputs, it returns one
|
|
35
35
|
* `{ signedTransaction }` output per input (a fully serialized, signed
|
|
36
|
-
* transaction
|
|
37
|
-
*
|
|
36
|
+
* transaction. The bridge rejects a returned message that differs from the
|
|
37
|
+
* requested message because the SDK submits the original transaction bytes.
|
|
38
38
|
*/
|
|
39
39
|
type WalletStandardSignTransaction = (...inputs: ReadonlyArray<{
|
|
40
40
|
/** Serialized transaction (wire format) to sign. */
|
|
@@ -61,21 +61,30 @@ type WalletStandardSignTransaction = (...inputs: ReadonlyArray<{
|
|
|
61
61
|
interface WalletStandardAccountLike {
|
|
62
62
|
/** Base58 account address (becomes the signer's `address`). */
|
|
63
63
|
readonly address: string;
|
|
64
|
-
/** CAIP-2 chains this account supports (used to
|
|
64
|
+
/** CAIP-2 chains this account supports (used to validate chain selection). */
|
|
65
65
|
readonly chains?: readonly string[];
|
|
66
66
|
/** Raw Wallet Standard feature bag, when resolvable off the account. */
|
|
67
67
|
readonly features?: Readonly<Record<string, {
|
|
68
68
|
readonly signTransaction?: WalletStandardSignTransaction;
|
|
69
69
|
} | unknown>>;
|
|
70
70
|
}
|
|
71
|
+
/** Provider networks that map to Wallet Standard Solana chain identifiers. */
|
|
72
|
+
type SolanaWalletNetwork = "localnet" | "devnet" | "mainnet";
|
|
73
|
+
/** A kit signer whose Wallet Standard chain can be validated by a provider. */
|
|
74
|
+
type ChainBoundTransactionSigner = TransactionSigner & {
|
|
75
|
+
readonly chain: string;
|
|
76
|
+
};
|
|
71
77
|
/** Options for {@link signerFromWalletAccount}. */
|
|
72
78
|
interface SignerFromWalletAccountOptions {
|
|
73
79
|
/**
|
|
74
80
|
* CAIP-2 chain id forwarded to the wallet on each sign (e.g.
|
|
75
|
-
* `"solana:devnet"`, `"solana:mainnet"`).
|
|
76
|
-
* `solana:*` chain
|
|
81
|
+
* `"solana:devnet"`, `"solana:mainnet"`). When omitted, `network` maps to a
|
|
82
|
+
* chain; otherwise the account must expose exactly one `solana:*` chain.
|
|
83
|
+
* Ambiguous or unsupported selections fail closed.
|
|
77
84
|
*/
|
|
78
85
|
chain?: string;
|
|
86
|
+
/** Provider network to bind to a Wallet Standard chain. */
|
|
87
|
+
network?: SolanaWalletNetwork;
|
|
79
88
|
/**
|
|
80
89
|
* Explicit `solana:signTransaction` feature method. Overrides any feature
|
|
81
90
|
* resolved off `account.features`. This is the seam tests and non-Wallet-
|
|
@@ -132,4 +141,4 @@ interface EmbeddedWalletConnection {
|
|
|
132
141
|
signTransactions(transactions: readonly Transaction[]): Promise<readonly SignatureBytes[]>;
|
|
133
142
|
}
|
|
134
143
|
|
|
135
|
-
export type { EmbeddedWalletConnection as E, SignerFromWalletAccountOptions as S, WalletStandardAccountLike as W, EmbeddedWalletProvider as a,
|
|
144
|
+
export type { ChainBoundTransactionSigner as C, EmbeddedWalletConnection as E, SignerFromWalletAccountOptions as S, WalletStandardAccountLike as W, EmbeddedWalletProvider as a, SolanaWalletNetwork as b, WalletStandardSignTransaction as c };
|
|
@@ -113,7 +113,7 @@ interface UseHireResult {
|
|
|
113
113
|
* const { hire, status, taskPda, error } = useHire();
|
|
114
114
|
* await hire({
|
|
115
115
|
* listing, creatorAgent, taskId, expectedPrice: price, expectedVersion: 1n,
|
|
116
|
-
* listingSpecHash,
|
|
116
|
+
* listingSpecHash, taskJobSpecHash,
|
|
117
117
|
* });
|
|
118
118
|
* ```
|
|
119
119
|
*/
|
|
@@ -113,7 +113,7 @@ interface UseHireResult {
|
|
|
113
113
|
* const { hire, status, taskPda, error } = useHire();
|
|
114
114
|
* await hire({
|
|
115
115
|
* listing, creatorAgent, taskId, expectedPrice: price, expectedVersion: 1n,
|
|
116
|
-
* listingSpecHash,
|
|
116
|
+
* listingSpecHash, taskJobSpecHash,
|
|
117
117
|
* });
|
|
118
118
|
* ```
|
|
119
119
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tetsuo-ai/marketplace-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Headless React hooks + themable components for the AgenC marketplace — provider, indexer-first read transport, and live referrer config",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"build": "tsup",
|
|
80
80
|
"typecheck": "tsc --noEmit",
|
|
81
81
|
"test": "vitest run",
|
|
82
|
+
"test:localnet": "AGENC_REACT_LOCALNET_E2E=1 vitest run test/playwright/checkout.e2e.test.tsx",
|
|
82
83
|
"test:watch": "vitest",
|
|
83
84
|
"prepack": "npm run build",
|
|
84
85
|
"ladle": "ladle serve",
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"peerDependencies": {
|
|
88
89
|
"@solana/kit": "^6.9.0",
|
|
89
90
|
"@solana/program-client-core": "^6.4.0",
|
|
90
|
-
"@tetsuo-ai/marketplace-sdk": "^0.
|
|
91
|
+
"@tetsuo-ai/marketplace-sdk": "^0.12.0",
|
|
91
92
|
"react": ">=18"
|
|
92
93
|
},
|
|
93
94
|
"dependencies": {
|
|
@@ -104,8 +105,10 @@
|
|
|
104
105
|
"@types/react-dom": "^18.3.1",
|
|
105
106
|
"axe-core": "^4.12.0",
|
|
106
107
|
"jsdom": "^25.0.1",
|
|
108
|
+
"postcss": "8.5.20",
|
|
107
109
|
"react": "^18.3.1",
|
|
108
110
|
"react-dom": "^18.3.1",
|
|
111
|
+
"tailwindcss": "3.4.19",
|
|
109
112
|
"tsup": "8.5.1",
|
|
110
113
|
"typescript": "5.9.3",
|
|
111
114
|
"vitest": "4.1.8",
|
|
@@ -135,6 +138,6 @@
|
|
|
135
138
|
],
|
|
136
139
|
"author": "Tetsuo AI",
|
|
137
140
|
"engines": {
|
|
138
|
-
"node": ">=
|
|
141
|
+
"node": ">=22.23.1"
|
|
139
142
|
}
|
|
140
143
|
}
|
|
@@ -152,10 +152,13 @@ export function HireCheckoutModal({
|
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
if (result && typeof (result as Promise<void>).then === "function") {
|
|
155
|
-
|
|
155
|
+
const releaseLatch = () => {
|
|
156
156
|
submittingRef.current = false;
|
|
157
157
|
setSubmitting(false);
|
|
158
|
-
}
|
|
158
|
+
};
|
|
159
|
+
// `finally()` creates a second rejected promise when onConfirm rejects.
|
|
160
|
+
// Both handlers below return void, so this discarded chain fulfills.
|
|
161
|
+
void Promise.resolve(result).then(releaseLatch, releaseLatch);
|
|
159
162
|
}
|
|
160
163
|
// For a synchronous (void) onConfirm the parent drives `status`; the effect
|
|
161
164
|
// above clears the latch when it reaches a terminal/closed state.
|