@fewbox/den-web 0.1.44 → 0.2.0-preview.2

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 (48) hide show
  1. package/index-web.d.ts +1 -4
  2. package/index.css +1 -1
  3. package/index.js +2 -1
  4. package/index.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/components/Auth/GoogleGrant/index.d.ts +10 -8
  7. package/src/components/Auth/GoogleSignin/index.d.ts +6 -5
  8. package/src/components/Engine/Base/index.d.ts +8 -9
  9. package/src/components/Engine/index.d.ts +282 -260
  10. package/src/components/Layout/Breakpoint/index.d.ts +20 -17
  11. package/src/components/Layout/Dock/index.d.ts +25 -23
  12. package/src/components/Layout/Flex/index.d.ts +38 -33
  13. package/src/components/Layout/FlexItem/index.d.ts +8 -7
  14. package/src/components/Layout/Position/index.d.ts +19 -17
  15. package/src/components/Layout/PositionArea/index.d.ts +5 -4
  16. package/src/components/Layout/XBase/index.d.ts +8 -7
  17. package/src/components/Layout/YBase/index.d.ts +8 -7
  18. package/src/components/View/VAnimation/index.d.ts +122 -118
  19. package/src/components/View/VBackground/index.d.ts +10 -10
  20. package/src/components/View/VCardWindow/index.d.ts +6 -5
  21. package/src/components/View/VChromeExtensionValidator/index.d.ts +8 -7
  22. package/src/components/View/VForm/index.d.ts +5 -4
  23. package/src/components/View/VGoogleFont/index.d.ts +5 -4
  24. package/src/components/View/VHyperlink/index.d.ts +7 -6
  25. package/src/components/View/VImage/index.d.ts +12 -8
  26. package/src/components/View/VInput/VColor/index.d.ts +0 -2
  27. package/src/components/View/VInput/VDate/index.d.ts +0 -2
  28. package/src/components/View/VInput/VDatetimeLocal/index.d.ts +0 -2
  29. package/src/components/View/VInput/VFile/index.d.ts +5 -4
  30. package/src/components/View/VInput/VGroup/index.d.ts +1 -1
  31. package/src/components/View/VInput/VRange/index.d.ts +1 -2
  32. package/src/components/View/VLabel/index.d.ts +53 -47
  33. package/src/components/View/VPhoto/index.d.ts +12 -10
  34. package/src/components/View/VRoot/index.d.ts +5 -4
  35. package/src/components/View/VShadow/index.d.ts +5 -4
  36. package/src/components/View/VShape/VEllipse/index.d.ts +5 -4
  37. package/src/components/View/VShape/VLine/index.d.ts +5 -4
  38. package/src/components/View/VShape/VRectangle/index.d.ts +5 -4
  39. package/src/components/View/VSvg/index.d.ts +11 -7
  40. package/src/components/View/VText/index.d.ts +18 -16
  41. package/src/components/View/VTheme/index.d.ts +13 -11
  42. package/src/components/View/VTooltip/index.d.ts +5 -4
  43. package/src/components/View/VVideo/index.d.ts +1 -4
  44. package/src/components/View/VZone/index.d.ts +9 -8
  45. package/src/components/core.d.ts +10 -1
  46. package/src/components/web.d.ts +4 -0
  47. package/templates/.claude/skills/fewbox-den/SKILL.md +400 -86
  48. package/tsconfig.app.tsbuildinfo +1 -1
@@ -25,45 +25,61 @@ Den.Components.ColorType // enums are also under Components
25
25
 
26
26
  ### Variant Exports
27
27
 
28
- - **core**: Layout (X/Y/S/Flex/Position/Dock/Display/Responsive), View (VBoundary, VLabel, VText, VForm, VInput/*, VSelect, VDropdown, VSwitch, VImage, VSvg, VBackground, VAnimation, VTooltip, VLoading, VErrorBoundary, VShape/*, VHyperlink, VMask, VFrame, VTheme, VHeader/VMain/VFooter, VHR, VSection, VZone, VAudio, VVideo, VShadow)
29
- - **web**: core + Debug, VGoogleFont, VChromeExtensionValidator, GoogleGrant, GoogleSignin, FigmaSignin, WeComSignin
30
- - **app**: web + VDynamic, VAvatar, VBlock, VCard, VCardMedia, VCardSocial, VCardWindow, VPhoto, VStack, VTree
28
+ - **core** (`Den.Components`): Layout (X/Y/S/Flex/FlexItem/Position/PositionArea/Dock/BreakpointDisplay/Responsive), View (VBoundary, VLabel, VText, VForm, VActionForm, VInput/*, VSelect, VDropdown, VSwitch, VImage, VSvg, VBackground, VAnimation, VTooltip, VLoading, VErrorBoundary, VShape/*, VHyperlink, VMask, VFrame, VTheme, VHeader/VMain/VFooter, VHR, VSection, VZone, VAudio, VVideo, VShadow), Enums, Types, utilities
29
+ - **web** (`Den.Components`): core + Debug, VGoogleFont, VChromeExtensionValidator, GoogleGrant, GoogleSignin, FigmaSignin, WeComSignin, parseJWT
30
+ - **app** (`Den.Components`): web + VDynamic, VAvatar, VBlock, VCard, VCardMedia, VCardSocial, VCardWindow, VPhoto, VStack, VTree
31
+ - **app** also exports: `Den.FewBox`, `Den.Language`, `Den.Network`, `Den.Store`
32
+ - **append** (no Components): `Den.FewBox`, `Den.Language`, `Den.Network`, `Den.Store`
31
33
 
32
34
  ## Core Concepts
33
35
 
34
- ### Common Props (IBaseProps)
36
+ ### Common Props (IViewProps / IBaseProps)
35
37
 
36
- All components extend `IBaseProps` which provides these shared props:
38
+ All components extend `IBaseProps` (which extends `IViewProps`) providing these shared props:
37
39
 
38
40
  | Prop | Type | Description |
39
41
  |------|------|-------------|
40
42
  | `className` | `string` | Additional CSS classes |
41
43
  | `style` | `CSSProperties` | Inline styles |
42
44
  | `fontSize` | `FontSizeType \| string` | Font size preset or custom value |
45
+ | `isAutoSize` | `boolean` | Use auto-responsive font size variant |
43
46
  | `fontWeight` | `FontWeightType` | Font weight (Thin through Black) |
44
47
  | `frontColor` | `ColorType \| string` | Text/foreground color |
45
48
  | `backgroundColor` | `ColorType \| string` | Background color |
46
49
  | `borderColor` | `ColorType \| string` | Border color |
47
50
  | `borderDirection` | `DirectionType` | Which sides get the border |
48
- | `padding` | `string` | CSS padding |
49
- | `margin` | `string` | CSS margin |
51
+ | `borderRadius` | `BorderRadiusType \| string` | Border radius preset or custom |
52
+ | `borderStyle` | `BorderStyleType \| string` | Border style preset or custom |
53
+ | `borderWidth` | `BorderWidthType \| string` | Border width preset or custom |
54
+ | `padding` | `PaddingType \| string` | CSS padding (preset or custom) |
55
+ | `margin` | `MarginType \| string` | CSS margin (preset or custom) |
56
+ | `opacity` | `OpacityType` | Opacity preset |
57
+ | `display` | `DisplayType \| string` | CSS display preset or custom |
58
+ | `visibility` | `VisibilityType \| string` | CSS visibility preset or custom |
59
+ | `cursor` | `CursorType \| string` | CSS cursor preset or custom |
60
+ | `overflow` | `OverflowType \| string` | CSS overflow preset or custom |
61
+ | `overflowX` | `OverflowXType \| string` | CSS overflow-x preset or custom |
62
+ | `overflowY` | `OverflowYType \| string` | CSS overflow-y preset or custom |
50
63
  | `width` | `string` | CSS width |
51
64
  | `height` | `string` | CSS height |
52
65
  | `minWidth` | `string` | CSS min-width |
53
66
  | `minHeight` | `string` | CSS min-height |
54
67
  | `maxWidth` | `string` | CSS max-width |
55
68
  | `maxHeight` | `string` | CSS max-height |
56
- | `borderRadius` | `string` | CSS border-radius |
57
- | `borderWidth` | `string` | CSS border-width |
58
- | `borderStyle` | `string` | CSS border-style |
59
- | `opacity` | `number` | CSS opacity |
60
- | `display` | `string` | CSS display |
61
- | `overflow` | `string` | CSS overflow |
62
- | `cursor` | `string` | CSS cursor |
69
+ | `zIndex` | `number` | CSS z-index |
70
+ | `fontFamily` | `string` | CSS font-family |
71
+ | `letterSpacing` | `string` | CSS letter-spacing |
72
+ | `lineHeight` | `string` | CSS line-height |
63
73
  | `selfShrink` | `number` | flex-shrink for the component itself |
64
74
  | `selfGrow` | `number` | flex-grow for the component itself |
65
75
  | `selfBasis` | `string` | flex-basis for the component itself |
66
76
  | `isDefaultValue` | `boolean` | Apply default transparency and color resets |
77
+ | `pseudoType` | `PseudoType` | Pseudo element target (All, Before, After) |
78
+ | `pseudoFrontColor` | `ColorType \| string` | Pseudo element foreground color |
79
+ | `pseudoBackgroundColor` | `ColorType \| string` | Pseudo element background color |
80
+ | `pseudoBorderColor` | `ColorType \| string` | Pseudo element border color |
81
+ | `pseudoBorderDirection` | `DirectionType` | Pseudo element border direction |
82
+ | `customAttributes` | `Object` | Custom HTML attributes to spread |
67
83
 
68
84
  ### Color System (ColorType)
69
85
 
@@ -87,7 +103,7 @@ ColorType.Border // border color
87
103
  ColorType.Placeholder // placeholder color
88
104
  ColorType.Transparent // transparent
89
105
 
90
- // Each color has opacity variants:
106
+ // Each color has opacity variants (Light, Dark, Primary, Secondary, Tertiary, Info, Success, Warning, Error, Border, Placeholder):
91
107
  ColorType.Primary75 // 75% opacity
92
108
  ColorType.Primary50 // 50% opacity
93
109
  ColorType.Primary25 // 25% opacity
@@ -96,10 +112,10 @@ ColorType.Primary25 // 25% opacity
96
112
  ### Font Size System (FontSizeType)
97
113
 
98
114
  ```tsx
115
+ FontSizeType.Default
116
+ FontSizeType.Normal
99
117
  FontSizeType.ExtraSmall
100
118
  FontSizeType.Small
101
- FontSizeType.Normal
102
- FontSizeType.Default
103
119
  FontSizeType.Large
104
120
  FontSizeType.ExtraLarge
105
121
 
@@ -128,6 +144,45 @@ FontWeightType.ExtraBold // 800
128
144
  FontWeightType.Black // 900
129
145
  ```
130
146
 
147
+ ### Preset Enums (class-based styling)
148
+
149
+ These enums generate CSS classes. Pass enum value or a custom string (generates `{prefix}-{value}` class):
150
+
151
+ ```tsx
152
+ // Border Radius
153
+ BorderRadiusType.Default | .Normal | .ExtraSmall | .Small | .Large | .ExtraLarge | .Max
154
+
155
+ // Border Style
156
+ BorderStyleType.None | .Solid | .Dashed | .Dotted | .Double | .Groove | .Ridge | .Inset | .Outset | .Hidden
157
+
158
+ // Border Width
159
+ BorderWidthType.Default | .Normal | .ExtraSmall | .Small | .Large | .ExtraLarge
160
+
161
+ // Padding
162
+ PaddingType.Default | .Normal | .ExtraSmall | .Small | .Large | .ExtraLarge
163
+
164
+ // Margin
165
+ MarginType.Default | .Normal | .ExtraSmall | .Small | .Large | .ExtraLarge
166
+
167
+ // Gap (for layout components)
168
+ GapType.Default | .Normal | .ExtraSmall | .Small | .Large | .ExtraLarge
169
+
170
+ // Opacity
171
+ OpacityType._0 | ._10 | ._20 | ._25 | ._30 | ._40 | ._50 | ._60 | ._70 | ._75 | ._80 | ._90 | ._100
172
+
173
+ // Display
174
+ DisplayType.None | .Block | .Inline | .InlineBlock | .Flex | .InlineFlex | .Grid | .InlineGrid | .Table | .TableRow | .TableCell | .Contents | .FlowRoot
175
+
176
+ // Visibility
177
+ VisibilityType.Visible | .Hidden | .Collapse
178
+
179
+ // Cursor
180
+ CursorType.Auto | .Default | .None | .Pointer | .Wait | .Text | .Move | .NotAllowed | .Grab | .Grabbing | ... (30+ options)
181
+
182
+ // Overflow / OverflowX / OverflowY
183
+ OverflowType.Visible | .Hidden | .Scroll | .Auto | .Clip
184
+ ```
185
+
131
186
  ---
132
187
 
133
188
  ## Layout Components
@@ -244,17 +299,13 @@ Wrap a child in an S-component to override the parent's cross-axis alignment for
244
299
  </Den.Components.STop>
245
300
  </Den.Components.XCenter>
246
301
 
247
- // In X containers (cross-axis is vertical):
302
+ // Available S-components:
248
303
  <Den.Components.STop>...</Den.Components.STop> // align-self: flex-start
249
304
  <Den.Components.SMiddle>...</Den.Components.SMiddle> // align-self: center
250
305
  <Den.Components.SBottom>...</Den.Components.SBottom> // align-self: flex-end
251
- <Den.Components.SStretch>...</Den.Components.SStretch> // align-self: stretch
252
- <Den.Components.SBaseline>...</Den.Components.SBaseline>// align-self: baseline
253
-
254
- // In Y containers (cross-axis is horizontal):
255
- <Den.Components.SLeft>...</Den.Components.SLeft> // align-self: flex-start
256
- <Den.Components.SCenter>...</Den.Components.SCenter> // align-self: center
257
- <Den.Components.SRight>...</Den.Components.SRight> // align-self: flex-end
306
+ <Den.Components.SLeft>...</Den.Components.SLeft> // align-self: flex-start (in Y container)
307
+ <Den.Components.SCenter>...</Den.Components.SCenter> // align-self: center (in Y container)
308
+ <Den.Components.SRight>...</Den.Components.SRight> // align-self: flex-end (in Y container)
258
309
  <Den.Components.SStretch>...</Den.Components.SStretch> // align-self: stretch
259
310
  <Den.Components.SBaseline>...</Den.Components.SBaseline>// align-self: baseline
260
311
  ```
@@ -263,7 +314,6 @@ Wrap a child in an S-component to override the parent's cross-axis alignment for
263
314
 
264
315
  ```tsx
265
316
  // PositionArea establishes a positioning context (position: relative) on its child.
266
- // PositionCategory.Area = position: absolute (for items inside)
267
317
  <Den.Components.PositionArea category={Den.Components.PositionAreaCategory.FullSize}>
268
318
  <Den.Components.VBoundary height="250px" backgroundColor={Den.Components.ColorType.Dark}>
269
319
  <Den.Components.Position category={Den.Components.PositionCategory.Area} type={Den.Components.PositionType.Center}>
@@ -331,60 +381,59 @@ Wrap a child in an S-component to override the parent's cross-axis alignment for
331
381
  </Den.Components.Dock>
332
382
  ```
333
383
 
334
- ### Display (Responsive Show/Hide)
384
+ ### BreakpointDisplay (Responsive Show/Hide)
335
385
 
336
- **Important:** Display uses `cloneElement` to inject className — child must accept `className` prop.
386
+ **Important:** BreakpointDisplay uses `cloneElement` to inject className — child must accept `className` prop.
337
387
 
338
388
  ```tsx
339
- // DisplayCategory: Visiable, Hidden
340
- // DisplayType: Only, Up, Down
389
+ // BreakpointCategory: Visible, Hidden
390
+ // BreakpointType: Only, Up, Down
391
+ // ScreenSizeType: ExtraSmall, Small, Medium, Large, ExtraLarge, ExtraExtraLarge
341
392
 
342
393
  // Always visible
343
- <Den.Components.Display category={Den.Components.DisplayCategory.Visiable}>
394
+ <Den.Components.BreakpointDisplay category={Den.Components.BreakpointCategory.Visible}>
344
395
  <div>Always shown</div>
345
- </Den.Components.Display>
396
+ </Den.Components.BreakpointDisplay>
346
397
 
347
398
  // Always hidden
348
- <Den.Components.Display category={Den.Components.DisplayCategory.Hidden}>
399
+ <Den.Components.BreakpointDisplay category={Den.Components.BreakpointCategory.Hidden}>
349
400
  <div>Always hidden</div>
350
- </Den.Components.Display>
401
+ </Den.Components.BreakpointDisplay>
351
402
 
352
403
  // Responsive: visible only on Medium breakpoint
353
- <Den.Components.Display
354
- category={Den.Components.DisplayCategory.Visiable}
355
- type={Den.Components.DisplayType.Only}
356
- breakpoint={Den.Components.BreakpointType.Medium}
404
+ <Den.Components.BreakpointDisplay
405
+ category={Den.Components.BreakpointCategory.Visible}
406
+ type={Den.Components.BreakpointType.Only}
407
+ breakpoint={Den.Components.ScreenSizeType.Medium}
357
408
  >
358
409
  <div>Medium only</div>
359
- </Den.Components.Display>
410
+ </Den.Components.BreakpointDisplay>
360
411
 
361
412
  // Hidden on Small and below
362
- <Den.Components.Display
363
- category={Den.Components.DisplayCategory.Hidden}
364
- type={Den.Components.DisplayType.Down}
365
- breakpoint={Den.Components.BreakpointType.Small}
413
+ <Den.Components.BreakpointDisplay
414
+ category={Den.Components.BreakpointCategory.Hidden}
415
+ type={Den.Components.BreakpointType.Down}
416
+ breakpoint={Den.Components.ScreenSizeType.Small}
366
417
  >
367
418
  <div>Hidden on mobile</div>
368
- </Den.Components.Display>
419
+ </Den.Components.BreakpointDisplay>
369
420
 
370
421
  // Multiple breakpoints (array):
371
- <Den.Components.Display
372
- category={Den.Components.DisplayCategory.Visiable}
373
- breakpoint={[Den.Components.BreakpointType.Small, Den.Components.BreakpointType.Large]}
422
+ <Den.Components.BreakpointDisplay
423
+ category={Den.Components.BreakpointCategory.Visible}
424
+ breakpoint={[Den.Components.ScreenSizeType.Small, Den.Components.ScreenSizeType.Large]}
374
425
  >
375
426
  <div>Visible on Small and Large</div>
376
- </Den.Components.Display>
377
-
378
- // BreakpointType: ExtraSmall, Small, Medium, Large, ExtraLarge, ExtraExtraLarge
427
+ </Den.Components.BreakpointDisplay>
379
428
  ```
380
429
 
381
430
  ### Responsive (Desktop/Mobile Switch)
382
431
 
383
432
  ```tsx
384
433
  // Shorthand for showing desktop or mobile content based on breakpoint.
385
- // Children must accept className prop (uses Display internally).
434
+ // Children must accept className prop (uses BreakpointDisplay internally).
386
435
  <Den.Components.Responsive
387
- breakpointType={Den.Components.BreakpointType.Medium}
436
+ breakpointType={Den.Components.ScreenSizeType.Medium}
388
437
  desktop={<div>Desktop layout</div>}
389
438
  mobile={<div>Mobile layout</div>}
390
439
  />
@@ -402,11 +451,11 @@ Wrap a child in an S-component to override the parent's cross-axis alignment for
402
451
 
403
452
  // ZoneCategory:
404
453
  // Fluid — always 100%, no max-width
405
- // Small — constrained from 576px (54072096011401320)
406
- // Medium — constrained from 768px (72096011401320)
407
- // Large — constrained from 992px (96011401320)
408
- // ExtraLarge — constrained from 1200px (11401320)
409
- // ExtraExtraLarge — constrained from 1400px (1320)
454
+ // Small — constrained from >=576px (540->720->960->1140->1320)
455
+ // Medium — constrained from >=768px (720->960->1140->1320)
456
+ // Large — constrained from >=992px (960->1140->1320)
457
+ // ExtraLarge — constrained from >=1200px (1140->1320)
458
+ // ExtraExtraLarge — constrained from >=1400px (1320)
410
459
  ```
411
460
 
412
461
  ### Flex & FlexItem (Low-level Control)
@@ -427,6 +476,9 @@ Wrap a child in an S-component to override the parent's cross-axis alignment for
427
476
  <Den.Components.FlexItem grow={1} shrink={0} basis="200px" order={2}>
428
477
  <Content />
429
478
  </Den.Components.FlexItem>
479
+
480
+ // FlexItem also exports FlexItemAlignSelfType
481
+ // Flex also exports FlexAlignContentType
430
482
  ```
431
483
 
432
484
  ---
@@ -548,9 +600,10 @@ For block-level text (p, article, section, etc.):
548
600
  // e.g., { form: { username: "value", password: "value" } }
549
601
  console.log(data);
550
602
  }}
551
- handleValidateError={(input) => {
603
+ handleValidateError={(invalidInputs) => {
552
604
  // Called when HTML5 validation fails
553
- input.focus();
605
+ // invalidInputs is HTMLInputElement[]
606
+ invalidInputs[0]?.focus();
554
607
  }}
555
608
  >
556
609
  <Den.Components.Y gap="0.5em">
@@ -559,6 +612,26 @@ For block-level text (p, article, section, etc.):
559
612
  <Den.Components.VSubmit caption="Submit" />
560
613
  </Den.Components.Y>
561
614
  </Den.Components.VForm>
615
+
616
+ // HandleSubmitCategory: Json (default), FormData
617
+ // Use FormData category to receive raw FormData instead of parsed JSON:
618
+ <Den.Components.VForm
619
+ handleSubmitCategory={Den.Components.HandleSubmitCategory.FormData}
620
+ handleSubmit={(formData) => { /* formData is FormData */ }}
621
+ >
622
+ ...
623
+ </Den.Components.VForm>
624
+ ```
625
+
626
+ #### VActionForm (Simple Form)
627
+
628
+ A simple `<form>` wrapper without JSON conversion or validation handling:
629
+
630
+ ```tsx
631
+ <Den.Components.VActionForm action="/api/submit" method="POST">
632
+ <input name="field" />
633
+ <button type="submit">Submit</button>
634
+ </Den.Components.VActionForm>
562
635
  ```
563
636
 
564
637
  **Form data naming conventions:**
@@ -604,6 +677,8 @@ const [value, setValue] = useState('');
604
677
  <Den.Components.VDate name="form.date" />
605
678
  <Den.Components.VDatetimeLocal name="form.datetime" />
606
679
  <Den.Components.VTime name="form.time" />
680
+ <Den.Components.VMonth name="form.month" />
681
+ <Den.Components.VWeek name="form.week" />
607
682
  <Den.Components.VColor name="form.color" />
608
683
  <Den.Components.VTel name="form.phone" />
609
684
  <Den.Components.VUrl name="form.website" />
@@ -626,6 +701,19 @@ const [value, setValue] = useState('');
626
701
  <Den.Components.VRadio id="opt1" name="form.option" value="A" label="Option A" />
627
702
  <Den.Components.VRadio id="opt2" name="form.option" value="B" label="Option B" />
628
703
 
704
+ // Radio Group (managed state)
705
+ <Den.Components.VGroup
706
+ selectedValue="A"
707
+ renderGroup={(selectedValue, handleSelect) => (
708
+ <>
709
+ <Den.Components.VRadio id="opt1" name="form.option" value="A" label="A"
710
+ isChecked={selectedValue === 'A'} onChange={handleSelect} />
711
+ <Den.Components.VRadio id="opt2" name="form.option" value="B" label="B"
712
+ isChecked={selectedValue === 'B'} onChange={handleSelect} />
713
+ </>
714
+ )}
715
+ />
716
+
629
717
  // Hidden field
630
718
  <Den.Components.VHidden name="form.id" value="123" />
631
719
 
@@ -638,6 +726,7 @@ const [value, setValue] = useState('');
638
726
  ]}
639
727
  value="us"
640
728
  />
729
+ // ISelectItemData: { caption: string; value: string }
641
730
 
642
731
  // Dropdown (custom dropdown with icons)
643
732
  <Den.Components.VDropdown
@@ -652,6 +741,7 @@ const [value, setValue] = useState('');
652
741
  enableClear
653
742
  handleChange={(value) => console.log(value)}
654
743
  />
744
+ // IDropdownItemData: { caption: string; value: string; icon?: JSX.Element }
655
745
 
656
746
  // Switch
657
747
  <Den.Components.VSwitch
@@ -667,6 +757,7 @@ const [value, setValue] = useState('');
667
757
  accept=".jpg,.png"
668
758
  appearance={<UploadIcon />} // Custom trigger element
669
759
  />
760
+ // FileCategory enum available for file categories
670
761
 
671
762
  // File with base64 output
672
763
  <Den.Components.VBase64File
@@ -682,6 +773,9 @@ const [value, setValue] = useState('');
682
773
  backgroundColor={Den.Components.ColorType.Primary}
683
774
  frontColor={Den.Components.ColorType.White}
684
775
  />
776
+
777
+ // Submit wrapper (wraps custom body with hidden submit input)
778
+ <Den.Components.VSubmitWrapper body={<button>Custom Submit UI</button>} />
685
779
  ```
686
780
 
687
781
  ### Media Components
@@ -702,6 +796,7 @@ import IconSvg from './icon.svg';
702
796
  >
703
797
  <IconSvg />
704
798
  </Den.Components.VSvg>
799
+ // SvgCategory enum available for SVG categories
705
800
 
706
801
  // Background image
707
802
  <Den.Components.VBackground
@@ -759,11 +854,27 @@ import IconSvg from './icon.svg';
759
854
 
760
855
  ```tsx
761
856
  <Den.Components.VEllipse width="100px" height="100px" backgroundColor={Den.Components.ColorType.Primary} />
857
+ // EllipseCategory enum available
858
+
762
859
  <Den.Components.VRectangle width="200px" height="50px" backgroundColor={Den.Components.ColorType.Info} />
860
+
763
861
  <Den.Components.VLine />
862
+ // LineCategory enum available
863
+
764
864
  <Den.Components.VShadow category={Den.Components.ShadowCategory.Small}><Content /></Den.Components.VShadow>
765
865
  ```
766
866
 
867
+ ### VTheme (Theme Provider)
868
+
869
+ ```tsx
870
+ <Den.Components.VTheme category={Den.Components.ThemeCategory.Light}>
871
+ <App />
872
+ </Den.Components.VTheme>
873
+
874
+ // ThemeCategory: Light, Dark (or custom)
875
+ // ThemeVariables type available for typed CSS variable overrides
876
+ ```
877
+
767
878
  ### App-only Components (app variant)
768
879
 
769
880
  ```tsx
@@ -782,6 +893,9 @@ import IconSvg from './icon.svg';
782
893
  foot={<button>Action</button>}
783
894
  />
784
895
 
896
+ // VCardSocial — social media card variant
897
+ <Den.Components.VCardSocial ... />
898
+
785
899
  // VCardWindow — card with background image
786
900
  <Den.Components.VCardWindow
787
901
  backgroundUrl="/bg.jpg"
@@ -806,6 +920,21 @@ import IconSvg from './icon.svg';
806
920
 
807
921
  // VTree — hierarchical tree view
808
922
  <Den.Components.VTree nodes={treeData} />
923
+ // IVTreeNode type exported for tree node data structure
924
+
925
+ // VPhoto — background-image based photo with sizing
926
+ <Den.Components.VPhoto
927
+ category={Den.Components.PhotoCategory.Cover}
928
+ position={Den.Components.PhotoPositionType.Center}
929
+ src="/photo.jpg"
930
+ width="100%"
931
+ height="300px"
932
+ />
933
+ // PhotoCategory: Auto, Contain, Cover
934
+ // PhotoPositionType: Left, Center, Right
935
+
936
+ // VAvatar — user avatar display
937
+ <Den.Components.VAvatar ... />
809
938
 
810
939
  // VDynamic — renders component by name from registry
811
940
  <Den.Components.VDynamic
@@ -816,6 +945,46 @@ import IconSvg from './icon.svg';
816
945
  />
817
946
  ```
818
947
 
948
+ ### Web-only Components (web variant)
949
+
950
+ ```tsx
951
+ // Debug utility component
952
+ <Den.Components.Debug ... />
953
+
954
+ // Google Font loader
955
+ <Den.Components.VGoogleFont
956
+ type={Den.Components.GoogleFontType...}
957
+ ...
958
+ />
959
+ // GoogleFontType, IGoogleTypeface, IGoogleFont types available
960
+
961
+ // Chrome extension validation
962
+ <Den.Components.VChromeExtensionValidator ... />
963
+ // ExtensionStatus enum exported
964
+
965
+ // Auth components
966
+ <Den.Components.GoogleGrant
967
+ category={Den.Components.GoogleGrantCategory.Implicit}
968
+ uxMode={Den.Components.GoogleGrantUXMode.Popup}
969
+ ...
970
+ />
971
+ // GoogleGrantCategory: Implicit, AuthorizationCode
972
+ // GoogleGrantUXMode: Popup, Redirect
973
+ // GoogleGrantCode, GoogleGrantToken types exported
974
+
975
+ <Den.Components.GoogleSignin
976
+ uxMode={Den.Components.GoogleSigninUXMode...}
977
+ ...
978
+ />
979
+
980
+ <Den.Components.FigmaSignin ... />
981
+ <Den.Components.WeComSignin ... />
982
+
983
+ // JWT utility
984
+ Den.Components.parseJWT(token) // returns IUserProfile
985
+ // IUserProfile type exported
986
+ ```
987
+
819
988
  ### Other View Components
820
989
 
821
990
  ```tsx
@@ -832,11 +1001,6 @@ import IconSvg from './icon.svg';
832
1001
  // Iframe
833
1002
  <Den.Components.VFrame src="https://example.com" />
834
1003
 
835
- // Theme
836
- <Den.Components.VTheme category={Den.Components.ThemeCategory.Light}>
837
- <App />
838
- </Den.Components.VTheme>
839
-
840
1004
  // Loading indicator
841
1005
  <Den.Components.VLoading />
842
1006
 
@@ -846,6 +1010,13 @@ import IconSvg from './icon.svg';
846
1010
  </Den.Components.VErrorBoundary>
847
1011
  ```
848
1012
 
1013
+ ### Utility Functions (core)
1014
+
1015
+ ```tsx
1016
+ // Convert FormData to nested JSON (used internally by VForm)
1017
+ Den.Components.convertFormDataToJson(formData)
1018
+ ```
1019
+
849
1020
  ---
850
1021
 
851
1022
  ## Network Module (App/Append variants only)
@@ -857,7 +1028,7 @@ Before using network features, initialize the bootstrap:
857
1028
  ```tsx
858
1029
  import { Den } from '@fewbox/den-app';
859
1030
 
860
- Den.boot({
1031
+ Den.FewBox.boot({
861
1032
  getToken: () => localStorage.getItem('token') || '',
862
1033
  getAppSettings: () => ({
863
1034
  endpoint: {
@@ -876,42 +1047,147 @@ Den.boot({
876
1047
  getLanguages: (lang) => ({ /* i18n messages */ }),
877
1048
  getHeaders: () => ({ 'X-Custom-Header': 'value' }),
878
1049
  handleIsNotSuccessful: (data) => console.error('API error:', data),
879
- handleError: (error) => console.error(error),
1050
+ handleError: (error) => console.error(error), // IError: { summary, data }
880
1051
  handleWarning: (error) => console.warn(error),
881
1052
  handleNetworkError: (error) => console.error('Network error:', error),
882
1053
  isDebug: process.env.NODE_ENV === 'development'
883
1054
  });
884
1055
 
885
1056
  // Or use the Boot component:
886
- <Den.Components.Boot options={bootOptions}><App /></Den.Components.Boot>
1057
+ <Den.Components.Boot options={bootOptions} />
1058
+
1059
+ // Types exported from Den.FewBox:
1060
+ // IFewBoxOptions, IAppSettings, IEndpoint, IError, BootClass
887
1061
  ```
888
1062
 
889
- ### HTTP Clients (Observable-based for Redux Observable)
1063
+ ### Fetch-based HTTP Clients (Observable-based for Redux Observable)
890
1064
 
891
- All network clients return RxJS Observables for use in Redux Observable epics:
1065
+ All Fetch clients return RxJS Observables for use in Redux Observable epics:
892
1066
 
893
1067
  ```tsx
894
1068
  import { Den } from '@fewbox/den-app';
895
1069
 
896
- // GET, POST, PUT, PATCH, DELETE (uses app settings endpoint)
1070
+ // Default endpoint (uses app settings endpoint)
897
1071
  new Den.Network.GetFetch('/users', (payload) => ({ type: 'USERS_LOADED', payload }));
898
1072
  new Den.Network.PostFetch('/users', body, (payload) => ({ type: 'USER_CREATED', payload }));
899
1073
  new Den.Network.PutFetch('/users/1', body, processAction);
900
1074
  new Den.Network.PatchFetch('/users/1', body, processAction);
901
1075
  new Den.Network.DeleteFetch('/users/1', processAction);
902
1076
 
903
- // External endpoint (bypasses app settings)
1077
+ // External endpoint (bypasses app settings, uses named endpoint from appSettings)
904
1078
  new Den.Network.GetFetchExternal('externalService', '/data', processAction);
1079
+ new Den.Network.PostFetchExternal('externalService', '/data', body, processAction);
1080
+ new Den.Network.PutFetchExternal('externalService', '/data/1', body, processAction);
1081
+ new Den.Network.PatchFetchExternal('externalService', '/data/1', body, processAction);
1082
+ new Den.Network.DeleteFetchExternal('externalService', '/data/1', processAction);
1083
+ ```
1084
+
1085
+ ### AJAX-based HTTP Clients
1086
+
1087
+ RxJS Ajax-based clients (alternative to Fetch):
1088
+
1089
+ ```tsx
1090
+ // Default endpoint
1091
+ new Den.Network.Get('/users', processAction);
1092
+ new Den.Network.Post('/users', body, processAction);
1093
+ new Den.Network.Put('/users/1', body, processAction);
1094
+ new Den.Network.Patch('/users/1', body, processAction);
1095
+ new Den.Network.Delete('/users/1', processAction);
1096
+
1097
+ // External endpoint
1098
+ new Den.Network.GetExternal('externalService', '/data', processAction);
1099
+ new Den.Network.PostExternal('externalService', '/data', body, processAction);
1100
+ new Den.Network.PutExternal('externalService', '/data/1', body, processAction);
1101
+ new Den.Network.PatchExternal('externalService', '/data/1', body, processAction);
1102
+ new Den.Network.DeleteExternal('externalService', '/data/1', processAction);
1103
+
1104
+ // Text response variants (returns text instead of JSON)
1105
+ new Den.Network.GetText('/data', processAction);
1106
+ new Den.Network.PostText('/data', body, processAction);
1107
+ new Den.Network.PutText('/data', body, processAction);
1108
+ new Den.Network.PatchText('/data', body, processAction);
1109
+ new Den.Network.DeleteText('/data', processAction);
1110
+ // External text variants: GetTextExternal, PostTextExternal, PutTextExternal, PatchTextExternal, DeleteTextExternal
1111
+
1112
+ // Local storage
1113
+ new Den.Network.GetLocal('/local-path', processAction);
1114
+ ```
1115
+
1116
+ ### GraphQL
905
1117
 
906
- // GraphQL
1118
+ ```tsx
1119
+ // Default endpoint
907
1120
  new Den.Network.GQL({ query: 'query { users { id name } }' }, processAction);
908
- new Den.Network.GQLExternal('externalService', { query: 'mutation { createUser(name: "test") { id } }' }, processAction);
909
1121
 
910
- // Server-Sent Events
1122
+ // External endpoint
1123
+ new Den.Network.GQLExternal('externalService', { query: 'mutation { ... }' }, processAction);
1124
+
1125
+ // File upload
1126
+ new Den.Network.GQLUpload({ query: '...', variables: { file } }, processAction);
1127
+ new Den.Network.GQLExternalUpload('externalService', { query: '...' }, processAction);
1128
+
1129
+ // IGraphQL type available for query/mutation objects
1130
+ ```
1131
+
1132
+ ### Server-Sent Events (SSE)
1133
+
1134
+ ```tsx
911
1135
  new Den.Network.GetSSE('/events', processAction);
1136
+ new Den.Network.PostSSE('/events', processAction);
1137
+ new Den.Network.GetSSEExternal('externalService', '/events', processAction);
1138
+ new Den.Network.PostSSEExternal('externalService', '/events', processAction);
1139
+ ```
912
1140
 
913
- // WebSocket
1141
+ ### WebSocket
1142
+
1143
+ ```tsx
914
1144
  new Den.Network.WS({ url: 'wss://example.com/ws' });
1145
+ // Den.Network.ws() function also available
1146
+ // IWebsocketOptions type exported
1147
+ ```
1148
+
1149
+ ### Promise-based HTTP (non-Observable)
1150
+
1151
+ For use outside Redux Observable epics:
1152
+
1153
+ ```tsx
1154
+ // Default endpoint
1155
+ Den.Network.verbsGetPromise('/users');
1156
+ Den.Network.verbsPostPromise('/users', body);
1157
+ Den.Network.verbsPutPromise('/users/1', body);
1158
+ Den.Network.verbsPatchPromise('/users/1', body);
1159
+ Den.Network.verbsDeletePromise('/users/1');
1160
+
1161
+ // External endpoint
1162
+ Den.Network.verbsGetPromiseExternal('externalService', '/data');
1163
+ Den.Network.verbsPostPromiseExternal('externalService', '/data', body);
1164
+ Den.Network.verbsPutPromiseExternal('externalService', '/data/1', body);
1165
+ Den.Network.verbsPatchPromiseExternal('externalService', '/data/1', body);
1166
+ Den.Network.verbsDeletePromiseExternal('externalService', '/data/1');
1167
+ ```
1168
+
1169
+ ### Raw HTTP Verb Functions
1170
+
1171
+ Low-level verb functions that return Observables:
1172
+
1173
+ ```tsx
1174
+ // Default: verbsGet, verbsPost, verbsPut, verbsPatch, verbsDelete
1175
+ // External: verbsGetExternal, verbsPostExternal, verbsPutExternal, verbsPatchExternal, verbsDeleteExternal
1176
+ // Internal: _verbsGet, _verbsPost, _verbsPut, _verbsPatch, _verbsDelete (with custom headers)
1177
+ // Internal Promise: _verbsGetPromise, _verbsPostPromise, etc.
1178
+ ```
1179
+
1180
+ ### Network Utilities
1181
+
1182
+ ```tsx
1183
+ Den.Network.buildHeaders(customHeaders); // Merge custom headers with JWT token
1184
+ Den.Network.buildUrl(path); // Build URL from app settings endpoint
1185
+ Den.Network.buildExternalUrl(externalName, path); // Build URL from named external endpoint
1186
+ Den.Network.JsonHeaders; // Default JSON content-type headers
1187
+ Den.Network.parseAjaxData(response); // Parse AJAX response
1188
+ Den.Network.parseFetchData(response); // Parse Fetch response
1189
+ Den.Network.parseGQLAjaxData(response); // Parse GraphQL response
1190
+ Den.Network.convertJsonToGraphQLSchema(json); // Convert JSON to GraphQL schema string
915
1191
  ```
916
1192
 
917
1193
  ### Redux Observable Epic Pattern
@@ -940,6 +1216,50 @@ const fetchUsersEpic = (action$) =>
940
1216
 
941
1217
  ---
942
1218
 
1219
+ ## Store Module (App/Append variants only)
1220
+
1221
+ Type definitions for Redux store integration:
1222
+
1223
+ ```tsx
1224
+ import { Den } from '@fewbox/den-app';
1225
+
1226
+ // Pagination
1227
+ type IList = Den.Store.IList; // List response wrapper
1228
+ type IPaging = Den.Store.IPaging; // Paged list with page/size
1229
+ type IContinuePaging = Den.Store.IContinuePaging; // Cursor-based pagination
1230
+
1231
+ // Data types
1232
+ type Json = Den.Store.Json; // Generic JSON type
1233
+ type EnumDictionary<K, V> = Den.Store.EnumDictionary<K, V>; // Enum-keyed dictionary
1234
+
1235
+ // Response wrappers
1236
+ type IMetaResponse = Den.Store.IMetaResponse; // Response with metadata
1237
+ type IPayloadResponse = Den.Store.IPayloadResponse; // Response with payload
1238
+ ```
1239
+
1240
+ ---
1241
+
1242
+ ## Language Module (App/Append variants only)
1243
+
1244
+ Internationalization utilities:
1245
+
1246
+ ```tsx
1247
+ import { Den } from '@fewbox/den-app';
1248
+
1249
+ // Get browser language
1250
+ Den.Language.getBrowserLang(); // "en" (short code)
1251
+ Den.Language.getBrowserLangFull(); // "en-US" (full code)
1252
+
1253
+ // Get formatted intl message (uses BootClass language config)
1254
+ Den.Language.getIntlMessage('Hello.World', 'en', { name: 'World' });
1255
+
1256
+ // Select messages for a locale from a locales object
1257
+ const messages = Den.Language.language(locales, 'en');
1258
+ const messagesFull = Den.Language.languageFull(locales, 'en-US');
1259
+ ```
1260
+
1261
+ ---
1262
+
943
1263
  ## Styling Guide
944
1264
 
945
1265
  ### CSS Variables
@@ -969,14 +1289,6 @@ ExceptTop, ExceptRight, ExceptBottom, ExceptLeft,
969
1289
  RightTop, RightBottom, LeftTop, LeftBottom, TopBottom, LeftRight
970
1290
  ```
971
1291
 
972
- ### Border Radius (BorderRadiusType)
973
-
974
- ```tsx
975
- Den.Components.BorderRadiusType.Default // default radius from CSS variable
976
- Den.Components.BorderRadiusType.Fixed // fixed radius
977
- Den.Components.BorderRadiusType.Max // maximum rounding (pill shape)
978
- ```
979
-
980
1292
  ---
981
1293
 
982
1294
  ## Common Patterns
@@ -1035,7 +1347,7 @@ Den.Components.BorderRadiusType.Max // maximum rounding (pill shape)
1035
1347
  ```tsx
1036
1348
  <Den.Components.VForm
1037
1349
  handleSubmit={(data) => api.login(data.form)}
1038
- handleValidateError={(input) => { input.focus(); input.scrollIntoView({ behavior: 'smooth' }); }}>
1350
+ handleValidateError={(invalidInputs) => { invalidInputs[0]?.focus(); }}>
1039
1351
  <Den.Components.Y gap="1em" padding="2em">
1040
1352
  <Den.Components.VEmail name="form.email" required placeholder="Email" label="Email" />
1041
1353
  <Den.Components.VPassword name="form.password" required minLength={8} placeholder="Password" label="Password" />
@@ -1084,7 +1396,7 @@ Den.Components.BorderRadiusType.Max // maximum rounding (pill shape)
1084
1396
 
1085
1397
  ```tsx
1086
1398
  <Den.Components.Responsive
1087
- breakpointType={Den.Components.BreakpointType.Medium}
1399
+ breakpointType={Den.Components.ScreenSizeType.Medium}
1088
1400
  desktop={<Den.Components.X gap="1em">
1089
1401
  <Sidebar />
1090
1402
  <MainContent />
@@ -1107,5 +1419,7 @@ Den.Components.BorderRadiusType.Max // maximum rounding (pill shape)
1107
1419
  6. `selfGrow={1}` fills remaining space (flex-grow: 1).
1108
1420
  7. VBoundary is the safe default container.
1109
1421
  8. All components forward standard HTML attributes (onClick, id, aria-*, data-*).
1110
- 9. Display/PositionArea use `cloneElement` — children must accept `className` prop.
1422
+ 9. BreakpointDisplay/PositionArea use `cloneElement` — children must accept `className` prop.
1111
1423
  10. Use `height`/`width` as direct props (not in `style`) for highest CSS priority.
1424
+ 11. Use preset enums (PaddingType, MarginType, etc.) for consistent spacing, or pass custom strings.
1425
+ 12. Pseudo element styling is available via `pseudoType`, `pseudoFrontColor`, `pseudoBackgroundColor`, `pseudoBorderColor` props.