@riebeckite/plugin-text-fragment 0.0.5 → 0.0.7
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/README.md +1 -1
- package/README_ja.md +1 -1
- package/dist/client.js +4 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/package.json +2 -2
- package/style.css +53 -53
package/README.md
CHANGED
package/README_ja.md
CHANGED
package/dist/client.js
CHANGED
|
@@ -71,8 +71,10 @@ function initTextFragmentShare() {
|
|
|
71
71
|
status.className = "rr-text-fragment__status";
|
|
72
72
|
status.setAttribute("role", "status");
|
|
73
73
|
status.setAttribute("aria-live", "polite");
|
|
74
|
-
actions.
|
|
75
|
-
|
|
74
|
+
actions.appendChild(linkButton);
|
|
75
|
+
actions.appendChild(quoteButton);
|
|
76
|
+
popover.appendChild(actions);
|
|
77
|
+
popover.appendChild(status);
|
|
76
78
|
document.body.appendChild(popover);
|
|
77
79
|
let active = null;
|
|
78
80
|
let isCopying = false;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type RiebeckitePlugin } from "@riebeckite/core";
|
|
2
|
-
export { buildQuoteMarkdown, buildTextFragmentUrl, encodeTextFragment, type TextFragmentOptions, } from "./src/text-fragment.js";
|
|
3
2
|
export { initTextFragmentShare } from "./src/text-fragment.client.js";
|
|
3
|
+
export { buildQuoteMarkdown, buildTextFragmentUrl, encodeTextFragment, type TextFragmentOptions, } from "./src/text-fragment.js";
|
|
4
4
|
/**
|
|
5
5
|
* Registers the client-only text fragment share plugin: a selection popover
|
|
6
6
|
* that copies a `#:~:text=` deep link or a Markdown quote.
|
package/dist/index.js
CHANGED
|
@@ -78,8 +78,10 @@ function initTextFragmentShare() {
|
|
|
78
78
|
status.className = "rr-text-fragment__status";
|
|
79
79
|
status.setAttribute("role", "status");
|
|
80
80
|
status.setAttribute("aria-live", "polite");
|
|
81
|
-
actions.
|
|
82
|
-
|
|
81
|
+
actions.appendChild(linkButton);
|
|
82
|
+
actions.appendChild(quoteButton);
|
|
83
|
+
popover.appendChild(actions);
|
|
84
|
+
popover.appendChild(status);
|
|
83
85
|
document.body.appendChild(popover);
|
|
84
86
|
let active = null;
|
|
85
87
|
let isCopying = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-text-fragment",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"./style.css": "./style.css"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@riebeckite/core": "0.0.
|
|
24
|
+
"@riebeckite/core": "0.0.7"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"tsx": "^4.22.4"
|
package/style.css
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
.rr-text-fragment {
|
|
2
|
-
position: fixed;
|
|
3
|
-
z-index: 900;
|
|
4
|
-
display: grid;
|
|
5
|
-
gap: 4px;
|
|
6
|
-
padding: 6px;
|
|
7
|
-
border: 1px solid var(--rb-color-border-strong, #9a9a9a);
|
|
8
|
-
background: var(--rb-color-surface, #ffffff);
|
|
9
|
-
color: var(--rb-color-ink, #1a1a1a);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.rr-text-fragment[hidden] {
|
|
13
|
-
display: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.rr-text-fragment__actions {
|
|
17
|
-
display: flex;
|
|
18
|
-
gap: 4px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.rr-text-fragment__button {
|
|
22
|
-
border: 1px solid var(--rb-color-border, #d0d0d0);
|
|
23
|
-
background: transparent;
|
|
24
|
-
color: inherit;
|
|
25
|
-
padding: 4px 10px;
|
|
26
|
-
font: inherit;
|
|
27
|
-
font-size: 0.8rem;
|
|
28
|
-
line-height: 1.4;
|
|
29
|
-
white-space: nowrap;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.rr-text-fragment__button:hover {
|
|
34
|
-
border-color: var(--rb-color-accent, #686868);
|
|
35
|
-
color: var(--rb-color-accent, #686868);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.rr-text-fragment__button:focus-visible {
|
|
39
|
-
outline: 2px solid var(--rb-color-accent, #686868);
|
|
40
|
-
outline-offset: 1px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.rr-text-fragment__status {
|
|
44
|
-
margin: 0;
|
|
45
|
-
max-width: 16rem;
|
|
46
|
-
font-size: 0.72rem;
|
|
47
|
-
line-height: 1.4;
|
|
48
|
-
color: var(--rb-color-muted, #5a5a5a);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.rr-text-fragment__status:empty {
|
|
52
|
-
display: none;
|
|
53
|
-
}
|
|
1
|
+
.rr-text-fragment {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 900;
|
|
4
|
+
display: grid;
|
|
5
|
+
gap: 4px;
|
|
6
|
+
padding: 6px;
|
|
7
|
+
border: 1px solid var(--rb-color-border-strong, #9a9a9a);
|
|
8
|
+
background: var(--rb-color-surface, #ffffff);
|
|
9
|
+
color: var(--rb-color-ink, #1a1a1a);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.rr-text-fragment[hidden] {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.rr-text-fragment__actions {
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: 4px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rr-text-fragment__button {
|
|
22
|
+
border: 1px solid var(--rb-color-border, #d0d0d0);
|
|
23
|
+
background: transparent;
|
|
24
|
+
color: inherit;
|
|
25
|
+
padding: 4px 10px;
|
|
26
|
+
font: inherit;
|
|
27
|
+
font-size: 0.8rem;
|
|
28
|
+
line-height: 1.4;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.rr-text-fragment__button:hover {
|
|
34
|
+
border-color: var(--rb-color-accent, #686868);
|
|
35
|
+
color: var(--rb-color-accent, #686868);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.rr-text-fragment__button:focus-visible {
|
|
39
|
+
outline: 2px solid var(--rb-color-accent, #686868);
|
|
40
|
+
outline-offset: 1px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.rr-text-fragment__status {
|
|
44
|
+
margin: 0;
|
|
45
|
+
max-width: 16rem;
|
|
46
|
+
font-size: 0.72rem;
|
|
47
|
+
line-height: 1.4;
|
|
48
|
+
color: var(--rb-color-muted, #5a5a5a);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.rr-text-fragment__status:empty {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|