luxen-ui 0.9.2 → 0.10.0

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 (34) hide show
  1. package/cdn/chunks/picker.js +5 -0
  2. package/cdn/chunks/picker.js.map +1 -0
  3. package/cdn/custom-elements.json +73 -49
  4. package/cdn/elements/avatar/avatar.d.ts +1 -0
  5. package/cdn/elements/avatar/avatar.d.ts.map +1 -1
  6. package/cdn/elements/avatar/avatar.js +1 -1
  7. package/cdn/elements/avatar/avatar.js.map +1 -1
  8. package/cdn/elements/prose-editor/prose-editor.d.ts +39 -11
  9. package/cdn/elements/prose-editor/prose-editor.d.ts.map +1 -1
  10. package/cdn/elements/prose-editor/prose-editor.js +36 -36
  11. package/cdn/elements/prose-editor/prose-editor.js.map +1 -1
  12. package/cdn/elements/tree-item/tree-item.js +1 -1
  13. package/cdn/elements/tree-item/tree-item.js.map +1 -1
  14. package/cdn/standalone.js +1768 -4166
  15. package/cdn/standalone.js.map +1 -1
  16. package/dist/custom-elements.json +73 -49
  17. package/dist/elements/avatar/avatar.css +10 -10
  18. package/dist/elements/avatar/avatar.d.ts +1 -0
  19. package/dist/elements/avatar/avatar.d.ts.map +1 -1
  20. package/dist/elements/avatar/avatar.js +1 -0
  21. package/dist/elements/prose-editor/prose-editor.d.ts +39 -11
  22. package/dist/elements/prose-editor/prose-editor.d.ts.map +1 -1
  23. package/dist/elements/prose-editor/prose-editor.js +114 -38
  24. package/dist/elements/tree-item/tree-item.css +7 -1
  25. package/dist/metadata/avatar.json +5 -0
  26. package/dist/metadata/index.json +14 -1
  27. package/dist/metadata/prose-editor.json +8 -0
  28. package/dist/templates/elements/avatar.md +23 -0
  29. package/dist/templates/elements/prose-editor.md +11 -0
  30. package/package.json +2 -3
  31. package/cdn/chunks/module.js +0 -717
  32. package/cdn/chunks/module.js.map +0 -1
  33. package/cdn/chunks/native.js +0 -2
  34. package/cdn/chunks/native.js.map +0 -1
@@ -86,6 +86,14 @@
86
86
  "reflects": false,
87
87
  "description": "Placeholder shown when the editor is empty."
88
88
  },
89
+ {
90
+ "name": "emojiDataSource",
91
+ "attribute": "emoji-data-source",
92
+ "type": "string",
93
+ "default": "''",
94
+ "reflects": false,
95
+ "description": "URL the emoji picker fetches its data from. Point this at a locally served\n`emojibase-data` JSON to run fully offline (no CDN). Defaults to the\npicker's bundled CDN source."
96
+ },
89
97
  {
90
98
  "name": "validationTarget",
91
99
  "attribute": null,
@@ -99,6 +99,28 @@ Add the `size` attribute: `xs`, `sm`, `md` (default), `lg`, or `xl`.
99
99
  </div>
100
100
  ```
101
101
 
102
+ ### Custom size
103
+
104
+ Set `--size` to any length for an arbitrary pixel size. It overrides the `size` scale and the font follows proportionally. Use it alone — not combined with a `size` token.
105
+
106
+ ```html
107
+ <div class="flex items-end gap-3">
108
+ <l-avatar
109
+ style="--size: 20px"
110
+ name="John Doe"
111
+ ></l-avatar>
112
+ <l-avatar
113
+ style="--size: 44px; --appearance: circle"
114
+ src="https://i.pravatar.cc/150?img=58"
115
+ name="John Doe"
116
+ ></l-avatar>
117
+ <l-avatar
118
+ style="--size: 64px; --color: #2f489a"
119
+ name="Jane Smith"
120
+ ></l-avatar>
121
+ </div>
122
+ ```
123
+
102
124
  ### Circle
103
125
 
104
126
  Set `--appearance: circle` for a fully circular shape. Default is a rounded square.
@@ -249,6 +271,7 @@ import 'luxen-ui/avatar';
249
271
 
250
272
  ### CSS custom properties
251
273
 
274
+ - `--size` (default: `40px`) — Box size (any length). Set it inline (e.g. `style="--size: 20px"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.
252
275
  - `--color` — Background fill color for initials and the default icon.
253
276
  - `--text-color` — Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).
254
277
  - `--appearance` — Set to `circle` for a fully circular avatar (default is a rounded square).
@@ -62,6 +62,14 @@ Set `toolbar-placement="bottom"` to move the toolbar below the content.
62
62
  ></l-prose-editor>
63
63
  ```
64
64
 
65
+ ### Emoji picker data
66
+
67
+ The `emoji` toolbar button opens a picker that loads its emoji data from a CDN by default. For an offline or behind-auth app, serve an [`emojibase-data`](https://www.npmjs.com/package/emojibase-data) JSON locally and point `emoji-data-source` at it.
68
+
69
+ ```html
70
+ <l-prose-editor emoji-data-source="/emoji/en/data.json"></l-prose-editor>
71
+ ```
72
+
65
73
  ## Examples
66
74
 
67
75
  ### Form integration
@@ -146,6 +154,9 @@ import 'luxen-ui/prose-editor';
146
154
  - **toolbar-placement**: `'top' | 'bottom'` (default: `'top'`) — Where the toolbar sits relative to the content.
147
155
  - **autofocus**: `boolean` (default: `false`) — Focus the editor on creation.
148
156
  - **placeholder**: `string` — Placeholder shown when the editor is empty.
157
+ - **emoji-data-source**: `string` — URL the emoji picker fetches its data from. Point this at a locally served
158
+ `emojibase-data` JSON to run fully offline (no CDN). Defaults to the
159
+ picker's bundled CDN source.
149
160
  - **validationTarget**: `HTMLElement | undefined`
150
161
 
151
162
  ### Methods
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luxen-ui",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
4
4
  "description": "Modern web components and CSS-first UI library built with Lit. Framework-agnostic, customizable prefix, design tokens.",
5
5
  "keywords": [
6
6
  "custom-elements",
@@ -119,7 +119,6 @@
119
119
  "provenance": true
120
120
  },
121
121
  "dependencies": {
122
- "@emoji-mart/data": "^1.2.1",
123
122
  "@floating-ui/dom": "^1.7.6",
124
123
  "@tiptap/core": "^3.23.6",
125
124
  "@tiptap/extension-highlight": "^3.23.6",
@@ -128,7 +127,7 @@
128
127
  "@tiptap/starter-kit": "^3.23.6",
129
128
  "embla-carousel": "^8.6.0",
130
129
  "embla-carousel-autoplay": "^8.6.0",
131
- "emoji-mart": "^5.6.0",
130
+ "emoji-picker-element": "^1.29.1",
132
131
  "iconify-icon": "^3.0.2",
133
132
  "lit": "^3.3.3"
134
133
  },