@nukipa/post-content 0.2.1 → 0.2.3

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 (2) hide show
  1. package/package.json +1 -1
  2. package/styles.css +56 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nukipa/post-content",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Framework-agnostic processor for Nukipa CMS post bodies — markdown + component markers + citations → HTML + interactive island descriptors.",
5
5
  "license": "MIT",
6
6
  "author": "Nukipa Labs",
package/styles.css CHANGED
@@ -1,14 +1,52 @@
1
1
  /*
2
- * Material Icons — pulled at the top so the @font-face rule wins the
3
- * cascade before any of our `.material-icons` selectors below. The
4
- * renderer emits glyph names verbatim (`help_outline`, `expand_more`,
5
- * `arrow_forward`, `chevron_left`, `chevron_right`, plus whatever
6
- * stage icons the post author picked); without this font those names
7
- * render as literal text. To self-host (offline, privacy, or perf
8
- * reasons): drop this @import, host the same font + matching CSS at
9
- * the host, and the rest of this stylesheet keeps working unchanged.
2
+ * Material Icons — declared inline so it works regardless of where
3
+ * this stylesheet lands in the bundle.
4
+ *
5
+ * We used to `@import url("https://fonts.googleapis.com/icon?family=Material+Icons")`,
6
+ * but the CSS spec requires every `@import` rule to appear BEFORE
7
+ * any other rule in the document; modern bundlers (Next.js/webpack,
8
+ * Vite) concatenate consumer styles (Tailwind, next/font, globals.css)
9
+ * ahead of package CSS, pushing the @import past other rules where
10
+ * browsers silently ignore it.
11
+ *
12
+ * The renderer emits glyph names verbatim (`help_outline`,
13
+ * `expand_more`, `arrow_forward`, `chevron_left`, `chevron_right`,
14
+ * plus whatever stage icons the post author picked); without the
15
+ * font those names render as literal text. The src URL is Google's
16
+ * gstatic CDN — old versions stay accessible indefinitely, so the
17
+ * pinned `v143` is durable. To self-host: replace the @font-face
18
+ * src with your own woff2 URL and keep the `.material-icons` rules
19
+ * below as-is.
10
20
  */
11
- @import url("https://fonts.googleapis.com/icon?family=Material+Icons");
21
+ @font-face {
22
+ font-family: "Material Icons";
23
+ font-style: normal;
24
+ font-weight: 400;
25
+ /* Two formats: WOFF2 first (modern browsers), TTF fallback (older).
26
+ Both versioned URLs come from Google's own current /icon?family=
27
+ CSS — gstatic keeps old versions reachable indefinitely so the
28
+ pin is durable. The previous pin (`v143/...IuiaDsNZ.woff2`) was
29
+ stale and 404'd in production. */
30
+ src:
31
+ url("https://fonts.gstatic.com/s/materialicons/v145/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2") format("woff2"),
32
+ url("https://fonts.gstatic.com/s/materialicons/v145/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf") format("truetype");
33
+ font-display: swap;
34
+ }
35
+ .material-icons {
36
+ font-family: "Material Icons";
37
+ font-weight: normal;
38
+ font-style: normal;
39
+ font-size: 24px;
40
+ line-height: 1;
41
+ letter-spacing: normal;
42
+ text-transform: none;
43
+ display: inline-block;
44
+ white-space: nowrap;
45
+ word-wrap: normal;
46
+ direction: ltr;
47
+ -webkit-font-feature-settings: "liga";
48
+ -webkit-font-smoothing: antialiased;
49
+ }
12
50
 
13
51
  /*
14
52
  * Nukipa post-content default stylesheet.
@@ -86,7 +124,15 @@
86
124
  color: var(--color-text-muted, #51646A);
87
125
  margin: 1.2em 0;
88
126
  }
89
- .prose-body ul, .prose-body ol { padding-left: 1.4em; margin: 0 0 1.1em; }
127
+ /* `list-style-type` is set explicitly because Tailwind's preflight
128
+ reset declares `ul, ol { list-style: none }`. Without our own
129
+ `disc` / `decimal` the renderer's markdown lists ship without
130
+ bullets / numbers. The selector specificity wins (`.prose-body ul`
131
+ > `ul`) so this works regardless of layer order. */
132
+ .prose-body ul { padding-left: 1.4em; margin: 0 0 1.1em; list-style-type: disc; }
133
+ .prose-body ol { padding-left: 1.4em; margin: 0 0 1.1em; list-style-type: decimal; }
134
+ .prose-body ul ul { list-style-type: circle; }
135
+ .prose-body ul ul ul { list-style-type: square; }
90
136
  .prose-body li { margin: 0.3em 0; }
91
137
 
92
138
  /* ───── Component wrapper (every bp-* gets one) ────────────────────── */