@mdfriday/foundry 26.4.20 → 26.5.1
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/dist/cjs/index.js +1 -1
- package/dist/cjs/obsidian/mobile.js +1 -1
- package/dist/cjs/worker/pool-manager.js +2 -2
- package/dist/cjs/worker/worker-node.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/obsidian/mobile.js +1 -1
- package/dist/types/internal/application/batch-task-queue.d.ts +17 -0
- package/dist/types/internal/application/container.d.ts +66 -0
- package/dist/types/internal/application/identity.d.ts +173 -0
- package/dist/types/internal/application/incremental-build-coordinator.d.ts +28 -0
- package/dist/types/internal/application/incremental-ssg.d.ts +4 -0
- package/dist/types/internal/application/index.d.ts +5 -4
- package/dist/types/internal/application/publish.d.ts +37 -0
- package/dist/types/internal/application/ssg-parallel.d.ts +6 -0
- package/dist/types/internal/application/ssg.d.ts +15 -0
- package/dist/types/internal/application/wiki-service-config.d.ts +65 -0
- package/dist/types/internal/application/wiki-service.d.ts +199 -0
- package/dist/types/internal/application/worker/pool-manager.d.ts +43 -0
- package/dist/types/internal/application/worker/worker-browser.d.ts +6 -0
- package/dist/types/internal/application/worker/worker-main.d.ts +12 -0
- package/dist/types/internal/application/worker/worker-state.d.ts +23 -0
- package/dist/types/internal/application/workspace.d.ts +98 -0
- package/dist/types/internal/domain/config/entity/config.d.ts +40 -0
- package/dist/types/internal/domain/config/entity/language.d.ts +51 -0
- package/dist/types/internal/domain/config/entity/markdown.d.ts +36 -0
- package/dist/types/internal/domain/config/entity/module.d.ts +36 -0
- package/dist/types/internal/domain/config/entity/root.d.ts +39 -0
- package/dist/types/internal/domain/config/entity/service.d.ts +36 -0
- package/dist/types/internal/domain/config/entity/social.d.ts +43 -0
- package/dist/types/internal/domain/config/entity/taxonomy.d.ts +39 -0
- package/dist/types/internal/domain/config/factory/config.d.ts +3 -0
- package/dist/types/internal/domain/config/factory/loader.d.ts +24 -0
- package/dist/types/internal/domain/config/factory/provider.d.ts +10 -0
- package/dist/types/internal/domain/config/factory/sourcedescriptor.d.ts +12 -0
- package/dist/types/internal/domain/config/type.d.ts +56 -0
- package/dist/types/internal/domain/config/vo/language.d.ts +6 -0
- package/dist/types/internal/domain/config/vo/markdown.d.ts +13 -0
- package/dist/types/internal/domain/config/vo/module.d.ts +9 -0
- package/dist/types/internal/domain/config/vo/root.d.ts +6 -0
- package/dist/types/internal/domain/config/vo/service.d.ts +6 -0
- package/dist/types/internal/domain/config/vo/social.d.ts +16 -0
- package/dist/types/internal/domain/config/vo/taxonomy.d.ts +12 -0
- package/dist/types/internal/domain/content/entity/content.d.ts +36 -0
- package/dist/types/internal/domain/content/entity/page.d.ts +23 -0
- package/dist/types/internal/domain/content/entity/pagebuilder.d.ts +83 -0
- package/dist/types/internal/domain/content/entity/pagecollector.d.ts +3 -0
- package/dist/types/internal/domain/content/entity/pagecontent.d.ts +14 -0
- package/dist/types/internal/domain/content/entity/pagemap.d.ts +69 -0
- package/dist/types/internal/domain/content/entity/pagesource.d.ts +52 -0
- package/dist/types/internal/domain/content/entity/pagetrees.d.ts +12 -0
- package/dist/types/internal/domain/content/entity/paginator.d.ts +19 -0
- package/dist/types/internal/domain/content/entity/section.d.ts +15 -0
- package/dist/types/internal/domain/content/entity/shortcode.d.ts +39 -0
- package/dist/types/internal/domain/content/entity/standalone.d.ts +9 -0
- package/dist/types/internal/domain/content/entity/taxonomy.d.ts +15 -0
- package/dist/types/internal/domain/content/entity/term.d.ts +6 -0
- package/dist/types/internal/domain/content/entity/translator.d.ts +22 -0
- package/dist/types/internal/domain/content/type.d.ts +6 -0
- package/dist/types/internal/domain/content/vo/classifier.d.ts +24 -0
- package/dist/types/internal/domain/content/vo/frontmatter.d.ts +65 -0
- package/dist/types/internal/domain/content/vo/kind.d.ts +10 -0
- package/dist/types/internal/domain/fs/entity/basefs.d.ts +23 -0
- package/dist/types/internal/domain/fs/entity/fs.d.ts +13 -0
- package/dist/types/internal/domain/fs/entity/originfs.d.ts +6 -0
- package/dist/types/internal/domain/fs/entity/overlaydir.d.ts +44 -0
- package/dist/types/internal/domain/fs/entity/overlayfs.d.ts +79 -0
- package/dist/types/internal/domain/fs/entity/service.d.ts +15 -0
- package/dist/types/internal/domain/fs/factory/fs.d.ts +4 -0
- package/dist/types/internal/domain/fs/type.d.ts +95 -0
- package/dist/types/internal/domain/fs/vo/dir.d.ts +41 -0
- package/dist/types/internal/domain/fs/vo/file.d.ts +28 -0
- package/dist/types/internal/domain/fs/vo/fileinfo.d.ts +23 -0
- package/dist/types/internal/domain/fs/vo/filemeta.d.ts +45 -0
- package/dist/types/internal/domain/fs/vo/filesystemscollector.d.ts +17 -0
- package/dist/types/internal/domain/fs/vo/filevitural.d.ts +8 -0
- package/dist/types/internal/domain/fs/vo/osfs.d.ts +12 -0
- package/dist/types/internal/domain/fs/vo/overlay-factory.d.ts +4 -0
- package/dist/types/internal/domain/fs/vo/overlayfs-factory.d.ts +42 -0
- package/dist/types/internal/domain/fs/vo/overlayoptions.d.ts +44 -0
- package/dist/types/internal/domain/fs/vo/static-copier.d.ts +22 -0
- package/dist/types/internal/domain/fs/vo/walkway.d.ts +22 -0
- package/dist/types/internal/domain/identity/entity/user.d.ts +100 -0
- package/dist/types/internal/domain/identity/factory/user-factory.d.ts +183 -0
- package/dist/types/internal/domain/identity/repository/index.d.ts +30 -0
- package/dist/types/internal/domain/identity/type.d.ts +17 -0
- package/dist/types/internal/domain/identity/value-object/device.d.ts +26 -0
- package/dist/types/internal/domain/identity/value-object/email.d.ts +29 -0
- package/dist/types/internal/domain/identity/value-object/license.d.ts +91 -0
- package/dist/types/internal/domain/identity/value-object/server-config.d.ts +37 -0
- package/dist/types/internal/domain/identity/value-object/sync-config.d.ts +47 -0
- package/dist/types/internal/domain/identity/value-object/token.d.ts +35 -0
- package/dist/types/internal/domain/markdown/entity/markdown.d.ts +41 -0
- package/dist/types/internal/domain/markdown/factory/it/config.d.ts +60 -0
- package/dist/types/internal/domain/markdown/factory/it/index.d.ts +21 -1
- package/dist/types/internal/domain/markdown/factory/it/parserresult.d.ts +3 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/callout-plugin.d.ts +40 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/latex-plugin.d.ts +23 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/mermaid-plugin.d.ts +24 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/tag-plugin.d.ts +71 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/wikilink-plugin.d.ts +28 -0
- package/dist/types/internal/domain/markdown/factory/it/plugins/wikilink.d.ts +31 -0
- package/dist/types/internal/domain/markdown/factory/it/tableofcontents.d.ts +21 -0
- package/dist/types/internal/domain/markdown/factory/it/util/path.d.ts +11 -0
- package/dist/types/internal/domain/markdown/factory/it/util/slugger-fallback.d.ts +6 -0
- package/dist/types/internal/domain/markdown/type.d.ts +159 -0
- package/dist/types/internal/domain/markdown/vo/config.d.ts +48 -0
- package/dist/types/internal/domain/markdown/vo/content.d.ts +92 -0
- package/dist/types/internal/domain/markdown/vo/context.d.ts +9 -0
- package/dist/types/internal/domain/markdown/vo/highlight.d.ts +15 -0
- package/dist/types/internal/domain/markdown/vo/pageparser.d.ts +9 -0
- package/dist/types/internal/domain/markdown/vo/parseinfo.d.ts +36 -0
- package/dist/types/internal/domain/markdown/vo/parserresult.d.ts +6 -0
- package/dist/types/internal/domain/markdown/vo/shortcode.d.ts +31 -1
- package/dist/types/internal/domain/markdown/vo/tableofcontents.d.ts +21 -0
- package/dist/types/internal/domain/module/entity/lang.d.ts +12 -0
- package/dist/types/internal/domain/module/entity/module.d.ts +73 -0
- package/dist/types/internal/domain/module/factory/module.d.ts +6 -0
- package/dist/types/internal/domain/module/type.d.ts +58 -0
- package/dist/types/internal/domain/module/vo/cache.d.ts +48 -0
- package/dist/types/internal/domain/module/vo/httpclient.d.ts +14 -0
- package/dist/types/internal/domain/module/vo/module.d.ts +76 -0
- package/dist/types/internal/domain/module/vo/mount.d.ts +39 -0
- package/dist/types/internal/domain/module/vo/themes.d.ts +38 -0
- package/dist/types/internal/domain/module/vo/zipextractor.d.ts +31 -0
- package/dist/types/internal/domain/paths/entity/path.d.ts +28 -0
- package/dist/types/internal/domain/paths/factory/pathfactory.d.ts +82 -0
- package/dist/types/internal/domain/paths/type.d.ts +132 -0
- package/dist/types/internal/domain/paths/vo/pathcomponents.d.ts +94 -0
- package/dist/types/internal/domain/paths/vo/pathparser.d.ts +77 -0
- package/dist/types/internal/domain/publish/entity/publisher.d.ts +26 -0
- package/dist/types/internal/domain/publish/factory/publisher-factory.d.ts +17 -0
- package/dist/types/internal/domain/publish/repository/http-client.d.ts +21 -0
- package/dist/types/internal/domain/publish/repository/manifest-repository.d.ts +27 -0
- package/dist/types/internal/domain/publish/type.d.ts +49 -0
- package/dist/types/internal/domain/publish/value-object/ftp-publisher.d.ts +30 -0
- package/dist/types/internal/domain/publish/value-object/mdfriday-publisher.d.ts +57 -0
- package/dist/types/internal/domain/publish/value-object/netlify-publisher.d.ts +55 -0
- package/dist/types/internal/domain/publish/value-object/publish-config.d.ts +38 -0
- package/dist/types/internal/domain/publish/value-object/publish-manifest.d.ts +50 -0
- package/dist/types/internal/domain/resources/entity/http.d.ts +11 -0
- package/dist/types/internal/domain/resources/entity/integrity.d.ts +4 -0
- package/dist/types/internal/domain/resources/entity/minifier.d.ts +4 -0
- package/dist/types/internal/domain/resources/entity/publisher.d.ts +24 -0
- package/dist/types/internal/domain/resources/entity/resource.d.ts +4 -0
- package/dist/types/internal/domain/resources/entity/resources.d.ts +40 -0
- package/dist/types/internal/domain/resources/entity/template.d.ts +4 -0
- package/dist/types/internal/domain/resources/factory/resource.d.ts +4 -0
- package/dist/types/internal/domain/site/entity/language.d.ts +55 -0
- package/dist/types/internal/domain/site/entity/menu-builder.d.ts +50 -0
- package/dist/types/internal/domain/site/entity/navigation.d.ts +8 -0
- package/dist/types/internal/domain/site/entity/page.d.ts +88 -0
- package/dist/types/internal/domain/site/entity/pagegraph.d.ts +85 -0
- package/dist/types/internal/domain/site/entity/pager.d.ts +6 -0
- package/dist/types/internal/domain/site/entity/publisher.d.ts +26 -0
- package/dist/types/internal/domain/site/entity/ref.d.ts +27 -0
- package/dist/types/internal/domain/site/entity/site.d.ts +178 -0
- package/dist/types/internal/domain/site/factory/navigation-factory.d.ts +6 -0
- package/dist/types/internal/domain/site/factory/site.d.ts +4 -0
- package/dist/types/internal/domain/site/service/html-link-processor.d.ts +44 -0
- package/dist/types/internal/domain/site/type.d.ts +100 -0
- package/dist/types/internal/domain/site/valueobject/author.d.ts +16 -0
- package/dist/types/internal/domain/site/valueobject/baseurl.d.ts +39 -0
- package/dist/types/internal/domain/site/valueobject/menu.d.ts +49 -0
- package/dist/types/internal/domain/site/valueobject/organization.d.ts +37 -0
- package/dist/types/internal/domain/site/valueobject/path.d.ts +50 -0
- package/dist/types/internal/domain/site/valueobject/version.d.ts +14 -0
- package/dist/types/internal/domain/template/entity/executor.d.ts +22 -0
- package/dist/types/internal/domain/template/entity/lookup.d.ts +55 -0
- package/dist/types/internal/domain/template/entity/parser.d.ts +40 -0
- package/dist/types/internal/domain/template/entity/template.d.ts +87 -0
- package/dist/types/internal/domain/template/factory/template.d.ts +61 -0
- package/dist/types/internal/domain/template/type.d.ts +109 -0
- package/dist/types/internal/domain/template/vo/baseof.d.ts +47 -0
- package/dist/types/internal/domain/template/vo/info.d.ts +28 -0
- package/dist/types/internal/domain/template/vo/namespace.d.ts +91 -0
- package/dist/types/internal/domain/template/vo/registry.d.ts +160 -0
- package/dist/types/internal/domain/wiki/entity/concept.d.ts +31 -0
- package/dist/types/internal/domain/wiki/entity/connection.d.ts +29 -0
- package/dist/types/internal/domain/wiki/entity/conversation.d.ts +65 -0
- package/dist/types/internal/domain/wiki/entity/embedding-index.d.ts +60 -0
- package/dist/types/internal/domain/wiki/entity/entity.d.ts +32 -0
- package/dist/types/internal/domain/wiki/entity/knowledge-base.d.ts +292 -0
- package/dist/types/internal/domain/wiki/entity/operation-log.d.ts +82 -0
- package/dist/types/internal/domain/wiki/factory/wiki-factory.d.ts +41 -0
- package/dist/types/internal/domain/wiki/index.d.ts +22 -0
- package/dist/types/internal/domain/wiki/repository/conversation-repository.interface.d.ts +29 -0
- package/dist/types/internal/domain/wiki/repository/crypto-service.d.ts +16 -0
- package/dist/types/internal/domain/wiki/repository/embedding-provider.d.ts +12 -0
- package/dist/types/internal/domain/wiki/repository/file-system.d.ts +43 -0
- package/dist/types/internal/domain/wiki/repository/index.d.ts +14 -0
- package/dist/types/internal/domain/wiki/repository/kb-repository.interface.d.ts +30 -0
- package/dist/types/internal/domain/wiki/repository/llm-http-client.d.ts +40 -0
- package/dist/types/internal/domain/wiki/repository/llm-provider.d.ts +34 -0
- package/dist/types/internal/domain/wiki/repository/path-service.d.ts +32 -0
- package/dist/types/internal/domain/wiki/repository/wiki-page-repository.interface.d.ts +49 -0
- package/dist/types/internal/domain/wiki/value-object/connection-type.d.ts +24 -0
- package/dist/types/internal/domain/wiki/value-object/content-annotator.d.ts +61 -0
- package/dist/types/internal/domain/wiki/value-object/entity-id.d.ts +17 -0
- package/dist/types/internal/domain/wiki/value-object/entity-type.d.ts +24 -0
- package/dist/types/internal/domain/wiki/value-object/extraction-parser.d.ts +27 -0
- package/dist/types/internal/domain/wiki/value-object/extraction-result.d.ts +32 -0
- package/dist/types/internal/domain/wiki/value-object/retrieval.d.ts +228 -0
- package/dist/types/internal/domain/wiki/value-object/source-record.d.ts +17 -0
- package/dist/types/internal/domain/wiki/value-object/wiki-config.d.ts +40 -0
- package/dist/types/internal/domain/wiki/value-object/wiki-index-generator.d.ts +31 -0
- package/dist/types/internal/domain/wiki/value-object/wiki-page-renderer.d.ts +42 -0
- package/dist/types/internal/domain/workspace/entity/authentication.d.ts +29 -0
- package/dist/types/internal/domain/workspace/entity/project.d.ts +173 -0
- package/dist/types/internal/domain/workspace/entity/workspace.d.ts +85 -0
- package/dist/types/internal/domain/workspace/factory/workspace-factory.d.ts +107 -0
- package/dist/types/internal/domain/workspace/repository/file-system.d.ts +241 -0
- package/dist/types/internal/domain/workspace/repository/index.d.ts +6 -0
- package/dist/types/internal/domain/workspace/repository.d.ts +72 -0
- package/dist/types/internal/domain/workspace/type.d.ts +18 -0
- package/dist/types/internal/domain/workspace/value-object/folder-structure.d.ts +41 -0
- package/dist/types/internal/domain/workspace/value-object/project-metadata.d.ts +36 -0
- package/dist/types/internal/domain/workspace/value-object/workspace-metadata.d.ts +7 -0
- package/dist/types/internal/infrastructure/embedding/embedding-provider.interface.d.ts +33 -0
- package/dist/types/internal/infrastructure/embedding/index.d.ts +5 -0
- package/dist/types/internal/infrastructure/embedding/ollama-embedding-provider.d.ts +24 -0
- package/dist/types/internal/infrastructure/http/netlify-http-client.d.ts +20 -0
- package/dist/types/internal/infrastructure/http/node-http-client.d.ts +3 -0
- package/dist/types/internal/infrastructure/index.d.ts +8 -0
- package/dist/types/internal/infrastructure/llm/fetch-http-client.d.ts +24 -0
- package/dist/types/internal/infrastructure/llm/index.d.ts +6 -0
- package/dist/types/internal/infrastructure/llm/llm-config.d.ts +80 -0
- package/dist/types/internal/infrastructure/llm/lmstudio-provider.d.ts +55 -0
- package/dist/types/internal/infrastructure/llm/node-llm-http-client.d.ts +21 -0
- package/dist/types/internal/infrastructure/llm/ollama-provider.d.ts +17 -0
- package/dist/types/internal/infrastructure/llm/openai-compatible-provider.d.ts +70 -0
- package/dist/types/internal/infrastructure/llm/provider-factory.d.ts +36 -0
- package/dist/types/internal/infrastructure/llm/provider.d.ts +77 -0
- package/dist/types/internal/infrastructure/node/index.d.ts +11 -0
- package/dist/types/internal/infrastructure/node/node-conversation-repository.d.ts +21 -0
- package/dist/types/internal/infrastructure/node/node-crypto-service.d.ts +10 -0
- package/dist/types/internal/infrastructure/node/node-file-system.d.ts +29 -0
- package/dist/types/internal/infrastructure/node/node-kb-repository.d.ts +18 -0
- package/dist/types/internal/infrastructure/node/node-path-service.d.ts +14 -0
- package/dist/types/internal/infrastructure/node/node-wiki-page-repository.d.ts +25 -0
- package/dist/types/internal/infrastructure/persistence/node-file-system.d.ts +8 -0
- package/dist/types/internal/infrastructure/persistence/node-manifest-repository.d.ts +31 -0
- package/dist/types/internal/infrastructure/persistence/node-snapshot-repository.d.ts +28 -0
- package/dist/types/internal/infrastructure/persistence/node-workspace-repository.d.ts +9 -0
- package/dist/types/pkg/cahce/cache.d.ts +56 -0
- package/dist/types/pkg/lang/data.d.ts +21 -0
- package/dist/types/pkg/lang/index.d.ts +46 -0
- package/dist/types/pkg/lang/service.d.ts +49 -0
- package/dist/types/pkg/lang/types.d.ts +29 -0
- package/dist/types/pkg/log/http.d.ts +16 -0
- package/dist/types/pkg/log/manager.d.ts +57 -0
- package/dist/types/pkg/maps/scratch.d.ts +25 -0
- package/dist/types/pkg/md/parser/item.d.ts +3 -3
- package/dist/types/pkg/media/type.d.ts +19 -0
- package/dist/types/pkg/page-filter/index.d.ts +29 -0
- package/dist/types/pkg/paths/index.d.ts +9 -0
- package/dist/types/pkg/text/index.d.ts +4 -0
- package/dist/types/pkg/web/server/livereload-server.d.ts +7 -0
- package/dist/types/pkg/web/watcher/content-file-watcher.d.ts +3 -0
- package/package.json +21 -15
- package/dist/types/index.d.ts +0 -20
- package/dist/types/internal/interfaces/obsidian/adapters/identity-adapter.d.ts +0 -5
- package/dist/types/internal/interfaces/obsidian/adapters/index.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/adapters/workspace-adapter.d.ts +0 -8
- package/dist/types/internal/interfaces/obsidian/desktop/adapters/identity-adapter.d.ts +0 -6
- package/dist/types/internal/interfaces/obsidian/desktop/adapters/index.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/desktop/adapters/workspace-adapter.d.ts +0 -12
- package/dist/types/internal/interfaces/obsidian/desktop/container.d.ts +0 -7
- package/dist/types/internal/interfaces/obsidian/desktop/index.d.ts +0 -22
- package/dist/types/internal/interfaces/obsidian/index.d.ts +0 -7
- package/dist/types/internal/interfaces/obsidian/mobile/adapters/identity-adapter.d.ts +0 -9
- package/dist/types/internal/interfaces/obsidian/mobile/adapters/index.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/mobile/adapters/workspace-adapter.d.ts +0 -13
- package/dist/types/internal/interfaces/obsidian/mobile/config-types.d.ts +0 -13
- package/dist/types/internal/interfaces/obsidian/mobile/container.d.ts +0 -6
- package/dist/types/internal/interfaces/obsidian/mobile/index.d.ts +0 -16
- package/dist/types/internal/interfaces/obsidian/mobile.d.ts +0 -2
- package/dist/types/internal/interfaces/obsidian/services/auth.service.d.ts +0 -11
- package/dist/types/internal/interfaces/obsidian/services/build.service.d.ts +0 -9
- package/dist/types/internal/interfaces/obsidian/services/config.service.d.ts +0 -31
- package/dist/types/internal/interfaces/obsidian/services/domain.service.d.ts +0 -15
- package/dist/types/internal/interfaces/obsidian/services/license.service.d.ts +0 -22
- package/dist/types/internal/interfaces/obsidian/services/project.service.d.ts +0 -17
- package/dist/types/internal/interfaces/obsidian/services/publish.service.d.ts +0 -11
- package/dist/types/internal/interfaces/obsidian/services/serve.service.d.ts +0 -18
- package/dist/types/internal/interfaces/obsidian/services/workspace.service.d.ts +0 -10
- package/dist/types/internal/interfaces/obsidian/types/auth.d.ts +0 -27
- package/dist/types/internal/interfaces/obsidian/types/build.d.ts +0 -23
- package/dist/types/internal/interfaces/obsidian/types/config.d.ts +0 -16
- package/dist/types/internal/interfaces/obsidian/types/domain.d.ts +0 -46
- package/dist/types/internal/interfaces/obsidian/types/index.d.ts +0 -9
- package/dist/types/internal/interfaces/obsidian/types/license.d.ts +0 -87
- package/dist/types/internal/interfaces/obsidian/types/project.d.ts +0 -56
- package/dist/types/internal/interfaces/obsidian/types/publish.d.ts +0 -33
- package/dist/types/internal/interfaces/obsidian/types/serve.d.ts +0 -46
- package/dist/types/internal/interfaces/obsidian/types/workspace.d.ts +0 -27
- package/dist/types/pkg/log/browser-manager.d.ts +0 -20
- package/dist/types/pkg/log/browser.d.ts +0 -25
- package/dist/types/pkg/media/buildin.d.ts +0 -3
|
@@ -5,6 +5,9 @@ export declare class PagesCollector {
|
|
|
5
5
|
private processedPaths;
|
|
6
6
|
constructor(pageMap: PageMap, fs: FsService);
|
|
7
7
|
collect(): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* CollectDir - exact replica of Go's collectDir method
|
|
10
|
+
*/
|
|
8
11
|
private collectDir;
|
|
9
12
|
private handleBundleLeaf;
|
|
10
13
|
}
|
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
import { TocFragments } from "@internal/domain/markdown";
|
|
2
2
|
export declare class Content {
|
|
3
3
|
private rawSource;
|
|
4
|
+
/** Front matter data */
|
|
4
5
|
frontMatter?: Record<string, any>;
|
|
6
|
+
/** Final rendered HTML content */
|
|
5
7
|
renderedContent: string;
|
|
8
|
+
/** Content summary */
|
|
6
9
|
summary: string;
|
|
10
|
+
/** Word count */
|
|
7
11
|
wordCount: number;
|
|
12
|
+
/** Reading time in minutes */
|
|
8
13
|
readingTime: number;
|
|
9
14
|
toc?: TocFragments;
|
|
10
15
|
lazyRendered: boolean;
|
|
11
16
|
lazyRender: (() => Promise<void>) | undefined;
|
|
12
17
|
constructor(source: Uint8Array);
|
|
18
|
+
/**
|
|
19
|
+
* Update content with parsed and rendered data
|
|
20
|
+
*/
|
|
13
21
|
updateWithContentResult(result: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* Get raw source content
|
|
24
|
+
*/
|
|
14
25
|
getRawSource(): Uint8Array;
|
|
15
26
|
RenderedContent(): Promise<string>;
|
|
16
27
|
Summary(): Promise<string>;
|
|
17
28
|
WordCount(): Promise<number>;
|
|
18
29
|
ReadingTime(): Promise<number>;
|
|
19
30
|
render(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Check if content is empty
|
|
33
|
+
*/
|
|
20
34
|
isEmpty(): boolean;
|
|
21
35
|
}
|
|
22
36
|
export declare function newContent(source: Uint8Array): Content;
|
|
@@ -3,7 +3,13 @@ import { PageTrees, PageTreesNode } from './pagetrees';
|
|
|
3
3
|
import { PageBuilder } from './pagebuilder';
|
|
4
4
|
import { FileInfo } from '../vo/fileinfo';
|
|
5
5
|
import { DynaCache } from '@pkg/cahce/cache';
|
|
6
|
+
/**
|
|
7
|
+
* Path utility functions - simplified implementations
|
|
8
|
+
*/
|
|
6
9
|
export declare function addTrailingSlash(path: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Page predicates - exact replica of Go's pagePredicates
|
|
12
|
+
*/
|
|
7
13
|
export declare const pagePredicates: {
|
|
8
14
|
kindPage: (p: Page) => boolean;
|
|
9
15
|
kindSection: (p: Page) => boolean;
|
|
@@ -14,18 +20,27 @@ export declare const pagePredicates: {
|
|
|
14
20
|
shouldListAny: (p: Page) => boolean;
|
|
15
21
|
shouldLink: (p: Page) => boolean;
|
|
16
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* PageMapQueryPagesBelowPath - query for pages below a path
|
|
25
|
+
*/
|
|
17
26
|
export interface PageMapQueryPagesBelowPath {
|
|
18
27
|
path: string;
|
|
19
28
|
keyPart: string;
|
|
20
29
|
include: (p: Page) => boolean;
|
|
21
30
|
key(): string;
|
|
22
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* PageMapQueryPagesInSection - query for pages in a section
|
|
34
|
+
*/
|
|
23
35
|
export interface PageMapQueryPagesInSection extends PageMapQueryPagesBelowPath {
|
|
24
36
|
recursive: boolean;
|
|
25
37
|
includeSelf: boolean;
|
|
26
38
|
index: number;
|
|
27
39
|
key(): string;
|
|
28
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Implementation of PageMapQueryPagesBelowPath
|
|
43
|
+
*/
|
|
29
44
|
export declare class PageMapQueryPagesBelowPathImpl implements PageMapQueryPagesBelowPath {
|
|
30
45
|
path: string;
|
|
31
46
|
keyPart: string;
|
|
@@ -33,6 +48,9 @@ export declare class PageMapQueryPagesBelowPathImpl implements PageMapQueryPages
|
|
|
33
48
|
constructor(path: string, keyPart: string, include?: (p: Page) => boolean);
|
|
34
49
|
key(): string;
|
|
35
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Implementation of PageMapQueryPagesInSection
|
|
53
|
+
*/
|
|
36
54
|
export declare class PageMapQueryPagesInSectionImpl extends PageMapQueryPagesBelowPathImpl implements PageMapQueryPagesInSection {
|
|
37
55
|
recursive: boolean;
|
|
38
56
|
includeSelf: boolean;
|
|
@@ -44,22 +62,73 @@ export declare class PageMap extends PageTrees {
|
|
|
44
62
|
private pageReverseIndex;
|
|
45
63
|
pageBuilder: PageBuilder;
|
|
46
64
|
constructor(pageBuilder: PageBuilder);
|
|
65
|
+
/**
|
|
66
|
+
* SetupReverseIndex - exact replica of Go's SetupReverseIndex method
|
|
67
|
+
*/
|
|
47
68
|
setupReverseIndex(): void;
|
|
69
|
+
/**
|
|
70
|
+
* InsertResourceNode - exact replica of Go's InsertResourceNode method
|
|
71
|
+
*/
|
|
48
72
|
insertResourceNode(key: string, node: PageTreesNode): void;
|
|
49
73
|
addFi(f: FileInfo): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Assemble - exact replica of Go's Assemble method
|
|
76
|
+
*/
|
|
50
77
|
assemble(): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* AssembleTerms - exact replica of Go's assembleTerms method
|
|
80
|
+
*/
|
|
51
81
|
private assembleTerms;
|
|
82
|
+
/**
|
|
83
|
+
* CleanPages - exact replica of Go's cleanPages method
|
|
84
|
+
*/
|
|
52
85
|
private cleanPages;
|
|
86
|
+
/**
|
|
87
|
+
* ApplyAggregates - exact replica of Go's applyAggregates method
|
|
88
|
+
*/
|
|
53
89
|
private applyAggregates;
|
|
90
|
+
/**
|
|
91
|
+
* AssembleStructurePages - exact replica of Go's assembleStructurePages method
|
|
92
|
+
*/
|
|
54
93
|
private assembleStructurePages;
|
|
94
|
+
/**
|
|
95
|
+
* AddMissingTaxonomies - exact replica of Go's addMissingTaxonomies method
|
|
96
|
+
*/
|
|
55
97
|
private addMissingTaxonomies;
|
|
98
|
+
/**
|
|
99
|
+
* AddMissingStandalone - exact replica of Go's addMissingStandalone method
|
|
100
|
+
*/
|
|
56
101
|
private addMissingStandalone;
|
|
102
|
+
/**
|
|
103
|
+
* GetResourcesForPage - exact replica of Go's getResourcesForPage method
|
|
104
|
+
*/
|
|
57
105
|
getResourcesForPage(ps: Page): Promise<PageSource[]>;
|
|
106
|
+
/**
|
|
107
|
+
* ForEachResourceInPage - exact replica of Go's forEachResourceInPage method
|
|
108
|
+
*/
|
|
58
109
|
private forEachResourceInPage;
|
|
110
|
+
/**
|
|
111
|
+
* GetPagesInSection - exact replica of Go's getPagesInSection method
|
|
112
|
+
*/
|
|
59
113
|
getPagesInSection(langIndex: number, q: PageMapQueryPagesInSection): Promise<Pages>;
|
|
114
|
+
/**
|
|
115
|
+
* GetOrCreatePagesFromCache - simplified synchronous version
|
|
116
|
+
*/
|
|
60
117
|
getOrCreatePagesFromCacheSync(cache: DynaCache<string, Pages> | null, key: string, create: (key: string) => Promise<Pages>): Promise<Pages>;
|
|
118
|
+
/**
|
|
119
|
+
* GetPagesWithTerm - exact replica of Go's getPagesWithTerm method
|
|
120
|
+
*/
|
|
61
121
|
getPagesWithTerm(langIndex: number, q: PageMapQueryPagesBelowPath): Promise<Pages>;
|
|
122
|
+
/**
|
|
123
|
+
* GetTermsForPageInTaxonomy - exact replica of Go's getTermsForPageInTaxonomy method
|
|
124
|
+
*/
|
|
62
125
|
getTermsForPageInTaxonomy(langIndex: number, base: string, taxonomy: string): Promise<Pages>;
|
|
126
|
+
/**
|
|
127
|
+
* GetSections - exact replica of Go's getSections method
|
|
128
|
+
*/
|
|
63
129
|
getSections(langIndex: number, prefix: string): Promise<Pages>;
|
|
130
|
+
/**
|
|
131
|
+
* Helper method to get directory from path
|
|
132
|
+
*/
|
|
64
133
|
private pathDir;
|
|
65
134
|
}
|
|
@@ -9,18 +9,70 @@ export declare class Source implements PageSource {
|
|
|
9
9
|
constructor(file: FileInfo);
|
|
10
10
|
sourceKey(): string;
|
|
11
11
|
contentSource(): Promise<Uint8Array>;
|
|
12
|
+
/**
|
|
13
|
+
* Read source all - exact replica of Go's readSourceAll method
|
|
14
|
+
*/
|
|
12
15
|
private readSourceAll;
|
|
16
|
+
/**
|
|
17
|
+
* Position offset - exact replica of Go's PosOffset method
|
|
18
|
+
*/
|
|
13
19
|
posOffset(offset: number): Promise<Position>;
|
|
20
|
+
/**
|
|
21
|
+
* Get identity - for PageIdentity interface
|
|
22
|
+
*/
|
|
14
23
|
pageIdentity(): Identity;
|
|
24
|
+
/**
|
|
25
|
+
* Get file - for FileProvider interface
|
|
26
|
+
*/
|
|
15
27
|
pageFile(): FileInfo;
|
|
28
|
+
/**
|
|
29
|
+
* Get stale versions - for Staler interface
|
|
30
|
+
*/
|
|
16
31
|
staleVersions(): number[];
|
|
32
|
+
/**
|
|
33
|
+
* Get section - for PageSource interface
|
|
34
|
+
*/
|
|
17
35
|
section(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Get paths - for PageSource interface
|
|
38
|
+
*/
|
|
18
39
|
paths(): any;
|
|
40
|
+
/**
|
|
41
|
+
* Get path - for PageSource interface
|
|
42
|
+
*/
|
|
19
43
|
path(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Get page slug for PageGraph (Quartz-compatible format)
|
|
46
|
+
* Slug format: "posts/my-post" (no leading slash, no extension)
|
|
47
|
+
*
|
|
48
|
+
* This is the same logic as in PageImpl.slug()
|
|
49
|
+
*/
|
|
20
50
|
slug(): string;
|
|
51
|
+
/**
|
|
52
|
+
* Convert path to slug (Quartz-compatible)
|
|
53
|
+
*
|
|
54
|
+
* Rules:
|
|
55
|
+
* 1. Remove leading slash
|
|
56
|
+
* 2. Remove file extension
|
|
57
|
+
* 3. Handle index files (index → parent folder)
|
|
58
|
+
* 4. Handle _index files (Hugo-style section index)
|
|
59
|
+
*/
|
|
21
60
|
private pathToSlug;
|
|
61
|
+
/**
|
|
62
|
+
* Get opener - for PageSource interface
|
|
63
|
+
*/
|
|
22
64
|
opener(): () => Promise<any>;
|
|
65
|
+
/**
|
|
66
|
+
* Open reader - simple implementation
|
|
67
|
+
*/
|
|
23
68
|
openReader(): any;
|
|
69
|
+
/**
|
|
70
|
+
* Content - simple implementation
|
|
71
|
+
*/
|
|
24
72
|
content(): Promise<Uint8Array>;
|
|
25
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Factory function to create new page source
|
|
76
|
+
* Exact replica of Go's newPageSource function
|
|
77
|
+
*/
|
|
26
78
|
export declare function newPageSource(file: FileInfo): Source;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Page, PageIdentity, PageSource } from '../type';
|
|
2
2
|
import { NodeShiftTree, TreeShiftTree, WalkableTrees, MutableTrees } from '@pkg/doctree';
|
|
3
|
+
/**
|
|
4
|
+
* OrdinalWeightPage - page with ordinal and weight
|
|
5
|
+
*/
|
|
3
6
|
declare class OrdinalWeightPage {
|
|
4
7
|
private ordinal;
|
|
5
8
|
private weight;
|
|
@@ -11,6 +14,9 @@ declare class OrdinalWeightPage {
|
|
|
11
14
|
name(): string;
|
|
12
15
|
title(): string;
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* WeightedTermTreeNode - tree node for weighted terms
|
|
19
|
+
*/
|
|
14
20
|
export declare class WeightedTermTreeNode {
|
|
15
21
|
private pageTreesNodeInstance;
|
|
16
22
|
term: OrdinalWeightPage;
|
|
@@ -21,6 +27,9 @@ export declare class WeightedTermTreeNode {
|
|
|
21
27
|
isEmpty(): boolean;
|
|
22
28
|
shift(languageIndex: number, exact: boolean): [PageTreesNode | null, boolean];
|
|
23
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* PageTreesNode - represents a node in the page tree
|
|
32
|
+
*/
|
|
24
33
|
export interface IPageTreesNode {
|
|
25
34
|
getPage(): [Page, boolean];
|
|
26
35
|
}
|
|
@@ -53,5 +62,8 @@ export declare class PageTrees {
|
|
|
53
62
|
get TreeTaxonomyEntries(): TreeShiftTree<WeightedTermTreeNode>;
|
|
54
63
|
get ResourceTrees(): MutableTrees;
|
|
55
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Factory function to create new PageTreesNode
|
|
67
|
+
*/
|
|
56
68
|
export declare function newPageTreesNode(ps: PageSource): PageTreesNode;
|
|
57
69
|
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Page, PageGroups, Pager, PagerManager, Pages } from "@internal/domain/content";
|
|
2
|
+
/**
|
|
3
|
+
* TypeScript implementation of Go's Paginator
|
|
4
|
+
*/
|
|
2
5
|
export declare class PaginatorImpl {
|
|
3
6
|
private paginatedElements;
|
|
4
7
|
private _pagers;
|
|
@@ -11,8 +14,14 @@ export declare class PaginatorImpl {
|
|
|
11
14
|
getElement(pageNumber: number): any[];
|
|
12
15
|
getBase(): string;
|
|
13
16
|
getPagers(): PagerImpl[];
|
|
17
|
+
/**
|
|
18
|
+
* Get all pages across all pagers - flattens all paginated elements
|
|
19
|
+
*/
|
|
14
20
|
getAllPages(): Pages;
|
|
15
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* TypeScript implementation of Go's Pager - implements the existing Pager interface
|
|
24
|
+
*/
|
|
16
25
|
declare class PagerImpl implements Pager {
|
|
17
26
|
private number;
|
|
18
27
|
private paginator;
|
|
@@ -32,10 +41,16 @@ declare class PagerImpl implements Pager {
|
|
|
32
41
|
private element;
|
|
33
42
|
private pathJoin;
|
|
34
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* PagerManager service interface
|
|
46
|
+
*/
|
|
35
47
|
export interface PagerSvc {
|
|
36
48
|
pageSize(): number;
|
|
37
49
|
globalRegularPages(): Promise<any[]>;
|
|
38
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* TypeScript implementation of Go's Paginator entity - implements existing PagerManager interface
|
|
53
|
+
*/
|
|
39
54
|
export declare class PaginatorManagerImpl implements PagerManager {
|
|
40
55
|
private currentPager;
|
|
41
56
|
private initialized;
|
|
@@ -47,6 +62,10 @@ export declare class PaginatorManagerImpl implements PagerManager {
|
|
|
47
62
|
paginate(groups: PageGroups): Promise<Pager>;
|
|
48
63
|
paginate(pages: Pages): Promise<Pager>;
|
|
49
64
|
paginator(): Promise<Pager>;
|
|
65
|
+
/**
|
|
66
|
+
* Initialize paginator - TypeScript equivalent of golang's init.Do()
|
|
67
|
+
* This matches the exact logic from golang's Paginator.Paginator() method
|
|
68
|
+
*/
|
|
50
69
|
private initializePaginator;
|
|
51
70
|
private newPaginatorFromPages;
|
|
52
71
|
private newPaginatorFromPageGroups;
|
|
@@ -2,14 +2,29 @@ import { FsService, Page } from '../type';
|
|
|
2
2
|
import { PageTreesNode } from './pagetrees';
|
|
3
3
|
import { PageBuilder } from './pagebuilder';
|
|
4
4
|
import { NodeShiftTree } from '@pkg/doctree';
|
|
5
|
+
/**
|
|
6
|
+
* Constants - exact replica of Go's constants
|
|
7
|
+
*/
|
|
5
8
|
export declare const PAGE_HOME_BASE = "/";
|
|
9
|
+
/**
|
|
10
|
+
* Section class - exact replica of Go's Section struct
|
|
11
|
+
*/
|
|
6
12
|
export declare class Section {
|
|
7
13
|
home: Page | null;
|
|
8
14
|
seen: Record<string, boolean>;
|
|
9
15
|
fsSvc: FsService;
|
|
10
16
|
constructor(fsSvc: FsService);
|
|
17
|
+
/**
|
|
18
|
+
* IsHome - exact replica of Go's isHome method
|
|
19
|
+
*/
|
|
11
20
|
isHome(key: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* IsSectionExist - exact replica of Go's isSectionExist method
|
|
23
|
+
*/
|
|
12
24
|
isSectionExist(section: string): boolean;
|
|
13
25
|
assemble(pages: NodeShiftTree<PageTreesNode>, pb: PageBuilder, langIdx: number): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* CreateHome - exact replica of Go's CreateHome method
|
|
28
|
+
*/
|
|
14
29
|
createHome(pb: PageBuilder): Promise<void>;
|
|
15
30
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Page, Position } from '../type';
|
|
2
2
|
import { Scratch } from '@pkg/maps/scratch';
|
|
3
|
+
/**
|
|
4
|
+
* ShortcodeWithPage is the "." context in a shortcode template.
|
|
5
|
+
*/
|
|
3
6
|
export declare class ShortcodeWithPage {
|
|
4
7
|
private _params;
|
|
5
8
|
private _inner;
|
|
@@ -14,23 +17,59 @@ export declare class ShortcodeWithPage {
|
|
|
14
17
|
private _pos;
|
|
15
18
|
private _scratch;
|
|
16
19
|
constructor(params: any, inner: string, page: Page, parent: ShortcodeWithPage | null, name: string, isNamedParams: boolean, ordinal: number, indentation?: string, posOffset?: number);
|
|
20
|
+
/**
|
|
21
|
+
* Get shortcode parameters
|
|
22
|
+
*/
|
|
17
23
|
get params(): any;
|
|
18
24
|
get Params(): any;
|
|
19
25
|
get IsNamedParams(): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Get inner content
|
|
28
|
+
*/
|
|
20
29
|
get inner(): string;
|
|
21
30
|
get Inner(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get parent page
|
|
33
|
+
*/
|
|
22
34
|
get page(): Page;
|
|
23
35
|
get Page(): Page;
|
|
36
|
+
/**
|
|
37
|
+
* Get parent shortcode if any
|
|
38
|
+
*/
|
|
24
39
|
get parent(): ShortcodeWithPage | null;
|
|
25
40
|
get Parent(): ShortcodeWithPage | null;
|
|
41
|
+
/**
|
|
42
|
+
* Get shortcode name
|
|
43
|
+
*/
|
|
26
44
|
get name(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Check if using named parameters
|
|
47
|
+
*/
|
|
27
48
|
get isNamedParams(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Get ordinal position
|
|
51
|
+
*/
|
|
28
52
|
get ordinal(): number;
|
|
29
53
|
get Ordinal(): number;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the (potentially de-indented) inner content of the shortcode
|
|
56
|
+
*/
|
|
30
57
|
innerDeindent(): string;
|
|
31
58
|
get InnerDeindent(): string;
|
|
59
|
+
/**
|
|
60
|
+
* Position returns this shortcode's detailed position.
|
|
61
|
+
* Note that this information may be expensive to calculate,
|
|
62
|
+
* so only use this in error situations.
|
|
63
|
+
*/
|
|
32
64
|
position(): Promise<Position>;
|
|
65
|
+
/**
|
|
66
|
+
* Scratch returns a scratch-pad scoped for this shortcode.
|
|
67
|
+
* This can be used as a temporary storage for variables, counters etc.
|
|
68
|
+
*/
|
|
33
69
|
scratch(): Scratch;
|
|
70
|
+
/**
|
|
71
|
+
* Get is a convenience method to look up shortcode parameters by its key
|
|
72
|
+
*/
|
|
34
73
|
get(key: string | number): any;
|
|
35
74
|
Get(key: string | number): any;
|
|
36
75
|
}
|
|
@@ -2,11 +2,20 @@ import { FsService } from '../type';
|
|
|
2
2
|
import { PageTreesNode } from './pagetrees';
|
|
3
3
|
import { PageBuilder } from './pagebuilder';
|
|
4
4
|
import { NodeShiftTree } from '@pkg/doctree';
|
|
5
|
+
/**
|
|
6
|
+
* Constants - exact replica of Go's constants
|
|
7
|
+
*/
|
|
5
8
|
export declare const STANDALONE_PAGE_404_BASE = "404";
|
|
6
9
|
export declare const STANDALONE_PAGE_SITEMAP_BASE = "_sitemap";
|
|
10
|
+
/**
|
|
11
|
+
* Standalone class - exact replica of Go's Standalone struct
|
|
12
|
+
*/
|
|
7
13
|
export declare class Standalone {
|
|
8
14
|
fsSvc: FsService;
|
|
9
15
|
constructor(fsSvc: FsService);
|
|
16
|
+
/**
|
|
17
|
+
* Assemble - exact replica of Go's Assemble method
|
|
18
|
+
*/
|
|
10
19
|
assemble(pages: NodeShiftTree<PageTreesNode>, pb: PageBuilder): Promise<void>;
|
|
11
20
|
private addStandalone;
|
|
12
21
|
}
|
|
@@ -6,9 +6,24 @@ export declare class Taxonomy {
|
|
|
6
6
|
views: ITaxonomy[];
|
|
7
7
|
fsSvc: FsService;
|
|
8
8
|
constructor(views: ITaxonomy[], fsSvc: FsService);
|
|
9
|
+
/**
|
|
10
|
+
* Assemble - exact replica of Go's Assemble method
|
|
11
|
+
*/
|
|
9
12
|
assemble(pages: NodeShiftTree<PageTreesNode>, pb: PageBuilder, langIdx: number): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* IsTaxonomyPath - exact replica of Go's IsTaxonomyPath method
|
|
15
|
+
*/
|
|
10
16
|
isTaxonomyPath(p: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* PluralTreeKey - exact replica of Go's PluralTreeKey method
|
|
19
|
+
*/
|
|
11
20
|
pluralTreeKey(plural: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* GetTaxonomy - exact replica of Go's getTaxonomy method
|
|
23
|
+
*/
|
|
12
24
|
getTaxonomy(s: string): ITaxonomy | null;
|
|
25
|
+
/**
|
|
26
|
+
* IsZero - exact replica of Go's IsZero method
|
|
27
|
+
*/
|
|
13
28
|
isZero(v: ITaxonomy | null): boolean;
|
|
14
29
|
}
|
|
@@ -2,9 +2,15 @@ import { FsService } from '../type';
|
|
|
2
2
|
import { PageTreesNode, WeightedTermTreeNode } from './pagetrees';
|
|
3
3
|
import { PageBuilder } from './pagebuilder';
|
|
4
4
|
import { NodeShiftTree, TreeShiftTree } from '@pkg/doctree';
|
|
5
|
+
/**
|
|
6
|
+
* Term class - exact replica of Go's Term struct
|
|
7
|
+
*/
|
|
5
8
|
export declare class Term {
|
|
6
9
|
terms: Record<string, string[]>;
|
|
7
10
|
fsSvc: FsService;
|
|
8
11
|
constructor(fsSvc: FsService);
|
|
12
|
+
/**
|
|
13
|
+
* Assemble - exact replica of Go's Assemble method
|
|
14
|
+
*/
|
|
9
15
|
assemble(pages: NodeShiftTree<PageTreesNode>, entries: TreeShiftTree<WeightedTermTreeNode>, pb: PageBuilder, langIdx: number): Promise<Error | null>;
|
|
10
16
|
}
|
|
@@ -10,10 +10,32 @@ export declare class Translator {
|
|
|
10
10
|
private contentLanguage;
|
|
11
11
|
private translateFuncs;
|
|
12
12
|
constructor(contentLanguage: string);
|
|
13
|
+
/**
|
|
14
|
+
* Translate a translation ID for a specific language
|
|
15
|
+
* @param lang Language code (e.g., 'en', 'cn', 'zh-TW')
|
|
16
|
+
* @param translationID Translation identifier
|
|
17
|
+
* @returns Translated string or fallback
|
|
18
|
+
*/
|
|
13
19
|
translate(lang: string, translationID: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Setup translation functions from i18n files
|
|
22
|
+
* @param fsService File system service to read i18n files
|
|
23
|
+
*/
|
|
14
24
|
setupTranslateFuncs(fsService: FsService): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Read i18n file content from FileMetaInfo
|
|
27
|
+
*/
|
|
15
28
|
private readI18nFile;
|
|
29
|
+
/**
|
|
30
|
+
* Parse YAML content into translation items
|
|
31
|
+
*/
|
|
16
32
|
private parseI18nContent;
|
|
33
|
+
/**
|
|
34
|
+
* Get available languages
|
|
35
|
+
*/
|
|
17
36
|
getAvailableLanguages(): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Check if a language is supported
|
|
39
|
+
*/
|
|
18
40
|
hasLanguage(lang: string): boolean;
|
|
19
41
|
}
|
|
@@ -293,10 +293,16 @@ export interface PageSorter {
|
|
|
293
293
|
less(i: number, j: number): boolean;
|
|
294
294
|
}
|
|
295
295
|
export type CollatorStringCompare = (getString: (page: Page) => string, p1: Page, p2: Page) => number;
|
|
296
|
+
/**
|
|
297
|
+
* OrdinalWeightPage - TypeScript equivalent of Go's OrdinalWeightPage interface
|
|
298
|
+
*/
|
|
296
299
|
export interface OrdinalWeightPage {
|
|
297
300
|
weight(): number;
|
|
298
301
|
ordinal(): number;
|
|
299
302
|
page(): Page;
|
|
300
303
|
owner(): Page;
|
|
301
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* WalkTaxonomyFunc - TypeScript equivalent of Go's WalkTaxonomyFunc
|
|
307
|
+
*/
|
|
302
308
|
export type WalkTaxonomyFunc = (taxonomy: string, term: string, page: OrdinalWeightPage) => Promise<void>;
|
|
@@ -4,12 +4,36 @@ export declare class Classifier {
|
|
|
4
4
|
private files;
|
|
5
5
|
constructor(files: FileInfo[]);
|
|
6
6
|
static newClassifier(fis: FileMetaInfo[]): Promise<Classifier>;
|
|
7
|
+
/**
|
|
8
|
+
* Sort files using the same logic as Go version
|
|
9
|
+
*/
|
|
7
10
|
private sort;
|
|
11
|
+
/**
|
|
12
|
+
* GetLeaf - returns the first leaf bundle file
|
|
13
|
+
*/
|
|
8
14
|
getLeaf(): FileInfo | null;
|
|
15
|
+
/**
|
|
16
|
+
* Get all files
|
|
17
|
+
*/
|
|
9
18
|
getFiles(): FileInfo[];
|
|
19
|
+
/**
|
|
20
|
+
* Get number of files
|
|
21
|
+
*/
|
|
10
22
|
length(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Get file at index
|
|
25
|
+
*/
|
|
11
26
|
at(index: number): FileInfo | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Filter files by predicate
|
|
29
|
+
*/
|
|
12
30
|
filter(predicate: (file: FileInfo) => boolean): FileInfo[];
|
|
31
|
+
/**
|
|
32
|
+
* Find first file matching predicate
|
|
33
|
+
*/
|
|
13
34
|
find(predicate: (file: FileInfo) => boolean): FileInfo | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Check if empty
|
|
37
|
+
*/
|
|
14
38
|
isEmpty(): boolean;
|
|
15
39
|
}
|
|
@@ -1,25 +1,90 @@
|
|
|
1
1
|
import { FrontMatter, FrontMatterParser, LangService, TaxonomyService } from '../type';
|
|
2
2
|
export type Params = Record<string, any>;
|
|
3
|
+
/**
|
|
4
|
+
* NewFrontMatter creates a new FrontMatter instance with default values
|
|
5
|
+
* Modified: Don't set default date - will be set from file modTime
|
|
6
|
+
*/
|
|
3
7
|
export declare function newFrontMatter(): FrontMatter;
|
|
8
|
+
/**
|
|
9
|
+
* FrontMatterParser class - exact replica of Go's FrontMatterParser struct
|
|
10
|
+
*/
|
|
4
11
|
export declare class FrontMatterParserImpl implements FrontMatterParser {
|
|
5
12
|
params: Record<string, any> | undefined;
|
|
6
13
|
langSvc: LangService;
|
|
7
14
|
taxonomySvc: TaxonomyService;
|
|
8
15
|
constructor(params: Record<string, any> | undefined, langSvc: LangService, taxonomySvc: TaxonomyService);
|
|
16
|
+
/**
|
|
17
|
+
* Parse front matter from parameters
|
|
18
|
+
* Exact replica of Go version: func (b *FrontMatterParser) Parse() (*FrontMatter, error)
|
|
19
|
+
*/
|
|
9
20
|
parse(baseURL: string): Promise<FrontMatter>;
|
|
21
|
+
/**
|
|
22
|
+
* Parse date field
|
|
23
|
+
* Modified: Don't set default date here, let applyFrontMatter handle it based on file modTime
|
|
24
|
+
*/
|
|
10
25
|
private parseDate;
|
|
26
|
+
/**
|
|
27
|
+
* Parse weight field
|
|
28
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseWeight(fm *FrontMatter) error
|
|
29
|
+
*/
|
|
11
30
|
private parseWeight;
|
|
31
|
+
/**
|
|
32
|
+
* Parse title field
|
|
33
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseTitle(fm *FrontMatter) error
|
|
34
|
+
*/
|
|
12
35
|
private parseTitle;
|
|
13
36
|
private parseDescription;
|
|
37
|
+
/**
|
|
38
|
+
* Parse customized fields (path, lang, kind)
|
|
39
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseCustomized(fm *FrontMatter) error
|
|
40
|
+
*/
|
|
14
41
|
private parseCustomized;
|
|
42
|
+
/**
|
|
43
|
+
* Parse terms (taxonomies)
|
|
44
|
+
* Exact replica of Go version: func (b *FrontMatterParser) parseTerms(fm *FrontMatter) error
|
|
45
|
+
*/
|
|
15
46
|
private parseTerms;
|
|
47
|
+
/**
|
|
48
|
+
* Parse organization field
|
|
49
|
+
* Parses organization configuration from front matter parameters
|
|
50
|
+
*/
|
|
16
51
|
private parseOrganization;
|
|
52
|
+
/**
|
|
53
|
+
* Parse menu field
|
|
54
|
+
* Parses menu configuration from front matter parameters
|
|
55
|
+
*/
|
|
17
56
|
private parseMenu;
|
|
57
|
+
/**
|
|
58
|
+
* Parse menu items array
|
|
59
|
+
* Helper method to parse an array of menu item objects
|
|
60
|
+
*/
|
|
18
61
|
private parseMenuItems;
|
|
62
|
+
/**
|
|
63
|
+
* Parse author field
|
|
64
|
+
* Parses author configuration from front matter parameters
|
|
65
|
+
*/
|
|
19
66
|
private parseAuthor;
|
|
67
|
+
/**
|
|
68
|
+
* Parse contact information (shared between Organization and Author)
|
|
69
|
+
*/
|
|
20
70
|
private parseContact;
|
|
71
|
+
/**
|
|
72
|
+
* Parse social information (shared between Organization and Author)
|
|
73
|
+
*/
|
|
21
74
|
private parseSocial;
|
|
75
|
+
/**
|
|
76
|
+
* Convert path to slash preserving leading slash
|
|
77
|
+
* Equivalent to Go's paths.ToSlashPreserveLeading
|
|
78
|
+
*/
|
|
22
79
|
private toSlashPreserveLeading;
|
|
23
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Get parameter with case-insensitive key lookup (lowercase version)
|
|
83
|
+
* Exact replica of Go version: func GetParamToLower(m maps.Params, key string) any
|
|
84
|
+
*/
|
|
24
85
|
export declare function getParamToLower(m: Params, key: string): any;
|
|
86
|
+
/**
|
|
87
|
+
* Get parameter with case-insensitive key lookup
|
|
88
|
+
* Exact replica of Go version: func GetParam(p maps.Params, key string, stringToLower bool) any
|
|
89
|
+
*/
|
|
25
90
|
export declare function getParam(p: Record<string, any>, key: string, stringToLower: boolean): any;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the page kind given a string, empty if not found.
|
|
3
|
+
* Note that this will not return any temporary kinds (e.g. robotstxt).
|
|
4
|
+
*/
|
|
1
5
|
export declare function getKindMain(s: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Returns whether the given kind is a branch node.
|
|
8
|
+
*/
|
|
2
9
|
export declare function isBranch(kind: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the new kind if the given kind is deprecated.
|
|
12
|
+
*/
|
|
3
13
|
export declare function isDeprecatedAndReplacedWith(s: string): string;
|