@moyarich/console-addon-resizable 0.0.0-stage → 0.2.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/README.md +38 -2
- package/dist/components/ResizableConsoleFrame/ResizableConsoleFrame.d.cts +50 -0
- package/dist/components/ResizableConsoleFrame/ResizableConsoleFrame.d.ts +50 -0
- package/dist/console-addon-resizable.css +293 -0
- package/dist/index.cjs +377 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +377 -0
- package/dist/locales/en.json +8 -0
- package/dist/locales/es.json +8 -0
- package/dist/locales/fr.json +8 -0
- package/dist/locales/pt.json +8 -0
- package/dist/localization.d.cts +3 -0
- package/dist/localization.d.ts +3 -0
- package/dist/styles.css +294 -0
- package/package.json +73 -4
package/dist/styles.css
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/* src/components/ResizableConsoleFrame/ResizableConsoleFrame.css */
|
|
2
|
+
/* ==========================================================================
|
|
3
|
+
Resizable console addon
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
.console-resizable-frame,
|
|
7
|
+
.console-resizable-frame *,
|
|
8
|
+
.console-resizable-frame *::before,
|
|
9
|
+
.console-resizable-frame *::after {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.console-resizable-frame {
|
|
14
|
+
--_console-resize-color-scheme: var(
|
|
15
|
+
--console-resize-color-scheme,
|
|
16
|
+
var(--console-panel-color-scheme, var(--console-color-scheme, inherit))
|
|
17
|
+
);
|
|
18
|
+
--_console-resize-separator-line-background-color: var(
|
|
19
|
+
--console-resize-separator-line-background-color,
|
|
20
|
+
color-mix(in oklab, currentColor 18%, transparent)
|
|
21
|
+
);
|
|
22
|
+
--_console-resize-separator-hover-line-background-color: var(
|
|
23
|
+
--console-resize-separator-hover-line-background-color,
|
|
24
|
+
color-mix(in oklab, currentColor 38%, transparent)
|
|
25
|
+
);
|
|
26
|
+
--_console-resize-separator-active-line-background-color: var(
|
|
27
|
+
--console-resize-separator-active-line-background-color,
|
|
28
|
+
light-dark(#635bff, #8b83ff)
|
|
29
|
+
);
|
|
30
|
+
--_console-resize-separator-grip-color: var(
|
|
31
|
+
--console-resize-separator-grip-color,
|
|
32
|
+
color-mix(in oklab, currentColor 58%, transparent)
|
|
33
|
+
);
|
|
34
|
+
--_console-resize-separator-active-grip-color: var(
|
|
35
|
+
--console-resize-separator-active-grip-color,
|
|
36
|
+
light-dark(#635bff, #8b83ff)
|
|
37
|
+
);
|
|
38
|
+
--_console-resize-separator-grip-border: var(
|
|
39
|
+
--console-resize-separator-grip-border,
|
|
40
|
+
1px solid color-mix(in oklab, currentColor 18%, transparent)
|
|
41
|
+
);
|
|
42
|
+
--_console-resize-separator-grip-background-color: var(
|
|
43
|
+
--console-resize-separator-grip-background-color,
|
|
44
|
+
light-dark(
|
|
45
|
+
color-mix(in oklab, white 96%, currentColor 4%),
|
|
46
|
+
color-mix(in oklab, #111113 94%, currentColor 6%)
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
--_console-resize-separator-grip-border-radius: var(
|
|
50
|
+
--console-resize-separator-grip-border-radius,
|
|
51
|
+
999px
|
|
52
|
+
);
|
|
53
|
+
--_console-resize-separator-grip-box-shadow: var(
|
|
54
|
+
--console-resize-separator-grip-box-shadow,
|
|
55
|
+
0 4px 14px color-mix(in oklab, currentColor 14%, transparent)
|
|
56
|
+
);
|
|
57
|
+
--_console-resize-handle-size: var(--console-resize-handle-size, 10px);
|
|
58
|
+
--_console-resize-corner-size: var(--console-resize-corner-size, 28px);
|
|
59
|
+
|
|
60
|
+
color-scheme: var(--_console-resize-color-scheme);
|
|
61
|
+
position: relative;
|
|
62
|
+
display: flex;
|
|
63
|
+
width: 100%;
|
|
64
|
+
max-width: 100%;
|
|
65
|
+
min-width: 0;
|
|
66
|
+
height: 100%;
|
|
67
|
+
max-height: 100%;
|
|
68
|
+
min-height: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.console-resizable-frame[data-console-resize-direction="horizontal"],
|
|
72
|
+
.console-resizable-frame[data-console-resize-direction="inline"],
|
|
73
|
+
.console-resizable-frame[data-console-resize-direction="both"] {
|
|
74
|
+
width: var(--_console-resizable-width);
|
|
75
|
+
min-width: min(100%, var(--_console-resizable-min-width));
|
|
76
|
+
max-width: min(100%, var(--_console-resizable-max-width));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.console-resizable-frame[data-console-resize-direction="vertical"],
|
|
80
|
+
.console-resizable-frame[data-console-resize-direction="block"],
|
|
81
|
+
.console-resizable-frame[data-console-resize-direction="both"] {
|
|
82
|
+
height: var(--_console-resizable-height);
|
|
83
|
+
min-height: min(100%, var(--_console-resizable-min-height));
|
|
84
|
+
max-height: min(100%, var(--_console-resizable-max-height));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.console-resizable-frame-content {
|
|
88
|
+
display: flex;
|
|
89
|
+
width: 100%;
|
|
90
|
+
min-width: 0;
|
|
91
|
+
height: 100%;
|
|
92
|
+
min-height: 0;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.console-resize-handle {
|
|
97
|
+
position: absolute;
|
|
98
|
+
z-index: 3;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
color: var(--_console-resize-separator-grip-color);
|
|
103
|
+
outline: none;
|
|
104
|
+
touch-action: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.console-resize-handle[data-console-resize-axis="horizontal"] {
|
|
108
|
+
top: 0;
|
|
109
|
+
width: var(--_console-resize-handle-size);
|
|
110
|
+
height: 100%;
|
|
111
|
+
cursor: col-resize;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="end"]
|
|
115
|
+
> .console-resize-handle[data-console-resize-axis="horizontal"] {
|
|
116
|
+
right: calc(var(--_console-resize-handle-size) / -2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="start"]
|
|
120
|
+
> .console-resize-handle[data-console-resize-axis="horizontal"] {
|
|
121
|
+
left: calc(var(--_console-resize-handle-size) / -2);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.console-resize-handle[data-console-resize-axis="vertical"] {
|
|
125
|
+
left: 0;
|
|
126
|
+
width: 100%;
|
|
127
|
+
height: var(--_console-resize-handle-size);
|
|
128
|
+
cursor: row-resize;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.console-resizable-frame[data-console-resize-vertical-edge="end"]
|
|
132
|
+
> .console-resize-handle[data-console-resize-axis="vertical"] {
|
|
133
|
+
bottom: calc(var(--_console-resize-handle-size) / -2);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.console-resizable-frame[data-console-resize-vertical-edge="start"]
|
|
137
|
+
> .console-resize-handle[data-console-resize-axis="vertical"] {
|
|
138
|
+
top: calc(var(--_console-resize-handle-size) / -2);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.console-resize-handle::before {
|
|
142
|
+
position: absolute;
|
|
143
|
+
background: var(--_console-resize-separator-line-background-color);
|
|
144
|
+
content: "";
|
|
145
|
+
pointer-events: none;
|
|
146
|
+
transition: background 120ms ease;
|
|
147
|
+
margin-top: -1px;
|
|
148
|
+
border-radius: 6px;
|
|
149
|
+
opacity: 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.console-resize-handle[data-console-resize-axis="horizontal"]::before {
|
|
153
|
+
width: 5px;
|
|
154
|
+
height: 90%;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.console-resize-handle[data-console-resize-axis="vertical"]::before {
|
|
158
|
+
width: 90%;
|
|
159
|
+
height: 5px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.console-resize-handle:hover::before,
|
|
163
|
+
.console-resize-handle:focus-visible::before {
|
|
164
|
+
background: var(--_console-resize-separator-hover-line-background-color);
|
|
165
|
+
opacity: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.console-resize-handle[data-active="true"]::before {
|
|
169
|
+
background: var(--_console-resize-separator-active-line-background-color);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.console-resize-grip {
|
|
173
|
+
position: relative;
|
|
174
|
+
display: inline-flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
border: 1px solid transparent;
|
|
178
|
+
border-radius: var(--_console-resize-separator-grip-border-radius);
|
|
179
|
+
background: transparent;
|
|
180
|
+
box-shadow: none;
|
|
181
|
+
color: inherit;
|
|
182
|
+
opacity: 0.55;
|
|
183
|
+
pointer-events: none;
|
|
184
|
+
transition:
|
|
185
|
+
opacity 120ms ease,
|
|
186
|
+
background 120ms ease,
|
|
187
|
+
border-color 120ms ease,
|
|
188
|
+
box-shadow 120ms ease,
|
|
189
|
+
color 120ms ease;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.console-resize-handle[data-console-resize-axis="horizontal"]
|
|
193
|
+
> .console-resize-grip {
|
|
194
|
+
width: 22px;
|
|
195
|
+
height: 34px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.console-resize-handle[data-console-resize-axis="vertical"]
|
|
199
|
+
> .console-resize-grip {
|
|
200
|
+
width: 34px;
|
|
201
|
+
height: 22px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.console-resize-handle:hover > .console-resize-grip,
|
|
205
|
+
.console-resize-handle:focus-visible > .console-resize-grip,
|
|
206
|
+
.console-resize-handle[data-active="true"] > .console-resize-grip {
|
|
207
|
+
border: var(--_console-resize-separator-grip-border);
|
|
208
|
+
background: var(--_console-resize-separator-grip-background-color);
|
|
209
|
+
box-shadow: var(--_console-resize-separator-grip-box-shadow);
|
|
210
|
+
opacity: 1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.console-resize-handle[data-active="true"] > .console-resize-grip {
|
|
214
|
+
color: var(--_console-resize-separator-active-grip-color);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.console-resize-corner-handle {
|
|
218
|
+
position: absolute;
|
|
219
|
+
z-index: 4;
|
|
220
|
+
display: flex;
|
|
221
|
+
width: var(--_console-resize-corner-size);
|
|
222
|
+
height: var(--_console-resize-corner-size);
|
|
223
|
+
align-items: center;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
border: 1px solid transparent;
|
|
226
|
+
border-radius: 8px;
|
|
227
|
+
background: transparent;
|
|
228
|
+
box-shadow: none;
|
|
229
|
+
color: var(--_console-resize-separator-grip-color);
|
|
230
|
+
opacity: 0.65;
|
|
231
|
+
outline: none;
|
|
232
|
+
touch-action: none;
|
|
233
|
+
transition:
|
|
234
|
+
opacity 120ms ease,
|
|
235
|
+
background 120ms ease,
|
|
236
|
+
border-color 120ms ease,
|
|
237
|
+
box-shadow 120ms ease,
|
|
238
|
+
color 120ms ease;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="end"]
|
|
242
|
+
> .console-resize-corner-handle {
|
|
243
|
+
right: -4px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="start"]
|
|
247
|
+
> .console-resize-corner-handle {
|
|
248
|
+
left: -4px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.console-resizable-frame[data-console-resize-vertical-edge="end"]
|
|
252
|
+
> .console-resize-corner-handle {
|
|
253
|
+
bottom: -4px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.console-resizable-frame[data-console-resize-vertical-edge="start"]
|
|
257
|
+
> .console-resize-corner-handle {
|
|
258
|
+
top: -4px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="end"][data-console-resize-vertical-edge="end"]
|
|
262
|
+
> .console-resize-corner-handle,
|
|
263
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="start"][data-console-resize-vertical-edge="start"]
|
|
264
|
+
> .console-resize-corner-handle {
|
|
265
|
+
cursor: nwse-resize;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="end"][data-console-resize-vertical-edge="start"]
|
|
269
|
+
> .console-resize-corner-handle,
|
|
270
|
+
.console-resizable-frame[data-console-resize-horizontal-edge="start"][data-console-resize-vertical-edge="end"]
|
|
271
|
+
> .console-resize-corner-handle {
|
|
272
|
+
cursor: nesw-resize;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.console-resize-corner-handle:hover,
|
|
276
|
+
.console-resize-corner-handle:focus-visible,
|
|
277
|
+
.console-resize-corner-handle[data-active="true"] {
|
|
278
|
+
border: var(--_console-resize-separator-grip-border);
|
|
279
|
+
background: var(--_console-resize-separator-grip-background-color);
|
|
280
|
+
box-shadow: var(--_console-resize-separator-grip-box-shadow);
|
|
281
|
+
opacity: 1;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.console-resize-corner-handle[data-active="true"] {
|
|
285
|
+
color: var(--_console-resize-separator-active-grip-color);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@media (prefers-reduced-motion: reduce) {
|
|
289
|
+
.console-resize-handle::before,
|
|
290
|
+
.console-resize-grip,
|
|
291
|
+
.console-resize-corner-handle {
|
|
292
|
+
transition: none;
|
|
293
|
+
}
|
|
294
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moyarich/console-addon-resizable",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "First-party resizable frame addon for @moyarich/console hosts.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./dist/index.d.cts",
|
|
18
|
+
"default": "./dist/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"./styles.css": "./dist/styles.css"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"registry": "https://npm.pkg.github.com"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "vite build && tsc -p tsconfig.build.json && node ../../../scripts/prepare-cjs-types.mjs && node ../../../scripts/prepare-addon-styles.mjs",
|
|
31
|
+
"typecheck": "tsc --noEmit"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"lucide-react": "^1.47.0"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"@moyarich/console-core": "^0.2.0",
|
|
38
|
+
"react": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@moyarich/console-core": "0.2.0",
|
|
42
|
+
"@types/react": "^19.1.12",
|
|
43
|
+
"react": "^19.2.7",
|
|
44
|
+
"typescript": "^5.9.2",
|
|
45
|
+
"vite": "^7.1.5"
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "git+https://github.com/moyarich/console.git",
|
|
50
|
+
"directory": "packages/addons/resizable"
|
|
51
|
+
},
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/moyarich/console/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/moyarich/console#readme",
|
|
56
|
+
"keywords": [
|
|
57
|
+
"console",
|
|
58
|
+
"addon",
|
|
59
|
+
"resize",
|
|
60
|
+
"developer-tools"
|
|
61
|
+
],
|
|
62
|
+
"sideEffects": [
|
|
63
|
+
"./src/index.tsx",
|
|
64
|
+
"./src/components/ResizableConsoleFrame/ResizableConsoleFrame.css",
|
|
65
|
+
"./dist/index.js",
|
|
66
|
+
"./dist/index.cjs",
|
|
67
|
+
"./dist/styles.css"
|
|
68
|
+
],
|
|
69
|
+
"publisher": "moyarich",
|
|
70
|
+
"author": "Moya Richards",
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">=24"
|
|
73
|
+
},
|
|
74
|
+
"private": false
|
|
75
|
+
}
|