@meddleware/token-deployer-ui 0.0.9 → 0.0.11

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.
Files changed (93) hide show
  1. package/LICENSE +11 -118
  2. package/README.md +11 -10
  3. package/package.json +22 -10
  4. package/src/App.vue +1 -1
  5. package/src/component-styles.css +39 -57
  6. package/src/components/GithubPush.vue +2 -2
  7. package/src/components/IconPicker.vue +44 -75
  8. package/src/components/LicensePicker.vue +4 -3
  9. package/src/components/ResultPanel.vue +2 -2
  10. package/src/components/ReviewPanel.vue +11 -3
  11. package/src/components/TokenDeployerView.vue +52 -48
  12. package/src/components/WalletBar.vue +12 -1
  13. package/src/components/WalrusBlobBrowser.vue +4 -4
  14. package/src/composables/useWalrusRelay.ts +1 -2
  15. package/src/config.ts +29 -30
  16. package/src/lib/buildPublishTx.ts +0 -10
  17. package/src/lib/deploy.ts +45 -3
  18. package/src/lib/deployExecutor.ts +19 -44
  19. package/src/lib/generatePackage.ts +12 -12
  20. package/src/lib/licenses.ts +4 -3
  21. package/src/lib/listMyTokens.ts +7 -11
  22. package/src/lib/readClient.ts +15 -7
  23. package/src/lib/template.ts +3 -0
  24. package/src/lib/types.ts +1 -1
  25. package/src/lib/walrus-constants.ts +2 -2
  26. package/src/main.ts +42 -61
  27. package/src/styles.css +22 -0
  28. package/src/template-src/files.json +7 -7
  29. package/.claude/move-language-reference/SKILL.md +0 -445
  30. package/.claude/skills/move-language-reference/SKILL.md +0 -445
  31. package/.claude/skills/sui-move-bootcamp/SKILL.md +0 -128
  32. package/.claude/sui-move-bootcamp/SKILL.md +0 -128
  33. package/.editorconfig +0 -8
  34. package/.env.example +0 -75
  35. package/.gitattributes +0 -1
  36. package/.github/workflows/docker-publish.yml +0 -348
  37. package/.github/workflows/e2e-realchain.yml +0 -64
  38. package/.github/workflows/node-ci.yml +0 -43
  39. package/.github/workflows/npm-publish.yml +0 -83
  40. package/.htmlvalidate.mjs +0 -30
  41. package/.oxfmtrc.json +0 -5
  42. package/.oxlintrc.json +0 -10
  43. package/.vscode/extensions.json +0 -9
  44. package/AGENTS.md +0 -39
  45. package/CLAUDE.md +0 -159
  46. package/Dockerfile +0 -96
  47. package/eslint.config.ts +0 -63
  48. package/index.html +0 -13
  49. package/playwright.config.ts +0 -30
  50. package/postcss.config.js +0 -8
  51. package/public/CNAME +0 -1
  52. package/public/_headers +0 -12
  53. package/public/_redirects +0 -1
  54. package/public/favicon.ico +0 -0
  55. package/public/favicon.svg +0 -5
  56. package/public/og-image.png +0 -0
  57. package/public/robots.txt +0 -3
  58. package/public/sitemap.xml +0 -8
  59. package/scripts/e2e-browser.mjs +0 -15
  60. package/scripts/e2e-deploy.mjs +0 -222
  61. package/scripts/e2e-localnet.mjs +0 -65
  62. package/scripts/e2e-walrus-browser.mjs +0 -115
  63. package/scripts/gen-og-image.mjs +0 -31
  64. package/scripts/publish-localnet.mjs +0 -55
  65. package/scripts/regen-template.sh +0 -45
  66. package/scripts/sync-template-src.sh +0 -36
  67. package/scripts/verify-bytecode.mjs +0 -49
  68. package/src/__tests__/App.spec.js +0 -11
  69. package/src/composables/useAccessGate.ts +0 -127
  70. package/src/lib/accessGate.ts +0 -141
  71. package/src/lib/walrus.ts +0 -144
  72. package/stylelint.config.js +0 -33
  73. package/test-results/.last-run.json +0 -4
  74. package/tests/accessGate.test.ts +0 -108
  75. package/tests/buildPublishTx.test.ts +0 -243
  76. package/tests/deploy.test.ts +0 -81
  77. package/tests/errors.test.ts +0 -32
  78. package/tests/generatePackage.test.ts +0 -182
  79. package/tests/github.test.ts +0 -61
  80. package/tests/licenses.test.ts +0 -78
  81. package/tests/template.test.ts +0 -93
  82. package/tests/templateArtifact.test.ts +0 -61
  83. package/tests/templateParity.test.ts +0 -55
  84. package/tests/useAccessGate.test.ts +0 -101
  85. package/tests/useWallet.test.ts +0 -74
  86. package/tests/useWalrusRelayGating.test.ts +0 -30
  87. package/tests/validation.test.ts +0 -117
  88. package/tests/walrusUpload.test.ts +0 -93
  89. package/tests/walrus_url_patch.test.ts +0 -26
  90. package/tsconfig.json +0 -19
  91. package/typedoc.json +0 -34
  92. package/vite.config.ts +0 -65
  93. package/vitest.config.ts +0 -10
package/LICENSE CHANGED
@@ -1,121 +1,14 @@
1
- Creative Commons Legal Code
1
+ BSD Zero Clause License
2
2
 
3
- CC0 1.0 Universal
3
+ Copyright (c) 2026 MeddleWare
4
4
 
5
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
- LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
- ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
- INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
- REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
- PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
- THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
- HEREUNDER.
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
13
7
 
14
- Statement of Purpose
15
-
16
- The laws of most jurisdictions throughout the world automatically confer
17
- exclusive Copyright and Related Rights (defined below) upon the creator
18
- and subsequent owner(s) (each and all, an "owner") of an original work of
19
- authorship and/or a database (each, a "Work").
20
-
21
- Certain owners wish to permanently relinquish those rights to a Work for
22
- the purpose of contributing to a commons of creative, cultural and
23
- scientific works ("Commons") that the public can reliably and without fear
24
- of later claims of infringement build upon, modify, incorporate in other
25
- works, reuse and redistribute as freely as possible in any form whatsoever
26
- and for any purposes, including without limitation commercial purposes.
27
- These owners may contribute to the Commons to promote the ideal of a free
28
- culture and the further production of creative, cultural and scientific
29
- works, or to gain reputation or greater distribution for their Work in
30
- part through the use and efforts of others.
31
-
32
- For these and/or other purposes and motivations, and without any
33
- expectation of additional consideration or compensation, the person
34
- associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
- is an owner of Copyright and Related Rights in the Work, voluntarily
36
- elects to apply CC0 to the Work and publicly distribute the Work under its
37
- terms, with knowledge of his or her Copyright and Related Rights in the
38
- Work and the meaning and intended legal effect of CC0 on those rights.
39
-
40
- 1. Copyright and Related Rights. A Work made available under CC0 may be
41
- protected by copyright and related or neighboring rights ("Copyright and
42
- Related Rights"). Copyright and Related Rights include, but are not
43
- limited to, the following:
44
-
45
- i. the right to reproduce, adapt, distribute, perform, display,
46
- communicate, and translate a Work;
47
- ii. moral rights retained by the original author(s) and/or performer(s);
48
- iii. publicity and privacy rights pertaining to a person's image or
49
- likeness depicted in a Work;
50
- iv. rights protecting against unfair competition in regards to a Work,
51
- subject to the limitations in paragraph 4(a), below;
52
- v. rights protecting the extraction, dissemination, use and reuse of data
53
- in a Work;
54
- vi. database rights (such as those arising under Directive 96/9/EC of the
55
- European Parliament and of the Council of 11 March 1996 on the legal
56
- protection of databases, and under any national implementation
57
- thereof, including any amended or successor version of such
58
- directive); and
59
- vii. other similar, equivalent or corresponding rights throughout the
60
- world based on applicable law or treaty, and any national
61
- implementations thereof.
62
-
63
- 2. Waiver. To the greatest extent permitted by, but not in contravention
64
- of, applicable law, Affirmer hereby overtly, fully, permanently,
65
- irrevocably and unconditionally waives, abandons, and surrenders all of
66
- Affirmer's Copyright and Related Rights and associated claims and causes
67
- of action, whether now known or unknown (including existing as well as
68
- future claims and causes of action), in the Work (i) in all territories
69
- worldwide, (ii) for the maximum duration provided by applicable law or
70
- treaty (including future time extensions), (iii) in any current or future
71
- medium and for any number of copies, and (iv) for any purpose whatsoever,
72
- including without limitation commercial, advertising or promotional
73
- purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
- member of the public at large and to the detriment of Affirmer's heirs and
75
- successors, fully intending that such Waiver shall not be subject to
76
- revocation, rescission, cancellation, termination, or any other legal or
77
- equitable action to disrupt the quiet enjoyment of the Work by the public
78
- as contemplated by Affirmer's express Statement of Purpose.
79
-
80
- 3. Public License Fallback. Should any part of the Waiver for any reason
81
- be judged legally invalid or ineffective under applicable law, then the
82
- Waiver shall be preserved to the maximum extent permitted taking into
83
- account Affirmer's express Statement of Purpose. In addition, to the
84
- extent the Waiver is so judged Affirmer hereby grants to each affected
85
- person a royalty-free, non transferable, non sublicensable, non exclusive,
86
- irrevocable and unconditional license to exercise Affirmer's Copyright and
87
- Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
- maximum duration provided by applicable law or treaty (including future
89
- time extensions), (iii) in any current or future medium and for any number
90
- of copies, and (iv) for any purpose whatsoever, including without
91
- limitation commercial, advertising or promotional purposes (the
92
- "License"). The License shall be deemed effective as of the date CC0 was
93
- applied by Affirmer to the Work. Should any part of the License for any
94
- reason be judged legally invalid or ineffective under applicable law, such
95
- partial invalidity or ineffectiveness shall not invalidate the remainder
96
- of the License, and in such case Affirmer hereby affirms that he or she
97
- will not (i) exercise any of his or her remaining Copyright and Related
98
- Rights in the Work or (ii) assert any associated claims and causes of
99
- action with respect to the Work, in either case contrary to Affirmer's
100
- express Statement of Purpose.
101
-
102
- 4. Limitations and Disclaimers.
103
-
104
- a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
- surrendered, licensed or otherwise affected by this document.
106
- b. Affirmer offers the Work as-is and makes no representations or
107
- warranties of any kind concerning the Work, express, implied,
108
- statutory or otherwise, including without limitation warranties of
109
- title, merchantability, fitness for a particular purpose, non
110
- infringement, or the absence of latent or other defects, accuracy, or
111
- the present or absence of errors, whether or not discoverable, all to
112
- the greatest extent permissible under applicable law.
113
- c. Affirmer disclaims responsibility for clearing rights of other persons
114
- that may apply to the Work or any use thereof, including without
115
- limitation any person's Copyright and Related Rights in the Work.
116
- Further, Affirmer disclaims responsibility for obtaining any necessary
117
- consents, permissions or other rights required for any use of the
118
- Work.
119
- d. Affirmer understands and acknowledges that Creative Commons is not a
120
- party to this document and has no duty or obligation with respect to
121
- this CC0 or use of the Work.
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -22,7 +22,8 @@ and can optionally push it to a new GitHub repo in their own account.
22
22
  ([src/lib/generatePackage.ts](src/lib/generatePackage.ts)) that is **byte-identical**
23
23
  to the CLI generator's output, so the on-chain package is source-verifiable.
24
24
  5. Licenses are fetched live from SPDX ([src/lib/licenses.ts](src/lib/licenses.ts)); an
25
- optional icon upload goes to Walrus ([src/lib/walrus.ts](src/lib/walrus.ts)); and an
25
+ optional icon upload goes to Walrus (`@meddleware/walrus-client/flow`, from
26
+ [src/components/IconPicker.vue](src/components/IconPicker.vue)); and an
26
27
  optional GitHub push uses the user's own token ([src/lib/github.ts](src/lib/github.ts)).
27
28
 
28
29
  ## Security & trust model
@@ -68,9 +69,9 @@ host dashboard. See [.env.example](.env.example) for the full list.
68
69
  | --- | --- | --- |
69
70
  | `VITE_FEE_TREASURY_TESTNET` / `_MAINNET` | Operator treasury that receives the fee. **A production build fails if either is the zero address** (bypass with `VITE_ALLOW_UNSET_TREASURY=1`). | committed operator address |
70
71
  | `VITE_FEE_MIST` | Flat fee split from the user's gas coin. | `1000000000` (1 SUI) |
71
- | `VITE_RPC_TESTNET` / `_MAINNET` | JSON-RPC endpoint (set a paid RPC for production). | public endpoints |
72
+ | `VITE_RPC_TESTNET` / `_MAINNET` | gRPC fullnode endpoint (set a paid RPC for production). JSON-RPC-only endpoints do not work. | public fullnodes |
72
73
  | `VITE_PUBLISH_GAS_BUDGET` | Publish gas budget (MIST). | `500000000` |
73
- | `VITE_PUBLIC_URL` | Site origin for canonical/OG/JSON-LD URLs. | `https://tokens.meddleware.co.uk` |
74
+ | `VITE_PUBLIC_URL` | Site origin (no trailing slash) for the canonical URL and Open Graph tags in `index.html`. | `https://sui-token-deployer.meddleware.co.uk` (`.env.production`) |
74
75
  | `VITE_WALRUS_RELAY_TESTNET` / `_MAINNET` | Your own upload relay (to collect the tip). Unset → public Mysten relay (earns nothing). | public relay |
75
76
  | `VITE_WALRUS_MAX_TIP_MIST` | Client-side max relay tip. **Must exceed your relay's tip** or uploads fail. | `50000000` (0.05 SUI) |
76
77
  | `VITE_ICON_MAX_BYTES` / `VITE_ICON_ALLOWED_TYPES` | Client icon size/type gate (UX only). | `102400` / PNG,JPEG,WebP,SVG |
@@ -163,14 +164,16 @@ Two tests enforce this invariant in CI so it can never silently drift:
163
164
  - `scripts/e2e-deploy.mjs` — the **network-parametrized real-chain deploy e2e** (headless
164
165
  browser + injected wallet): drives the full UI, does a REAL publish, waits for real
165
166
  confirmation, checks the result panel, downloads the source zip, and verifies coin type +
166
- operator fee on-chain. Covers exactly what the mocked Cypress suite cannot. `scripts/e2e-browser.mjs`
167
+ operator fee on-chain. Covers exactly what the mocked Playwright suite cannot. `scripts/e2e-browser.mjs`
167
168
  is a thin localnet wrapper over it.
168
- - `scripts/e2e-walrus-browser.mjs` — the Walrus icon uploader end-to-end on testnet
169
- with an injected wallet.
169
+ - `scripts/e2e-walrus-browser.mjs` (`npm run e2e:walrus`) — the Walrus icon uploader end-to-end on
170
+ testnet with an injected wallet (`SUI_PRIV` with SUI + WAL); `E2E_RELAY=operator` exercises the
171
+ NFT-gated relay (pass purchase, consume, signed proof). Manual only — it spends real funds.
170
172
 
171
173
  ## Real-chain e2e / launch runbook
172
174
 
173
- The Playwright mocked suite (`npm run test:e2e`) mocks all RPC via `VITE_E2E=1`, so it can prove
175
+ The Playwright mocked suite (`npm run test:e2e`) mocks all RPC in a dedicated e2e build
176
+ (`npm run build:e2e`, `--mode e2e`; production builds refuse `VITE_E2E`), so it can prove
174
177
  the form/wallet/publish UI but **not** on-chain confirmation, the result panel, or the source
175
178
  download. The real-chain harness fills that gap. It is **manual** — never wired into automatic CI — because testnet/mainnet runs
176
179
  publish a real token and spend real SUI.
@@ -192,7 +195,7 @@ testnet mode with the RPC pointed at the local node).
192
195
  | `SUI_PRIV` | bech32 `suiprivkey1…` for a **funded** deployer key. Export the CLI key: `sui keytool export --key-identity <addr>`. Never faucet-funded on a real network. |
193
196
  | `VITE_FEE_TREASURY_TESTNET` / `_MAINNET` | Operator treasury baked into the build (already set in `.env.production`). The build fails if it is the zero address. |
194
197
  | `E2E_FEE_ADDR` | The treasury to watch for the fee-delta assertion — set it equal to the built treasury. If unset, the fee check is skipped (the app still charges the fee). |
195
- | `VITE_RPC_TESTNET` / `_MAINNET` and `E2E_RPC` | JSON-RPC endpoint for the build (browser) and the node-side verifier. Use a JSON-RPC-capable endpoint — the official testnet fullnode is gRPC-only. |
198
+ | `VITE_RPC_TESTNET` / `_MAINNET` and `E2E_RPC` | gRPC endpoint for the build (browser) and the node-side verifier. Defaults to the public fullnodes. |
196
199
  | `E2E_MAINNET_CONFIRM=1` | **Mainnet only.** Without it the mainnet runner aborts cleanly (fail-safe default) so it can never publish by accident. |
197
200
 
198
201
  A full fee-charging run needs the key to hold **≥ gas + fee** (~0.5 SUI gas + 1 SUI fee = ~1.5 SUI).
@@ -203,8 +206,6 @@ Example (testnet):
203
206
 
204
207
  ```bash
205
208
  export SUI_PRIV="$(sui keytool export --key-identity 0xYOURADDR --json | jq -r .exportedPrivateKey)"
206
- VITE_RPC_TESTNET=https://sui-testnet-rpc.publicnode.com \
207
- E2E_RPC=https://sui-testnet-rpc.publicnode.com \
208
209
  VITE_FEE_TREASURY_TESTNET=0xYOURTREASURY \
209
210
  E2E_FEE_ADDR=0xYOURTREASURY \
210
211
  npm run e2e:testnet
package/package.json CHANGED
@@ -1,12 +1,20 @@
1
1
  {
2
2
  "name": "@meddleware/token-deployer-ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "type": "module",
5
+ "license": "0BSD",
5
6
  "exports": {
6
7
  ".": {
7
8
  "default": "./src/index.ts"
8
9
  }
9
10
  },
11
+ "files": [
12
+ "src",
13
+ "!src/__tests__",
14
+ "env.d.ts",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
10
18
  "publishConfig": {
11
19
  "access": "public"
12
20
  },
@@ -18,13 +26,15 @@
18
26
  "test:unit": "vitest",
19
27
  "test": "vitest run",
20
28
  "test:watch": "vitest",
21
- "build:e2e": "VITE_E2E=1 vite build",
29
+ "build:e2e": "VITE_E2E=1 vite build --mode e2e",
30
+ "check:bundle": "node scripts/check-prod-bundle.mjs",
22
31
  "test:e2e": "playwright test",
23
32
  "test:e2e:ui": "playwright test --ui",
24
33
  "e2e:install": "playwright install --with-deps chromium firefox",
25
34
  "e2e:localnet": "VITE_RPC_TESTNET=${VITE_RPC_TESTNET:-http://127.0.0.1:9000} VITE_FEE_TREASURY_TESTNET=${VITE_FEE_TREASURY_TESTNET:-0xfee0000000000000000000000000000000000000000000000000000000000000} vite build && start-server-and-test preview http://localhost:4173 'E2E_NETWORK=localnet node scripts/e2e-deploy.mjs'",
26
35
  "e2e:testnet": "vite build && start-server-and-test preview http://localhost:4173 'E2E_NETWORK=testnet node scripts/e2e-deploy.mjs'",
27
36
  "e2e:mainnet": "vite build && start-server-and-test preview http://localhost:4173 'E2E_NETWORK=mainnet node scripts/e2e-deploy.mjs'",
37
+ "e2e:walrus": "vite build && start-server-and-test preview http://localhost:4173 'node scripts/e2e-walrus-browser.mjs'",
28
38
  "lint": "npm run lint:css && npm run lint:js && npm run lint:html",
29
39
  "format": "oxfmt src/",
30
40
  "docs": "typedoc",
@@ -39,16 +49,18 @@
39
49
  "dependencies": {
40
50
  "@meddleware/design-tokens": "^0.1.7",
41
51
  "@meddleware/ui": "^0.1.28",
42
- "@meddleware/wallet-adapter": "^0.0.9",
43
- "@meddleware/walrus-relay": "^0.1.18",
44
- "@mysten/bcs": "~2.1.0",
45
- "@mysten/move-bytecode-template": "~0.4.0",
46
- "@mysten/sui": "^2.33.0",
47
- "@mysten/walrus": "~1.2.0",
52
+ "@meddleware/wallet-adapter": "^0.0.12",
53
+ "@meddleware/walrus-client": "^0.0.21",
54
+ "@meddleware/walrus-relay": "^0.1.20",
55
+ "@mysten/bcs": "~2.1.2",
56
+ "@mysten/move-bytecode-template": "~0.4.1",
57
+ "@mysten/sui": "^2.33.1",
58
+ "@mysten/walrus": "~1.2.32",
48
59
  "fflate": "^0.8.3",
49
60
  "vue": "^3.5.0"
50
61
  },
51
62
  "devDependencies": {
63
+ "@meddleware/access-gate-client": "^0.0.1",
52
64
  "@playwright/test": "^1.56.0",
53
65
  "@types/node": "~24.12.2",
54
66
  "@vitejs/plugin-vue": "^6.0.8",
@@ -76,12 +88,12 @@
76
88
  "typescript": "~6.0.0",
77
89
  "vite": "^8.1.5",
78
90
  "vite-plugin-vue-devtools": "^8.1.5",
79
- "vitest": "^4.1.10",
91
+ "vitest": "~5.0.2",
80
92
  "vue-eslint-parser": "^10.4.1",
81
93
  "vue-tsc": "~3.3.0"
82
94
  },
83
95
  "optionalDependencies": {
84
- "@meddleware/sui-token-template": "^1.0.4"
96
+ "@meddleware/sui-token-template": "^1.0.5"
85
97
  },
86
98
  "engines": {
87
99
  "node": "^22.18.0 || >=24.12.0"
package/src/App.vue CHANGED
@@ -8,7 +8,7 @@ const { mode: colorMode, set: setColorMode } = useColorMode('system')
8
8
 
9
9
  <template>
10
10
  <a class="skip-link" href="#main-content">Skip to main content</a>
11
- <main id="main-content">
11
+ <main id="main-content" class="mw-token-deployer">
12
12
  <header class="page-header">
13
13
  <ColorModeControl
14
14
  class="theme-toggle"
@@ -1,9 +1,11 @@
1
1
  /* Component utility styles for TokenDeployerView and its sub-components.
2
2
  Imported by index.ts so these are available in both standalone and library (dashboard) mode.
3
+ Every rule is scoped under `:where(.mw-token-deployer)` so the library injects nothing global
4
+ into an embedding host, while `:where()` keeps the original (element-level) specificity.
3
5
  Relies on design-token CSS variables (--bg, --surface, --border, etc.) provided by the
4
6
  consumer — either @meddleware/design-tokens (standalone) or the dashboard's own import. */
5
7
 
6
- .card {
8
+ :where(.mw-token-deployer) .card {
7
9
  background: var(--surface);
8
10
  border: 1px solid var(--border);
9
11
  border-radius: var(--radius);
@@ -12,20 +14,20 @@
12
14
  border-top: 2px solid var(--border);
13
15
  }
14
16
 
15
- label {
17
+ :where(.mw-token-deployer) label {
16
18
  display: block;
17
19
  font-weight: 600;
18
20
  margin: 0.9rem 0 0.3rem;
19
21
  }
20
- .hint {
22
+ :where(.mw-token-deployer) .hint {
21
23
  color: var(--muted);
22
24
  font-weight: 400;
23
25
  font-size: 0.9rem;
24
26
  }
25
27
 
26
- input,
27
- select,
28
- textarea {
28
+ :where(.mw-token-deployer) input,
29
+ :where(.mw-token-deployer) select,
30
+ :where(.mw-token-deployer) textarea {
29
31
  width: 100%;
30
32
  padding: 0.6rem 0.7rem;
31
33
  font: inherit;
@@ -34,24 +36,24 @@ textarea {
34
36
  border: 1px solid var(--border);
35
37
  border-radius: 8px;
36
38
  }
37
- textarea {
39
+ :where(.mw-token-deployer) textarea {
38
40
  min-height: 4rem;
39
41
  resize: vertical;
40
42
  }
41
43
 
42
- input[aria-invalid='true'],
43
- select[aria-invalid='true'],
44
- textarea[aria-invalid='true'] {
44
+ :where(.mw-token-deployer) input[aria-invalid='true'],
45
+ :where(.mw-token-deployer) select[aria-invalid='true'],
46
+ :where(.mw-token-deployer) textarea[aria-invalid='true'] {
45
47
  border-color: var(--danger);
46
48
  }
47
49
 
48
- .field-error {
50
+ :where(.mw-token-deployer) .field-error {
49
51
  color: var(--danger);
50
52
  font-size: 0.88rem;
51
53
  margin-top: 0.3rem;
52
54
  }
53
55
 
54
- button {
56
+ :where(.mw-token-deployer) button {
55
57
  font: inherit;
56
58
  font-weight: 600;
57
59
  padding: 0.6rem 1rem;
@@ -61,54 +63,54 @@ button {
61
63
  color: var(--text);
62
64
  cursor: pointer;
63
65
  }
64
- button.primary {
66
+ :where(.mw-token-deployer) button.primary {
65
67
  background: var(--accent);
66
68
  color: var(--accent-contrast);
67
69
  border-color: transparent;
68
70
  }
69
- button:disabled {
71
+ :where(.mw-token-deployer) button:disabled {
70
72
  opacity: 0.55;
71
73
  cursor: not-allowed;
72
74
  }
73
75
 
74
- .row {
76
+ :where(.mw-token-deployer) .row {
75
77
  display: flex;
76
78
  gap: 0.75rem;
77
79
  flex-wrap: wrap;
78
80
  align-items: center;
79
81
  }
80
82
  /* A row of form/navigation actions below a block of content. */
81
- .actions {
83
+ :where(.mw-token-deployer) .actions {
82
84
  margin-top: 1rem;
83
85
  }
84
- .grid2 {
86
+ :where(.mw-token-deployer) .grid2 {
85
87
  display: grid;
86
88
  grid-template-columns: 1fr;
87
89
  gap: 0 1rem;
88
90
  }
89
91
  @media (width >= 520px) {
90
- .grid2 {
92
+ :where(.mw-token-deployer) .grid2 {
91
93
  grid-template-columns: 1fr 1fr;
92
94
  }
93
95
  }
94
96
 
95
- fieldset {
97
+ :where(.mw-token-deployer) fieldset {
96
98
  background: var(--lift);
97
99
  border: 1px solid var(--border);
98
100
  border-radius: 8px;
99
101
  padding: 0.5rem 1rem 1rem;
100
102
  margin: 1rem 0;
101
103
  }
102
- legend {
104
+ :where(.mw-token-deployer) legend {
103
105
  font-weight: 700;
104
106
  padding: 0 0.4rem;
105
107
  }
106
108
 
107
- details {
109
+ :where(.mw-token-deployer) details {
108
110
  margin: 1rem 0;
109
111
  }
110
112
 
111
- details > summary {
113
+ :where(.mw-token-deployer) details > summary {
112
114
  color: var(--accent);
113
115
  font-weight: 700;
114
116
  margin: 0.5rem 0;
@@ -119,28 +121,28 @@ details > summary {
119
121
  transition: border-color 0.2s ease;
120
122
  }
121
123
 
122
- details > summary:hover {
124
+ :where(.mw-token-deployer) details > summary:hover {
123
125
  border-color: var(--border);
124
126
  }
125
127
 
126
- details[open] > summary {
128
+ :where(.mw-token-deployer) details[open] > summary {
127
129
  border-color: var(--border);
128
130
  margin-bottom: 1rem;
129
131
  }
130
132
 
131
- details > fieldset {
133
+ :where(.mw-token-deployer) details > fieldset {
132
134
  margin-top: 0;
133
135
  }
134
136
 
135
- .permanent {
137
+ :where(.mw-token-deployer) .permanent {
136
138
  color: var(--danger);
137
139
  font-weight: 600;
138
140
  }
139
- .mono {
141
+ :where(.mw-token-deployer) .mono {
140
142
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
141
143
  word-break: break-all;
142
144
  }
143
- .badge {
145
+ :where(.mw-token-deployer) .badge {
144
146
  display: inline-block;
145
147
  font-size: 0.8rem;
146
148
  padding: 0.15rem 0.5rem;
@@ -148,44 +150,24 @@ details > fieldset {
148
150
  background: var(--border);
149
151
  }
150
152
 
151
- .skip-link {
152
- position: absolute;
153
- left: 0.5rem;
154
- top: -3rem;
155
- z-index: 100;
156
- background: var(--accent);
157
- color: #fff;
158
- padding: 0.5rem 0.9rem;
159
- border-radius: 6px;
160
- text-decoration: none;
161
- transition: top 0.15s ease;
162
- }
163
- .skip-link:focus {
164
- top: 0.5rem;
165
- }
166
- @media (prefers-reduced-motion: reduce) {
167
- .skip-link {
168
- transition: none;
169
- }
170
- }
171
153
 
172
- .steps {
154
+ :where(.mw-token-deployer) .steps {
173
155
  list-style: none;
174
156
  padding: 0;
175
157
  }
176
- .steps li {
158
+ :where(.mw-token-deployer) .steps li {
177
159
  padding: 0.35rem 0;
178
160
  color: var(--muted);
179
161
  }
180
- .steps li[data-state='active'] {
162
+ :where(.mw-token-deployer) .steps li[data-state='active'] {
181
163
  color: var(--text);
182
164
  font-weight: 600;
183
165
  }
184
- .steps li[data-state='done'] {
166
+ :where(.mw-token-deployer) .steps li[data-state='done'] {
185
167
  color: var(--ok);
186
168
  }
187
169
 
188
- .spinner {
170
+ :where(.mw-token-deployer) .spinner {
189
171
  width: 1em;
190
172
  height: 1em;
191
173
  border: 2px solid currentColor;
@@ -201,21 +183,21 @@ details > fieldset {
201
183
  }
202
184
  }
203
185
  @media (prefers-reduced-motion: reduce) {
204
- .spinner {
186
+ :where(.mw-token-deployer) .spinner {
205
187
  animation: none;
206
188
  }
207
- * {
189
+ :where(.mw-token-deployer) * {
208
190
  scroll-behavior: auto;
209
191
  }
210
192
  }
211
193
 
212
- .wallet-list {
194
+ :where(.mw-token-deployer) .wallet-list {
213
195
  display: flex;
214
196
  flex-direction: column;
215
197
  gap: 0.5rem;
216
198
  margin-top: 1rem;
217
199
  }
218
- .wallet-list button {
200
+ :where(.mw-token-deployer) .wallet-list button {
219
201
  display: flex;
220
202
  align-items: center;
221
203
  gap: 0.6rem;
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
3
  import type { PublishResult, TokenConfig } from '../lib/types.js'
4
- import { UiNotice } from '@meddleware/ui'
4
+ import { UiNotice, safeHref } from '@meddleware/ui'
5
5
  import { buildPackageFiles } from '../lib/generatePackage.js'
6
6
  import { fetchLicenseText } from '../lib/licenses.js'
7
7
  import { createRepoAndPush } from '../lib/github.js'
@@ -92,7 +92,7 @@ async function push(): Promise<void> {
92
92
 
93
93
  <UiNotice v-if="error" type="error">{{ error }}</UiNotice>
94
94
  <UiNotice v-if="doneUrl" type="ok">
95
- Pushed: <a :href="doneUrl" target="_blank" rel="noopener noreferrer">{{ doneUrl }}</a>
95
+ Pushed: <a :href="safeHref(doneUrl)" target="_blank" rel="noopener noreferrer">{{ doneUrl }}</a>
96
96
  </UiNotice>
97
97
  </div>
98
98
  </div>