@nakashim/tp-custom 0.1.6

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 (54) hide show
  1. package/README.md +68 -0
  2. package/dist/lib/index.d.ts +10 -0
  3. package/dist/lib/index.d.ts.map +1 -0
  4. package/dist/lib/index.js +10 -0
  5. package/dist/lib/index.js.map +1 -0
  6. package/dist/lib/tp-plugin/counter-blade-plugin.d.ts +11 -0
  7. package/dist/lib/tp-plugin/counter-blade-plugin.d.ts.map +1 -0
  8. package/dist/lib/tp-plugin/counter-blade-plugin.js +96 -0
  9. package/dist/lib/tp-plugin/counter-blade-plugin.js.map +1 -0
  10. package/dist/lib/tp-plugin/dynamic-list-blade-plugin.d.ts +159 -0
  11. package/dist/lib/tp-plugin/dynamic-list-blade-plugin.d.ts.map +1 -0
  12. package/dist/lib/tp-plugin/dynamic-list-blade-plugin.js +719 -0
  13. package/dist/lib/tp-plugin/dynamic-list-blade-plugin.js.map +1 -0
  14. package/dist/lib/tp-plugin/image-container-blade-plugin.d.ts +67 -0
  15. package/dist/lib/tp-plugin/image-container-blade-plugin.d.ts.map +1 -0
  16. package/dist/lib/tp-plugin/image-container-blade-plugin.js +251 -0
  17. package/dist/lib/tp-plugin/image-container-blade-plugin.js.map +1 -0
  18. package/dist/lib/tp-plugin/label-layout-utils.d.ts +2 -0
  19. package/dist/lib/tp-plugin/label-layout-utils.d.ts.map +1 -0
  20. package/dist/lib/tp-plugin/label-layout-utils.js +11 -0
  21. package/dist/lib/tp-plugin/label-layout-utils.js.map +1 -0
  22. package/dist/lib/tp-plugin/plain-blade-plugin.d.ts +28 -0
  23. package/dist/lib/tp-plugin/plain-blade-plugin.d.ts.map +1 -0
  24. package/dist/lib/tp-plugin/plain-blade-plugin.js +86 -0
  25. package/dist/lib/tp-plugin/plain-blade-plugin.js.map +1 -0
  26. package/dist/lib/tp-plugin/register-custom-plugins.d.ts +4 -0
  27. package/dist/lib/tp-plugin/register-custom-plugins.d.ts.map +1 -0
  28. package/dist/lib/tp-plugin/register-custom-plugins.js +39 -0
  29. package/dist/lib/tp-plugin/register-custom-plugins.js.map +1 -0
  30. package/dist/lib/tp-plugin/row-blade-plugin.d.ts +48 -0
  31. package/dist/lib/tp-plugin/row-blade-plugin.d.ts.map +1 -0
  32. package/dist/lib/tp-plugin/row-blade-plugin.js +216 -0
  33. package/dist/lib/tp-plugin/row-blade-plugin.js.map +1 -0
  34. package/dist/lib/tp-plugin/text-blade-plugin.d.ts +80 -0
  35. package/dist/lib/tp-plugin/text-blade-plugin.d.ts.map +1 -0
  36. package/dist/lib/tp-plugin/text-blade-plugin.js +276 -0
  37. package/dist/lib/tp-plugin/text-blade-plugin.js.map +1 -0
  38. package/dist/lib/tp-plugin/text-input-blade-plugin.d.ts +81 -0
  39. package/dist/lib/tp-plugin/text-input-blade-plugin.d.ts.map +1 -0
  40. package/dist/lib/tp-plugin/text-input-blade-plugin.js +385 -0
  41. package/dist/lib/tp-plugin/text-input-blade-plugin.js.map +1 -0
  42. package/dist/lib/tp-plugin/toggle-blade-plugin.d.ts +64 -0
  43. package/dist/lib/tp-plugin/toggle-blade-plugin.d.ts.map +1 -0
  44. package/dist/lib/tp-plugin/toggle-blade-plugin.js +343 -0
  45. package/dist/lib/tp-plugin/toggle-blade-plugin.js.map +1 -0
  46. package/dist/styles/assets/fonts/JetBrainsMono-VariableFont_wght.ttf +0 -0
  47. package/dist/styles/assets/icons/check-16.svg +1 -0
  48. package/dist/styles/assets/icons/chevron-down-12.svg +1 -0
  49. package/dist/styles/assets/icons/chevron-up-12.svg +1 -0
  50. package/dist/styles/assets/icons/triangle-down-16.svg +1 -0
  51. package/dist/styles/assets/icons/x-12.svg +1 -0
  52. package/dist/styles/assets/images/bg-grid.png +0 -0
  53. package/dist/styles/tp-custom.css +329 -0
  54. package/package.json +54 -0
@@ -0,0 +1,329 @@
1
+ /*
2
+ * Tweakpane customization layer
3
+ * - Keep pane sizing outside component code
4
+ * - Override values with CSS variables per host/container
5
+ */
6
+ @font-face {
7
+ font-family: "JetBrains Mono";
8
+ src: url("./assets/fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype-variations");
9
+ font-weight: 100 800;
10
+ font-style: normal;
11
+ font-display: swap;
12
+ }
13
+ :root {
14
+ --tp-base-background-color: rgba(60, 60, 60, 1);
15
+ --tp-button-background-color: rgba(158, 158, 158, 1);
16
+ --tp-button-background-color-active: hsla(0, 0%, 70%, 1);
17
+ --tp-button-background-color-focus: hsla(0, 0%, 70%, 1);
18
+ --tp-button-background-color-hover: hsla(0, 0%, 70%, 1);
19
+ --tp-button-foreground-color: rgba(0, 0, 0, 0.7);
20
+ --tp-container-background-color: transparent;
21
+ --tp-container-background-color-active: rgba(79, 79, 79, 1);
22
+ --tp-container-background-color-focus: rgba(79, 79, 79, 1);
23
+ --tp-container-background-color-hover: rgba(79, 79, 79, 1);
24
+ --tp-container-foreground-color: rgba(255, 255, 255, 0.5);
25
+ --tp-groove-foreground-color: rgba(255, 255, 255, 0.03);
26
+ --tp-input-background-color: rgba(255, 255, 255, 0.1);
27
+ --tp-input-background-color-active: rgba(255, 255, 255, 0.15);
28
+ --tp-input-background-color-focus: rgba(255, 255, 255, 0.15);
29
+ --tp-input-background-color-hover: rgba(255, 255, 255, 0.15);
30
+ --tp-input-foreground-color: rgba(255, 255, 255, 0.5);
31
+ --tp-label-foreground-color: rgba(255, 255, 255, 0.5);
32
+ --tp-monitor-background-color: rgba(0, 0, 0, 0.1);
33
+ --tp-monitor-foreground-color: rgba(255, 255, 255, 0.5);
34
+ }
35
+
36
+ .tp-custom {
37
+ --tp-c-base-font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco,
38
+ Consolas, 'Liberation Mono', 'Courier New', monospace;
39
+ --tp-c-base-line-height: 14px !important;
40
+ --tp-c-base-border-radius: 2px;
41
+ --tp-c-base-max-width: 100%;
42
+ --tp-c-base-box-shadow: none;
43
+ --tp-c-base-gap: 4px;
44
+ --tp-c-container-unit-size: 20px;
45
+ --tp-c-container-vertical-gap: 4px;
46
+ --tp-c-container-horizontal-gap: 4px;
47
+ --tp-c-container-padding-inline: 6px;
48
+ --tp-c-base-background-color: var(--tp-base-background-color);
49
+ --tp-c-base-label-flex-basis: 29.41%;
50
+ --tp-c-base-value-flex-basis: calc(100% - var(--tp-c-base-label-flex-basis));
51
+ --tp-c-tab-background-color-hover: rgba(255, 255, 255, 0.1);
52
+ --tp-c-button-background-color-upper: rgba(206, 206, 206, 1);
53
+ --tp-c-textarea-padding-block: 3px;
54
+ --tp-container-unit-spacing: var(--tp-c-container-vertical-gap);
55
+ background: rgb(57, 57, 57) url("./assets/images/bg-grid.png") top left/20px 20px;
56
+ padding: var(--tp-c-base-gap);
57
+ }
58
+ .tp-custom * {
59
+ line-height: var(--tp-c-base-line-height);
60
+ }
61
+ .tp-custom button {
62
+ border-radius: var(--tp-c-base-border-radius);
63
+ outline: none;
64
+ }
65
+ .tp-custom .tp-rotv {
66
+ background-color: transparent;
67
+ font-family: var(--tp-c-base-font-family);
68
+ line-height: var(--tp-c-base-line-height);
69
+ border-radius: var(--tp-c-base-border-radius);
70
+ width: 100%;
71
+ max-width: var(--tp-c-base-max-width);
72
+ box-shadow: var(--tp-c-base-box-shadow);
73
+ }
74
+ .tp-custom .tp-rotv_b,
75
+ .tp-custom .tp-fldv_b {
76
+ height: calc(var(--tp-c-container-unit-size) + var(--tp-c-container-vertical-gap) * 2);
77
+ }
78
+ .tp-custom .tp-rotv_b {
79
+ background-color: var(--tp-c-base-background-color);
80
+ border-radius: var(--tp-c-base-border-radius);
81
+ }
82
+ .tp-custom .tp-rotv_t {
83
+ font-size: 12px;
84
+ margin-bottom: 2px;
85
+ }
86
+ .tp-custom .tp-fldv {
87
+ background-color: var(--tp-c-base-background-color);
88
+ border-radius: var(--tp-c-base-border-radius);
89
+ }
90
+ .tp-custom .tp-fldv .tp-fldv .tp-fldv_b {
91
+ height: calc(var(--tp-c-container-unit-size));
92
+ }
93
+ .tp-custom .tp-fldv .tp-fldv .tp-fldv_t {
94
+ font-size: 11px;
95
+ margin-bottom: 0;
96
+ }
97
+ .tp-custom .tp-fldv .tp-fldv .tp-fldv {
98
+ background-color: var(--tp-monitor-background-color);
99
+ }
100
+ .tp-custom .tp-rotv.tp-rotv-not .tp-rotv_c > .tp-fldv.tp-v-fst {
101
+ margin-top: 0;
102
+ }
103
+ .tp-custom .tp-fldv:not(.tp-v-fst) {
104
+ margin-top: var(--tp-c-base-gap) !important;
105
+ }
106
+ .tp-custom .tp-rotv.tp-rotv-not .tp-rotv_c {
107
+ padding-top: 0;
108
+ }
109
+ .tp-custom .tp-fldv_t {
110
+ font-size: 12px;
111
+ padding-left: 0;
112
+ margin-bottom: 1px;
113
+ }
114
+ .tp-custom .tp-fldv_b {
115
+ padding-left: var(--tp-c-container-padding-inline);
116
+ }
117
+ .tp-custom .tp-tabv_t {
118
+ padding-bottom: 1px;
119
+ }
120
+ .tp-custom .tp-tabv_t:before {
121
+ height: 1px;
122
+ background-color: var(--tp-c-tab-background-color-hover);
123
+ }
124
+ .tp-custom .tp-tbiv.tp-tbiv-sel > .tp-tbiv_b {
125
+ background-color: var(--tp-c-tab-background-color-hover);
126
+ }
127
+ .tp-custom .tp-tbiv_t {
128
+ height: calc(var(--cnt-usz) + 3px);
129
+ line-height: calc(var(--cnt-usz) + 3px);
130
+ }
131
+ .tp-custom .tp-tbiv_b {
132
+ overflow: hidden;
133
+ }
134
+ .tp-custom .tp-tbiv_b:before {
135
+ display: none;
136
+ }
137
+ .tp-custom .tp-tbiv_b:active, .tp-custom .tp-tbiv_b:hover {
138
+ background-color: var(--tp-c-tab-background-color-hover);
139
+ }
140
+ .tp-custom .tp-tbiv_b,
141
+ .tp-custom .tp-fldv_b,
142
+ .tp-custom .tp-rotv.tp-rotv-not .tp-rotv_c > .tp-fldv.tp-v-fst > .tp-fldv_b {
143
+ border-top-left-radius: var(--tp-c-base-border-radius);
144
+ border-top-right-radius: var(--tp-c-base-border-radius);
145
+ border-bottom-left-radius: 0;
146
+ border-bottom-right-radius: 0;
147
+ }
148
+ .tp-custom .tp-tbpv_c > .tp-cntv + .tp-fldv > .tp-fldv_b,
149
+ .tp-custom .tp-fldv_c > .tp-cntv + .tp-fldv > .tp-fldv_b,
150
+ .tp-custom .tp-tbpv_c > .tp-fldv > .tp-fldv_b,
151
+ .tp-custom .tp-fldv_c > .tp-fldv > .tp-fldv_b {
152
+ border-radius: var(--tp-c-base-border-radius);
153
+ border-bottom-left-radius: 0;
154
+ border-bottom-right-radius: 0;
155
+ }
156
+ .tp-custom .tp-rotv_c > .tp-fldv.tp-v-lst .tp-fldv_b,
157
+ .tp-custom .tp-tbpv_c > .tp-fldv.tp-v-lst .tp-fldv_b,
158
+ .tp-custom .tp-fldv_c > .tp-fldv.tp-v-lst .tp-fldv_b {
159
+ border-bottom-right-radius: 0;
160
+ }
161
+ .tp-custom .tp-rotv_c .tp-fldv.tp-v-vlst:not(.tp-fldv-expanded) > .tp-fldv_b,
162
+ .tp-custom .tp-rotv_c > .tp-fldv.tp-v-lst:not(.tp-fldv-expanded) > .tp-fldv_b {
163
+ border-bottom-left-radius: var(--tp-c-base-border-radius);
164
+ border-bottom-right-radius: var(--tp-c-base-border-radius);
165
+ }
166
+ .tp-custom .tp-rotv_c .tp-fldv:not(.tp-fldv-expanded) > .tp-fldv_b,
167
+ .tp-custom .tp-rotv_c > .tp-fldv:not(.tp-fldv-expanded) > .tp-fldv_b {
168
+ border-bottom-left-radius: var(--tp-c-base-border-radius);
169
+ border-bottom-right-radius: var(--tp-c-base-border-radius);
170
+ }
171
+ .tp-custom .tp-txtv_i,
172
+ .tp-custom .tp-btnv_b {
173
+ padding-inline: var(--tp-c-container-padding-inline);
174
+ }
175
+ .tp-custom .tp-lstv_s {
176
+ padding-left: var(--tp-c-container-padding-inline);
177
+ }
178
+ .tp-custom .tp-txtv_k:before {
179
+ opacity: 0.25;
180
+ }
181
+ .tp-custom .tp-lstv_m:before {
182
+ background-color: var(--tp-button-foreground-color);
183
+ content: "";
184
+ bottom: 1px;
185
+ height: 16px;
186
+ margin: auto;
187
+ position: absolute;
188
+ right: 0;
189
+ top: 0;
190
+ width: 16px;
191
+ object-fit: cover;
192
+ -webkit-mask: url("./assets/icons/triangle-down-16.svg") no-repeat center/contain;
193
+ mask: url("./assets/icons/triangle-down-16.svg") no-repeat center/contain;
194
+ }
195
+ .tp-custom .tp-lstv_m svg {
196
+ display: none;
197
+ }
198
+ .tp-custom .tp-rotv_m,
199
+ .tp-custom .tp-fldv_m {
200
+ background: none;
201
+ background-color: #FFF;
202
+ border-radius: 0;
203
+ bottom: 1px;
204
+ height: 16px;
205
+ right: 8px;
206
+ width: 16px;
207
+ transform: rotate(-180deg);
208
+ object-fit: cover;
209
+ -webkit-mask: url("./assets/icons/triangle-down-16.svg") no-repeat center/contain;
210
+ mask: url("./assets/icons/triangle-down-16.svg") no-repeat center/contain;
211
+ }
212
+ .tp-custom .tp-rotv.tp-rotv-expanded .tp-rotv_m,
213
+ .tp-custom .tp-fldv.tp-fldv-expanded > .tp-fldv_b > .tp-fldv_m {
214
+ transform: none;
215
+ }
216
+ .tp-custom .tp-tabv_i,
217
+ .tp-custom .tp-fldv_i {
218
+ display: none;
219
+ }
220
+ .tp-custom .tp-tbpv_c,
221
+ .tp-custom .tp-fldv_c {
222
+ padding-left: 0;
223
+ }
224
+ .tp-custom .tp-tbpv_c > .tp-cntv,
225
+ .tp-custom .tp-fldv_c > .tp-cntv {
226
+ margin-left: 0;
227
+ }
228
+ .tp-custom .tp-lblv {
229
+ padding-inline: var(--tp-c-container-padding-inline);
230
+ }
231
+ .tp-custom .tp-lblv_l {
232
+ flex-basis: var(--tp-c-base-label-flex-basis);
233
+ padding-inline: 0 var(--tp-c-container-padding-inline);
234
+ padding-block: var(--tp-c-textarea-padding-block);
235
+ }
236
+ .tp-custom .tp-lblv_v {
237
+ flex-basis: var(--tp-c-base-value-flex-basis);
238
+ width: auto;
239
+ }
240
+ .tp-custom .tp-ckbv_i:checked + .tp-ckbv_w:before {
241
+ opacity: 1;
242
+ }
243
+ .tp-custom .tp-ckbv_w {
244
+ margin-left: auto;
245
+ }
246
+ .tp-custom .tp-ckbv_w:before {
247
+ background-color: var(--tp-c-button-background-color-upper);
248
+ content: "";
249
+ bottom: 0;
250
+ height: 16px;
251
+ left: 2px;
252
+ margin: auto;
253
+ position: absolute;
254
+ top: 0;
255
+ width: 16px;
256
+ opacity: 0;
257
+ object-fit: cover;
258
+ -webkit-mask: url("./assets/icons/check-16.svg") no-repeat center/contain;
259
+ mask: url("./assets/icons/check-16.svg") no-repeat center/contain;
260
+ }
261
+ .tp-custom .tp-ckbv_w svg {
262
+ display: none;
263
+ }
264
+ .tp-custom .tp-sldv_t:before {
265
+ margin-inline: -6px;
266
+ }
267
+ .tp-custom .tp-sldv_t .tp-sldv_k:before {
268
+ opacity: 0.6;
269
+ left: -6px;
270
+ width: calc(100% + 6px);
271
+ }
272
+ .tp-custom .tp-sldtxtv_t {
273
+ margin-left: calc(var(--tp-c-container-horizontal-gap) + 6px);
274
+ }
275
+ .tp-custom .tp-sldtxtv_s {
276
+ flex: 1.55;
277
+ }
278
+ .tp-custom .tp-colv_t,
279
+ .tp-custom .tp-pndtxtv_a + .tp-pndtxtv_a,
280
+ .tp-custom .tp-coltxtv_c + .tp-pndtxtv_a,
281
+ .tp-custom .tp-pndtxtv_a + .tp-coltxtv_c,
282
+ .tp-custom .tp-coltxtv_c + .tp-coltxtv_c {
283
+ margin-left: var(--tp-c-container-horizontal-gap);
284
+ }
285
+ .tp-custom .tp-p2dv_b {
286
+ margin-right: var(--tp-c-container-horizontal-gap);
287
+ }
288
+ .tp-custom .tp-sprv_r {
289
+ height: 1px;
290
+ border-radius: 0.5px;
291
+ margin-block: var(--tp-c-container-vertical-gap);
292
+ margin-inline: var(--tp-c-container-padding-inline);
293
+ width: calc(100% - var(--tp-c-container-padding-inline) * 2);
294
+ }
295
+ .tp-custom .tp-dynlistblade_btn {
296
+ color: transparent;
297
+ background-color: transparent;
298
+ opacity: 0.2;
299
+ }
300
+ .tp-custom .tp-dynlistblade_btn:before {
301
+ background-color: #FFF;
302
+ content: "";
303
+ display: block;
304
+ height: 100%;
305
+ width: 100%;
306
+ object-fit: cover;
307
+ -webkit-mask: url("./assets/icons/x-12.svg") no-repeat center/contain;
308
+ mask: url("./assets/icons/x-12.svg") no-repeat center/contain;
309
+ transform: scale(0.8);
310
+ }
311
+ .tp-custom .tp-dynlistblade_btn:hover {
312
+ color: transparent;
313
+ background-color: transparent;
314
+ opacity: 0.5;
315
+ }
316
+ .tp-custom .tp-dynlistblade_btn:disabled {
317
+ color: transparent;
318
+ background-color: transparent;
319
+ opacity: 0.1;
320
+ display: none;
321
+ }
322
+ .tp-custom .tp-dynlistblade_btn.tp-dynlistblade_btn-up:before {
323
+ -webkit-mask: url("./assets/icons/chevron-up-12.svg") no-repeat center/contain;
324
+ mask: url("./assets/icons/chevron-up-12.svg") no-repeat center/contain;
325
+ }
326
+ .tp-custom .tp-dynlistblade_btn.tp-dynlistblade_btn-down:before {
327
+ -webkit-mask: url("./assets/icons/chevron-down-12.svg") no-repeat center/contain;
328
+ mask: url("./assets/icons/chevron-down-12.svg") no-repeat center/contain;
329
+ }
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@nakashim/tp-custom",
3
+ "private": false,
4
+ "version": "0.1.6",
5
+ "type": "module",
6
+ "main": "./dist/lib/index.js",
7
+ "module": "./dist/lib/index.js",
8
+ "types": "./dist/lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/lib/index.d.ts",
12
+ "import": "./dist/lib/index.js"
13
+ },
14
+ "./styles": "./dist/styles/tp-custom.css"
15
+ },
16
+ "files": [
17
+ "dist/lib",
18
+ "dist/styles"
19
+ ],
20
+ "scripts": {
21
+ "dev": "vite",
22
+ "build": "tsc -b && vite build",
23
+ "build:lib": "tsc -p tsconfig.lib.json",
24
+ "build:styles": "node ./scripts/build-styles.mjs",
25
+ "preview": "vite preview",
26
+ "storybook": "storybook dev -p 6006",
27
+ "build-storybook": "storybook build",
28
+ "typecheck:stories": "tsc -p tsconfig.storybook.json --noEmit",
29
+ "test": "vitest run",
30
+ "prepack": "npm run build:lib && npm run build:styles"
31
+ },
32
+ "peerDependencies": {
33
+ "@tweakpane/core": "^2.0.5",
34
+ "tweakpane": "^4.0.5"
35
+ },
36
+ "dependencies": {
37
+ "preact": "^10.27.2"
38
+ },
39
+ "devDependencies": {
40
+ "@preact/preset-vite": "^2.10.2",
41
+ "@storybook/addon-essentials": "^8.6.14",
42
+ "@storybook/addon-interactions": "^8.6.14",
43
+ "@storybook/preact-vite": "^8.6.18",
44
+ "@storybook/test": "^8.6.14",
45
+ "@tweakpane/core": "^2.0.5",
46
+ "@types/node": "^24.10.1",
47
+ "jsdom": "^27.2.0",
48
+ "sass": "^1.97.3",
49
+ "tweakpane": "^4.0.5",
50
+ "typescript": "~5.9.3",
51
+ "vite": "^7.3.1",
52
+ "vitest": "^4.0.0"
53
+ }
54
+ }