@riebeckite/plugin-rich-embed 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
@@ -139,4 +139,4 @@ warning through the vfile message channel:
139
139
 
140
140
  ## See also
141
141
 
142
- - [Plugin guide](../../docs/plugins_en.md)
142
+ - [Plugin guide](../../../docs/en/plugin-system.md)
package/README_ja.md CHANGED
@@ -129,4 +129,4 @@ Gist の場合は iframe の代わりに
129
129
 
130
130
  ## 関連
131
131
 
132
- - [プラグインガイド](../../docs/plugins_ja.md)
132
+ - [プラグインガイド](../../../docs/ja/plugin-system.md)
package/dist/index.js CHANGED
@@ -34,7 +34,13 @@ var VIMEO_HOSTS = /* @__PURE__ */ new Set(["vimeo.com", "www.vimeo.com", "player
34
34
  var SPOTIFY_HOSTS = /* @__PURE__ */ new Set(["open.spotify.com"]);
35
35
  var CODEPEN_HOSTS = /* @__PURE__ */ new Set(["codepen.io", "www.codepen.io"]);
36
36
  var GIST_HOSTS = /* @__PURE__ */ new Set(["gist.github.com"]);
37
- var SPOTIFY_TYPES = /* @__PURE__ */ new Set(["track", "album", "playlist", "episode", "show"]);
37
+ var SPOTIFY_TYPES = /* @__PURE__ */ new Set([
38
+ "track",
39
+ "album",
40
+ "playlist",
41
+ "episode",
42
+ "show"
43
+ ]);
38
44
  var YOUTUBE_ID = /^[A-Za-z0-9_-]{11}$/;
39
45
  var NUMERIC_ID = /^\d+$/;
40
46
  var SLUG_ID = /^[A-Za-z0-9]+$/;
@@ -54,7 +60,8 @@ function parseEmbedBlock(source) {
54
60
  if (value.length === 0) continue;
55
61
  if (key === "title") options.title = value;
56
62
  else if (key === "caption") options.caption = value;
57
- else if (key === "aspect") options.aspect = normalizeAspect(value) ?? void 0;
63
+ else if (key === "aspect")
64
+ options.aspect = normalizeAspect(value) ?? void 0;
58
65
  else if (key === "start") options.start = parseStart(value);
59
66
  }
60
67
  return { url, options };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-rich-embed",
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",
@@ -15,7 +15,7 @@
15
15
  "./style.css": "./style.css"
16
16
  },
17
17
  "dependencies": {
18
- "@riebeckite/core": "0.0.3"
18
+ "@riebeckite/core": "0.0.6"
19
19
  },
20
20
  "publishConfig": {
21
21
  "access": "public"
package/style.css CHANGED
@@ -1,78 +1,78 @@
1
- /*
2
- * @riebeckite/plugin-rich-embed
3
- * Stable class namespace: rb-rich-embed*
4
- */
5
- .rb-rich-embed {
6
- --rb-rich-embed-paper: var(--rb-color-paper, #ffffff);
7
- --rb-rich-embed-ink: var(--rb-color-ink, #000000);
8
- --rb-rich-embed-muted: var(--rb-color-muted, #69645c);
9
- --rb-rich-embed-rule: var(
10
- --rb-color-border,
11
- color-mix(in srgb, var(--rb-rich-embed-ink) 18%, transparent)
12
- );
13
- margin: 2rem 0;
14
- border: 1px solid var(--rb-rich-embed-rule);
15
- background: color-mix(
16
- in srgb,
17
- var(--rb-rich-embed-paper) 96%,
18
- var(--rb-rich-embed-ink)
19
- );
20
- color: var(--rb-rich-embed-ink);
21
- }
22
-
23
- .rb-rich-embed__frame {
24
- position: relative;
25
- aspect-ratio: var(--rb-rich-embed-aspect, 16 / 9);
26
- width: 100%;
27
- overflow: hidden;
28
- background: color-mix(in srgb, var(--rb-rich-embed-ink) 6%, transparent);
29
- }
30
-
31
- .rb-rich-embed__frame > iframe {
32
- position: absolute;
33
- inset: 0;
34
- display: block;
35
- width: 100%;
36
- height: 100%;
37
- border: 0;
38
- }
39
-
40
- .rb-rich-embed__caption {
41
- padding: 0.625rem 0.75rem;
42
- border-top: 1px solid var(--rb-rich-embed-rule);
43
- color: var(--rb-rich-embed-muted);
44
- font-size: 0.875rem;
45
- }
46
-
47
- .rb-rich-embed__card {
48
- display: flex;
49
- align-items: center;
50
- gap: 0.5rem;
51
- padding: 1rem 1.25rem;
52
- }
53
-
54
- .rb-rich-embed__link {
55
- color: var(--rb-color-accent, var(--rb-rich-embed-ink));
56
- font-weight: 600;
57
- text-decoration: underline;
58
- text-underline-offset: 0.15em;
59
- }
60
-
61
- .rb-rich-embed__link::after {
62
- content: "↗";
63
- margin-inline-start: 0.35em;
64
- font-weight: 400;
65
- text-decoration: none;
66
- }
67
-
68
- html[data-theme="dark"] .rb-rich-embed,
69
- html.dark .rb-rich-embed {
70
- --rb-rich-embed-paper: var(--rb-color-ink, #000000);
71
- --rb-rich-embed-ink: var(--rb-color-paper, #ffffff);
72
- }
73
-
74
- @media (prefers-reduced-motion: reduce) {
75
- .rb-rich-embed__link {
76
- transition: none;
77
- }
78
- }
1
+ /*
2
+ * @riebeckite/plugin-rich-embed
3
+ * Stable class namespace: rb-rich-embed*
4
+ */
5
+ .rb-rich-embed {
6
+ --rb-rich-embed-paper: var(--rb-color-paper, #ffffff);
7
+ --rb-rich-embed-ink: var(--rb-color-ink, #000000);
8
+ --rb-rich-embed-muted: var(--rb-color-muted, #69645c);
9
+ --rb-rich-embed-rule: var(
10
+ --rb-color-border,
11
+ color-mix(in srgb, var(--rb-rich-embed-ink) 18%, transparent)
12
+ );
13
+ margin: 2rem 0;
14
+ border: 1px solid var(--rb-rich-embed-rule);
15
+ background: color-mix(
16
+ in srgb,
17
+ var(--rb-rich-embed-paper) 96%,
18
+ var(--rb-rich-embed-ink)
19
+ );
20
+ color: var(--rb-rich-embed-ink);
21
+ }
22
+
23
+ .rb-rich-embed__frame {
24
+ position: relative;
25
+ aspect-ratio: var(--rb-rich-embed-aspect, 16 / 9);
26
+ width: 100%;
27
+ overflow: hidden;
28
+ background: color-mix(in srgb, var(--rb-rich-embed-ink) 6%, transparent);
29
+ }
30
+
31
+ .rb-rich-embed__frame > iframe {
32
+ position: absolute;
33
+ inset: 0;
34
+ display: block;
35
+ width: 100%;
36
+ height: 100%;
37
+ border: 0;
38
+ }
39
+
40
+ .rb-rich-embed__caption {
41
+ padding: 0.625rem 0.75rem;
42
+ border-top: 1px solid var(--rb-rich-embed-rule);
43
+ color: var(--rb-rich-embed-muted);
44
+ font-size: 0.875rem;
45
+ }
46
+
47
+ .rb-rich-embed__card {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 0.5rem;
51
+ padding: 1rem 1.25rem;
52
+ }
53
+
54
+ .rb-rich-embed__link {
55
+ color: var(--rb-color-accent, var(--rb-rich-embed-ink));
56
+ font-weight: 600;
57
+ text-decoration: underline;
58
+ text-underline-offset: 0.15em;
59
+ }
60
+
61
+ .rb-rich-embed__link::after {
62
+ content: "↗";
63
+ margin-inline-start: 0.35em;
64
+ font-weight: 400;
65
+ text-decoration: none;
66
+ }
67
+
68
+ html[data-theme="dark"] .rb-rich-embed,
69
+ html.dark .rb-rich-embed {
70
+ --rb-rich-embed-paper: var(--rb-color-ink, #000000);
71
+ --rb-rich-embed-ink: var(--rb-color-paper, #ffffff);
72
+ }
73
+
74
+ @media (prefers-reduced-motion: reduce) {
75
+ .rb-rich-embed__link {
76
+ transition: none;
77
+ }
78
+ }