@musecat/uikit 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.
Files changed (58) hide show
  1. package/.agents/references/Components/Box.md +60 -0
  2. package/.agents/references/Components/Button.md +49 -0
  3. package/.agents/references/Components/Card.md +67 -0
  4. package/.agents/references/Components/Checkbox.md +48 -0
  5. package/.agents/references/Components/CodeBox.md +31 -0
  6. package/.agents/references/Components/ContextMenu.md +82 -0
  7. package/.agents/references/Components/ContributionGraph.md +61 -0
  8. package/.agents/references/Components/DatePicker.md +92 -0
  9. package/.agents/references/Components/Divider.md +56 -0
  10. package/.agents/references/Components/Header.md +52 -0
  11. package/.agents/references/Components/Icon.md +82 -0
  12. package/.agents/references/Components/Input.md +60 -0
  13. package/.agents/references/Components/Label.md +78 -0
  14. package/.agents/references/Components/Layout.md +102 -0
  15. package/.agents/references/Components/Maps.md +63 -0
  16. package/.agents/references/Components/Nav.md +68 -0
  17. package/.agents/references/Components/Pagination.md +67 -0
  18. package/.agents/references/Components/Pill.md +75 -0
  19. package/.agents/references/Components/Profile.md +76 -0
  20. package/.agents/references/Components/Progress.md +72 -0
  21. package/.agents/references/Components/Radio.md +68 -0
  22. package/.agents/references/Components/Select.md +80 -0
  23. package/.agents/references/Components/Skeleton.md +48 -0
  24. package/.agents/references/Components/Spinner.md +62 -0
  25. package/.agents/references/Components/Text.md +73 -0
  26. package/.agents/references/Components/TimePicker.md +72 -0
  27. package/.agents/references/Components/Timeline.md +97 -0
  28. package/.agents/references/Components/Title.md +108 -0
  29. package/.agents/references/Components/Toggle.md +53 -0
  30. package/.agents/references/Components/Tooltip.md +62 -0
  31. package/.agents/references/Frameworks/DNDView.md +82 -0
  32. package/.agents/references/Frameworks/Dialog.md +109 -0
  33. package/.agents/references/Frameworks/EdgeEffect.md +64 -0
  34. package/.agents/references/Frameworks/HScrollView.md +76 -0
  35. package/.agents/references/Frameworks/ImageView.md +67 -0
  36. package/.agents/references/Frameworks/Motion.md +62 -0
  37. package/.agents/references/Frameworks/Pressable.md +79 -0
  38. package/.agents/references/Frameworks/Squircle.md +50 -0
  39. package/.agents/references/Frameworks/Theme.md +68 -0
  40. package/.agents/references/Frameworks/Toaster.md +67 -0
  41. package/.agents/references/Frameworks/View.md +81 -0
  42. package/.agents/references/Frameworks/_shared.md +74 -0
  43. package/.agents/references/Styles/Animation.md +43 -0
  44. package/.agents/references/Styles/Color.md +45 -0
  45. package/.agents/references/Styles/Font.md +37 -0
  46. package/.agents/references/Styles/Icon.md +43 -0
  47. package/.agents/references/Styles/Importer.md +19 -0
  48. package/.agents/references/Styles/System.md +27 -0
  49. package/.agents/references/Styles/Textstyle.md +45 -0
  50. package/.agents/references/Styles/Theme.md +51 -0
  51. package/.agents/references/Styles/Viewport-global.md +42 -0
  52. package/.agents/references/Styles/Viewport.md +42 -0
  53. package/AGENTS.md +54 -0
  54. package/CLAUDE.md +1 -0
  55. package/README.md +4 -0
  56. package/package.json +4 -1
  57. package/packages/Styles/_icon.scss +2 -0
  58. package/packages/Styles/_importer.scss +0 -1
@@ -0,0 +1,42 @@
1
+ # Viewport
2
+
3
+ This document defines viewport mixin functions for easily writing media queries within SCSS.
4
+
5
+ ## Configuration
6
+
7
+ Manages the breakpoint ranges (min, max, next) of `w1`, `w2`, `w3`, `w4` as a Map object.
8
+
9
+ ## Mixins
10
+
11
+ - `@mixin viewport-max($max)`: Generates a max-width based media query
12
+ - `@mixin viewport-min($min)`: Generates a min-width based media query
13
+ - `@mixin viewport-between($min, $max)`: Generates a range-specified media query
14
+
15
+ ### Helper Mixins
16
+
17
+ - `@mixin down($key)`: Applies at or below the max-width of a specific keyword (e.g., `w3`). Useful when writing mobile-first views.
18
+ - `@mixin up($key)`: Applies at or above the min-width of a specific keyword. Useful when writing PC-first views.
19
+ - `@mixin only($key)`: Applies exactly within the min ~ max range of a specific keyword.
20
+
21
+ ## Usage
22
+
23
+ Import `_viewport.scss` as a module when designing custom components to control media queries.
24
+
25
+ ```scss
26
+ @use "../../Styles/viewport" as vp;
27
+
28
+ .container {
29
+ padding: 2rem;
30
+
31
+ @include vp.down(w3) {
32
+ // Applied on screens 767.98px or below
33
+ padding: 1rem;
34
+ flex-direction: column;
35
+ }
36
+
37
+ @include vp.only(w2) {
38
+ // Applied only on screens 320px ~ 409.98px
39
+ background: red;
40
+ }
41
+ }
42
+ ```
package/AGENTS.md ADDED
@@ -0,0 +1,54 @@
1
+ You are a concise coding assistant.
2
+
3
+ ## Stack
4
+
5
+ - Primary stack: Next.js 16 + TypeScript.
6
+
7
+ ## Documentation References
8
+
9
+ - Before using or modifying any component, framework, or style, you MUST read the corresponding documentation in `.agents/references/`.
10
+ - **Documentation MUST Be Updated Immediately:** Every time you add, modify, or remove a component, framework, style, or any exported API/type, you MUST update the corresponding `.agents/references/` doc in the **same batch of tool calls** — not later, not after tests, not when asked. You must check what changed and update refs before moving to the next task.
11
+ - If references have drifted from the actual code due to manual changes, analyze the source code and git history to align them.
12
+ - **README Maintenance:** If you add, remove, or modify external package dependencies, you MUST update the Acknowledgements section in `README.md`.
13
+ - **README Examples:** If the usage logic or APIs of core layout components (`View`, `Pressable`, `ImageView`) change, you MUST update the example code block in `README.md` to reflect those changes.
14
+
15
+ ## Test Failure Resolution
16
+
17
+ When a test fails, do not blindly patch it to turn green. Reason about intent:
18
+ 1. Understand the component's design contract — what it should do vs. what it actually does.
19
+ 2. If the test correctly captures the intended behavior and the code violates it, fix the code.
20
+ 3. If the code correctly implements the intended behavior and the test reflects outdated assumptions, fix the test.
21
+ 4. If neither is clearly right, treat the component's source as the source of truth and align the test to match, unless you have explicit user instruction to change the behavior.
22
+
23
+ ## Design Token Enforcement
24
+
25
+ - Theme design tokens (Radius, Color, Spacing, etc.) MUST be used at all times. Hardcoding raw pixel values, inline colors, or any literal style values instead of using the token system is strictly prohibited.
26
+
27
+ ## Theme & Token System Guidelines
28
+
29
+ 1. **Radius Scale Usage**
30
+ - Use standard tokens: `None`, `Light`, `Regular`, `Bold`, `ExtraBold`, `Heavy`, `Circle`.
31
+ - Explicit `cornerRadius` or directional radius arrays are supported.
32
+ - Centralized `RADIUS_TOKEN` mapping via `RadiusValue()` must be used.
33
+
34
+ 2. **Color & Paint Tokens**
35
+ - Palette colors must use the JSON expansion/SCSS mapping (e.g. `Red1TP3`, `BaseLight3`).
36
+ - Background props support state-specific mappings: `[idle, hover, active]`.
37
+ - Border props support paint tokens, width-only fallback (`Base1TP1`), and directional width arrays.
38
+ - Use `UISecondary` / `ReversedUISecondary` presets for default interactive element states (e.g., checked, selected).
39
+
40
+ 3. **Core Component Selection**
41
+ - Do not use raw HTML elements (`div`, `button`, `a`, `Link`) when custom layout blocks are available. `View` and `Pressable` are foundational primitives replacing these elements.
42
+ - Use `View` for structural layout. It dynamically resolves theme props, handles disabling/readonly state forwarding, and automatically applies `Squircle` clips when `radius` is present.
43
+ - Use `Pressable` for interactive elements. It renders polymorphic wrappers (button, a, Link, label) with proper radius resolution.
44
+ - **Layout & Sizing Defaults:** `View` and `Pressable` inherently use `display: flex` and support layout props like `gap`, `width`, and `height`.
45
+ - Numeric values for sizing/spacing props are automatically converted to `rem` values.
46
+ - For responsive or bounded sizing, use `min`, `max`, and `clamp` functions on `width` and `height` props.
47
+ - Avoid redundant inline styles or unnecessary utility classes by leveraging these built-in properties.
48
+ - Package is published as `@musecat/uikit` on GitHub Packages. The root `index.ts` is the single entry point.
49
+ - **No internal barrels:** Directories must NOT contain `index.ts` re-exports. Always import from the definitive source file. The single exception is the root `index.ts` (npm package entry).
50
+ - **Type Referencing & Image:** Both components support various other props. You MUST refer to the TypeScript definitions of `View` and `Pressable` to check available attributes. For rendering images, use the custom `ImageView` component instead of the native `img` element.
51
+
52
+ 4. **Squircle & Motion Integration**
53
+ - `Squircle` renders SVG clip paths dynamically using `figma-squircle`.
54
+ - Avoid passing raw animate objects containing width/height directly to Framer Motion on Squircle elements to prevent base-style clip-path reset bugs. Use imperative controls (`useAnimationControls`) or animate wrapping wrappers instead.
package/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
package/README.md CHANGED
@@ -36,6 +36,10 @@ export default function Example() {
36
36
  }
37
37
  ```
38
38
 
39
+ ## References
40
+
41
+ This package includes `.agents/references/` directory with detailed documentation for every component, framework, and style system. Use it alongside TypeScript definitions as a guide when building with `@musecat/uikit`.
42
+
39
43
  ## Acknowledgements
40
44
 
41
45
  - [Motion (Framer Motion)](https://motion.dev/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@musecat/uikit",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "High-performance Next.js React UI component library with Squircle shapes, theme tokens, and gesture-driven overlays",
@@ -34,6 +34,9 @@
34
34
  "files": [
35
35
  "index.ts",
36
36
  "packages/",
37
+ ".agents/",
38
+ "AGENTS.md",
39
+ "CLAUDE.md",
37
40
  "README.md",
38
41
  "LICENSE"
39
42
  ],
@@ -10,6 +10,8 @@ i,
10
10
  i::before,
11
11
  i::after,
12
12
  blockquote::before {
13
+ line-height: 1;
14
+ font-style: normal;
13
15
  font-family: var(--font-icon);
14
16
  font-variation-settings:
15
17
  "rond" 2,
@@ -1,7 +1,6 @@
1
1
  @use "animation";
2
2
  @use "color";
3
3
  @use "font";
4
- @use "icon";
5
4
  @use "system";
6
5
  @use "textstyle";
7
6
  @use "theme";