diff --git a/README.md b/README.md index 75d0061..3ec940a 100644 --- a/README.md +++ b/README.md @@ -6,22 +6,22 @@ Wikidot markup parser and renderer. | Package | Description | |---------|-------------| -| [@wdpr/ast](./packages/ast) | AST type definitions | -| [@wdpr/parser](./packages/parser) | Wikidot markup parser | -| [@wdpr/render](./packages/render) | HTML renderer | -| [@wdpr/runtime](./packages/runtime) | Client-side runtime for interactive elements | +| [@wdprlib/ast](./packages/ast) | AST type definitions | +| [@wdprlib/parser](./packages/parser) | Wikidot markup parser | +| [@wdprlib/render](./packages/render) | HTML renderer | +| [@wdprlib/runtime](./packages/runtime) | Client-side runtime for interactive elements | ## Installation ```bash -npm install @wdpr/parser @wdpr/render +npm install @wdprlib/parser @wdprlib/render ``` ## Usage ```ts -import { parse } from '@wdpr/parser' -import { renderToHtml } from '@wdpr/render' +import { parse } from '@wdprlib/parser' +import { renderToHtml } from '@wdprlib/render' const ast = parse('**Hello** world') const html = renderToHtml(ast) diff --git a/bun.lock b/bun.lock index b13d334..844eab6 100644 --- a/bun.lock +++ b/bun.lock @@ -25,7 +25,7 @@ "name": "@wdmock/files", "version": "0.0.1", "dependencies": { - "@wdpr/runtime": "workspace:*", + "@wdprlib/runtime": "workspace:*", }, "devDependencies": { "@cloudflare/workers-types": "^4.20250123.0", @@ -38,9 +38,9 @@ "dependencies": { "@wdmock/db": "workspace:*", "@wdmock/shared": "workspace:*", - "@wdpr/parser": "workspace:*", - "@wdpr/render": "workspace:*", - "@wdpr/runtime": "workspace:*", + "@wdprlib/parser": "workspace:*", + "@wdprlib/render": "workspace:*", + "@wdprlib/runtime": "workspace:*", "hono": "^4.7.5", }, "devDependencies": { @@ -56,7 +56,7 @@ "version": "0.0.1", "dependencies": { "@wdmock/shared": "workspace:*", - "@wdpr/parser": "workspace:*", + "@wdprlib/parser": "workspace:*", }, "devDependencies": { "@cloudflare/workers-types": "^4.20250123.0", @@ -67,26 +67,26 @@ "version": "0.0.1", }, "packages/ast": { - "name": "@wdpr/ast", + "name": "@wdprlib/ast", "version": "0.1.0", }, "packages/parser": { - "name": "@wdpr/parser", + "name": "@wdprlib/parser", "version": "0.1.0", "dependencies": { "@braintree/sanitize-url": "^7.1.1", - "@wdpr/ast": "workspace:*", + "@wdprlib/ast": "workspace:*", }, }, "packages/render": { - "name": "@wdpr/render", + "name": "@wdprlib/render", "version": "0.1.0", "dependencies": { - "@wdpr/ast": "workspace:*", + "@wdprlib/ast": "workspace:*", }, }, "packages/runtime": { - "name": "@wdpr/runtime", + "name": "@wdprlib/runtime", "version": "0.1.0", }, }, @@ -493,13 +493,13 @@ "@wdmock/shared": ["@wdmock/shared@workspace:examples/wdmock-cf/packages/shared"], - "@wdpr/ast": ["@wdpr/ast@workspace:packages/ast"], + "@wdprlib/ast": ["@wdprlib/ast@workspace:packages/ast"], - "@wdpr/parser": ["@wdpr/parser@workspace:packages/parser"], + "@wdprlib/parser": ["@wdprlib/parser@workspace:packages/parser"], - "@wdpr/render": ["@wdpr/render@workspace:packages/render"], + "@wdprlib/render": ["@wdprlib/render@workspace:packages/render"], - "@wdpr/runtime": ["@wdpr/runtime@workspace:packages/runtime"], + "@wdprlib/runtime": ["@wdprlib/runtime@workspace:packages/runtime"], "acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], diff --git a/bunup.config.ts b/bunup.config.ts index e944cd7..f99b2eb 100644 --- a/bunup.config.ts +++ b/bunup.config.ts @@ -21,7 +21,7 @@ export default defineWorkspace([ dts: true, minify: false, clean: true, - external: ["@wdpr/ast"], + external: ["@wdprlib/ast"], }, }, { @@ -33,7 +33,7 @@ export default defineWorkspace([ dts: true, minify: false, clean: true, - external: ["@wdpr/ast"], + external: ["@wdprlib/ast"], }, }, { diff --git a/examples/wdmock-cf/apps/files/package.json b/examples/wdmock-cf/apps/files/package.json index a264e83..ae2c19b 100644 --- a/examples/wdmock-cf/apps/files/package.json +++ b/examples/wdmock-cf/apps/files/package.json @@ -9,7 +9,7 @@ "typecheck": "bunx tsc --noEmit" }, "dependencies": { - "@wdpr/runtime": "workspace:*" + "@wdprlib/runtime": "workspace:*" }, "devDependencies": { "@cloudflare/workers-types": "^4.20250123.0", diff --git a/examples/wdmock-cf/apps/files/src/index.ts b/examples/wdmock-cf/apps/files/src/index.ts index c608009..6e1556d 100644 --- a/examples/wdmock-cf/apps/files/src/index.ts +++ b/examples/wdmock-cf/apps/files/src/index.ts @@ -10,7 +10,7 @@ * - /common--javascript/html-block-iframe.js - Resize script for iframe */ -import { HTML_BLOCK_RESIZE_SCRIPT } from "@wdpr/runtime"; +import { HTML_BLOCK_RESIZE_SCRIPT } from "@wdprlib/runtime"; interface Env { FILES: R2Bucket; diff --git a/examples/wdmock-cf/apps/main/package.json b/examples/wdmock-cf/apps/main/package.json index 7970670..c3aea8c 100644 --- a/examples/wdmock-cf/apps/main/package.json +++ b/examples/wdmock-cf/apps/main/package.json @@ -13,9 +13,9 @@ "dependencies": { "@wdmock/db": "workspace:*", "@wdmock/shared": "workspace:*", - "@wdpr/parser": "workspace:*", - "@wdpr/render": "workspace:*", - "@wdpr/runtime": "workspace:*", + "@wdprlib/parser": "workspace:*", + "@wdprlib/render": "workspace:*", + "@wdprlib/runtime": "workspace:*", "hono": "^4.7.5" }, "devDependencies": { diff --git a/examples/wdmock-cf/apps/main/src/client/main.ts b/examples/wdmock-cf/apps/main/src/client/main.ts index a80ab78..6b0e1cd 100644 --- a/examples/wdmock-cf/apps/main/src/client/main.ts +++ b/examples/wdmock-cf/apps/main/src/client/main.ts @@ -1,4 +1,4 @@ -import { initWdprRuntime, type WdprRuntime } from "@wdpr/runtime"; +import { initWdprRuntime, type WdprRuntime } from "@wdprlib/runtime"; let runtime: WdprRuntime | null = null; let currentPageId: number | null = null; @@ -21,7 +21,7 @@ function applyPageStyles(styles: string[]) { /** * Safely set HTML content using a sandboxed approach. - * The HTML is generated server-side by @wdpr/render which sanitizes user input. + * The HTML is generated server-side by @wdprlib/render which sanitizes user input. * We use a template element for parsing to avoid script execution during parsing. */ function setTrustedHtml(element: Element, html: string): void { @@ -76,7 +76,7 @@ async function loadPage(path: string) { const content = document.getElementById("page-content"); if (!content) return; - // Server-generated HTML from @wdpr/render (sanitized) + // Server-generated HTML from @wdprlib/render (sanitized) setTrustedHtml(content, data.html); content.dataset.pageId = String(data.page_id); @@ -341,7 +341,7 @@ async function previewPage() { h3.textContent = "Preview"; const previewContent = document.createElement("div"); previewContent.className = "preview-content"; - // Server-generated HTML from @wdpr/render (sanitized) + // Server-generated HTML from @wdprlib/render (sanitized) setTrustedHtml(previewContent, data.html); previewArea.appendChild(h3); previewArea.appendChild(previewContent); @@ -391,7 +391,7 @@ async function loadNavigation() { const actionsSection = sidebar.querySelector("#side-bar-actions"); // Clone the actions section to preserve it after replaceChildren const actionsClone = actionsSection?.cloneNode(true) as HTMLElement | null; - // Server-generated HTML from @wdpr/render (sanitized) + // Server-generated HTML from @wdprlib/render (sanitized) setTrustedHtml(sidebar, html); // Re-add actions section at the beginning if (actionsClone) { @@ -407,7 +407,7 @@ async function loadNavigation() { const { html, styles } = (await topbarRes.json()) as { html: string; styles?: string[] }; const topbar = document.getElementById("top-bar"); if (topbar) { - // Server-generated HTML from @wdpr/render (sanitized) + // Server-generated HTML from @wdprlib/render (sanitized) setTrustedHtml(topbar, html); } if (styles) navStyles.push(...styles); diff --git a/examples/wdmock-cf/apps/main/src/services/pipeline.ts b/examples/wdmock-cf/apps/main/src/services/pipeline.ts index f501075..a711a9a 100644 --- a/examples/wdmock-cf/apps/main/src/services/pipeline.ts +++ b/examples/wdmock-cf/apps/main/src/services/pipeline.ts @@ -3,15 +3,15 @@ * * Handles source parsing, module resolution, and HTML rendering. */ -import { parse, extractDataRequirements, resolveModules, resolveIncludes } from "@wdpr/parser"; +import { parse, extractDataRequirements, resolveModules, resolveIncludes } from "@wdprlib/parser"; import type { NormalizedListPagesQuery, ListPagesExternalData, PageData, PageRef, -} from "@wdpr/parser"; -import { renderToHtml } from "@wdpr/render"; -import type { PageContext } from "@wdpr/render"; +} from "@wdprlib/parser"; +import { renderToHtml } from "@wdprlib/render"; +import type { PageContext } from "@wdprlib/render"; import { SITE, getUserInfo, parseFullname, buildFullname } from "@wdmock/shared"; import { getTagsByFullname, rowToPageData, getAllPageSources } from "@wdmock/db"; diff --git a/examples/wdmock-cf/packages/db/package.json b/examples/wdmock-cf/packages/db/package.json index 3cd30b1..192a05d 100644 --- a/examples/wdmock-cf/packages/db/package.json +++ b/examples/wdmock-cf/packages/db/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@wdmock/shared": "workspace:*", - "@wdpr/parser": "workspace:*" + "@wdprlib/parser": "workspace:*" }, "devDependencies": { "@cloudflare/workers-types": "^4.20250123.0" diff --git a/examples/wdmock-cf/packages/db/src/pages.ts b/examples/wdmock-cf/packages/db/src/pages.ts index fde3c52..f112d5e 100644 --- a/examples/wdmock-cf/packages/db/src/pages.ts +++ b/examples/wdmock-cf/packages/db/src/pages.ts @@ -2,7 +2,7 @@ * Pages table operations */ -import type { PageData } from "@wdpr/parser"; +import type { PageData } from "@wdprlib/parser"; import { getUserInfo, buildFullname } from "@wdmock/shared"; export interface PageApiData { diff --git a/examples/wdmock-cf/seed.sql b/examples/wdmock-cf/seed.sql index a5f528f..b3606bd 100644 --- a/examples/wdmock-cf/seed.sql +++ b/examples/wdmock-cf/seed.sql @@ -56,9 +56,9 @@ This is an example application demonstrating the capabilities of the wdpr librar * **Server**: Hono on Cloudflare Workers * **Database**: Cloudflare D1 (SQLite) -* **Parser**: @wdpr/parser -* **Renderer**: @wdpr/render -* **Runtime**: @wdpr/runtime (client-side) +* **Parser**: @wdprlib/parser +* **Renderer**: @wdprlib/render +* **Runtime**: @wdprlib/runtime (client-side) ', 1); INSERT OR REPLACE INTO pages (site_id, category, unix_name, title, source, owner_user_id) VALUES (1, '_default', 'scp-280-jp', 'SCP-280-JP', '[[include credit:start]] **タイトル:** SCP-280-JP - 縮小する時空間異常 diff --git a/packages/ast/CHANGELOG.md b/packages/ast/CHANGELOG.md index aaaa41b..71a198b 100644 --- a/packages/ast/CHANGELOG.md +++ b/packages/ast/CHANGELOG.md @@ -1,4 +1,4 @@ -# @wdpr/ast +# @wdprlib/ast ## 1.0.0 diff --git a/packages/ast/package.json b/packages/ast/package.json index 112afaf..0209857 100644 --- a/packages/ast/package.json +++ b/packages/ast/package.json @@ -1,6 +1,6 @@ { - "name": "@wdpr/ast", - "version": "1.0.0", + "name": "@wdprlib/ast", + "version": "0.1.0", "description": "AST types for Wikidot markup", "keywords": [ "ast", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 68831f1..5a6d5d8 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,4 +1,4 @@ -# @wdpr/parser +# @wdprlib/parser ## 1.0.0 @@ -9,4 +9,4 @@ ### Patch Changes - Updated dependencies [[`5e5a7de`](https://github.com/r74tech/wdpr/commit/5e5a7def04c116fdf90419684b5c773716ca4ed4)]: - - @wdpr/ast@1.0.0 + - @wdprlib/ast@1.0.0 diff --git a/packages/parser/package.json b/packages/parser/package.json index 35322f5..9f263da 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { - "name": "@wdpr/parser", - "version": "1.0.0", + "name": "@wdprlib/parser", + "version": "0.1.0", "description": "Parser for Wikidot markup", "keywords": [ "ast", @@ -39,6 +39,6 @@ }, "dependencies": { "@braintree/sanitize-url": "^7.1.1", - "@wdpr/ast": "workspace:*" + "@wdprlib/ast": "workspace:*" } } diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index 346014f..7d234d5 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -1,4 +1,4 @@ -// Re-export AST types and utilities from @wdpr/ast +// Re-export AST types and utilities from @wdprlib/ast export type { Position, Point, @@ -36,7 +36,7 @@ export type { DateItem, Embed, TocEntry, -} from "@wdpr/ast"; +} from "@wdprlib/ast"; export { createPoint, createPosition, @@ -52,7 +52,7 @@ export { list, listItemElements, listItemSubList, -} from "@wdpr/ast"; +} from "@wdprlib/ast"; // Lexer export type { TokenType, Token, LexerOptions } from "./lexer"; diff --git a/packages/parser/src/lexer/lexer.ts b/packages/parser/src/lexer/lexer.ts index 6984b0e..e48926c 100644 --- a/packages/parser/src/lexer/lexer.ts +++ b/packages/parser/src/lexer/lexer.ts @@ -1,4 +1,4 @@ -import { createPoint, createPosition } from "@wdpr/ast"; +import { createPoint, createPosition } from "@wdprlib/ast"; import { createToken, type Token, type TokenType } from "./tokens"; /** diff --git a/packages/parser/src/lexer/tokens.ts b/packages/parser/src/lexer/tokens.ts index b6d6eb6..9fa88e9 100644 --- a/packages/parser/src/lexer/tokens.ts +++ b/packages/parser/src/lexer/tokens.ts @@ -1,4 +1,4 @@ -import type { Position } from "@wdpr/ast"; +import type { Position } from "@wdprlib/ast"; /** * Token types for Wikidot markup diff --git a/packages/parser/src/parser/parse.ts b/packages/parser/src/parser/parse.ts index dc0ee9d..2e44b46 100644 --- a/packages/parser/src/parser/parse.ts +++ b/packages/parser/src/parser/parse.ts @@ -1,7 +1,7 @@ import type { Token } from "../lexer"; import { tokenize } from "../lexer"; import { preprocess } from "./preprocess"; -import type { Element, SyntaxTree } from "@wdpr/ast"; +import type { Element, SyntaxTree } from "@wdprlib/ast"; import { blockRules, blockFallbackRule, inlineRules, type ParseContext } from "./rules"; import { canApplyBlockRule } from "./rules/block/utils"; import { mergeSpanStripParagraphs, cleanInternalFlags } from "./postprocess"; diff --git a/packages/parser/src/parser/postprocess/spanStrip.ts b/packages/parser/src/parser/postprocess/spanStrip.ts index 0be607e..78208db 100644 --- a/packages/parser/src/parser/postprocess/spanStrip.ts +++ b/packages/parser/src/parser/postprocess/spanStrip.ts @@ -3,7 +3,7 @@ * * Handles span_ (paragraph strip) paragraph merging */ -import type { Element, ContainerData } from "@wdpr/ast"; +import type { Element, ContainerData } from "@wdprlib/ast"; /** * Check if an element is a container with specific type diff --git a/packages/parser/src/parser/rules/block/align.ts b/packages/parser/src/parser/rules/block/align.ts index 7d82d7e..699863f 100644 --- a/packages/parser/src/parser/rules/block/align.ts +++ b/packages/parser/src/parser/rules/block/align.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlocksUntil } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/block-list.ts b/packages/parser/src/parser/rules/block/block-list.ts index 0372f65..4192d25 100644 --- a/packages/parser/src/parser/rules/block/block-list.ts +++ b/packages/parser/src/parser/rules/block/block-list.ts @@ -1,4 +1,4 @@ -import type { Element, ListData, ListItem } from "@wdpr/ast"; +import type { Element, ListData, ListItem } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName, parseAttributes, canApplyBlockRule } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/blockquote.ts b/packages/parser/src/parser/rules/block/blockquote.ts index 0e3f65c..31692d2 100644 --- a/packages/parser/src/parser/rules/block/blockquote.ts +++ b/packages/parser/src/parser/rules/block/blockquote.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseInlineUntil } from "../inline/utils"; diff --git a/packages/parser/src/parser/rules/block/center.ts b/packages/parser/src/parser/rules/block/center.ts index e46a75b..6511495 100644 --- a/packages/parser/src/parser/rules/block/center.ts +++ b/packages/parser/src/parser/rules/block/center.ts @@ -4,7 +4,7 @@ * Creates a centered paragraph. * Requires: line start + = + space + text */ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseInlineUntil } from "../inline/utils"; diff --git a/packages/parser/src/parser/rules/block/clear-float.ts b/packages/parser/src/parser/rules/block/clear-float.ts index f3a2049..649b6f8 100644 --- a/packages/parser/src/parser/rules/block/clear-float.ts +++ b/packages/parser/src/parser/rules/block/clear-float.ts @@ -8,7 +8,7 @@ * * Note: ~~~ (3 tildes) does NOT work in Wikidot - requires 4+ */ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; diff --git a/packages/parser/src/parser/rules/block/code.ts b/packages/parser/src/parser/rules/block/code.ts index 3503863..ed1c6f9 100644 --- a/packages/parser/src/parser/rules/block/code.ts +++ b/packages/parser/src/parser/rules/block/code.ts @@ -1,4 +1,4 @@ -import type { Element, CodeBlockData } from "@wdpr/ast"; +import type { Element, CodeBlockData } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName } from "../utils"; diff --git a/packages/parser/src/parser/rules/block/collapsible.ts b/packages/parser/src/parser/rules/block/collapsible.ts index 63263fc..d2a275e 100644 --- a/packages/parser/src/parser/rules/block/collapsible.ts +++ b/packages/parser/src/parser/rules/block/collapsible.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName, parseBlocksUntil } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/comment.ts b/packages/parser/src/parser/rules/block/comment.ts index 977da7a..a688666 100644 --- a/packages/parser/src/parser/rules/block/comment.ts +++ b/packages/parser/src/parser/rules/block/comment.ts @@ -4,7 +4,7 @@ * Handles comments that span multiple lines. These are completely removed * from output (returns empty elements array). */ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; export const blockCommentRule: BlockRule = { diff --git a/packages/parser/src/parser/rules/block/content-separator.ts b/packages/parser/src/parser/rules/block/content-separator.ts index 3d86ffb..4fae6ac 100644 --- a/packages/parser/src/parser/rules/block/content-separator.ts +++ b/packages/parser/src/parser/rules/block/content-separator.ts @@ -3,7 +3,7 @@ * * Creates a content separator element. */ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; diff --git a/packages/parser/src/parser/rules/block/definition-list.ts b/packages/parser/src/parser/rules/block/definition-list.ts index 4a5270e..2d7f6da 100644 --- a/packages/parser/src/parser/rules/block/definition-list.ts +++ b/packages/parser/src/parser/rules/block/definition-list.ts @@ -2,7 +2,7 @@ * Definition list rule: : term : value * */ -import type { Element, DefinitionListItem } from "@wdpr/ast"; +import type { Element, DefinitionListItem } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { parseInlineUntil } from "../inline/utils"; diff --git a/packages/parser/src/parser/rules/block/div.ts b/packages/parser/src/parser/rules/block/div.ts index bb62acc..3f95128 100644 --- a/packages/parser/src/parser/rules/block/div.ts +++ b/packages/parser/src/parser/rules/block/div.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { diff --git a/packages/parser/src/parser/rules/block/footnoteblock.ts b/packages/parser/src/parser/rules/block/footnoteblock.ts index 2bf4a26..0418148 100644 --- a/packages/parser/src/parser/rules/block/footnoteblock.ts +++ b/packages/parser/src/parser/rules/block/footnoteblock.ts @@ -4,7 +4,7 @@ * This block marks where the collected footnotes should be rendered. * Supports optional title attribute. */ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; diff --git a/packages/parser/src/parser/rules/block/heading.ts b/packages/parser/src/parser/rules/block/heading.ts index 148505a..e7221cf 100644 --- a/packages/parser/src/parser/rules/block/heading.ts +++ b/packages/parser/src/parser/rules/block/heading.ts @@ -1,4 +1,4 @@ -import type { Element, HeadingLevel } from "@wdpr/ast"; +import type { Element, HeadingLevel } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseInlineUntil } from "../inline/utils"; diff --git a/packages/parser/src/parser/rules/block/horizontal-rule.ts b/packages/parser/src/parser/rules/block/horizontal-rule.ts index aaf2573..d22543b 100644 --- a/packages/parser/src/parser/rules/block/horizontal-rule.ts +++ b/packages/parser/src/parser/rules/block/horizontal-rule.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; diff --git a/packages/parser/src/parser/rules/block/html.ts b/packages/parser/src/parser/rules/block/html.ts index bf77e15..184ed06 100644 --- a/packages/parser/src/parser/rules/block/html.ts +++ b/packages/parser/src/parser/rules/block/html.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/iframe.ts b/packages/parser/src/parser/rules/block/iframe.ts index 892cdd1..27bf2d5 100644 --- a/packages/parser/src/parser/rules/block/iframe.ts +++ b/packages/parser/src/parser/rules/block/iframe.ts @@ -1,4 +1,4 @@ -import type { AttributeMap, Element } from "@wdpr/ast"; +import type { AttributeMap, Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/iftags.ts b/packages/parser/src/parser/rules/block/iftags.ts index ed7067e..e808d86 100644 --- a/packages/parser/src/parser/rules/block/iftags.ts +++ b/packages/parser/src/parser/rules/block/iftags.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName, parseBlocksUntil } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/include.ts b/packages/parser/src/parser/rules/block/include.ts index 5822fff..8d80435 100644 --- a/packages/parser/src/parser/rules/block/include.ts +++ b/packages/parser/src/parser/rules/block/include.ts @@ -1,4 +1,4 @@ -import type { Element, PageRef, VariableMap } from "@wdpr/ast"; +import type { Element, PageRef, VariableMap } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/list.ts b/packages/parser/src/parser/rules/block/list.ts index 05f509a..d61e4ca 100644 --- a/packages/parser/src/parser/rules/block/list.ts +++ b/packages/parser/src/parser/rules/block/list.ts @@ -1,4 +1,4 @@ -import type { Element, ListData, ListItem, ListType } from "@wdpr/ast"; +import type { Element, ListData, ListItem, ListType } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseInlineUntil } from "../inline/utils"; diff --git a/packages/parser/src/parser/rules/block/math.ts b/packages/parser/src/parser/rules/block/math.ts index 2a9a0f9..0b8c6bc 100644 --- a/packages/parser/src/parser/rules/block/math.ts +++ b/packages/parser/src/parser/rules/block/math.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/module.ts b/packages/parser/src/parser/rules/block/module.ts index 81a6903..ebea768 100644 --- a/packages/parser/src/parser/rules/block/module.ts +++ b/packages/parser/src/parser/rules/block/module.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName } from "../utils"; diff --git a/packages/parser/src/parser/rules/block/module/css/index.ts b/packages/parser/src/parser/rules/block/module/css/index.ts index c117316..a5562fb 100644 --- a/packages/parser/src/parser/rules/block/module/css/index.ts +++ b/packages/parser/src/parser/rules/block/module/css/index.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { ModuleRule } from "../types"; export const cssModuleRule: ModuleRule = { diff --git a/packages/parser/src/parser/rules/block/module/iftags/resolve.ts b/packages/parser/src/parser/rules/block/module/iftags/resolve.ts index 22e75f9..e445582 100644 --- a/packages/parser/src/parser/rules/block/module/iftags/resolve.ts +++ b/packages/parser/src/parser/rules/block/module/iftags/resolve.ts @@ -4,7 +4,7 @@ * Evaluates [[iftags]] conditions and returns matching elements. */ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import { parseTagCondition, evaluateTagCondition } from "./condition"; /** diff --git a/packages/parser/src/parser/rules/block/module/include/resolve.ts b/packages/parser/src/parser/rules/block/module/include/resolve.ts index e4f897a..7b94b1d 100644 --- a/packages/parser/src/parser/rules/block/module/include/resolve.ts +++ b/packages/parser/src/parser/rules/block/module/include/resolve.ts @@ -5,7 +5,7 @@ * allowing block structures (like div) to span across include boundaries. */ -import type { PageRef, VariableMap } from "@wdpr/ast"; +import type { PageRef, VariableMap } from "@wdprlib/ast"; /** * Callback to fetch page content for include resolution. diff --git a/packages/parser/src/parser/rules/block/module/listpages/extract.ts b/packages/parser/src/parser/rules/block/module/listpages/extract.ts index 14939b8..d91a025 100644 --- a/packages/parser/src/parser/rules/block/module/listpages/extract.ts +++ b/packages/parser/src/parser/rules/block/module/listpages/extract.ts @@ -5,7 +5,7 @@ * what external data they need. */ -import type { SyntaxTree, Module } from "@wdpr/ast"; +import type { SyntaxTree, Module } from "@wdprlib/ast"; import type { DataRequirements, ListPagesQuery, diff --git a/packages/parser/src/parser/rules/block/module/listpages/parser.ts b/packages/parser/src/parser/rules/block/module/listpages/parser.ts index 2bdd122..5b119b4 100644 --- a/packages/parser/src/parser/rules/block/module/listpages/parser.ts +++ b/packages/parser/src/parser/rules/block/module/listpages/parser.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { ModuleRule } from "../types"; import { parseBool, parseInt32 } from "../utils"; diff --git a/packages/parser/src/parser/rules/block/module/listpages/resolve.ts b/packages/parser/src/parser/rules/block/module/listpages/resolve.ts index 083ee53..d183d2a 100644 --- a/packages/parser/src/parser/rules/block/module/listpages/resolve.ts +++ b/packages/parser/src/parser/rules/block/module/listpages/resolve.ts @@ -4,7 +4,7 @@ * Handles expanding ListPages modules with fetched data. */ -import type { Element, Module } from "@wdpr/ast"; +import type { Element, Module } from "@wdprlib/ast"; import type { ListPagesExternalData, CompiledTemplate, VariableContext } from "./types"; import type { ParseFunction } from "../types"; export type { ParseFunction }; diff --git a/packages/parser/src/parser/rules/block/module/listusers/parser.ts b/packages/parser/src/parser/rules/block/module/listusers/parser.ts index a740e39..e6fe1bb 100644 --- a/packages/parser/src/parser/rules/block/module/listusers/parser.ts +++ b/packages/parser/src/parser/rules/block/module/listusers/parser.ts @@ -2,7 +2,7 @@ * ListUsers module parser */ -import type { Element, Module } from "@wdpr/ast"; +import type { Element, Module } from "@wdprlib/ast"; import type { ModuleRule } from "../types"; const ERROR_MESSAGE = 'Currently only users="." is implemented.'; diff --git a/packages/parser/src/parser/rules/block/module/listusers/resolve.ts b/packages/parser/src/parser/rules/block/module/listusers/resolve.ts index 17480ab..730f7e0 100644 --- a/packages/parser/src/parser/rules/block/module/listusers/resolve.ts +++ b/packages/parser/src/parser/rules/block/module/listusers/resolve.ts @@ -2,7 +2,7 @@ * ListUsers module resolution */ -import type { Element, Module } from "@wdpr/ast"; +import type { Element, Module } from "@wdprlib/ast"; import type { ListUsersExternalData, ListUsersCompiledTemplate, diff --git a/packages/parser/src/parser/rules/block/module/resolve.ts b/packages/parser/src/parser/rules/block/module/resolve.ts index 63ffa8b..99e508a 100644 --- a/packages/parser/src/parser/rules/block/module/resolve.ts +++ b/packages/parser/src/parser/rules/block/module/resolve.ts @@ -6,7 +6,7 @@ * - IfTags condition evaluation */ -import type { Element, SyntaxTree } from "@wdpr/ast"; +import type { Element, SyntaxTree } from "@wdprlib/ast"; import type { DataProvider } from "./types-common"; import { walkElements, mapElementChildren, mapElementChildrenWithState } from "./walk"; import type { diff --git a/packages/parser/src/parser/rules/block/module/types.ts b/packages/parser/src/parser/rules/block/module/types.ts index 4bc3f62..259107c 100644 --- a/packages/parser/src/parser/rules/block/module/types.ts +++ b/packages/parser/src/parser/rules/block/module/types.ts @@ -1,4 +1,4 @@ -import type { Element, Module } from "@wdpr/ast"; +import type { Element, Module } from "@wdprlib/ast"; import type { ParseContext } from "../../types"; /** diff --git a/packages/parser/src/parser/rules/block/module/walk.ts b/packages/parser/src/parser/rules/block/module/walk.ts index 2b2a086..07f55bb 100644 --- a/packages/parser/src/parser/rules/block/module/walk.ts +++ b/packages/parser/src/parser/rules/block/module/walk.ts @@ -19,7 +19,7 @@ import type { TableCell, DefinitionListItem, TabData, -} from "@wdpr/ast"; +} from "@wdprlib/ast"; /** * Walk all elements recursively, calling callback for each element. diff --git a/packages/parser/src/parser/rules/block/paragraph.ts b/packages/parser/src/parser/rules/block/paragraph.ts index 4ef3d5b..db08ce5 100644 --- a/packages/parser/src/parser/rules/block/paragraph.ts +++ b/packages/parser/src/parser/rules/block/paragraph.ts @@ -4,7 +4,7 @@ * Collects inline content until paragraph break (double newline) or end of input. * Line breaks within paragraphs are handled by the newlineLineBreakRule. */ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { parseInlineUntil } from "../inline/utils"; diff --git a/packages/parser/src/parser/rules/block/table-block.ts b/packages/parser/src/parser/rules/block/table-block.ts index 022894d..c49686a 100644 --- a/packages/parser/src/parser/rules/block/table-block.ts +++ b/packages/parser/src/parser/rules/block/table-block.ts @@ -3,7 +3,7 @@ * * Handles [[table]][[row]][[cell]]...[[/cell]][[/row]][[/table]] syntax */ -import type { Element, TableData, TableRow, TableCell, Alignment } from "@wdpr/ast"; +import type { Element, TableData, TableRow, TableCell, Alignment } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName, parseAttributes, parseBlocksUntil } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/table.ts b/packages/parser/src/parser/rules/block/table.ts index 3695eab..0c4ab6d 100644 --- a/packages/parser/src/parser/rules/block/table.ts +++ b/packages/parser/src/parser/rules/block/table.ts @@ -1,4 +1,4 @@ -import type { Element, TableData, TableRow, TableCell, Alignment } from "@wdpr/ast"; +import type { Element, TableData, TableRow, TableCell, Alignment } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import type { TokenType } from "../../../lexer/tokens"; diff --git a/packages/parser/src/parser/rules/block/tabview.ts b/packages/parser/src/parser/rules/block/tabview.ts index 4a0db82..c6a9de2 100644 --- a/packages/parser/src/parser/rules/block/tabview.ts +++ b/packages/parser/src/parser/rules/block/tabview.ts @@ -1,4 +1,4 @@ -import type { Element, TabData } from "@wdpr/ast"; +import type { Element, TabData } from "@wdprlib/ast"; import type { BlockRule, ParseContext, RuleResult } from "../types"; import { currentToken } from "../types"; import { parseBlockName, parseBlocksUntil } from "./utils"; diff --git a/packages/parser/src/parser/rules/block/toc.ts b/packages/parser/src/parser/rules/block/toc.ts index 7dfdcfe..d4cf840 100644 --- a/packages/parser/src/parser/rules/block/toc.ts +++ b/packages/parser/src/parser/rules/block/toc.ts @@ -9,7 +9,7 @@ * Note: Wikidot ignores attributes on [[toc]] (class, style, id are not applied) * [[>toc]] and [[, - elements: import("@wdpr/ast").Element[], + elements: import("@wdprlib/ast").Element[], ): void { const tag = `h${level}`; if (hasToc) { @@ -49,7 +49,7 @@ function renderStringContainer( ctx: RenderContext, type: string, attributes: Record, - elements: import("@wdpr/ast").Element[], + elements: import("@wdprlib/ast").Element[], ): void { switch (type) { case "paragraph": @@ -191,7 +191,7 @@ function renderStringContainer( function renderSizeContainer( ctx: RenderContext, attributes: Record, - elements: import("@wdpr/ast").Element[], + elements: import("@wdprlib/ast").Element[], ): void { const style = attributes.style ?? ""; // The size value is stored in the style attribute as font-size diff --git a/packages/render/src/elements/date.ts b/packages/render/src/elements/date.ts index 7af602e..4b6eb1d 100644 --- a/packages/render/src/elements/date.ts +++ b/packages/render/src/elements/date.ts @@ -1,4 +1,4 @@ -import type { DateData } from "@wdpr/ast"; +import type { DateData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeHtml } from "../escape"; diff --git a/packages/render/src/elements/embed.ts b/packages/render/src/elements/embed.ts index 2b70cc9..44951f1 100644 --- a/packages/render/src/elements/embed.ts +++ b/packages/render/src/elements/embed.ts @@ -1,4 +1,4 @@ -import type { Embed } from "@wdpr/ast"; +import type { Embed } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr } from "../escape"; diff --git a/packages/render/src/elements/expr.ts b/packages/render/src/elements/expr.ts index ce977c4..51bf4d8 100644 --- a/packages/render/src/elements/expr.ts +++ b/packages/render/src/elements/expr.ts @@ -1,4 +1,4 @@ -import type { Element, ExprData, IfCondData, IfExprData } from "@wdpr/ast"; +import type { Element, ExprData, IfCondData, IfExprData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { renderElements } from "../render"; import { evaluateExpression, isTruthy } from "../utils/expr-eval"; diff --git a/packages/render/src/elements/footnote.ts b/packages/render/src/elements/footnote.ts index 90fa113..ee47d9b 100644 --- a/packages/render/src/elements/footnote.ts +++ b/packages/render/src/elements/footnote.ts @@ -1,4 +1,4 @@ -import type { FootnoteBlockData } from "@wdpr/ast"; +import type { FootnoteBlockData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeHtml } from "../escape"; import { renderElements } from "../render"; diff --git a/packages/render/src/elements/html.ts b/packages/render/src/elements/html.ts index 4971fed..78ac1f4 100644 --- a/packages/render/src/elements/html.ts +++ b/packages/render/src/elements/html.ts @@ -1,4 +1,4 @@ -import type { HtmlData } from "@wdpr/ast"; +import type { HtmlData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr } from "../escape"; import { syncHashSha1 } from "../hash"; diff --git a/packages/render/src/elements/iframe.ts b/packages/render/src/elements/iframe.ts index adf196d..6e93c03 100644 --- a/packages/render/src/elements/iframe.ts +++ b/packages/render/src/elements/iframe.ts @@ -1,4 +1,4 @@ -import type { IframeData } from "@wdpr/ast"; +import type { IframeData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr, isDangerousUrl, sanitizeStyleValue } from "../escape"; diff --git a/packages/render/src/elements/iftags.ts b/packages/render/src/elements/iftags.ts index 21053d6..1ddfb18 100644 --- a/packages/render/src/elements/iftags.ts +++ b/packages/render/src/elements/iftags.ts @@ -1,4 +1,4 @@ -import type { IfTagsData } from "@wdpr/ast"; +import type { IfTagsData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { renderElements } from "../render"; diff --git a/packages/render/src/elements/image.ts b/packages/render/src/elements/image.ts index 2b3e1c3..0cb45b9 100644 --- a/packages/render/src/elements/image.ts +++ b/packages/render/src/elements/image.ts @@ -1,4 +1,4 @@ -import type { ImageSource, ImageData } from "@wdpr/ast"; +import type { ImageSource, ImageData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr, isDangerousUrl, sanitizeAttributes } from "../escape"; diff --git a/packages/render/src/elements/include.ts b/packages/render/src/elements/include.ts index b6c7101..70ac42b 100644 --- a/packages/render/src/elements/include.ts +++ b/packages/render/src/elements/include.ts @@ -1,4 +1,4 @@ -import type { IncludeData } from "@wdpr/ast"; +import type { IncludeData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { renderElements } from "../render"; diff --git a/packages/render/src/elements/link.ts b/packages/render/src/elements/link.ts index 0d5b353..eab3fcf 100644 --- a/packages/render/src/elements/link.ts +++ b/packages/render/src/elements/link.ts @@ -1,4 +1,4 @@ -import type { LinkData, AnchorData } from "@wdpr/ast"; +import type { LinkData, AnchorData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr, isDangerousUrl, sanitizeAttributes } from "../escape"; import { renderElements } from "../render"; diff --git a/packages/render/src/elements/list.ts b/packages/render/src/elements/list.ts index 760d444..f2521e4 100644 --- a/packages/render/src/elements/list.ts +++ b/packages/render/src/elements/list.ts @@ -1,4 +1,4 @@ -import type { ListData, DefinitionListItem } from "@wdpr/ast"; +import type { ListData, DefinitionListItem } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr, sanitizeAttributes } from "../escape"; import { renderElements } from "../render"; diff --git a/packages/render/src/elements/math.ts b/packages/render/src/elements/math.ts index ede5465..8a58466 100644 --- a/packages/render/src/elements/math.ts +++ b/packages/render/src/elements/math.ts @@ -1,4 +1,4 @@ -import type { MathData, MathInlineData } from "@wdpr/ast"; +import type { MathData, MathInlineData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr, escapeHtml } from "../escape"; diff --git a/packages/render/src/elements/module/backlinks.ts b/packages/render/src/elements/module/backlinks.ts index 0386b89..5acbe79 100644 --- a/packages/render/src/elements/module/backlinks.ts +++ b/packages/render/src/elements/module/backlinks.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { RenderContext } from "../../context"; export function renderBacklinks( diff --git a/packages/render/src/elements/module/categories.ts b/packages/render/src/elements/module/categories.ts index 93d6dc0..8e13191 100644 --- a/packages/render/src/elements/module/categories.ts +++ b/packages/render/src/elements/module/categories.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { RenderContext } from "../../context"; export function renderCategories( diff --git a/packages/render/src/elements/module/index.ts b/packages/render/src/elements/module/index.ts index 7f1df54..9aff00b 100644 --- a/packages/render/src/elements/module/index.ts +++ b/packages/render/src/elements/module/index.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { RenderContext } from "../../context"; import { renderBacklinks } from "./backlinks"; import { renderCategories } from "./categories"; diff --git a/packages/render/src/elements/module/join.ts b/packages/render/src/elements/module/join.ts index 097623f..60e79d0 100644 --- a/packages/render/src/elements/module/join.ts +++ b/packages/render/src/elements/module/join.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { RenderContext } from "../../context"; import { escapeHtml } from "../../escape"; diff --git a/packages/render/src/elements/module/listpages.ts b/packages/render/src/elements/module/listpages.ts index a89e58c..8663537 100644 --- a/packages/render/src/elements/module/listpages.ts +++ b/packages/render/src/elements/module/listpages.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { RenderContext } from "../../context"; export function renderListPages( diff --git a/packages/render/src/elements/module/listusers.ts b/packages/render/src/elements/module/listusers.ts index 7463d30..d085d6b 100644 --- a/packages/render/src/elements/module/listusers.ts +++ b/packages/render/src/elements/module/listusers.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { RenderContext } from "../../context"; export function renderListUsers( diff --git a/packages/render/src/elements/module/page-tree.ts b/packages/render/src/elements/module/page-tree.ts index 98af093..3f5c247 100644 --- a/packages/render/src/elements/module/page-tree.ts +++ b/packages/render/src/elements/module/page-tree.ts @@ -1,4 +1,4 @@ -import type { Module } from "@wdpr/ast"; +import type { Module } from "@wdprlib/ast"; import type { RenderContext } from "../../context"; export function renderPageTree( diff --git a/packages/render/src/elements/tab-view.ts b/packages/render/src/elements/tab-view.ts index 5e24073..f59486c 100644 --- a/packages/render/src/elements/tab-view.ts +++ b/packages/render/src/elements/tab-view.ts @@ -1,4 +1,4 @@ -import type { TabData } from "@wdpr/ast"; +import type { TabData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeHtml } from "../escape"; import { syncHashMd5 } from "../hash"; diff --git a/packages/render/src/elements/table.ts b/packages/render/src/elements/table.ts index 029c610..a30659c 100644 --- a/packages/render/src/elements/table.ts +++ b/packages/render/src/elements/table.ts @@ -1,4 +1,4 @@ -import type { TableData } from "@wdpr/ast"; +import type { TableData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeAttr, sanitizeAttributes } from "../escape"; import { renderElements } from "../render"; diff --git a/packages/render/src/elements/toc.ts b/packages/render/src/elements/toc.ts index d2beb80..5d3b3d3 100644 --- a/packages/render/src/elements/toc.ts +++ b/packages/render/src/elements/toc.ts @@ -1,4 +1,4 @@ -import type { Element, ListData, ListItem, TableOfContentsData } from "@wdpr/ast"; +import type { Element, ListData, ListItem, TableOfContentsData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeHtml } from "../escape"; diff --git a/packages/render/src/elements/user.ts b/packages/render/src/elements/user.ts index 6f8df0a..e4ddb9e 100644 --- a/packages/render/src/elements/user.ts +++ b/packages/render/src/elements/user.ts @@ -1,4 +1,4 @@ -import type { UserData } from "@wdpr/ast"; +import type { UserData } from "@wdprlib/ast"; import type { RenderContext } from "../context"; import { escapeHtml, escapeAttr } from "../escape"; diff --git a/packages/render/src/render.ts b/packages/render/src/render.ts index 7768a09..eed0aa3 100644 --- a/packages/render/src/render.ts +++ b/packages/render/src/render.ts @@ -1,4 +1,4 @@ -import type { Element, SyntaxTree } from "@wdpr/ast"; +import type { Element, SyntaxTree } from "@wdprlib/ast"; import { RenderContext } from "./context"; import { escapeStyleContent } from "./escape"; import type { RenderOptions } from "./types"; diff --git a/packages/render/src/types.ts b/packages/render/src/types.ts index 6c41e66..97fb9a9 100644 --- a/packages/render/src/types.ts +++ b/packages/render/src/types.ts @@ -1,4 +1,4 @@ -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; /** * Page context for resolving links, images, etc. diff --git a/packages/runtime/CHANGELOG.md b/packages/runtime/CHANGELOG.md index a1885c4..e1c113c 100644 --- a/packages/runtime/CHANGELOG.md +++ b/packages/runtime/CHANGELOG.md @@ -1,4 +1,4 @@ -# @wdpr/runtime +# @wdprlib/runtime ## 1.0.0 diff --git a/packages/runtime/package.json b/packages/runtime/package.json index ae1065a..38efe02 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -1,6 +1,6 @@ { - "name": "@wdpr/runtime", - "version": "1.0.0", + "name": "@wdprlib/runtime", + "version": "0.1.0", "description": "Client-side runtime for Wikidot markup", "keywords": [ "markup", diff --git a/tests/helpers/ast.ts b/tests/helpers/ast.ts index d8206ec..205c64d 100644 --- a/tests/helpers/ast.ts +++ b/tests/helpers/ast.ts @@ -1,7 +1,7 @@ /** * AST操作用ヘルパー関数 */ -import type { Element, ContainerData, ListData } from "@wdpr/ast"; +import type { Element, ContainerData, ListData } from "@wdprlib/ast"; export function isContainer(el: Element): el is { element: "container"; data: ContainerData } { return el.element === "container"; diff --git a/tests/integration/fixture-parser.test.ts b/tests/integration/fixture-parser.test.ts index 5e43a66..1f1cc2d 100644 --- a/tests/integration/fixture-parser.test.ts +++ b/tests/integration/fixture-parser.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; -import { parse } from "@wdpr/parser"; -import type { SyntaxTree } from "@wdpr/ast"; +import { parse } from "@wdprlib/parser"; +import type { SyntaxTree } from "@wdprlib/ast"; import * as fs from "fs"; import * as path from "path"; diff --git a/tests/integration/fixture-render.test.ts b/tests/integration/fixture-render.test.ts index 21f02bf..a62b0c7 100644 --- a/tests/integration/fixture-render.test.ts +++ b/tests/integration/fixture-render.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; -import type { SyntaxTree } from "@wdpr/ast"; -import { renderToHtml } from "@wdpr/render"; +import type { SyntaxTree } from "@wdprlib/ast"; +import { renderToHtml } from "@wdprlib/render"; import * as fs from "fs"; import * as path from "path"; diff --git a/tests/unit/module/include/resolve.test.ts b/tests/unit/module/include/resolve.test.ts index cf8ea72..516bbb2 100644 --- a/tests/unit/module/include/resolve.test.ts +++ b/tests/unit/module/include/resolve.test.ts @@ -1,5 +1,5 @@ import { test, expect, describe } from "bun:test"; -import { parse, resolveIncludes } from "@wdpr/parser"; +import { parse, resolveIncludes } from "@wdprlib/parser"; import { getAllText } from "../../../helpers"; describe("resolveIncludes", () => { diff --git a/tests/unit/module/listpages/extract.test.ts b/tests/unit/module/listpages/extract.test.ts index 7ff5673..72f3452 100644 --- a/tests/unit/module/listpages/extract.test.ts +++ b/tests/unit/module/listpages/extract.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; import { extractDataRequirements } from "../../../../packages/parser/src/parser/rules/block/module/listpages/extract"; -import type { SyntaxTree, Module, Element } from "@wdpr/ast"; +import type { SyntaxTree, Module, Element } from "@wdprlib/ast"; /** * Type alias for list-pages module diff --git a/tests/unit/module/listpages/resolve.test.ts b/tests/unit/module/listpages/resolve.test.ts index 663327c..1e83b01 100644 --- a/tests/unit/module/listpages/resolve.test.ts +++ b/tests/unit/module/listpages/resolve.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "bun:test"; import { resolveModules } from "../../../../packages/parser/src/parser/rules/block/module/resolve"; import { compileTemplate } from "../../../../packages/parser/src/parser/rules/block/module/listpages/compiler"; -import type { SyntaxTree, Module } from "@wdpr/ast"; +import type { SyntaxTree, Module } from "@wdprlib/ast"; import type { DataProvider } from "../../../../packages/parser/src/parser/rules/block/module/types-common"; import type { ListPagesDataRequirement, diff --git a/tests/unit/module/listusers/extract.test.ts b/tests/unit/module/listusers/extract.test.ts index 8f914ce..861a715 100644 --- a/tests/unit/module/listusers/extract.test.ts +++ b/tests/unit/module/listusers/extract.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from "bun:test"; import { extractDataRequirements } from "../../../../packages/parser/src/parser/rules/block/module/listpages/extract"; -import type { SyntaxTree, Element } from "@wdpr/ast"; +import type { SyntaxTree, Element } from "@wdprlib/ast"; function createListUsersModule(users = ".", body?: string): Element { return { diff --git a/tests/unit/module/listusers/resolve.test.ts b/tests/unit/module/listusers/resolve.test.ts index b65f998..9703711 100644 --- a/tests/unit/module/listusers/resolve.test.ts +++ b/tests/unit/module/listusers/resolve.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect } from "bun:test"; import { resolveModules } from "../../../../packages/parser/src/parser/rules/block/module/resolve"; import { compileListUsersTemplate } from "../../../../packages/parser/src/parser/rules/block/module/listusers/compiler"; -import type { SyntaxTree, Element } from "@wdpr/ast"; +import type { SyntaxTree, Element } from "@wdprlib/ast"; import type { DataProvider } from "../../../../packages/parser/src/parser/rules/block/module/types-common"; import type { ListUsersCompiledTemplate } from "../../../../packages/parser/src/parser/rules/block/module/listusers/types"; diff --git a/tests/unit/parser/lexer.test.ts b/tests/unit/parser/lexer.test.ts index 58d8ba9..554f658 100644 --- a/tests/unit/parser/lexer.test.ts +++ b/tests/unit/parser/lexer.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "bun:test"; -import { tokenize } from "@wdpr/parser"; +import { tokenize } from "@wdprlib/parser"; /** * Helper to get token types from source diff --git a/tests/unit/parser/line-break.test.ts b/tests/unit/parser/line-break.test.ts index 369174b..76cf62c 100644 --- a/tests/unit/parser/line-break.test.ts +++ b/tests/unit/parser/line-break.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; -import { parse } from "@wdpr/parser"; -import type { Element, SyntaxTree } from "@wdpr/ast"; +import { parse } from "@wdprlib/parser"; +import type { Element, SyntaxTree } from "@wdprlib/ast"; /** * Line Break Unit Tests diff --git a/tests/unit/parser/parser.test.ts b/tests/unit/parser/parser.test.ts index 924b054..fe47d0f 100644 --- a/tests/unit/parser/parser.test.ts +++ b/tests/unit/parser/parser.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; -import { parse } from "@wdpr/parser"; -import type { Element, SyntaxTree } from "@wdpr/ast"; +import { parse } from "@wdprlib/parser"; +import type { Element, SyntaxTree } from "@wdprlib/ast"; /** * Parser Unit Tests diff --git a/tests/unit/parser/resolve/styles-iftags.test.ts b/tests/unit/parser/resolve/styles-iftags.test.ts index 4ac02ca..4c2d4f3 100644 --- a/tests/unit/parser/resolve/styles-iftags.test.ts +++ b/tests/unit/parser/resolve/styles-iftags.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; -import { parse, resolveModules, resolveIncludes } from "@wdpr/parser"; -import type { SyntaxTree, Element } from "@wdpr/ast"; +import { parse, resolveModules, resolveIncludes } from "@wdprlib/parser"; +import type { SyntaxTree, Element } from "@wdprlib/ast"; import type { DataProvider } from "../../../../packages/parser/src/parser/rules/block/module/types-common"; import type { ResolveOptions } from "../../../../packages/parser/src/parser/rules/block/module/resolve"; diff --git a/tests/unit/parser/spanStrip.test.ts b/tests/unit/parser/spanStrip.test.ts index d18310c..5f56d5b 100644 --- a/tests/unit/parser/spanStrip.test.ts +++ b/tests/unit/parser/spanStrip.test.ts @@ -3,7 +3,7 @@ import { mergeSpanStripParagraphs, cleanInternalFlags, } from "../../../packages/parser/src/parser/postprocess/spanStrip"; -import type { Element } from "@wdpr/ast"; +import type { Element } from "@wdprlib/ast"; /** * spanStrip Post-processing Tests diff --git a/tests/unit/render/context.test.ts b/tests/unit/render/context.test.ts index 9a3b187..fa9c59f 100644 --- a/tests/unit/render/context.test.ts +++ b/tests/unit/render/context.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; import { RenderContext } from "../../../packages/render/src/context"; -import type { SyntaxTree, ImageSource, LinkLocation } from "@wdpr/ast"; +import type { SyntaxTree, ImageSource, LinkLocation } from "@wdprlib/ast"; describe("RenderContext", () => { function createEmptyTree(): SyntaxTree { diff --git a/tests/unit/render/escape.test.ts b/tests/unit/render/escape.test.ts index ba759a2..7b6b7e5 100644 --- a/tests/unit/render/escape.test.ts +++ b/tests/unit/render/escape.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; -import type { SyntaxTree, Element } from "@wdpr/ast"; -import { renderToHtml } from "@wdpr/render"; +import type { SyntaxTree, Element } from "@wdprlib/ast"; +import { renderToHtml } from "@wdprlib/render"; import { escapeHtml, escapeAttr, diff --git a/tests/unit/render/html-block-url.test.ts b/tests/unit/render/html-block-url.test.ts index 2323334..f033989 100644 --- a/tests/unit/render/html-block-url.test.ts +++ b/tests/unit/render/html-block-url.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "bun:test"; -import type { SyntaxTree, Element } from "@wdpr/ast"; -import { renderToHtml } from "@wdpr/render"; +import type { SyntaxTree, Element } from "@wdprlib/ast"; +import { renderToHtml } from "@wdprlib/render"; describe("htmlBlockUrl callback", () => { const createTreeWithHtmlBlocks = (htmlBlocks: string[]): SyntaxTree => ({ diff --git a/tests/unit/render/toc.test.ts b/tests/unit/render/toc.test.ts index 7254d66..aa24187 100644 --- a/tests/unit/render/toc.test.ts +++ b/tests/unit/render/toc.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "bun:test"; import { renderTableOfContents } from "../../../packages/render/src/elements/toc"; import { RenderContext } from "../../../packages/render/src/context"; -import type { SyntaxTree, Element, ListData, TableOfContentsData } from "@wdpr/ast"; +import type { SyntaxTree, Element, ListData, TableOfContentsData } from "@wdprlib/ast"; /** * Table of Contents Rendering Tests diff --git a/tsconfig.json b/tsconfig.json index 567f60a..0cc2783 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,8 +20,8 @@ "noEmit": true, "baseUrl": ".", "paths": { - "@wdpr/ast": ["packages/ast/src/index.ts"], - "@wdpr/runtime": ["packages/runtime/src/index.ts"] + "@wdprlib/ast": ["packages/ast/src/index.ts"], + "@wdprlib/runtime": ["packages/runtime/src/index.ts"] } }, "include": ["packages/*/src/**/*"],