diff --git a/.changeset/internal-initial-release.md b/.changeset/internal-initial-release.md deleted file mode 100644 index 36dfb28..0000000 --- a/.changeset/internal-initial-release.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@vivliostyle/internal': major ---- - -Initial release diff --git a/.changeset/vfm-internal-utils-initial-release.md b/.changeset/vfm-internal-utils-initial-release.md new file mode 100644 index 0000000..2d30c2e --- /dev/null +++ b/.changeset/vfm-internal-utils-initial-release.md @@ -0,0 +1,5 @@ +--- +'@vivliostyle/vfm-internal-utils': major +--- + +Initial release diff --git a/packages/internal/README.md b/packages/internal/README.md deleted file mode 100644 index a99eca5..0000000 --- a/packages/internal/README.md +++ /dev/null @@ -1 +0,0 @@ -# @vivliostyle/internal diff --git a/packages/remark-footnote-dpub/package.json b/packages/remark-footnote-dpub/package.json index 41b8613..930be44 100644 --- a/packages/remark-footnote-dpub/package.json +++ b/packages/remark-footnote-dpub/package.json @@ -29,7 +29,7 @@ "dependencies": { "@types/hast": "^2.0.0", "@types/unist": "^2.0.0", - "@vivliostyle/internal": "workspace:*", + "@vivliostyle/vfm-internal-utils": "workspace:*", "hast-util-select": "^5.0.5", "hastscript": "^7.2.0", "mdast-util-to-hast": "^11.3.0", diff --git a/packages/remark-footnote-dpub/src/index.ts b/packages/remark-footnote-dpub/src/index.ts index ee2288a..74d4669 100644 --- a/packages/remark-footnote-dpub/src/index.ts +++ b/packages/remark-footnote-dpub/src/index.ts @@ -12,7 +12,7 @@ import { buildElement, type ElementFactory as FootnoteFactory, HastPropertiesSchema, -} from '@vivliostyle/internal'; +} from '@vivliostyle/vfm-internal-utils'; import type * as hast from 'hast'; import { selectAll } from 'hast-util-select'; import { h } from 'hastscript'; @@ -25,7 +25,7 @@ import type * as unist from 'unist'; import { u } from 'unist-builder'; import * as v from 'valibot'; -export type { ElementFactory as FootnoteFactory } from '@vivliostyle/internal'; +export type { ElementFactory as FootnoteFactory } from '@vivliostyle/vfm-internal-utils'; type ElementWithProps = hast.Element & { properties: NonNullable; diff --git a/packages/remark-footnote-gcpm/package.json b/packages/remark-footnote-gcpm/package.json index ccba883..a2e06c3 100644 --- a/packages/remark-footnote-gcpm/package.json +++ b/packages/remark-footnote-gcpm/package.json @@ -28,7 +28,7 @@ }, "dependencies": { "@types/hast": "^2.0.0", - "@vivliostyle/internal": "workspace:*", + "@vivliostyle/vfm-internal-utils": "workspace:*", "hastscript": "^7.2.0", "mdast-util-to-hast": "^11.3.0", "unified": "^9.2.0", diff --git a/packages/remark-footnote-gcpm/src/index.ts b/packages/remark-footnote-gcpm/src/index.ts index 8c421bf..6cd2f50 100644 --- a/packages/remark-footnote-gcpm/src/index.ts +++ b/packages/remark-footnote-gcpm/src/index.ts @@ -12,7 +12,7 @@ import { type ElementFactory as FootnoteFactory, HastPropertiesSchema, type TagAwareH, -} from '@vivliostyle/internal'; +} from '@vivliostyle/vfm-internal-utils'; import type * as hast from 'hast'; import { h } from 'hastscript'; import { @@ -22,7 +22,7 @@ import { import type unified from 'unified'; import * as v from 'valibot'; -export type { ElementFactory as FootnoteFactory } from '@vivliostyle/internal'; +export type { ElementFactory as FootnoteFactory } from '@vivliostyle/vfm-internal-utils'; // --------------------------------------------------------------------------- // GCPM-specific types and schemas diff --git a/packages/internal/LICENSE b/packages/vfm-internal-utils/LICENSE similarity index 100% rename from packages/internal/LICENSE rename to packages/vfm-internal-utils/LICENSE diff --git a/packages/vfm-internal-utils/README.md b/packages/vfm-internal-utils/README.md new file mode 100644 index 0000000..a8d1921 --- /dev/null +++ b/packages/vfm-internal-utils/README.md @@ -0,0 +1 @@ +# @vivliostyle/vfm-internal-utils diff --git a/packages/internal/package.json b/packages/vfm-internal-utils/package.json similarity index 89% rename from packages/internal/package.json rename to packages/vfm-internal-utils/package.json index 52350dd..30d21c2 100644 --- a/packages/internal/package.json +++ b/packages/vfm-internal-utils/package.json @@ -1,5 +1,5 @@ { - "name": "@vivliostyle/internal", + "name": "@vivliostyle/vfm-internal-utils", "version": "0.0.0", "description": "Internal shared machinery for VFM's own packages.", "license": "Apache-2.0", @@ -12,7 +12,7 @@ "repository": { "type": "git", "url": "git+https://github.com/vivliostyle/vfm.git", - "directory": "packages/internal" + "directory": "packages/vfm-internal-utils" }, "files": [ "lib" diff --git a/packages/internal/src/element-customizer.ts b/packages/vfm-internal-utils/src/element-customizer.ts similarity index 100% rename from packages/internal/src/element-customizer.ts rename to packages/vfm-internal-utils/src/element-customizer.ts diff --git a/packages/internal/src/index.ts b/packages/vfm-internal-utils/src/index.ts similarity index 100% rename from packages/internal/src/index.ts rename to packages/vfm-internal-utils/src/index.ts diff --git a/packages/internal/tests/element-customizer.test.ts b/packages/vfm-internal-utils/tests/element-customizer.test.ts similarity index 100% rename from packages/internal/tests/element-customizer.test.ts rename to packages/vfm-internal-utils/tests/element-customizer.test.ts diff --git a/packages/internal/tests/tsconfig.json b/packages/vfm-internal-utils/tests/tsconfig.json similarity index 100% rename from packages/internal/tests/tsconfig.json rename to packages/vfm-internal-utils/tests/tsconfig.json diff --git a/packages/internal/tsconfig.json b/packages/vfm-internal-utils/tsconfig.json similarity index 100% rename from packages/internal/tsconfig.json rename to packages/vfm-internal-utils/tsconfig.json diff --git a/packages/vfm/package.json b/packages/vfm/package.json index ef5c4f2..2f850fc 100644 --- a/packages/vfm/package.json +++ b/packages/vfm/package.json @@ -51,7 +51,7 @@ "@types/hast": "^2.0.0", "@types/mdast": "^3.0.0", "@types/unist": "^2.0.0", - "@vivliostyle/internal": "workspace:*", + "@vivliostyle/vfm-internal-utils": "workspace:*", "@vivliostyle/remark-footnote-dpub": "workspace:*", "@vivliostyle/remark-footnote-gcpm": "workspace:*", "@vivliostyle/remark-footnote-pandoc": "workspace:*", diff --git a/packages/vfm/src/plugins/table.ts b/packages/vfm/src/plugins/table.ts index c3f1978..433f847 100644 --- a/packages/vfm/src/plugins/table.ts +++ b/packages/vfm/src/plugins/table.ts @@ -3,7 +3,10 @@ import { type Handler as ToHastHandler } from 'mdast-util-to-hast'; import { table as defaultTableHandler } from 'mdast-util-to-hast/lib/handlers/table.js'; import { visit } from 'unist-util-visit'; import * as v from 'valibot'; -import { buildElement, type ElementFactory } from '@vivliostyle/internal'; +import { + buildElement, + type ElementFactory, +} from '@vivliostyle/vfm-internal-utils'; /** Column alignment carried on a GFM table cell. */ export type TableCellAlign = 'left' | 'center' | 'right'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 121bdcd..d2676e3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,18 +42,6 @@ importers: specifier: ^4.1.3 version: 4.1.3(@types/node@22.19.19)(vite@8.0.7(@types/node@22.19.19)) - packages/internal: - dependencies: - '@types/hast': - specifier: ^2.0.0 - version: 2.3.10 - hastscript: - specifier: ^7.2.0 - version: 7.2.0 - valibot: - specifier: 1.2.0 - version: 1.2.0(typescript@6.0.2) - packages/remark-footnote-dpub: dependencies: '@types/hast': @@ -62,9 +50,9 @@ importers: '@types/unist': specifier: ^2.0.0 version: 2.0.3 - '@vivliostyle/internal': + '@vivliostyle/vfm-internal-utils': specifier: workspace:* - version: link:../internal + version: link:../vfm-internal-utils hast-util-select: specifier: ^5.0.5 version: 5.0.5 @@ -108,9 +96,9 @@ importers: '@types/hast': specifier: ^2.0.0 version: 2.3.10 - '@vivliostyle/internal': + '@vivliostyle/vfm-internal-utils': specifier: workspace:* - version: link:../internal + version: link:../vfm-internal-utils hastscript: specifier: ^7.2.0 version: 7.2.0 @@ -265,9 +253,6 @@ importers: '@types/unist': specifier: ^2.0.0 version: 2.0.3 - '@vivliostyle/internal': - specifier: workspace:* - version: link:../internal '@vivliostyle/remark-footnote-dpub': specifier: workspace:* version: link:../remark-footnote-dpub @@ -283,6 +268,9 @@ importers: '@vivliostyle/remark-sectionize': specifier: workspace:* version: link:../remark-sectionize + '@vivliostyle/vfm-internal-utils': + specifier: workspace:* + version: link:../vfm-internal-utils debug: specifier: ^4.4.3 version: 4.4.3 @@ -420,6 +408,18 @@ importers: specifier: ^1.8.2 version: 1.8.2 + packages/vfm-internal-utils: + dependencies: + '@types/hast': + specifier: ^2.0.0 + version: 2.3.10 + hastscript: + specifier: ^7.2.0 + version: 7.2.0 + valibot: + specifier: 1.2.0 + version: 1.2.0(typescript@6.0.2) + packages: '@babel/runtime@7.29.7': @@ -628,36 +628,42 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.0.0-rc.13': resolution: {integrity: sha512-bmRg3O6Z0gq9yodKKWCIpnlH051sEfdVwt+6m5UDffAQMUUqU0xjnQqqAUm+Gu7ofAAly9DqiQDtKu2nPDEABA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [musl] '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.13': resolution: {integrity: sha512-8Wtnbw4k7pMYN9B/mOEAsQ8HOiq7AZ31Ig4M9BKn2So4xRaFEhtCSa4ZJaOutOWq50zpgR4N5+L/opnlaCx8wQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.13': resolution: {integrity: sha512-D/0Nlo8mQuxSMohNJUF2lDXWRsFDsHldfRRgD9bRgktj+EndGPj4DOV37LqDKPYS+osdyhZEH7fTakTAEcW7qg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.0.0-rc.13': resolution: {integrity: sha512-eRrPvat2YaVQcwwKi/JzOP6MKf1WRnOCr+VaI3cTWz3ZoLcP/654z90lVCJ4dAuMEpPdke0n+qyAqXDZdIC4rA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-musl@1.0.0-rc.13': resolution: {integrity: sha512-PsdONiFRp8hR8KgVjTWjZ9s7uA3uueWL0t74/cKHfM4dR5zXYv4AjB8BvA+QDToqxAFg4ZkcVEqeu5F7inoz5w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [musl] '@rolldown/binding-openharmony-arm64@1.0.0-rc.13': resolution: {integrity: sha512-hCNXgC5dI3TVOLrPT++PKFNZ+1EtS0mLQwfXXXSUD/+rGlB65gZDwN/IDuxLpQP4x8RYYHqGomlUXzpO8aVI2w==} @@ -1392,24 +1398,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==}