@lupinum/ginko-content 0.3.5 → 0.3.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.
@@ -158,6 +158,10 @@ const isSafeBindingValue = (value) => {
158
158
  };
159
159
  const SHIKI_COLOR = /^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
160
160
  const SHIKI_STYLE_VALUES = {
161
+ // Shiki marks inline code with `display: inline`; @shikijs/transformers marks
162
+ // highlighted and diff lines with `display: inline-block`. Nothing else is emitted,
163
+ // so nothing else is accepted.
164
+ display: /^(?:inline|inline-block)$/,
161
165
  color: SHIKI_COLOR,
162
166
  "--shiki-light": SHIKI_COLOR,
163
167
  "--shiki-dark": SHIKI_COLOR,
@@ -170,7 +174,6 @@ const SHIKI_STYLE_VALUES = {
170
174
  };
171
175
  const isSafeShikiStyle = (value) => {
172
176
  if (typeof value !== "string") return false;
173
- if (value.trim() === "display: inline") return true;
174
177
  const declarations = value.split(";");
175
178
  if (!declarations.length || declarations.some((declaration) => !declaration)) return false;
176
179
  const seen = /* @__PURE__ */ new Set();
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lupinum/ginko-content",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "configKey": "content",
5
5
  "compatibility": {
6
6
  "nuxt": ">=4.4.7 <5"
package/dist/module.mjs CHANGED
@@ -30,7 +30,7 @@ import { createRouterMatcher } from 'vue-router';
30
30
  import { globby } from 'globby';
31
31
 
32
32
  const name = "@lupinum/ginko-content";
33
- const version = "0.3.5";
33
+ const version = "0.3.6";
34
34
  const peerDependencies = {
35
35
  nuxt: ">=4.4.7 <5"};
36
36
 
@@ -1415,6 +1415,11 @@ const registerContentNitroConfig = ({
1415
1415
  nitroConfig.externals = defu(typeof nitroConfig.externals === "object" ? nitroConfig.externals : {}, {
1416
1416
  inline: [
1417
1417
  resolveModuleFile("."),
1418
+ // The generated virtual modules import authored app files (content.config.ts and
1419
+ // transformers). Nitro's dev server externalizes them by default, which hands raw
1420
+ // TypeScript to Node's ESM loader and fails on any import Node cannot resolve on its
1421
+ // own — extensionless relative imports, aliases. They must be bundled instead.
1422
+ withTrailingSlash(resolve$1(nuxt.options.buildDir, "content")),
1418
1423
  ...runtimeInlineDependencies
1419
1424
  ]
1420
1425
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "@lupinum/ginko-content",
4
- "version": "0.3.5",
4
+ "version": "0.3.6",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lupinum/ginko-content",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Collection-first content engine for Nuxt",
5
5
  "homepage": "https://github.com/lupinum-dev/ginko-content",
6
6
  "bugs": {