@riebeckite/plugin-text-fragment 0.0.3 → 0.0.6

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 CHANGED
@@ -67,4 +67,4 @@ The fragment follows `#:~:text=[prefix-,]start[,end][,-suffix]`:
67
67
 
68
68
  ## See also
69
69
 
70
- - [Plugin guide](../../docs/plugins_en.md)
70
+ - [Plugin guide](../../../docs/en/plugin-system.md)
package/README_ja.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  記事内で選択したテキストから、Text Fragment のディープリンク(`#:~:text=`)と Markdown の引用を作るプラグインです。
4
4
 
5
- [English](./README_en.md)
5
+ [English](./README.md)
6
6
 
7
7
  ## できること
8
8
 
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.append(linkButton, quoteButton);
75
- popover.append(actions, status);
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.append(linkButton, quoteButton);
82
- popover.append(actions, status);
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",
3
+ "version": "0.0.6",
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.3"
24
+ "@riebeckite/core": "0.0.6"
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
+ }