@netlisian/softconfig 0.1.1 → 0.1.3

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 CHANGED
@@ -61,6 +61,56 @@ import "@netlisian/softconfig/styles.css";
61
61
 
62
62
  You can supply custom overrides (action bar, headers, map UI, etc.) through the `overrides` prop. See `src/puck/types/Overrides.ts` for the full surface.
63
63
 
64
+ ## Action Lifecycle Events
65
+
66
+ `SoftConfigProvider` supports `onActions` for lifecycle callbacks:
67
+
68
+ - `build` → when build mode starts
69
+ - `remodel` → when remodel mode starts
70
+ - `complete` → when a build/remodel is finalized
71
+ - `inspect` → when inspect is requested
72
+ - `demolish` → when a soft component is deleted
73
+ - `setDefaultVersion`, `decompose`, `cancel`, `publish`
74
+
75
+ Version-aware payloads are included for build finalization and inspection flows:
76
+
77
+ ```ts
78
+ type ActionEventPayload =
79
+ | {
80
+ type: "remodel";
81
+ payload: {
82
+ id: string;
83
+ version?: string;
84
+ softComponent?: VersionedSoftComponent["versions"][string];
85
+ };
86
+ }
87
+ | {
88
+ type: "complete";
89
+ payload: {
90
+ id: string;
91
+ version: string;
92
+ componentData: Record<string, any>;
93
+ softComponent: VersionedSoftComponent["versions"][string];
94
+ };
95
+ }
96
+ | {
97
+ type: "inspect";
98
+ payload: {
99
+ id: string;
100
+ version?: string;
101
+ softComponent?: VersionedSoftComponent["versions"][string];
102
+ };
103
+ }
104
+ | {
105
+ type: "demolish";
106
+ payload: {
107
+ id: string;
108
+ };
109
+ };
110
+ ```
111
+
112
+ This contract allows downstream consumers (for example, save/sync bridges) to persist using exact version metadata without relying on inferred/default versions.
113
+
64
114
  ## Development
65
115
 
66
116
  - Build: `pnpm --filter @netlisian/softconfig build`
@@ -119,8 +119,8 @@
119
119
  margin: 0;
120
120
  }
121
121
 
122
- /* css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/overrides/ComponentItem.module.css/#css-module-data */
123
- ._ComponentItem_1kbi2_1 {
122
+ /* css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/overrides/DrawerItem.module.css/#css-module-data */
123
+ ._DrawerItem_182aj_1 {
124
124
  background: var(--puck-color-white);
125
125
  cursor: grab;
126
126
  border: 1px solid var(--puck-color-grey-09);
@@ -132,13 +132,13 @@
132
132
  transition: background-color 50ms ease-in, color 50ms ease-in;
133
133
  display: flex;
134
134
  }
135
- ._ComponentItem--insertDisabled_1kbi2_14 {
135
+ ._DrawerItem--insertDisabled_182aj_14 {
136
136
  cursor: not-allowed;
137
137
  color: var(--puck-color-grey-5);
138
138
  background: var(--puck-color-grey-11);
139
139
  pointer-events: none;
140
140
  }
141
- ._ComponentItem-content_1kbi2_21 {
141
+ ._DrawerItem-content_182aj_21 {
142
142
  flex: 1;
143
143
  display: flex;
144
144
  flex-direction: column;
@@ -147,82 +147,85 @@
147
147
  white-space: nowrap;
148
148
  overflow-x: hidden;
149
149
  }
150
- ._ComponentItem-name_1kbi2_31 {
150
+ ._DrawerItem-name_182aj_31 {
151
151
  font-weight: 400;
152
152
  }
153
- ._ComponentItem-version_1kbi2_35 {
153
+ ._DrawerItem-version_182aj_35 {
154
154
  font-size: 10px;
155
155
  color: var(--puck-color-grey-05);
156
156
  }
157
- ._ComponentItem-actions_1kbi2_40 {
157
+ ._DrawerItem-actions_182aj_40 {
158
158
  display: flex;
159
159
  align-items: center;
160
160
  gap: 8px;
161
161
  }
162
- ._ComponentItem-settingsButton_1kbi2_46 {
162
+ ._DrawerItem-settingsButton_182aj_46 {
163
163
  opacity: 0;
164
164
  transition: opacity 120ms ease;
165
165
  color: var(--puck-color-grey-05);
166
166
  }
167
- ._ComponentItem_1kbi2_1:hover ._ComponentItem-settingsButton_1kbi2_46 {
167
+ ._DrawerItem_182aj_1:hover ._DrawerItem-settingsButton_182aj_46 {
168
168
  opacity: 1;
169
169
  }
170
- ._ComponentItem-grip_1kbi2_56 {
170
+ ._DrawerItem-grip_182aj_56 {
171
171
  color: var(--puck-color-grey-05);
172
172
  display: flex;
173
173
  align-items: center;
174
174
  }
175
- ._ComponentItem-modal_1kbi2_63 {
175
+ ._DrawerItem-modal_182aj_63 {
176
176
  background: var(--puck-color-white);
177
177
  display: flex;
178
178
  flex-direction: column;
179
- height: 100%;
179
+ height: min(90dvh, 100%);
180
+ min-height: 0;
180
181
  }
181
- ._ComponentItem-modalHeader_1kbi2_70 {
182
+ ._DrawerItem-modalHeader_182aj_71 {
182
183
  padding: 24px 32px;
183
184
  border-bottom: 1px solid var(--puck-color-grey-09);
185
+ flex-shrink: 0;
184
186
  }
185
- ._ComponentItem-modalTitle_1kbi2_75 {
187
+ ._DrawerItem-modalTitle_182aj_77 {
186
188
  margin: 0 0 4px 0;
187
189
  font-size: 24px;
188
190
  font-weight: 600;
189
191
  color: var(--puck-color-black);
190
192
  }
191
- ._ComponentItem-modalSubtitle_1kbi2_82 {
193
+ ._DrawerItem-modalSubtitle_182aj_84 {
192
194
  margin: 0;
193
195
  font-size: 14px;
194
196
  color: var(--puck-color-grey-04);
195
197
  }
196
- ._ComponentItem-modalBody_1kbi2_88 {
198
+ ._DrawerItem-modalBody_182aj_90 {
197
199
  flex: 1;
200
+ min-height: 0;
198
201
  padding: 32px;
199
202
  overflow-y: auto;
200
203
  display: flex;
201
204
  flex-direction: column;
202
205
  gap: 32px;
203
206
  }
204
- ._ComponentItem-section_1kbi2_97 {
207
+ ._DrawerItem-section_182aj_100 {
205
208
  display: flex;
206
209
  flex-direction: column;
207
210
  gap: 16px;
208
211
  }
209
- ._ComponentItem-sectionTitle_1kbi2_103 {
212
+ ._DrawerItem-sectionTitle_182aj_106 {
210
213
  margin: 0;
211
214
  font-size: 16px;
212
215
  font-weight: 600;
213
216
  color: var(--puck-color-black);
214
217
  }
215
- ._ComponentItem-sectionDescription_1kbi2_110 {
218
+ ._DrawerItem-sectionDescription_182aj_113 {
216
219
  margin: 0;
217
220
  font-size: 14px;
218
221
  color: var(--puck-color-grey-04);
219
222
  }
220
- ._ComponentItem-versionList_1kbi2_116 {
223
+ ._DrawerItem-versionList_182aj_119 {
221
224
  display: flex;
222
225
  flex-direction: column;
223
226
  gap: 8px;
224
227
  }
225
- ._ComponentItem-versionRow_1kbi2_122 {
228
+ ._DrawerItem-versionRow_182aj_125 {
226
229
  display: flex;
227
230
  justify-content: space-between;
228
231
  align-items: center;
@@ -232,26 +235,26 @@
232
235
  background: var(--puck-color-white);
233
236
  transition: all 150ms ease;
234
237
  }
235
- ._ComponentItem-versionRow--isDefault_1kbi2_133 {
238
+ ._DrawerItem-versionRow--isDefault_182aj_136 {
236
239
  border-color: var(--puck-color-azure-07);
237
240
  background: var(--puck-color-azure-10);
238
241
  }
239
- ._ComponentItem-versionRow--isMarkedForDeletion_1kbi2_138 {
242
+ ._DrawerItem-versionRow--isMarkedForDeletion_182aj_141 {
240
243
  opacity: 0.6;
241
244
  background: var(--puck-color-grey-11);
242
245
  }
243
- ._ComponentItem-versionInfo_1kbi2_143 {
246
+ ._DrawerItem-versionInfo_182aj_146 {
244
247
  display: flex;
245
248
  align-items: center;
246
249
  gap: 12px;
247
250
  flex: 1;
248
251
  }
249
- ._ComponentItem-versionNumber_1kbi2_150 {
252
+ ._DrawerItem-versionNumber_182aj_153 {
250
253
  font-size: 14px;
251
254
  font-weight: 500;
252
255
  color: var(--puck-color-black);
253
256
  }
254
- ._ComponentItem-defaultBadge_1kbi2_156 {
257
+ ._DrawerItem-defaultBadge_182aj_159 {
255
258
  font-size: 11px;
256
259
  padding: 3px 8px;
257
260
  border-radius: 4px;
@@ -261,7 +264,7 @@
261
264
  text-transform: uppercase;
262
265
  letter-spacing: 0.5px;
263
266
  }
264
- ._ComponentItem-deleteBadge_1kbi2_167 {
267
+ ._DrawerItem-deleteBadge_182aj_170 {
265
268
  font-size: 11px;
266
269
  padding: 3px 8px;
267
270
  border-radius: 4px;
@@ -271,15 +274,26 @@
271
274
  text-transform: uppercase;
272
275
  letter-spacing: 0.5px;
273
276
  }
274
- ._ComponentItem-versionActions_1kbi2_178 {
277
+ ._DrawerItem-versionActions_182aj_181 {
275
278
  display: flex;
276
279
  gap: 8px;
277
280
  align-items: center;
278
281
  }
279
- ._ComponentItem-migrationOptions_1kbi2_184 {
282
+ ._DrawerItem-migrationOptions_182aj_187 {
280
283
  width: 100%;
281
284
  }
282
- ._ComponentItem-select_1kbi2_188 {
285
+ ._DrawerItem-migrationList_182aj_191 {
286
+ display: flex;
287
+ flex-direction: column;
288
+ gap: 8px;
289
+ max-height: 180px;
290
+ overflow-y: auto;
291
+ padding: 8px;
292
+ border: 1px solid var(--puck-color-grey-09);
293
+ border-radius: 6px;
294
+ background: var(--puck-color-white);
295
+ }
296
+ ._DrawerItem-migrationOption_182aj_187 {
283
297
  width: 100%;
284
298
  padding: 10px 12px;
285
299
  border: 1px solid var(--puck-color-grey-09);
@@ -289,33 +303,48 @@
289
303
  color: var(--puck-color-black);
290
304
  cursor: pointer;
291
305
  transition: border-color 150ms ease;
306
+ display: flex;
307
+ align-items: center;
308
+ justify-content: space-between;
309
+ gap: 8px;
310
+ text-align: start;
292
311
  }
293
- ._ComponentItem-select_1kbi2_188:hover {
312
+ ._DrawerItem-migrationOption_182aj_187:hover {
294
313
  border-color: var(--puck-color-grey-07);
295
314
  }
296
- ._ComponentItem-select_1kbi2_188:focus {
315
+ ._DrawerItem-migrationOption_182aj_187:focus {
297
316
  outline: none;
298
317
  border-color: var(--puck-color-azure-07);
299
318
  }
300
- ._ComponentItem-modalFooter_1kbi2_209 {
319
+ ._DrawerItem-migrationOption--isSelected_182aj_229 {
320
+ border-color: var(--puck-color-azure-07);
321
+ background: var(--puck-color-azure-10);
322
+ }
323
+ ._DrawerItem-migrationOptionLabel_182aj_234 {
324
+ white-space: nowrap;
325
+ overflow: hidden;
326
+ text-overflow: ellipsis;
327
+ }
328
+ ._DrawerItem-modalFooter_182aj_240 {
301
329
  padding: 20px 32px;
302
330
  border-top: 1px solid var(--puck-color-grey-09);
303
331
  display: flex;
304
332
  justify-content: space-between;
305
333
  align-items: center;
306
334
  background: var(--puck-color-grey-11);
335
+ flex-shrink: 0;
307
336
  }
308
- ._ComponentItem-footerLeft_1kbi2_218 {
337
+ ._DrawerItem-footerLeft_182aj_250 {
309
338
  display: flex;
310
339
  gap: 12px;
311
340
  }
312
- ._ComponentItem-footerRight_1kbi2_223 {
341
+ ._DrawerItem-footerRight_182aj_255 {
313
342
  display: flex;
314
343
  gap: 12px;
315
344
  }
316
345
 
317
346
  /* css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/components/modal/styles.module.css/#css-module-data */
318
- ._Modal_pvj02_1 {
347
+ ._Modal_1t9ot_1 {
319
348
  background: color-mix(in srgb, var(--puck-color-black) 75%, transparent);
320
349
  display: none;
321
350
  justify-content: center;
@@ -325,19 +354,77 @@
325
354
  left: 0;
326
355
  bottom: 0;
327
356
  right: 0;
328
- z-index: 1;
357
+ z-index: 1000;
329
358
  padding: 32px;
330
359
  }
331
- ._Modal--isOpen_pvj02_29 {
360
+ ._Modal--isOpen_1t9ot_29 {
332
361
  display: flex;
333
362
  }
334
- ._Modal-inner_pvj02_37 {
363
+ ._Modal-inner_1t9ot_37 {
335
364
  width: 100%;
336
365
  max-width: 1024px;
337
366
  border-radius: 8px;
338
- overflow: hidden;
367
+ overflow: visible;
339
368
  background: var(--puck-color-white);
340
369
  display: flex;
341
370
  flex-direction: column;
342
371
  max-height: 90dvh;
372
+ min-height: 0;
373
+ }
374
+
375
+ /* css-module:/media/manual_mount/osamuProjects/netlisian/packages/soft-config/src/puck/overrides/Drawer.module.css/#css-module-data */
376
+ ._Drawer_12zq5_1 {
377
+ display: flex;
378
+ flex-direction: column;
379
+ gap: 0;
380
+ }
381
+ ._Drawer-category_12zq5_7 {
382
+ max-width: 100%;
383
+ }
384
+ ._Drawer-category_12zq5_7 + ._Drawer-category_12zq5_7 {
385
+ margin-top: 4px;
386
+ }
387
+ ._Drawer-category--isExpanded_12zq5_15 + ._Drawer-category_12zq5_7 {
388
+ margin-top: 12px;
389
+ }
390
+ ._Drawer-categoryContent_12zq5_19 {
391
+ display: none;
392
+ }
393
+ ._Drawer-category--isExpanded_12zq5_15 > ._Drawer-categoryContent_12zq5_19 {
394
+ display: block;
395
+ }
396
+ ._Drawer-categoryTitle_12zq5_27 {
397
+ background-color: transparent;
398
+ border: 0;
399
+ color: var(--puck-color-grey-05);
400
+ cursor: pointer;
401
+ display: flex;
402
+ font: inherit;
403
+ font-size: var(--puck-font-size-xxxs);
404
+ list-style: none;
405
+ margin-bottom: 6px;
406
+ padding: 8px;
407
+ text-transform: uppercase;
408
+ transition: background-color 50ms ease-in, color 50ms ease-in;
409
+ gap: 4px;
410
+ border-radius: 4px;
411
+ width: 100%;
412
+ }
413
+ ._Drawer-categoryTitle_12zq5_27:focus-visible {
414
+ outline: 2px solid var(--puck-color-azure-05);
415
+ outline-offset: 2px;
416
+ }
417
+ @media (hover: hover) and (pointer: fine) {
418
+ ._Drawer-categoryTitle_12zq5_27:hover {
419
+ background-color: var(--puck-color-azure-11);
420
+ color: var(--puck-color-azure-04);
421
+ transition: none;
422
+ }
423
+ }
424
+ ._Drawer-categoryTitle_12zq5_27:active {
425
+ background-color: var(--puck-color-azure-10);
426
+ transition: none;
427
+ }
428
+ ._Drawer-categoryTitleIcon_12zq5_63 {
429
+ margin-inline-start: auto;
343
430
  }