@llumi/design-system 1.0.0 → 1.0.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/custom-elements.json +49 -0
- package/dist/review.cjs +27 -27
- package/dist/review.js +27 -27
- package/dist/review.mjs +139 -124
- package/dist/types/components/review/comment-dialog.element.d.ts +8 -0
- package/dist/types/components/review/review.element.d.ts +4 -0
- package/package.json +50 -51
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { ReferenceElement } from '@floating-ui/dom';
|
|
1
2
|
import { PropertyValues } from 'lit';
|
|
2
3
|
import { TailwindElement } from '../../shared/tailwind-element';
|
|
3
4
|
export declare class LlumiCommentDialog extends TailwindElement {
|
|
4
5
|
targetElement: HTMLElement | null;
|
|
6
|
+
/**
|
|
7
|
+
* Optional positioning reference that overrides `targetElement` — used for
|
|
8
|
+
* text-selection comments, where the dialog must anchor to the selected
|
|
9
|
+
* range's rect rather than the whole (potentially tall) selectable element.
|
|
10
|
+
* A floating-ui virtual element (`{ getBoundingClientRect() }`) is accepted.
|
|
11
|
+
*/
|
|
12
|
+
anchor: ReferenceElement | null;
|
|
5
13
|
value: string;
|
|
6
14
|
private floating;
|
|
7
15
|
private cleanup?;
|
|
@@ -4,6 +4,8 @@ import { ReviewResult } from './review.type';
|
|
|
4
4
|
* `<llumi-review>` — wraps light-DOM content for element- and text-selection
|
|
5
5
|
* review comments. Both events bubble and are composed.
|
|
6
6
|
*
|
|
7
|
+
* @attr {string} persist - When set to a non-empty value, persists the review draft to
|
|
8
|
+
* localStorage under that key and restores it on load. Read once on connect.
|
|
7
9
|
* @fires llumi-review-change - On every edit (comment added/edited/deleted, or overall comment changed). `detail` is a `ReviewResult`.
|
|
8
10
|
* @fires llumi-review-submit - When the user clicks Submit / Approve. `detail` is `{ result: ReviewResult, clearPersisted: () => void }`; call `clearPersisted()` after a confirmed server save to discard the persisted draft.
|
|
9
11
|
*/
|
|
@@ -20,6 +22,7 @@ export declare class LlumiReview extends HTMLElement {
|
|
|
20
22
|
private selectionComments;
|
|
21
23
|
private bar;
|
|
22
24
|
private commentDialog;
|
|
25
|
+
private commentDialogAnchorId;
|
|
23
26
|
private overallDialog;
|
|
24
27
|
private icons;
|
|
25
28
|
private get shortcut();
|
|
@@ -34,6 +37,7 @@ export declare class LlumiReview extends HTMLElement {
|
|
|
34
37
|
private emitSubmit;
|
|
35
38
|
/** Clears the persisted draft for this element. No-op when persistence is off. */
|
|
36
39
|
clearPersisted(): void;
|
|
40
|
+
private selectionAnchor;
|
|
37
41
|
private mountChrome;
|
|
38
42
|
private onIconClick;
|
|
39
43
|
private syncFromSnapshot;
|
package/package.json
CHANGED
|
@@ -1,52 +1,51 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
2
|
+
"name": "@llumi/design-system",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist",
|
|
7
|
+
"custom-elements.json"
|
|
8
|
+
],
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"**/*.css",
|
|
11
|
+
"**/*.js",
|
|
12
|
+
"**/*.mjs",
|
|
13
|
+
"**/*.cjs"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
"./review": {
|
|
17
|
+
"types": "./dist/types/components/review/index.d.ts",
|
|
18
|
+
"import": "./dist/review.mjs",
|
|
19
|
+
"require": "./dist/review.cjs",
|
|
20
|
+
"default": "./dist/review.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./review.mjs": "./dist/review.mjs",
|
|
23
|
+
"./review.cjs": "./dist/review.cjs",
|
|
24
|
+
"./review.js": "./dist/review.js",
|
|
25
|
+
"./review.css": "./dist/review.css",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@floating-ui/dom": "^1.6.13",
|
|
30
|
+
"clsx": "^2.1.1",
|
|
31
|
+
"lit": "^3.2.1",
|
|
32
|
+
"tailwind-merge": "^3.0.2",
|
|
33
|
+
"tinykeys": "^3.0.0",
|
|
34
|
+
"xstate": "^5.28.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
38
|
+
"@vitest/browser": "^3.0.0",
|
|
39
|
+
"playwright": "^1.50.0",
|
|
40
|
+
"tailwindcss": "^4.1.18",
|
|
41
|
+
"vite": "^6.0.0",
|
|
42
|
+
"vite-plugin-dts": "^4.5.0",
|
|
43
|
+
"vitest": "^3.0.0"
|
|
44
|
+
},
|
|
45
|
+
"customElements": "custom-elements.json",
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "vite build -c vite.lib.config.ts && vite build -c vite.umd.config.ts && cp src/components/review/review.css dist/review.css",
|
|
48
|
+
"analyze": "cem analyze --config custom-elements-manifest.config.mjs",
|
|
49
|
+
"test:browser": "vitest run"
|
|
50
|
+
}
|
|
51
|
+
}
|