@waggylabs/yumekit 0.4.3 → 0.4.4

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/llm.txt CHANGED
@@ -3,7 +3,7 @@
3
3
  A modern, framework-agnostic Web Components UI kit providing 35 production-ready custom HTML elements. Built entirely on native web standards with zero external runtime dependencies.
4
4
 
5
5
  ## Version
6
- 0.4.3
6
+ 0.4.4
7
7
 
8
8
  ## License
9
9
  MIT
@@ -569,15 +569,33 @@ Slots: `image` (flush, no padding, clips to card border radius), `header`, `foot
569
569
  ---
570
570
 
571
571
  ### y-appbar
572
- Top/side navigation bar.
572
+ Top/side navigation bar with collapsible vertical sidebar mode and a mobile hamburger fallback.
573
573
 
574
574
  Tag: `<y-appbar>`
575
575
  Attributes:
576
- - `orientation` — `"horizontal"` (default) | `"vertical"`
577
- - `sticky` — boolean
578
- - `color` — color scheme name
576
+ - `orientation` — `"vertical"` (default) | `"horizontal"`
577
+ - `collapsed` — boolean, vertical only — collapses sidebar to icon-only width
578
+ - `items` — JSON array of `{ text, icon?, href?, selected?, slot?, children? }` objects driving the auto-generated nav buttons
579
+ - `size` — `"small"` | `"medium"` (default) | `"large"`
580
+ - `menu-direction` — `"right"` | `"down"` — direction submenus pop out (auto: vertical → right, horizontal → down)
581
+ - `sticky` — `"start"` | `"end"` — sticks the appbar to the named edge
582
+ - `mobile-breakpoint` — number (px) — viewport width below which horizontal appbar switches to mobile hamburger mode (default 768)
583
+ - `history` — omit (default) for `pushState` SPA navigation; `"false"` for full-page `window.location.href`
584
+
585
+ Events: `navigate` (cancelable, `detail: { href }`)
579
586
 
580
- Slots: `brand`, `nav`, `actions`, default
587
+ Methods: `toggle()` flip collapsed state
588
+
589
+ Slots: `logo`, `title`, `header`, `footer`, default (user-supplied link elements rendered in the body alongside `items` — use this for framework router links like Vue Router's `<router-link>` or React Router's `<NavLink>`. In mobile mode the same unslotted children are rendered inside the hamburger dropdown panel after the items.)
590
+
591
+ ```html
592
+ <!-- Mix items array with framework router links -->
593
+ <y-appbar orientation="vertical" items='[{"text":"Home","icon":"home","href":"/"}]'>
594
+ <span slot="title">MyApp</span>
595
+ <router-link to="/projects">Projects</router-link>
596
+ <router-link to="/settings">Settings</router-link>
597
+ </y-appbar>
598
+ ```
581
599
 
582
600
  ---
583
601
 
@@ -687,25 +705,38 @@ CSS Custom Properties: `--component-dock-height`, `--component-dock-background`,
687
705
  ---
688
706
 
689
707
  ### y-menu
690
- Dropdown menu. Positioned relative to an anchor element.
708
+ Dropdown menu. Positioned relative to an anchor element. Items can be defined via the `items` JSON attribute or as light-DOM children.
691
709
 
692
710
  Tag: `<y-menu>`
693
711
  Attributes:
694
- - `items` — JSON string: `[{"text": "Edit", "url": "...", "selected": true, "children": [...], "icon-template": "slot-name", "template": "slot-name"}, ...]`
712
+ - `items` — JSON string: `[{"text": "Edit", "value": "edit", "href": "...", "icon": "edit", "slot": "name", "selected": true, "children": [...]}, ...]`
695
713
  - `anchor` — CSS selector or element ID of the trigger element
696
714
  - `visible` — boolean
697
715
  - `direction` — `"down"` (default) | `"up"` | `"left"` | `"right"`
698
716
  - `size` — `"small"` | `"medium"` | `"large"`
717
+ - `history` — omit (default) for SPA `pushState` navigation; `"false"` for full-page `window.location.href`
699
718
 
700
- Events: none (item clicks fire navigation via `url`, or listen for DOM events on the element)
719
+ Events:
720
+ - `open` — fires when the menu becomes visible
721
+ - `close` — fires when the menu is dismissed
722
+ - `select` — fires when a leaf item is activated. `event.detail = { value, item?, element? }`. `item` is set for JSON-defined items; `element` is set for slotted children.
723
+ - `navigate` — cancelable; `event.detail.href`. Fires before navigation when an item with `href` is clicked.
701
724
 
702
725
  Item object fields:
703
726
  - `text` — display text
704
- - `url` — optional navigation URL
727
+ - `value` — value reported in the `select` event (defaults to `text`)
728
+ - `href` — optional navigation URL
729
+ - `icon` — icon name rendered via `<y-icon>` (e.g. `"edit"`, `"trash"`)
730
+ - `slot` — named slot in light DOM whose content replaces this item's default content
705
731
  - `selected` — boolean, highlights the active item
706
732
  - `children` — array of sub-items (nested submenu)
707
- - `icon-template` — `<template slot="name">` inside `<y-menu>` for a custom icon
708
- - `template` `<template slot="name">` inside `<y-menu>` for custom item content
733
+
734
+ Deprecated item fields (still work; will be removed in a future release):
735
+ - `url` — use `href`
736
+ - `icon-template` — use `icon`
737
+ - `template` — use `slot`
738
+
739
+ Light-DOM children of `<y-menu>` (without a `slot` attribute) become additional menu items. Each child is automatically given `role="menuitem"` and `tabindex="0"`. On click the menu fires `select` with `detail.value` from the child's `data-value` (or its `textContent`) and closes.
709
740
 
710
741
  ```html
711
742
  <y-button id="options-btn">Options</y-button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waggylabs/yumekit",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Modern Web Component UI Kit",
5
5
  "type": "module",
6
6
  "main": "dist/yumekit.min.js",