@meddleware/token-deployer-ui 0.0.6 → 0.0.8

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.
@@ -50,8 +50,9 @@ jobs:
50
50
  run: npm install -g npm@latest
51
51
  - name: Install dependencies
52
52
  run: npm ci
53
- - name: Build
54
- run: npm run build --if-present
53
+ # No build step: the npm package ships TypeScript source (exports → ./src),
54
+ # not the compiled SPA. The treasury-gated `vite build` belongs to
55
+ # docker-publish.yml, which injects the real treasury via build-args.
55
56
  - name: Publish to npmjs (OIDC, idempotent, opt-in)
56
57
  env:
57
58
  NPM_PUBLISH: ${{ vars.NPM_PUBLISH }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/token-deployer-ui",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@meddleware/design-tokens": "^0.1.6",
38
- "@meddleware/ui": "^0.1.26",
38
+ "@meddleware/ui": "^0.1.27",
39
39
  "@meddleware/wallet-adapter": "^0.0.8",
40
40
  "@meddleware/walrus-relay": "^0.1.17",
41
41
  "@mysten/bcs": "~2.1.0",
@@ -49,11 +49,27 @@ function onBlur(key: string): void {
49
49
  <fieldset>
50
50
  <legend>Package identity <span class="permanent">(permanent)</span></legend>
51
51
  <div class="grid2">
52
- <UiFormField id="package" label="Package name" :error="visibleError('packageName')" v-slot="{ attrs }">
53
- <input v-bind="attrs" v-model="form.packageName" placeholder="my_token" autocomplete="off" @blur="onBlur('packageName')" />
52
+ <UiFormField id="package" label="Package name" :error="visibleError('packageName')">
53
+ <template #label-suffix>
54
+ <UiFieldHint field-id="package-name">
55
+ The on-chain Move package name (snake_case, e.g. <b>my_token</b>). It identifies the
56
+ published package and cannot be changed after deployment.
57
+ </UiFieldHint>
58
+ </template>
59
+ <template #default="{ attrs }">
60
+ <input v-bind="attrs" v-model="form.packageName" placeholder="my_token" autocomplete="off" @blur="onBlur('packageName')" />
61
+ </template>
54
62
  </UiFormField>
55
- <UiFormField id="module" label="Module name" :error="visibleError('moduleName')" v-slot="{ attrs }">
56
- <input v-bind="attrs" v-model="form.moduleName" placeholder="mytoken" autocomplete="off" @blur="onBlur('moduleName')" />
63
+ <UiFormField id="module" label="Module name" :error="visibleError('moduleName')">
64
+ <template #label-suffix>
65
+ <UiFieldHint field-id="module-name">
66
+ The Move module inside the package (lowercase, e.g. <b>mytoken</b>). The coin type and
67
+ its one-time-witness struct are derived from this name, so it is permanent too.
68
+ </UiFieldHint>
69
+ </template>
70
+ <template #default="{ attrs }">
71
+ <input v-bind="attrs" v-model="form.moduleName" placeholder="mytoken" autocomplete="off" @blur="onBlur('moduleName')" />
72
+ </template>
57
73
  </UiFormField>
58
74
  </div>
59
75
  <p class="hint" aria-live="polite">
@@ -75,23 +91,50 @@ function onBlur(key: string): void {
75
91
  <legend>Token details</legend>
76
92
 
77
93
  <div class="grid2">
78
- <UiFormField id="name" label="Token name" :error="visibleError('name')" v-slot="{ attrs }">
79
- <input v-bind="attrs" v-model="form.name" autocomplete="off" @blur="onBlur('name')" />
94
+ <UiFormField id="name" label="Token name" :error="visibleError('name')">
95
+ <template #label-suffix>
96
+ <UiFieldHint field-id="token-name">
97
+ The human-readable display name shown in wallets and explorers (e.g. <b>My Token</b>).
98
+ Editable later if you keep the Updatable metadata policy.
99
+ </UiFieldHint>
100
+ </template>
101
+ <template #default="{ attrs }">
102
+ <input v-bind="attrs" v-model="form.name" autocomplete="off" @blur="onBlur('name')" />
103
+ </template>
80
104
  </UiFormField>
81
- <UiFormField id="symbol" label="Symbol" :error="visibleError('symbol')" v-slot="{ attrs }">
82
- <input v-bind="attrs" v-model="form.symbol" autocomplete="off" @blur="onBlur('symbol')" />
105
+ <UiFormField id="symbol" label="Symbol" :error="visibleError('symbol')">
106
+ <template #label-suffix>
107
+ <UiFieldHint field-id="token-symbol">
108
+ The short ticker shown in wallets (e.g. <b>MYT</b>), typically 3–5 uppercase letters.
109
+ </UiFieldHint>
110
+ </template>
111
+ <template #default="{ attrs }">
112
+ <input v-bind="attrs" v-model="form.symbol" autocomplete="off" @blur="onBlur('symbol')" />
113
+ </template>
83
114
  </UiFormField>
84
115
  </div>
85
116
 
86
117
  <UiFormField id="description" label="Description" :error="visibleError('description')">
87
- <template #label-suffix>&nbsp;<span class="hint">(optional)</span></template>
118
+ <template #label-suffix>
119
+ &nbsp;<span class="hint">(optional)</span>
120
+ <UiFieldHint field-id="token-description">
121
+ A short blurb stored in the coin metadata and shown in some wallets/explorers.
122
+ Leave blank if you don't need one.
123
+ </UiFieldHint>
124
+ </template>
88
125
  <template #default="{ attrs }">
89
126
  <textarea v-bind="attrs" v-model="form.description" @blur="onBlur('description')" />
90
127
  </template>
91
128
  </UiFormField>
92
129
 
93
130
  <UiFormField id="decimals" label="Decimals" :error="visibleError('decimals')">
94
- <template #label-suffix>&nbsp;<span class="permanent">(permanent)</span></template>
131
+ <template #label-suffix>
132
+ &nbsp;<span class="permanent">(permanent)</span>
133
+ <UiFieldHint field-id="token-decimals">
134
+ How many decimal places the coin supports. <b>9</b> is the Sui convention (1 token =
135
+ 1,000,000,000 base units). Fixed at deployment and cannot be changed.
136
+ </UiFieldHint>
137
+ </template>
95
138
  <template #default="{ attrs }">
96
139
  <input v-bind="attrs" v-model="form.decimals" inputmode="numeric" @blur="onBlur('decimals')" />
97
140
  </template>
@@ -283,7 +283,15 @@ function onBrowseSelect(url: string): void {
283
283
  </label>
284
284
 
285
285
  <fieldset v-if="fileName && availableRelays.length > 1" style="margin: 0.5rem 0">
286
- <legend>Upload relay</legend>
286
+ <legend>
287
+ Upload relay
288
+ <UiFieldHint field-id="upload-relay">
289
+ Browsers can't write to Walrus directly, so the blob is sent through an upload relay.
290
+ The <b>public</b> relay is free; the <b>operator</b> relay is run by this app and may
291
+ charge a small SUI tip per upload. Both store the identical blob — pick whichever you
292
+ prefer.
293
+ </UiFieldHint>
294
+ </legend>
287
295
  <div style="display: flex; flex-direction: column; gap: 0.5rem">
288
296
  <label
289
297
  v-for="option in availableRelays"
@@ -321,7 +329,7 @@ function onBrowseSelect(url: string): void {
321
329
  Tip: select the public relay above to avoid the relay fee.
322
330
  </p>
323
331
 
324
- <p id="walrus-help" class="hint" aria-live="polite">
332
+ <p id="walrus-help" class="upload-note" aria-live="polite">
325
333
  Max {{ maxSizeLabel }} · PNG/JPEG/WebP/SVG. Requires <strong>WAL</strong> (storage) and
326
334
  <strong>SUI</strong> (gas + relay fee) in your wallet; two approvals. Stored for
327
335
  ~{{ ICON_YEARS }} years. <span v-if="status">{{ status }}</span>
@@ -345,12 +353,31 @@ function onBrowseSelect(url: string): void {
345
353
  display: flex;
346
354
  align-items: center;
347
355
  gap: 0.4rem;
356
+ /* Only span the content — otherwise the row stretches the full field width. */
357
+ width: fit-content;
348
358
  margin-top: 0.5rem;
349
359
  font-size: 0.875rem;
350
360
  cursor: pointer;
351
361
  }
352
362
 
353
363
  .permanent-toggle input[type='checkbox'] {
364
+ /* Override the global `input { width: 100% }` so the checkbox stays its
365
+ natural size instead of consuming most of the row. */
366
+ width: auto;
367
+ flex: none;
354
368
  margin: 0;
355
369
  }
370
+
371
+ /* Boxed, muted note that reads as section-level guidance — visually distinct
372
+ from the Permanent-blob toggle above it. */
373
+ .upload-note {
374
+ margin: 0.75rem 0 0;
375
+ padding: 0.5rem 0.7rem;
376
+ border: 1px solid var(--border);
377
+ border-radius: 8px;
378
+ background: var(--surface);
379
+ color: var(--muted);
380
+ font-size: 0.85rem;
381
+ line-height: 1.45;
382
+ }
356
383
  </style>