@rip-lang/ui 0.3.66 → 0.4.1
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/AGENTS.md +93 -0
- package/README.md +22 -625
- package/browser/AGENTS.md +213 -0
- package/browser/CONTRIBUTING.md +375 -0
- package/browser/README.md +11 -0
- package/browser/TESTING.md +59 -0
- package/browser/browser.rip +56 -0
- package/{components → browser/components}/accordion.rip +1 -1
- package/{components → browser/components}/alert-dialog.rip +6 -3
- package/{components → browser/components}/autocomplete.rip +27 -21
- package/{components → browser/components}/avatar.rip +3 -3
- package/{components → browser/components}/badge.rip +1 -1
- package/{components → browser/components}/breadcrumb.rip +2 -2
- package/{components → browser/components}/button-group.rip +3 -3
- package/{components → browser/components}/button.rip +2 -2
- package/{components → browser/components}/card.rip +1 -1
- package/{components → browser/components}/carousel.rip +5 -5
- package/{components → browser/components}/checkbox-group.rip +40 -11
- package/{components → browser/components}/checkbox.rip +4 -4
- package/{components → browser/components}/collapsible.rip +2 -2
- package/{components → browser/components}/combobox.rip +36 -23
- package/{components → browser/components}/context-menu.rip +1 -1
- package/{components → browser/components}/date-picker.rip +5 -5
- package/{components → browser/components}/dialog.rip +8 -4
- package/{components → browser/components}/drawer.rip +8 -4
- package/{components → browser/components}/editable-value.rip +7 -1
- package/{components → browser/components}/field.rip +5 -5
- package/{components → browser/components}/fieldset.rip +2 -2
- package/{components → browser/components}/form.rip +1 -1
- package/{components → browser/components}/grid.rip +8 -8
- package/{components → browser/components}/input-group.rip +1 -1
- package/{components → browser/components}/input.rip +6 -6
- package/{components → browser/components}/label.rip +2 -2
- package/{components → browser/components}/menu.rip +17 -10
- package/{components → browser/components}/menubar.rip +1 -1
- package/{components → browser/components}/meter.rip +7 -7
- package/{components → browser/components}/multi-select.rip +76 -33
- package/{components → browser/components}/native-select.rip +3 -3
- package/{components → browser/components}/nav-menu.rip +3 -3
- package/{components → browser/components}/number-field.rip +11 -11
- package/{components → browser/components}/otp-field.rip +4 -4
- package/{components → browser/components}/pagination.rip +4 -4
- package/{components → browser/components}/popover.rip +11 -24
- package/{components → browser/components}/preview-card.rip +7 -11
- package/{components → browser/components}/progress.rip +3 -3
- package/{components → browser/components}/radio-group.rip +4 -4
- package/{components → browser/components}/resizable.rip +3 -3
- package/{components → browser/components}/scroll-area.rip +1 -1
- package/{components → browser/components}/select.rip +55 -27
- package/{components → browser/components}/separator.rip +2 -2
- package/{components → browser/components}/skeleton.rip +4 -4
- package/{components → browser/components}/slider.rip +15 -10
- package/{components → browser/components}/spinner.rip +2 -2
- package/{components → browser/components}/table.rip +2 -2
- package/{components → browser/components}/tabs.rip +12 -7
- package/{components → browser/components}/textarea.rip +8 -8
- package/{components → browser/components}/toast.rip +3 -3
- package/{components → browser/components}/toggle-group.rip +42 -11
- package/{components → browser/components}/toggle.rip +2 -2
- package/{components → browser/components}/toolbar.rip +2 -2
- package/{components → browser/components}/tooltip.rip +19 -23
- package/browser/hljs-rip.js +209 -0
- package/browser/playwright.config.mjs +31 -0
- package/browser/tests/overlays.js +349 -0
- package/email/AGENTS.md +16 -0
- package/email/README.md +55 -0
- package/email/benchmarks/benchmark.rip +94 -0
- package/email/benchmarks/samples.rip +104 -0
- package/email/compat.rip +129 -0
- package/email/components.rip +371 -0
- package/email/dom.rip +330 -0
- package/email/email.rip +10 -0
- package/email/render.rip +82 -0
- package/package.json +29 -39
- package/shared/README.md +3 -0
- package/shared/styles.rip +17 -0
- package/tailwind/AGENTS.md +3 -0
- package/tailwind/README.md +27 -0
- package/tailwind/engine.js +107 -0
- package/tailwind/inline.js +215 -0
- package/tailwind/serve.js +6 -0
- package/tailwind/tailwind.rip +13 -0
- package/ui.rip +3 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Unified UI Package Guide
|
|
2
|
+
|
|
3
|
+
`@rip-lang/ui` is the umbrella package for browser widgets, email components, shared helpers, and Tailwind integration.
|
|
4
|
+
|
|
5
|
+
## Domain boundaries
|
|
6
|
+
|
|
7
|
+
- `browser/` owns interactive headless widgets and browser-only DOM behavior
|
|
8
|
+
- `email/` owns curated email rendering, serializers, and email-client compatibility
|
|
9
|
+
- `shared/` owns only truly cross-domain utilities
|
|
10
|
+
- `tailwind/` is the only place where `tailwindcss` and `css-tree` may be imported
|
|
11
|
+
|
|
12
|
+
## Typing
|
|
13
|
+
|
|
14
|
+
All exported browser and email components should use explicit Rip types on their public props. Use the existing virtual TypeScript pipeline (`rip check`, LSP, generated virtual TS) during development; do not emit scattered `.d.ts` files during active work.
|
|
15
|
+
|
|
16
|
+
## Gallery
|
|
17
|
+
|
|
18
|
+
The root `index.html` / `index.css` / `index.rip` form a showcase layer only. Components stay headless and unstyled. The gallery itself is intentionally polished.
|
|
19
|
+
|
|
20
|
+
## First Read For Agents
|
|
21
|
+
|
|
22
|
+
When working in `packages/ui`, do not rely only on automatic context pickup from nested `AGENTS.md` files. For strong results, proactively read these files at the start of the task:
|
|
23
|
+
|
|
24
|
+
1. `packages/ui/AGENTS.md` — package boundaries, architecture, reuse policy
|
|
25
|
+
2. `packages/ui/browser/AGENTS.md` — widget conventions, gotchas, popup/focus patterns
|
|
26
|
+
3. `packages/ui/DEBUG.md` — current local-debug workflow, live gallery URL, known-good browser signals
|
|
27
|
+
|
|
28
|
+
Then, if the task involves a hard popup/input widget, inspect the current reference component before making changes:
|
|
29
|
+
|
|
30
|
+
- `packages/ui/browser/components/multi-select.rip`
|
|
31
|
+
|
|
32
|
+
Use `multi-select.rip` as the reference example for:
|
|
33
|
+
|
|
34
|
+
- layered popup mechanics vs widget-local semantics
|
|
35
|
+
- nested interactive affordance isolation
|
|
36
|
+
- reopen suppression after pointer-driven closes
|
|
37
|
+
- composite input styling with an embedded input inside a larger shell
|
|
38
|
+
|
|
39
|
+
This startup sequence gets an agent much closer to “current project reality” than `AGENTS.md` inheritance alone.
|
|
40
|
+
|
|
41
|
+
## Browser Widget Direction
|
|
42
|
+
|
|
43
|
+
For complex browser widgets, prefer a layered design:
|
|
44
|
+
|
|
45
|
+
- keep generic popup, focus, keyboard, and timing logic in the shared `ARIA` helper layer in `src/ui.rip`
|
|
46
|
+
- keep component-specific semantics local to the widget (`chips`, token removal, selection rules, etc.)
|
|
47
|
+
- do not solve browser event-ordering bugs independently in every component if the underlying problem is generic
|
|
48
|
+
|
|
49
|
+
The current model is:
|
|
50
|
+
|
|
51
|
+
- `ARIA` / `__aria` owns shared primitives such as popup dismissal, popover binding, dialog binding, positioning, roving/list navigation, and short reopen-suppression after pointer-driven closes
|
|
52
|
+
- individual components own only the semantics that make that widget unique
|
|
53
|
+
|
|
54
|
+
## Reference Component
|
|
55
|
+
|
|
56
|
+
`browser/components/multi-select.rip` is the reference example for a "hard" composite widget in this package.
|
|
57
|
+
|
|
58
|
+
Use it as the model for components that combine:
|
|
59
|
+
|
|
60
|
+
- popup lifecycle
|
|
61
|
+
- embedded inputs
|
|
62
|
+
- nested interactive affordances
|
|
63
|
+
- keyboard navigation
|
|
64
|
+
- multiple coordinated state transitions
|
|
65
|
+
|
|
66
|
+
What it should demonstrate:
|
|
67
|
+
|
|
68
|
+
- clear separation between shared popup mechanics and local widget semantics
|
|
69
|
+
- consistent naming (`on...` for auto-wired root handlers, `_on...` for child handlers, `_...` for private helpers/refs/state)
|
|
70
|
+
- explicit isolation of nested controls when `mousedown` / focus ordering would otherwise leak into parent behavior
|
|
71
|
+
- behavior that matches high-quality headless UI expectations before adding styling
|
|
72
|
+
|
|
73
|
+
## Reuse Policy
|
|
74
|
+
|
|
75
|
+
When building or refactoring browser widgets:
|
|
76
|
+
|
|
77
|
+
- extract the smallest stable shared primitive into `src/ui.rip`
|
|
78
|
+
- do not create a giant generic base component prematurely
|
|
79
|
+
- reuse `ARIA.popupGuard()` for pointer-driven close/reopen timing problems in popup-style controls
|
|
80
|
+
- keep styling fixes in the gallery CSS unless the component itself is shipping opinionated visuals
|
|
81
|
+
|
|
82
|
+
Good candidates for shared primitives:
|
|
83
|
+
|
|
84
|
+
- reopen suppression after outside-click dismissal
|
|
85
|
+
- popup dismissal wiring
|
|
86
|
+
- keyboard navigation helpers
|
|
87
|
+
- focus restoration / modal stack handling
|
|
88
|
+
|
|
89
|
+
Bad candidates for premature abstraction:
|
|
90
|
+
|
|
91
|
+
- token rendering rules
|
|
92
|
+
- chip-specific behaviors
|
|
93
|
+
- widget-specific content semantics
|