From 172d155da4c53a9a0c7012e38a7552cc9e7a605c Mon Sep 17 00:00:00 2001 From: vanyauhalin Date: Tue, 17 Dec 2024 13:14:54 +0400 Subject: [PATCH] a huge restructuring of packages - Add a build script for each package. - Add a test:types script for each package. - Upgrade TypeScript. - Reconfigure TypeScript. - Update the implementation of HTML components. - Change a new resource's configuration file to the YAML format. - Remove some unused packages. - Update several type-related packages. - Move stories out of the packages. --- eslint.config.js | 2 +- makefile.ts | 11 +- package.json | 20 +- packages/async-transform/package.json | 11 +- packages/async-transform/tsconfig.build.json | 3 + packages/async-transform/tsconfig.json | 3 +- packages/caller-position/package.json | 11 +- packages/caller-position/tsconfig.build.json | 3 + packages/caller-position/tsconfig.json | 3 +- .../lib/define.ts | 40 +- .../lib/element.ts | 52 +- .../lib/events.ts | 16 +- .../lib/global.ts | 44 + .../lib/main.ts | 3 + .../lib/types.ts | 75 + .../package.json | 17 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- .../wds.config.ts | 10 + .../web-dev-server.config.mjs | 18 - packages/command/package.json | 11 +- packages/command/tsconfig.build.json | 3 + packages/command/tsconfig.json | 3 +- .../package.json | 10 +- .../tsconfig.json | 3 +- .../community-server-resource/package.json | 10 +- .../community-server-resource/tsconfig.json | 3 +- packages/console/package.json | 11 +- packages/console/tsconfig.build.json | 3 + packages/console/tsconfig.json | 3 +- packages/css-calc/package.json | 11 +- packages/css-calc/tsconfig.build.json | 3 + packages/css-calc/tsconfig.json | 3 +- .../declaration-code-example/package.json | 11 +- .../tsconfig.build.json | 3 + .../declaration-code-example/tsconfig.json | 3 +- packages/declaration-reference/package.json | 11 +- .../declaration-reference/tsconfig.build.json | 3 + packages/declaration-reference/tsconfig.json | 3 +- .../docspace-plugin-sdk-resource/config.ts | 13 - .../docspace-plugin-sdk-resource/config.yml | 8 + .../docspace-plugin-sdk-resource/package.json | 6 +- packages/docspace-resource/package.json | 10 +- packages/docspace-resource/tsconfig.json | 3 +- packages/docspace-sdk-js-resource/config.ts | 13 - packages/docspace-sdk-js-resource/config.yml | 8 + .../docspace-sdk-js-resource/package.json | 6 +- .../package.json | 11 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- .../lib/element.ts | 6 +- .../package.json | 13 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- .../document-builder-resource/package.json | 10 +- .../document-builder-resource/tsconfig.json | 3 +- .../document-builder-types/lib/types.d.ts | 19 - packages/document-builder-types/package.json | 17 - packages/document-builder-types/tsconfig.json | 4 - .../lib/main.test.ts | 24 +- .../document-editor-code-sample/package.json | 15 +- .../tsconfig.build.json | 3 + .../document-editor-code-sample/tsconfig.json | 3 +- .../web-test-runner.config.mjs | 32 - .../document-editor-code-sample/wtr.config.ts | 28 + .../document-editor-hast-element/package.json | 11 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- .../lib/define.ts | 164 +- .../lib/element.ts | 400 ++-- .../lib/events.ts | 598 +++-- .../lib/global.ts | 199 ++ .../document-editor-html-element/lib/main.ts | 3 + .../document-editor-html-element/lib/types.ts | 252 ++ .../document-editor-html-element/package.json | 17 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- .../wds.config.ts | 10 + .../web-dev-server.config.mjs | 18 - .../lib/main.ts | 18 +- .../package.json | 19 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- .../wds.config.ts | 10 + .../web-dev-server.config.mjs | 18 - .../{lib/types.d.ts => index.d.ts} | 0 packages/document-server-types/package.json | 10 +- packages/document-server-types/tsconfig.json | 3 +- packages/document-server-utils/c8.config.json | 11 - packages/document-server-utils/package.json | 13 +- .../document-server-utils/tsconfig.build.json | 3 + packages/document-server-utils/tsconfig.json | 3 +- packages/eleventy-clean/index.d.ts | 1 - packages/eleventy-clean/package.json | 12 +- packages/eleventy-clean/tsconfig.build.json | 3 + packages/eleventy-clean/tsconfig.json | 3 +- packages/eleventy-env/package.json | 10 +- packages/eleventy-env/tsconfig.build.json | 3 + packages/eleventy-env/tsconfig.json | 8 +- packages/eleventy-esbuild/lib/main.ts | 1 + packages/eleventy-esbuild/package.json | 11 +- packages/eleventy-esbuild/tsconfig.build.json | 3 + packages/eleventy-esbuild/tsconfig.json | 3 +- .../eleventy-html-minifier-terser/index.d.ts | 1 - .../package.json | 11 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- packages/eleventy-lightningcss/lib/main.ts | 1 + packages/eleventy-lightningcss/package.json | 11 +- .../eleventy-lightningcss/tsconfig.build.json | 3 + packages/eleventy-lightningcss/tsconfig.json | 3 +- packages/eleventy-pagefind/index.d.ts | 1 - packages/eleventy-pagefind/package.json | 11 +- .../eleventy-pagefind/tsconfig.build.json | 3 + packages/eleventy-pagefind/tsconfig.json | 3 +- packages/eleventy-sitemap/package.json | 11 +- packages/eleventy-sitemap/tsconfig.build.json | 3 + packages/eleventy-sitemap/tsconfig.json | 3 +- packages/eleventy-starry-night/index.d.ts | 1 - packages/eleventy-starry-night/package.json | 12 +- .../eleventy-starry-night/tsconfig.build.json | 3 + packages/eleventy-starry-night/tsconfig.json | 3 +- packages/eleventy-types/lib/main.ts | 3 + packages/eleventy-types/lib/reference.d.ts | 4 - packages/eleventy-types/package.json | 14 +- packages/eleventy-types/tsconfig.json | 3 +- packages/errors/package.json | 11 +- packages/errors/tsconfig.build.json | 3 + packages/errors/tsconfig.json | 3 +- packages/eslint-config/lib/main.ts | 2 +- packages/eslint-config/package.json | 15 +- packages/eslint-config/tsconfig.build.json | 3 + packages/eslint-config/tsconfig.emit.json | 9 - packages/eslint-config/tsconfig.json | 3 +- packages/eslint-plugin/package.json | 5 +- packages/eslint-plugin/tsconfig.json | 3 +- packages/fixture-resource/config.ts | 33 - packages/fixture-resource/config.yml | 5 + .../fixtures/typedoc/README.md | 2 + packages/fixture-resource/package.json | 11 +- packages/glossary-hastscript/lib/main.ts | 2 +- packages/glossary-hastscript/package.json | 11 +- .../glossary-hastscript/tsconfig.build.json | 3 + packages/glossary-hastscript/tsconfig.json | 3 +- packages/hast-util-eleventy-img/package.json | 11 +- .../tsconfig.build.json | 3 + packages/hast-util-eleventy-img/tsconfig.json | 6 +- packages/hast-util-is-element/lib/main.ts | 2 +- packages/hast-util-is-element/package.json | 11 +- .../hast-util-is-element/tsconfig.build.json | 3 + packages/hast-util-is-element/tsconfig.json | 3 +- packages/hast-util-is-text/lib/main.ts | 2 +- packages/hast-util-is-text/package.json | 11 +- .../hast-util-is-text/tsconfig.build.json | 3 + packages/hast-util-is-text/tsconfig.json | 3 +- packages/hastscript/package.json | 19 +- packages/hastscript/tsconfig.build.json | 3 + packages/hastscript/tsconfig.json | 3 +- packages/jq/package.json | 15 +- packages/jq/tsconfig.build.json | 3 + packages/jq/tsconfig.json | 3 +- packages/jsdoc-declaration/package.json | 9 +- .../jsdoc-declaration/tsconfig.build.json | 3 + packages/jsdoc-declaration/tsconfig.json | 3 +- packages/jsdoc-resource-fixtures/package.json | 10 +- .../jsdoc-resource-fixtures/tsconfig.json | 3 +- packages/jsdoc/package.json | 11 +- packages/jsdoc/tsconfig.build.json | 3 + packages/jsdoc/tsconfig.json | 3 +- packages/lang-to-ext/package.json | 11 +- packages/lang-to-ext/tsconfig.build.json | 3 + packages/lang-to-ext/tsconfig.emit.json | 8 - packages/lang-to-ext/tsconfig.json | 3 +- packages/library-declaration/package.json | 15 +- .../library-declaration/tsconfig.build.json | 3 + packages/library-declaration/tsconfig.json | 3 +- .../library-resource/fixtures/resource.js | 34 + .../library-resource/fixtures/resource.ts | 19 - packages/library-resource/lib/main.ts | 8 +- packages/library-resource/package.json | 11 +- packages/library-resource/tsconfig.build.json | 3 + packages/library-resource/tsconfig.json | 3 +- packages/library-signature/lib/main.ts | 2 +- packages/library-signature/package.json | 11 +- .../library-signature/tsconfig.build.json | 3 + packages/library-signature/tsconfig.json | 3 +- packages/mdast-util-eslint/package.json | 9 +- .../mdast-util-eslint/tsconfig.build.json | 3 + packages/mdast-util-eslint/tsconfig.json | 3 +- .../mdast-util-extract-section/package.json | 11 +- .../tsconfig.build.json | 3 + .../mdast-util-extract-section/tsconfig.json | 3 +- .../mdast-util-first-sentence/package.json | 11 +- .../tsconfig.build.json | 3 + .../mdast-util-first-sentence/tsconfig.json | 3 +- packages/mdast-util-is-node/package.json | 11 +- .../mdast-util-is-node/tsconfig.build.json | 3 + .../mdast-util-is-node/tsconfig.emit.json | 8 - packages/mdast-util-is-node/tsconfig.json | 3 +- packages/node-assert/lib/main.ts | 16 - packages/node-assert/package.json | 18 - packages/node-assert/tsconfig.json | 4 - packages/node-http/package.json | 11 +- packages/node-http/tsconfig.build.json | 3 + packages/node-http/tsconfig.json | 3 +- packages/node-path/package.json | 15 +- packages/node-path/tsconfig.build.json | 3 + packages/node-path/tsconfig.json | 3 +- packages/object-to-string/c8.config.json | 11 - packages/object-to-string/package.json | 13 +- packages/object-to-string/tsconfig.build.json | 3 + packages/object-to-string/tsconfig.json | 3 +- packages/openapi-declaration/lib/main.ts | 2 +- packages/openapi-declaration/package.json | 11 +- .../openapi-declaration/tsconfig.build.json | 3 + packages/openapi-declaration/tsconfig.json | 3 +- .../openapi-resource-fixtures/package.json | 8 +- .../openapi-resource-fixtures/tsconfig.json | 3 +- packages/openapi-resource/lib/main.ts | 2 +- packages/openapi-resource/package.json | 11 +- packages/openapi-resource/tsconfig.build.json | 3 + packages/openapi-resource/tsconfig.json | 3 +- packages/pagefind-fixtures/package.json | 6 +- packages/pagefind-types/lib/main.ts | 53 - packages/pagefind-types/package.json | 15 - packages/pagefind-types/tsconfig.json | 4 - packages/preact-callback/index.d.ts | 1 - packages/preact-callback/package.json | 12 +- packages/preact-callback/tsconfig.build.json | 3 + packages/preact-callback/tsconfig.json | 8 +- packages/preact-elements/lib/main.tsx | 2 +- packages/preact-elements/package.json | 11 +- packages/preact-elements/tsconfig.build.json | 3 + packages/preact-elements/tsconfig.json | 8 +- packages/preact-eleventy-img/lib/main.tsx | 2 +- packages/preact-eleventy-img/package.json | 11 +- .../preact-eleventy-img/tsconfig.build.json | 3 + packages/preact-eleventy-img/tsconfig.json | 8 +- packages/preact-join/lib/main.tsx | 8 +- packages/preact-join/package.json | 11 +- packages/preact-join/tsconfig.build.json | 3 + packages/preact-join/tsconfig.json | 8 +- packages/preact-merge/package.json | 12 +- packages/preact-merge/tsconfig.build.json | 3 + packages/preact-merge/tsconfig.json | 8 +- packages/preact-slots/lib/slot.tsx | 2 - packages/preact-slots/lib/slots.ts | 4 +- packages/preact-slots/package.json | 11 +- packages/preact-slots/tsconfig.build.json | 3 + packages/preact-slots/tsconfig.json | 8 +- packages/preact-suspense/lib/main.test.tsx | 2 +- packages/preact-suspense/lib/main.tsx | 2 +- packages/preact-suspense/package.json | 11 +- packages/preact-suspense/tsconfig.build.json | 3 + packages/preact-suspense/tsconfig.json | 8 +- packages/preact-template/lib/main.tsx | 2 +- packages/preact-template/package.json | 11 +- packages/preact-template/tsconfig.build.json | 3 + packages/preact-template/tsconfig.json | 8 +- packages/preact-types/package.json | 12 +- packages/preact-types/tsconfig.json | 3 +- .../lib/define.ts | 38 +- .../lib/element.ts | 38 +- .../lib/events.ts | 34 +- .../lib/global.ts | 44 + .../lib/main.ts | 3 + .../lib/types.ts | 55 + .../package.json | 16 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 3 +- .../wds.config.ts | 10 + .../web-dev-server.config.mjs | 18 - packages/rehype-clean/package.json | 9 +- packages/rehype-clean/tsconfig.build.json | 3 + packages/rehype-clean/tsconfig.json | 3 +- packages/rehype-description-list/package.json | 9 +- .../tsconfig.build.json | 3 + .../rehype-description-list/tsconfig.json | 3 +- packages/rehype-metaobject/index.d.ts | 1 + .../rehype-metaobject/lib/internal.test.ts | 4 +- packages/rehype-metaobject/lib/internal.ts | 2 +- packages/rehype-metaobject/lib/main.ts | 4 +- packages/rehype-metaobject/package.json | 9 +- .../rehype-metaobject/tsconfig.build.json | 3 + packages/rehype-metaobject/tsconfig.json | 3 +- packages/rehype-metastring/package.json | 9 +- .../rehype-metastring/tsconfig.build.json | 3 + packages/rehype-metastring/tsconfig.json | 3 +- packages/rehype-parameters/package.json | 9 +- .../rehype-parameters/tsconfig.build.json | 3 + packages/rehype-parameters/tsconfig.json | 3 +- packages/rehype-preact/package.json | 9 +- packages/rehype-preact/tsconfig.build.json | 3 + packages/rehype-preact/tsconfig.json | 3 +- packages/rehype-references/package.json | 9 +- .../rehype-references/tsconfig.build.json | 3 + packages/rehype-references/tsconfig.json | 3 +- packages/rehype-signature/package.json | 9 +- packages/rehype-signature/tsconfig.build.json | 3 + packages/rehype-signature/tsconfig.json | 3 +- packages/rehype-starry-night/lib/main.test.ts | 2 +- packages/rehype-starry-night/package.json | 11 +- .../rehype-starry-night/tsconfig.build.json | 3 + packages/rehype-starry-night/tsconfig.json | 6 +- packages/remark-config/package.json | 11 +- packages/remark-config/tsconfig.build.json | 3 + packages/remark-config/tsconfig.emit.json | 8 - packages/remark-config/tsconfig.json | 3 +- packages/remark-lint-eslint/package.json | 11 +- .../remark-lint-eslint/tsconfig.build.json | 3 + .../remark-lint-eslint/tsconfig.emit.json | 8 - packages/remark-lint-eslint/tsconfig.json | 3 +- packages/remark-lint-no-unicode/package.json | 11 +- .../tsconfig.build.json | 3 + .../remark-lint-no-unicode/tsconfig.emit.json | 8 - packages/remark-lint-no-unicode/tsconfig.json | 3 +- packages/remark-lint/package.json | 9 +- packages/remark-lint/tsconfig.build.json | 3 + packages/remark-lint/tsconfig.json | 3 +- packages/resource/lib/main.test.ts | 2 +- packages/resource/lib/main.ts | 2 +- packages/resource/package.json | 11 +- packages/resource/tsconfig.build.json | 3 + packages/resource/tsconfig.json | 3 +- packages/result/{lib/main.ts => index.d.ts} | 0 packages/result/package.json | 10 +- packages/result/tsconfig.json | 3 +- packages/server-client/package.json | 21 +- packages/server-client/tsconfig.build.json | 4 + packages/server-client/tsconfig.json | 3 +- .../server-client/web-test-runner.config.mjs | 32 - packages/server-client/wtr.config.ts | 28 + packages/service-declaration/package.json | 15 +- .../service-declaration/tsconfig.build.json | 3 + packages/service-declaration/tsconfig.json | 3 +- .../service-resource/fixtures/resource.js | 34 + .../service-resource/fixtures/resource.ts | 19 - packages/service-resource/lib/main.ts | 8 +- packages/service-resource/package.json | 11 +- packages/service-resource/tsconfig.build.json | 3 + packages/service-resource/tsconfig.json | 3 +- packages/service-signature/lib/main.test.ts | 2 +- packages/service-signature/lib/main.ts | 2 +- packages/service-signature/package.json | 11 +- .../service-signature/tsconfig.build.json | 3 + packages/service-signature/tsconfig.json | 3 +- packages/signature-hastscript/lib/main.ts | 2 +- packages/signature-hastscript/package.json | 11 +- .../signature-hastscript/tsconfig.build.json | 3 + packages/signature-hastscript/tsconfig.json | 3 +- packages/signature/package.json | 15 +- packages/signature/tsconfig.build.json | 3 + packages/signature/tsconfig.json | 8 +- packages/site-article/index.d.ts | 1 - packages/site-article/lib/client.ts | 2 + packages/site-article/lib/client/define.ts | 18 - packages/site-article/lib/client/element.ts | 2 +- packages/site-article/lib/client/global.ts | 19 + packages/site-article/lib/main.tsx | 2 +- packages/site-article/package.json | 19 +- packages/site-article/tsconfig.build.json | 3 + packages/site-article/tsconfig.json | 8 +- packages/site-chapter/index.d.ts | 1 - packages/site-chapter/lib/client.ts | 2 + packages/site-chapter/lib/client/define.ts | 18 - packages/site-chapter/lib/client/global.ts | 19 + packages/site-chapter/lib/main.tsx | 2 +- packages/site-chapter/package.json | 19 +- packages/site-chapter/tsconfig.build.json | 3 + packages/site-chapter/tsconfig.json | 8 +- packages/site-config-fixtures/lib/main.ts | 116 - packages/site-config-fixtures/package.json | 18 - packages/site-config-fixtures/tsconfig.json | 9 - packages/site-config/package.json | 9 +- packages/site-config/tsconfig.build.json | 3 + packages/site-config/tsconfig.json | 8 +- packages/site-content/index.d.ts | 1 - packages/site-content/package.json | 16 +- packages/site-content/tsconfig.build.json | 3 + packages/site-content/tsconfig.json | 8 +- .../index.d.ts | 1 - .../lib/client.ts | 2 + .../lib/client/define.ts | 33 +- .../lib/client/element.ts | 6 +- .../lib/client/global.ts | 33 + .../lib/main.tsx | 6 +- .../package.json | 18 +- .../tsconfig.build.json | 3 + .../tsconfig.json | 8 +- packages/site-env/package.json | 11 +- packages/site-env/tsconfig.build.json | 3 + packages/site-env/tsconfig.json | 8 +- packages/site-footer/index.d.ts | 1 - packages/site-footer/lib/main.tsx | 2 +- packages/site-footer/package.json | 15 +- packages/site-footer/tsconfig.build.json | 3 + packages/site-footer/tsconfig.json | 8 +- packages/site-glossary/index.d.ts | 1 - packages/site-glossary/lib/main.tsx | 2 +- packages/site-glossary/lib/use.story.tsx | 108 - packages/site-glossary/package.json | 18 +- packages/site-glossary/tsconfig.build.json | 3 + packages/site-glossary/tsconfig.json | 8 +- packages/site-header/index.d.ts | 1 - packages/site-header/lib/main.tsx | 2 +- packages/site-header/package.json | 16 +- packages/site-header/tsconfig.build.json | 3 + packages/site-header/tsconfig.json | 8 +- packages/site-help/index.d.ts | 1 - packages/site-help/lib/main.tsx | 2 +- packages/site-help/package.json | 16 +- packages/site-help/tsconfig.build.json | 3 + packages/site-help/tsconfig.json | 8 +- packages/site-home/index.d.ts | 1 - packages/site-home/lib/main.tsx | 2 +- packages/site-home/package.json | 17 +- packages/site-home/tsconfig.build.json | 3 + packages/site-home/tsconfig.json | 8 +- packages/site-kit/lib/client.ts | 16 +- packages/site-kit/lib/client/prerender.ts | 2 +- packages/site-kit/lib/main.ts | 9 +- packages/site-kit/package.json | 19 +- packages/site-kit/tsconfig.build.json | 3 + packages/site-kit/tsconfig.json | 8 +- packages/site-library/index.d.ts | 1 - packages/site-library/lib/main.tsx | 2 +- packages/site-library/lib/next.tsx | 4 +- packages/site-library/package.json | 13 +- packages/site-library/tsconfig.build.json | 3 + packages/site-library/tsconfig.json | 8 +- packages/site-logo/index.d.ts | 1 - packages/site-logo/lib/main.tsx | 2 +- packages/site-logo/package.json | 17 +- packages/site-logo/tsconfig.build.json | 3 + packages/site-logo/tsconfig.json | 8 +- packages/site-menubar/index.d.ts | 1 - packages/site-menubar/lib/client.ts | 69 +- packages/site-menubar/lib/client/define.ts | 27 - packages/site-menubar/lib/client/element.ts | 41 - packages/site-menubar/lib/main.tsx | 2 +- packages/site-menubar/package.json | 22 +- packages/site-menubar/tsconfig.build.json | 3 + packages/site-menubar/tsconfig.json | 8 +- packages/site-page/index.d.ts | 1 - packages/site-page/lib/client.ts | 65 +- packages/site-page/lib/client/define.ts | 27 - packages/site-page/lib/client/element.ts | 37 - packages/site-page/lib/main.tsx | 4 +- packages/site-page/package.json | 22 +- packages/site-page/tsconfig.build.json | 3 + packages/site-page/tsconfig.json | 8 +- packages/site-part/index.d.ts | 1 - packages/site-part/lib/main.tsx | 2 +- packages/site-part/package.json | 15 +- packages/site-part/tsconfig.build.json | 3 + packages/site-part/tsconfig.json | 8 +- packages/site-search/lib/client.ts | 434 +++- packages/site-search/lib/client/define.ts | 27 - packages/site-search/lib/client/element.ts | 406 ---- packages/site-search/lib/main.tsx | 7 +- packages/site-search/package.json | 20 +- packages/site-search/tsconfig.build.json | 3 + packages/site-search/tsconfig.json | 8 +- packages/site-service/index.d.ts | 1 - packages/site-service/lib/main.tsx | 8 +- packages/site-service/package.json | 13 +- packages/site-service/tsconfig.build.json | 3 + packages/site-service/tsconfig.json | 8 +- packages/site-signature/index.d.ts | 1 - packages/site-signature/lib/main.tsx | 2 +- packages/site-signature/package.json | 15 +- packages/site-signature/tsconfig.build.json | 3 + packages/site-signature/tsconfig.json | 8 +- packages/site-status/index.d.ts | 1 - packages/site-status/lib/main.tsx | 2 +- packages/site-status/package.json | 17 +- packages/site-status/tsconfig.build.json | 3 + packages/site-status/tsconfig.json | 8 +- packages/site-theme-switcher/index.d.ts | 1 - packages/site-theme-switcher/lib/client.ts | 77 +- .../site-theme-switcher/lib/client/define.ts | 27 - .../site-theme-switcher/lib/client/element.ts | 49 - packages/site-theme-switcher/lib/main.tsx | 2 +- packages/site-theme-switcher/package.json | 24 +- .../site-theme-switcher/tsconfig.build.json | 3 + packages/site-theme-switcher/tsconfig.json | 8 +- packages/site-toc/index.d.ts | 1 - packages/site-toc/lib/client.ts | 213 +- packages/site-toc/lib/client/define.ts | 27 - packages/site-toc/lib/client/element.ts | 185 -- packages/site-toc/lib/main.tsx | 2 +- packages/site-toc/package.json | 21 +- packages/site-toc/tsconfig.build.json | 3 + packages/site-toc/tsconfig.json | 8 +- packages/store-demo/bin/store-demo.js | 3 + packages/store-demo/bin/store-demo.ts | 3 - packages/store-demo/lib/main.ts | 2 +- packages/store-demo/package.json | 14 +- packages/store-demo/tsconfig.build.json | 3 + packages/store-demo/tsconfig.json | 3 +- packages/stream-json/package.json | 11 +- packages/stream-json/tsconfig.build.json | 3 + packages/stream-json/tsconfig.json | 3 +- packages/stream-string/package.json | 11 +- packages/stream-string/tsconfig.build.json | 3 + packages/stream-string/tsconfig.json | 3 +- packages/strings/package.json | 11 +- packages/strings/tsconfig.build.json | 3 + packages/strings/tsconfig.json | 3 +- packages/stylelint-config/package.json | 11 +- packages/stylelint-config/tsconfig.build.json | 3 + packages/stylelint-config/tsconfig.emit.json | 9 - packages/stylelint-config/tsconfig.json | 3 +- packages/svg-library/bin/svg-library.js | 3 + packages/svg-library/bin/svg-library.ts | 3 - packages/svg-library/lib/main.ts | 44 +- packages/svg-library/package.json | 14 +- packages/svg-library/tsconfig.build.json | 3 + packages/svg-library/tsconfig.json | 2 +- packages/svg-preact/lib/main.test.ts | 63 +- packages/svg-preact/lib/main.ts | 66 +- packages/svg-preact/package.json | 11 +- packages/svg-preact/tsconfig.build.json | 3 + packages/svg-preact/tsconfig.json | 8 +- .../tab-container-element-types/index.d.ts | 1 - .../tab-container-element-types/lib/main.ts | 11 - .../tab-container-element-types/package.json | 19 - .../tab-container-element-types/tsconfig.json | 4 - packages/template-hast-element/package.json | 11 +- .../template-hast-element/tsconfig.build.json | 3 + packages/template-hast-element/tsconfig.json | 3 +- packages/typedoc-declaration/lib/main.test.ts | 4 +- packages/typedoc-declaration/lib/main.ts | 2 +- packages/typedoc-declaration/package.json | 15 +- .../typedoc-declaration/tsconfig.build.json | 3 + packages/typedoc-declaration/tsconfig.json | 3 +- .../typedoc-resource/bin/typedoc-resource.js | 4 + .../typedoc-resource/bin/typedoc-resource.ts | 4 - packages/typedoc-resource/fixtures/typedoc.js | 38 + packages/typedoc-resource/fixtures/typedoc.ts | 20 - packages/typedoc-resource/lib/config.json | 32 + packages/typedoc-resource/lib/shared.ts | 36 +- packages/typedoc-resource/lib/typedoc.ts | 4 +- packages/typedoc-resource/package.json | 12 +- packages/typedoc-resource/tsconfig.build.json | 3 + packages/typedoc-resource/tsconfig.json | 3 +- packages/typedoc-transformer/lib/collector.ts | 2 +- packages/typedoc-transformer/lib/main.test.ts | 2 +- packages/typedoc-transformer/lib/main.ts | 2 +- packages/typedoc-transformer/lib/processor.ts | 2 +- packages/typedoc-transformer/package.json | 15 +- .../typedoc-transformer/tsconfig.build.json | 3 + packages/typedoc-transformer/tsconfig.json | 3 +- packages/typedoc-transport/lib/main.test.ts | 2 +- packages/typedoc-transport/lib/main.ts | 2 +- packages/typedoc-transport/package.json | 11 +- .../typedoc-transport/tsconfig.build.json | 3 + packages/typedoc-transport/tsconfig.json | 3 +- packages/typedoc-util-is-kind/package.json | 11 +- .../typedoc-util-is-kind/tsconfig.build.json | 3 + packages/typedoc-util-is-kind/tsconfig.json | 3 +- .../typedoc-util-is-reflection/package.json | 11 +- .../tsconfig.build.json | 3 + .../typedoc-util-is-reflection/tsconfig.json | 3 +- packages/typedoc-util-is-type/package.json | 11 +- .../typedoc-util-is-type/tsconfig.build.json | 3 + packages/typedoc-util-is-type/tsconfig.json | 3 +- packages/types-11ty__eleventy/index.d.ts | 2 + packages/types-11ty__eleventy/package.json | 13 + packages/types-11ty__eleventy/tsconfig.json | 3 + packages/types-pagefind/index.d.ts | 55 + packages/types-pagefind/package.json | 13 + packages/types-pagefind/tsconfig.json | 3 + packages/types-remark-strip-html/package.json | 5 +- .../types-remark-strip-html/tsconfig.json | 3 +- .../types-tab-container-element/index.d.ts | 10 + .../types-tab-container-element/package.json | 19 + .../types-tab-container-element/tsconfig.json | 3 + packages/ui-article-card/index.d.ts | 1 - packages/ui-article-card/lib/main.tsx | 2 +- packages/ui-article-card/package.json | 15 +- packages/ui-article-card/tsconfig.build.json | 3 + packages/ui-article-card/tsconfig.json | 8 +- .../ui-badge-group-hastscript/lib/main.ts | 2 +- .../ui-badge-group-hastscript/package.json | 11 +- .../tsconfig.build.json | 3 + .../ui-badge-group-hastscript/tsconfig.json | 3 +- packages/ui-badge-group/index.d.ts | 1 - packages/ui-badge-group/lib/main.tsx | 2 +- packages/ui-badge-group/package.json | 16 +- packages/ui-badge-group/tsconfig.build.json | 3 + packages/ui-badge-group/tsconfig.json | 8 +- packages/ui-badge-hastscript/lib/main.ts | 2 +- packages/ui-badge-hastscript/package.json | 11 +- .../ui-badge-hastscript/tsconfig.build.json | 3 + packages/ui-badge-hastscript/tsconfig.json | 3 +- packages/ui-badge/index.d.ts | 1 - packages/ui-badge/lib/main.tsx | 9 +- packages/ui-badge/package.json | 15 +- packages/ui-badge/tsconfig.build.json | 3 + packages/ui-badge/tsconfig.json | 8 +- packages/ui-base/package.json | 2 +- packages/ui-base/tsconfig.json | 3 +- packages/ui-breadcrumb/index.d.ts | 1 - packages/ui-breadcrumb/lib/main.tsx | 5 +- packages/ui-breadcrumb/package.json | 15 +- packages/ui-breadcrumb/tsconfig.build.json | 3 + packages/ui-breadcrumb/tsconfig.json | 8 +- packages/ui-button/index.d.ts | 1 - packages/ui-button/lib/main.tsx | 2 +- packages/ui-button/package.json | 15 +- packages/ui-button/tsconfig.build.json | 3 + packages/ui-button/tsconfig.json | 8 +- packages/ui-code-editor/index.d.ts | 1 - packages/ui-code-editor/lib/main.tsx | 2 +- packages/ui-code-editor/package.json | 16 +- packages/ui-code-editor/tsconfig.build.json | 3 + packages/ui-code-editor/tsconfig.json | 8 +- packages/ui-code-listing/index.d.ts | 2 - packages/ui-code-listing/lib/main.tsx | 2 +- packages/ui-code-listing/package.json | 21 +- packages/ui-code-listing/tsconfig.build.json | 3 + packages/ui-code-listing/tsconfig.json | 8 +- packages/ui-code-preview/index.d.ts | 1 - packages/ui-code-preview/lib/main.tsx | 2 +- packages/ui-code-preview/package.json | 15 +- packages/ui-code-preview/tsconfig.build.json | 3 + packages/ui-code-preview/tsconfig.json | 8 +- packages/ui-content/index.d.ts | 2 - packages/ui-content/lib/main.tsx | 2 +- packages/ui-content/package.json | 21 +- packages/ui-content/tsconfig.build.json | 3 + packages/ui-content/tsconfig.json | 8 +- packages/ui-fonts/lib/main.tsx | 2 +- packages/ui-fonts/package.json | 16 +- packages/ui-fonts/tsconfig.build.json | 3 + packages/ui-fonts/tsconfig.json | 8 +- packages/ui-form-control/index.d.ts | 2 - packages/ui-form-control/lib/main.tsx | 2 +- packages/ui-form-control/package.json | 16 +- packages/ui-form-control/tsconfig.build.json | 3 + packages/ui-form-control/tsconfig.json | 8 +- packages/ui-icons/index.d.ts | 1 - packages/ui-icons/package.json | 12 +- packages/ui-icons/tsconfig.json | 8 +- packages/ui-kit/lib/client.ts | 8 +- packages/ui-kit/lib/main.css | 2 +- packages/ui-kit/lib/main.ts | 3 + packages/ui-kit/package.json | 15 +- packages/ui-kit/tsconfig.build.json | 3 + packages/ui-kit/tsconfig.json | 8 +- packages/ui-logos/index.d.ts | 1 - packages/ui-logos/package.json | 14 +- packages/ui-logos/tsconfig.json | 8 +- packages/ui-mascots/index.d.ts | 1 - packages/ui-mascots/package.json | 14 +- packages/ui-mascots/tsconfig.json | 8 +- packages/ui-pictures/index.d.ts | 1 - packages/ui-pictures/lib/main.tsx | 4 +- packages/ui-pictures/package.json | 20 +- packages/ui-pictures/tsconfig.build.json | 3 + packages/ui-pictures/tsconfig.json | 8 +- packages/ui-primitives/index.d.ts | 1 - packages/ui-primitives/package.json | 11 +- packages/ui-primitives/tsconfig.json | 3 +- packages/ui-select/index.d.ts | 1 - packages/ui-select/lib/main.tsx | 2 +- packages/ui-select/package.json | 17 +- packages/ui-select/tsconfig.build.json | 3 + packages/ui-select/tsconfig.json | 8 +- packages/ui-sr-only/index.d.ts | 1 - packages/ui-sr-only/lib/main.tsx | 2 +- packages/ui-sr-only/package.json | 15 +- packages/ui-sr-only/tsconfig.build.json | 3 + packages/ui-sr-only/tsconfig.json | 8 +- packages/ui-text-input/index.d.ts | 1 - packages/ui-text-input/lib/client.ts | 224 +- packages/ui-text-input/lib/client/define.ts | 27 - packages/ui-text-input/lib/client/element.ts | 195 -- packages/ui-text-input/lib/main.tsx | 2 +- packages/ui-text-input/package.json | 28 +- packages/ui-text-input/tsconfig.build.json | 3 + packages/ui-text-input/tsconfig.json | 8 +- pnpm-lock.yaml | 2091 +++++------------ site/assets/main.ts | 4 +- site/assets/prerender.ts | 2 +- site/components/tree/tree.tsx | 2 +- site/generations/library-next.ts | 2 +- site/internal/help.tsx | 2 +- site/internal/icon.tsx | 8 +- site/internal/menubar.tsx | 2 +- site/internal/preact.ts | 2 +- site/package.json | 1 + site/pages/Robots/index.tsx | 1 - .../community-server-hosted-solutions.ts | 4 +- site/resources/community-server.ts | 4 +- site/resources/docspace-plugin-sdk.ts | 2 +- site/resources/docspace-sdk-js.ts | 2 +- site/resources/docspace.ts | 6 +- site/resources/document-builder.ts | 4 +- site/tsconfig.json | 13 +- storybook/{lib => config}/main.tsx | 11 +- storybook/{lib => config}/preview.css | 0 storybook/{lib => config}/preview.tsx | 43 +- storybook/package.json | 9 +- .../Site Composites/Article/default.story.tsx | 18 +- .../Site Composites/Footer/default.story.tsx | 6 +- .../Site Composites/Header/default.story.tsx | 7 +- .../Header/full-featured.story.tsx | 19 +- .../Site Composites/Library/default.story.tsx | 24 + .../Library/playground.story.tsx | 21 +- .../Site Composites/Service/default.story.tsx | 25 + .../Service/playground.story.tsx | 21 +- .../Site Patterns/Content/default.story.tsx | 3 +- .../Site Patterns/Glossary/default.story.tsx | 7 +- .../Glossary/of-methods.story.tsx | 66 + .../Glossary/of-parameters.story.tsx | 61 + .../Site Patterns/Help/default.story.tsx | 4 +- .../Site Patterns/Logo/default.story.tsx | 21 + .../Site Patterns/Logo/playground.story.tsx | 16 +- .../Site Patterns/Menubar/default.story.tsx | 10 +- .../Site Patterns/Search/default.story.tsx | 10 +- .../Site Patterns/Signature/default.story.tsx | 29 + .../Signature/playground.story.tsx | 27 +- .../Table of Contents/default.story.tsx | 37 + .../Table of Contents/playground.story.tsx | 32 +- .../Theme Switcher/default.story.tsx | 2 +- .../Site Regions/Chapter/default.story.tsx | 6 +- .../Site Regions/Chapter}/use.story.tsx | 4 +- .../stories/Site Regions/Page}/use.story.tsx | 15 +- .../document-editor-playground.story.tsx | 0 .../stories/Site Regions/home.story.tsx | 14 +- .../stories/Site Regions/page.story.tsx | 2 +- .../stories/Site Regions/part.story.tsx | 10 +- .../stories/Site Regions/status.story.tsx | 8 +- .../stories/UI Assets/icons.story.tsx | 12 +- .../stories/UI Assets/logos.story.tsx | 2 +- .../stories/UI Assets/mascots.story.tsx | 2 +- .../stories/UI Assets/pictures.story.tsx | 2 +- .../UI Foundation/badge-group.story.tsx | 3 +- .../stories/UI Foundation/badge.story.tsx | 2 +- .../UI Foundation/breadcrumb.story.tsx | 2 +- .../stories/UI Foundation/button.story.tsx | 2 +- .../UI Foundation/code-editor.story.tsx | 2 +- .../UI Foundation/code-listing.story.tsx | 8 +- .../UI Foundation/code-preview.story.tsx | 2 +- .../stories/UI Foundation/content.story.tsx | 12 +- .../UI Foundation/form-control.story.tsx | 10 +- .../stories/UI Foundation/select.story.tsx | 2 +- .../UI Foundation/text-input.story.tsx | 8 +- .../stories/UI Primitives}/colors.story.tsx | 2 +- .../stories/UI Primitives}/sizes.story.tsx | 2 +- .../stories/UI Utilities/sr-only.story.tsx | 2 +- storybook/tsconfig.json | 6 +- tsconfig.base.json | 9 +- tsconfig.build.json | 12 + tsconfig.emit.json | 8 - tsconfig.json | 14 +- 758 files changed, 5589 insertions(+), 6460 deletions(-) create mode 100644 packages/async-transform/tsconfig.build.json create mode 100644 packages/caller-position/tsconfig.build.json create mode 100644 packages/combobox-container-html-element/lib/global.ts create mode 100644 packages/combobox-container-html-element/lib/types.ts create mode 100644 packages/combobox-container-html-element/tsconfig.build.json create mode 100644 packages/combobox-container-html-element/wds.config.ts delete mode 100644 packages/combobox-container-html-element/web-dev-server.config.mjs create mode 100644 packages/command/tsconfig.build.json create mode 100644 packages/console/tsconfig.build.json create mode 100644 packages/css-calc/tsconfig.build.json create mode 100644 packages/declaration-code-example/tsconfig.build.json create mode 100644 packages/declaration-reference/tsconfig.build.json delete mode 100644 packages/docspace-plugin-sdk-resource/config.ts create mode 100644 packages/docspace-plugin-sdk-resource/config.yml delete mode 100644 packages/docspace-sdk-js-resource/config.ts create mode 100644 packages/docspace-sdk-js-resource/config.yml create mode 100644 packages/document-builder-hast-element/tsconfig.build.json create mode 100644 packages/document-builder-html-element/tsconfig.build.json delete mode 100644 packages/document-builder-types/lib/types.d.ts delete mode 100644 packages/document-builder-types/package.json delete mode 100644 packages/document-builder-types/tsconfig.json create mode 100644 packages/document-editor-code-sample/tsconfig.build.json delete mode 100644 packages/document-editor-code-sample/web-test-runner.config.mjs create mode 100644 packages/document-editor-code-sample/wtr.config.ts create mode 100644 packages/document-editor-hast-element/tsconfig.build.json create mode 100644 packages/document-editor-html-element/lib/global.ts create mode 100644 packages/document-editor-html-element/lib/types.ts create mode 100644 packages/document-editor-html-element/tsconfig.build.json create mode 100644 packages/document-editor-html-element/wds.config.ts delete mode 100644 packages/document-editor-html-element/web-dev-server.config.mjs create mode 100644 packages/document-editor-mirror-html-element/tsconfig.build.json create mode 100644 packages/document-editor-mirror-html-element/wds.config.ts delete mode 100644 packages/document-editor-mirror-html-element/web-dev-server.config.mjs rename packages/document-server-types/{lib/types.d.ts => index.d.ts} (100%) delete mode 100644 packages/document-server-utils/c8.config.json create mode 100644 packages/document-server-utils/tsconfig.build.json delete mode 100644 packages/eleventy-clean/index.d.ts create mode 100644 packages/eleventy-clean/tsconfig.build.json create mode 100644 packages/eleventy-env/tsconfig.build.json create mode 100644 packages/eleventy-esbuild/tsconfig.build.json delete mode 100644 packages/eleventy-html-minifier-terser/index.d.ts create mode 100644 packages/eleventy-html-minifier-terser/tsconfig.build.json create mode 100644 packages/eleventy-lightningcss/tsconfig.build.json delete mode 100644 packages/eleventy-pagefind/index.d.ts create mode 100644 packages/eleventy-pagefind/tsconfig.build.json create mode 100644 packages/eleventy-sitemap/tsconfig.build.json delete mode 100644 packages/eleventy-starry-night/index.d.ts create mode 100644 packages/eleventy-starry-night/tsconfig.build.json delete mode 100644 packages/eleventy-types/lib/reference.d.ts create mode 100644 packages/errors/tsconfig.build.json create mode 100644 packages/eslint-config/tsconfig.build.json delete mode 100644 packages/eslint-config/tsconfig.emit.json delete mode 100644 packages/fixture-resource/config.ts create mode 100644 packages/fixture-resource/config.yml create mode 100644 packages/fixture-resource/fixtures/typedoc/README.md create mode 100644 packages/glossary-hastscript/tsconfig.build.json create mode 100644 packages/hast-util-eleventy-img/tsconfig.build.json create mode 100644 packages/hast-util-is-element/tsconfig.build.json create mode 100644 packages/hast-util-is-text/tsconfig.build.json create mode 100644 packages/hastscript/tsconfig.build.json create mode 100644 packages/jq/tsconfig.build.json create mode 100644 packages/jsdoc-declaration/tsconfig.build.json create mode 100644 packages/jsdoc/tsconfig.build.json create mode 100644 packages/lang-to-ext/tsconfig.build.json delete mode 100644 packages/lang-to-ext/tsconfig.emit.json create mode 100644 packages/library-declaration/tsconfig.build.json create mode 100644 packages/library-resource/fixtures/resource.js delete mode 100644 packages/library-resource/fixtures/resource.ts create mode 100644 packages/library-resource/tsconfig.build.json create mode 100644 packages/library-signature/tsconfig.build.json create mode 100644 packages/mdast-util-eslint/tsconfig.build.json create mode 100644 packages/mdast-util-extract-section/tsconfig.build.json create mode 100644 packages/mdast-util-first-sentence/tsconfig.build.json create mode 100644 packages/mdast-util-is-node/tsconfig.build.json delete mode 100644 packages/mdast-util-is-node/tsconfig.emit.json delete mode 100644 packages/node-assert/lib/main.ts delete mode 100644 packages/node-assert/package.json delete mode 100644 packages/node-assert/tsconfig.json create mode 100644 packages/node-http/tsconfig.build.json create mode 100644 packages/node-path/tsconfig.build.json delete mode 100644 packages/object-to-string/c8.config.json create mode 100644 packages/object-to-string/tsconfig.build.json create mode 100644 packages/openapi-declaration/tsconfig.build.json create mode 100644 packages/openapi-resource/tsconfig.build.json delete mode 100644 packages/pagefind-types/lib/main.ts delete mode 100644 packages/pagefind-types/package.json delete mode 100644 packages/pagefind-types/tsconfig.json delete mode 100644 packages/preact-callback/index.d.ts create mode 100644 packages/preact-callback/tsconfig.build.json create mode 100644 packages/preact-elements/tsconfig.build.json create mode 100644 packages/preact-eleventy-img/tsconfig.build.json create mode 100644 packages/preact-join/tsconfig.build.json create mode 100644 packages/preact-merge/tsconfig.build.json create mode 100644 packages/preact-slots/tsconfig.build.json create mode 100644 packages/preact-suspense/tsconfig.build.json create mode 100644 packages/preact-template/tsconfig.build.json create mode 100644 packages/radiogroup-container-html-element/lib/global.ts create mode 100644 packages/radiogroup-container-html-element/lib/types.ts create mode 100644 packages/radiogroup-container-html-element/tsconfig.build.json create mode 100644 packages/radiogroup-container-html-element/wds.config.ts delete mode 100644 packages/radiogroup-container-html-element/web-dev-server.config.mjs create mode 100644 packages/rehype-clean/tsconfig.build.json create mode 100644 packages/rehype-description-list/tsconfig.build.json create mode 100644 packages/rehype-metaobject/index.d.ts create mode 100644 packages/rehype-metaobject/tsconfig.build.json create mode 100644 packages/rehype-metastring/tsconfig.build.json create mode 100644 packages/rehype-parameters/tsconfig.build.json create mode 100644 packages/rehype-preact/tsconfig.build.json create mode 100644 packages/rehype-references/tsconfig.build.json create mode 100644 packages/rehype-signature/tsconfig.build.json create mode 100644 packages/rehype-starry-night/tsconfig.build.json create mode 100644 packages/remark-config/tsconfig.build.json delete mode 100644 packages/remark-config/tsconfig.emit.json create mode 100644 packages/remark-lint-eslint/tsconfig.build.json delete mode 100644 packages/remark-lint-eslint/tsconfig.emit.json create mode 100644 packages/remark-lint-no-unicode/tsconfig.build.json delete mode 100644 packages/remark-lint-no-unicode/tsconfig.emit.json create mode 100644 packages/remark-lint/tsconfig.build.json create mode 100644 packages/resource/tsconfig.build.json rename packages/result/{lib/main.ts => index.d.ts} (100%) create mode 100644 packages/server-client/tsconfig.build.json delete mode 100644 packages/server-client/web-test-runner.config.mjs create mode 100644 packages/server-client/wtr.config.ts create mode 100644 packages/service-declaration/tsconfig.build.json create mode 100644 packages/service-resource/fixtures/resource.js delete mode 100644 packages/service-resource/fixtures/resource.ts create mode 100644 packages/service-resource/tsconfig.build.json create mode 100644 packages/service-signature/tsconfig.build.json create mode 100644 packages/signature-hastscript/tsconfig.build.json create mode 100644 packages/signature/tsconfig.build.json delete mode 100644 packages/site-article/index.d.ts create mode 100644 packages/site-article/lib/client/global.ts create mode 100644 packages/site-article/tsconfig.build.json delete mode 100644 packages/site-chapter/index.d.ts create mode 100644 packages/site-chapter/lib/client/global.ts create mode 100644 packages/site-chapter/tsconfig.build.json delete mode 100644 packages/site-config-fixtures/lib/main.ts delete mode 100644 packages/site-config-fixtures/package.json delete mode 100644 packages/site-config-fixtures/tsconfig.json create mode 100644 packages/site-config/tsconfig.build.json delete mode 100644 packages/site-content/index.d.ts create mode 100644 packages/site-content/tsconfig.build.json create mode 100644 packages/site-document-editor-playground/lib/client/global.ts create mode 100644 packages/site-document-editor-playground/tsconfig.build.json create mode 100644 packages/site-env/tsconfig.build.json delete mode 100644 packages/site-footer/index.d.ts create mode 100644 packages/site-footer/tsconfig.build.json delete mode 100644 packages/site-glossary/index.d.ts delete mode 100644 packages/site-glossary/lib/use.story.tsx create mode 100644 packages/site-glossary/tsconfig.build.json delete mode 100644 packages/site-header/index.d.ts create mode 100644 packages/site-header/tsconfig.build.json delete mode 100644 packages/site-help/index.d.ts create mode 100644 packages/site-help/tsconfig.build.json delete mode 100644 packages/site-home/index.d.ts create mode 100644 packages/site-home/tsconfig.build.json create mode 100644 packages/site-kit/tsconfig.build.json delete mode 100644 packages/site-library/index.d.ts create mode 100644 packages/site-library/tsconfig.build.json delete mode 100644 packages/site-logo/index.d.ts create mode 100644 packages/site-logo/tsconfig.build.json delete mode 100644 packages/site-menubar/index.d.ts delete mode 100644 packages/site-menubar/lib/client/define.ts delete mode 100644 packages/site-menubar/lib/client/element.ts create mode 100644 packages/site-menubar/tsconfig.build.json delete mode 100644 packages/site-page/index.d.ts delete mode 100644 packages/site-page/lib/client/define.ts delete mode 100644 packages/site-page/lib/client/element.ts create mode 100644 packages/site-page/tsconfig.build.json delete mode 100644 packages/site-part/index.d.ts create mode 100644 packages/site-part/tsconfig.build.json delete mode 100644 packages/site-search/lib/client/define.ts delete mode 100644 packages/site-search/lib/client/element.ts create mode 100644 packages/site-search/tsconfig.build.json delete mode 100644 packages/site-service/index.d.ts create mode 100644 packages/site-service/tsconfig.build.json delete mode 100644 packages/site-signature/index.d.ts create mode 100644 packages/site-signature/tsconfig.build.json delete mode 100644 packages/site-status/index.d.ts create mode 100644 packages/site-status/tsconfig.build.json delete mode 100644 packages/site-theme-switcher/lib/client/define.ts delete mode 100644 packages/site-theme-switcher/lib/client/element.ts create mode 100644 packages/site-theme-switcher/tsconfig.build.json delete mode 100644 packages/site-toc/index.d.ts delete mode 100644 packages/site-toc/lib/client/define.ts delete mode 100644 packages/site-toc/lib/client/element.ts create mode 100644 packages/site-toc/tsconfig.build.json create mode 100755 packages/store-demo/bin/store-demo.js delete mode 100755 packages/store-demo/bin/store-demo.ts create mode 100644 packages/store-demo/tsconfig.build.json create mode 100644 packages/stream-json/tsconfig.build.json create mode 100644 packages/stream-string/tsconfig.build.json create mode 100644 packages/strings/tsconfig.build.json create mode 100644 packages/stylelint-config/tsconfig.build.json delete mode 100644 packages/stylelint-config/tsconfig.emit.json create mode 100755 packages/svg-library/bin/svg-library.js delete mode 100755 packages/svg-library/bin/svg-library.ts create mode 100644 packages/svg-library/tsconfig.build.json create mode 100644 packages/svg-preact/tsconfig.build.json delete mode 100644 packages/tab-container-element-types/index.d.ts delete mode 100644 packages/tab-container-element-types/lib/main.ts delete mode 100644 packages/tab-container-element-types/package.json delete mode 100644 packages/tab-container-element-types/tsconfig.json create mode 100644 packages/template-hast-element/tsconfig.build.json create mode 100644 packages/typedoc-declaration/tsconfig.build.json create mode 100755 packages/typedoc-resource/bin/typedoc-resource.js delete mode 100755 packages/typedoc-resource/bin/typedoc-resource.ts create mode 100644 packages/typedoc-resource/fixtures/typedoc.js delete mode 100644 packages/typedoc-resource/fixtures/typedoc.ts create mode 100644 packages/typedoc-resource/lib/config.json create mode 100644 packages/typedoc-resource/tsconfig.build.json create mode 100644 packages/typedoc-transformer/tsconfig.build.json create mode 100644 packages/typedoc-transport/tsconfig.build.json create mode 100644 packages/typedoc-util-is-kind/tsconfig.build.json create mode 100644 packages/typedoc-util-is-reflection/tsconfig.build.json create mode 100644 packages/typedoc-util-is-type/tsconfig.build.json create mode 100644 packages/types-11ty__eleventy/index.d.ts create mode 100644 packages/types-11ty__eleventy/package.json create mode 100644 packages/types-11ty__eleventy/tsconfig.json create mode 100644 packages/types-pagefind/index.d.ts create mode 100644 packages/types-pagefind/package.json create mode 100644 packages/types-pagefind/tsconfig.json create mode 100644 packages/types-tab-container-element/index.d.ts create mode 100644 packages/types-tab-container-element/package.json create mode 100644 packages/types-tab-container-element/tsconfig.json delete mode 100644 packages/ui-article-card/index.d.ts create mode 100644 packages/ui-article-card/tsconfig.build.json create mode 100644 packages/ui-badge-group-hastscript/tsconfig.build.json delete mode 100644 packages/ui-badge-group/index.d.ts create mode 100644 packages/ui-badge-group/tsconfig.build.json create mode 100644 packages/ui-badge-hastscript/tsconfig.build.json delete mode 100644 packages/ui-badge/index.d.ts create mode 100644 packages/ui-badge/tsconfig.build.json delete mode 100644 packages/ui-breadcrumb/index.d.ts create mode 100644 packages/ui-breadcrumb/tsconfig.build.json delete mode 100644 packages/ui-button/index.d.ts create mode 100644 packages/ui-button/tsconfig.build.json delete mode 100644 packages/ui-code-editor/index.d.ts create mode 100644 packages/ui-code-editor/tsconfig.build.json delete mode 100644 packages/ui-code-listing/index.d.ts create mode 100644 packages/ui-code-listing/tsconfig.build.json delete mode 100644 packages/ui-code-preview/index.d.ts create mode 100644 packages/ui-code-preview/tsconfig.build.json delete mode 100644 packages/ui-content/index.d.ts create mode 100644 packages/ui-content/tsconfig.build.json create mode 100644 packages/ui-fonts/tsconfig.build.json delete mode 100644 packages/ui-form-control/index.d.ts create mode 100644 packages/ui-form-control/tsconfig.build.json delete mode 100644 packages/ui-icons/index.d.ts create mode 100644 packages/ui-kit/tsconfig.build.json delete mode 100644 packages/ui-logos/index.d.ts delete mode 100644 packages/ui-mascots/index.d.ts delete mode 100644 packages/ui-pictures/index.d.ts create mode 100644 packages/ui-pictures/tsconfig.build.json delete mode 100644 packages/ui-primitives/index.d.ts create mode 100644 packages/ui-select/tsconfig.build.json delete mode 100644 packages/ui-sr-only/index.d.ts create mode 100644 packages/ui-sr-only/tsconfig.build.json delete mode 100644 packages/ui-text-input/index.d.ts delete mode 100644 packages/ui-text-input/lib/client/define.ts delete mode 100644 packages/ui-text-input/lib/client/element.ts create mode 100644 packages/ui-text-input/tsconfig.build.json rename storybook/{lib => config}/main.tsx (88%) rename storybook/{lib => config}/preview.css (100%) rename storybook/{lib => config}/preview.tsx (85%) rename packages/site-article/lib/main.story.tsx => storybook/stories/Site Composites/Article/default.story.tsx (93%) rename packages/site-footer/lib/main.story.tsx => storybook/stories/Site Composites/Footer/default.story.tsx (97%) rename packages/site-header/lib/main.story.tsx => storybook/stories/Site Composites/Header/default.story.tsx (84%) rename packages/site-header/lib/use.story.tsx => storybook/stories/Site Composites/Header/full-featured.story.tsx (62%) create mode 100644 storybook/stories/Site Composites/Library/default.story.tsx rename packages/site-library/lib/main.story.tsx => storybook/stories/Site Composites/Library/playground.story.tsx (89%) create mode 100644 storybook/stories/Site Composites/Service/default.story.tsx rename packages/site-service/lib/main.story.tsx => storybook/stories/Site Composites/Service/playground.story.tsx (86%) rename packages/site-content/lib/main.story.tsx => storybook/stories/Site Patterns/Content/default.story.tsx (87%) rename packages/site-glossary/lib/main.story.tsx => storybook/stories/Site Patterns/Glossary/default.story.tsx (93%) create mode 100644 storybook/stories/Site Patterns/Glossary/of-methods.story.tsx create mode 100644 storybook/stories/Site Patterns/Glossary/of-parameters.story.tsx rename packages/site-help/lib/main.story.tsx => storybook/stories/Site Patterns/Help/default.story.tsx (86%) create mode 100644 storybook/stories/Site Patterns/Logo/default.story.tsx rename packages/site-logo/lib/main.story.tsx => storybook/stories/Site Patterns/Logo/playground.story.tsx (66%) rename packages/site-menubar/lib/main.story.tsx => storybook/stories/Site Patterns/Menubar/default.story.tsx (95%) rename packages/site-search/lib/main.story.tsx => storybook/stories/Site Patterns/Search/default.story.tsx (93%) create mode 100644 storybook/stories/Site Patterns/Signature/default.story.tsx rename packages/site-signature/lib/main.story.tsx => storybook/stories/Site Patterns/Signature/playground.story.tsx (84%) create mode 100644 storybook/stories/Site Patterns/Table of Contents/default.story.tsx rename packages/site-toc/lib/main.story.tsx => storybook/stories/Site Patterns/Table of Contents/playground.story.tsx (70%) rename packages/site-theme-switcher/lib/main.story.tsx => storybook/stories/Site Patterns/Theme Switcher/default.story.tsx (86%) rename packages/site-chapter/lib/main.story.tsx => storybook/stories/Site Regions/Chapter/default.story.tsx (79%) rename {packages/site-chapter/lib => storybook/stories/Site Regions/Chapter}/use.story.tsx (79%) rename {packages/site-page/lib => storybook/stories/Site Regions/Page}/use.story.tsx (77%) rename packages/site-document-editor-playground/lib/main.story.tsx => storybook/stories/Site Regions/document-editor-playground.story.tsx (100%) rename packages/site-home/lib/main.story.tsx => storybook/stories/Site Regions/home.story.tsx (94%) rename packages/site-page/lib/main.story.tsx => storybook/stories/Site Regions/page.story.tsx (86%) rename packages/site-part/lib/main.story.tsx => storybook/stories/Site Regions/part.story.tsx (91%) rename packages/site-status/lib/main.story.tsx => storybook/stories/Site Regions/status.story.tsx (98%) rename packages/ui-icons/lib/main.story.tsx => storybook/stories/UI Assets/icons.story.tsx (62%) rename packages/ui-logos/lib/main.story.tsx => storybook/stories/UI Assets/logos.story.tsx (85%) rename packages/ui-mascots/lib/main.story.tsx => storybook/stories/UI Assets/mascots.story.tsx (89%) rename packages/ui-pictures/lib/main.story.tsx => storybook/stories/UI Assets/pictures.story.tsx (90%) rename packages/ui-badge-group/lib/main.story.tsx => storybook/stories/UI Foundation/badge-group.story.tsx (91%) rename packages/ui-badge/lib/main.story.tsx => storybook/stories/UI Foundation/badge.story.tsx (93%) rename packages/ui-breadcrumb/lib/main.story.tsx => storybook/stories/UI Foundation/breadcrumb.story.tsx (91%) rename packages/ui-button/lib/main.story.tsx => storybook/stories/UI Foundation/button.story.tsx (93%) rename packages/ui-code-editor/lib/main.story.tsx => storybook/stories/UI Foundation/code-editor.story.tsx (88%) rename packages/ui-code-listing/lib/main.story.tsx => storybook/stories/UI Foundation/code-listing.story.tsx (95%) rename packages/ui-code-preview/lib/main.story.tsx => storybook/stories/UI Foundation/code-preview.story.tsx (86%) rename packages/ui-content/lib/main.story.tsx => storybook/stories/UI Foundation/content.story.tsx (97%) rename packages/ui-form-control/lib/main.story.tsx => storybook/stories/UI Foundation/form-control.story.tsx (79%) rename packages/ui-select/lib/main.story.tsx => storybook/stories/UI Foundation/select.story.tsx (98%) rename packages/ui-text-input/lib/main.story.tsx => storybook/stories/UI Foundation/text-input.story.tsx (96%) rename {packages/ui-primitives/lib => storybook/stories/UI Primitives}/colors.story.tsx (93%) rename {packages/ui-primitives/lib => storybook/stories/UI Primitives}/sizes.story.tsx (92%) rename packages/ui-sr-only/lib/main.story.tsx => storybook/stories/UI Utilities/sr-only.story.tsx (91%) create mode 100644 tsconfig.build.json delete mode 100644 tsconfig.emit.json diff --git a/eslint.config.js b/eslint.config.js index a8cb77000..0c1683878 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -28,7 +28,7 @@ export default [ "!package.json", "!stylelint.config.js", "!tsconfig.base.json", - "!tsconfig.emit.json", + "!tsconfig.build.json", "!tsconfig.json", ], }, diff --git a/makefile.ts b/makefile.ts index bc7b50c8b..1c1a9e24d 100644 --- a/makefile.ts +++ b/makefile.ts @@ -12,16 +12,6 @@ interface PackageJson { function main(): void { sade("makefile.ts") - .command("clean") - .describe("Recursively run 'pnpm clean' on all packages") - .action(async (p: {_: string[]}) => { - if (p._.length === 0) { - p._ = await readdir("packages") - } - for (const n of p._) { - await run(n, "clean") - } - }) .command("build") .describe("Recursively run 'pnpm build' on all packages") .action(async (p: {_: string[]}) => { @@ -65,6 +55,7 @@ function main(): void { n === "node-path" || n === "preact-elements" || n === "preact-slots" || + n === "preact-suspense" || n === "preact-template" || n === "rehype-clean" || n === "remark-config" || diff --git a/package.json b/package.json index 4439029b4..093487719 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@onlyoffice/documentation", + "name": "@onlyoffice/api.onlyoffice.com", "type": "module", "private": true, "engines": { @@ -7,12 +7,13 @@ }, "scripts": { "build": "tsx makefile.ts build", - "clean": "tsx makefile.ts clean", "lint:code": "eslint .", "lint:pages": "remark --frail --quiet site/pages", "lint:styles": "stylelint --ignore-path .gitignore \"+(packages|site|storybook)/**/*.css\"", "lint": "pnpm lint:code && pnpm lint:styles && pnpm lint:pages", - "test": "tsx makefile.ts test" + "test:packages": "tsx makefile.ts test", + "test:types": "tsc --noEmit", + "test": "pnpm test:types && pnpm test:packages" }, "devDependencies": { "@onlyoffice/eslint-config": "workspace:^", @@ -29,12 +30,19 @@ "sade": "1.8.1", "stylelint": "16.8.2", "tsx": "4.16.5", - "typescript": "5.4.5" + "typescript": "5.7.2" }, "pnpm": { "supportedArchitectures": { - "os": ["current", "darwin", "win32"], - "cpu": ["arm64", "x64"] + "os": [ + "current", + "darwin", + "win32" + ], + "cpu": [ + "arm64", + "x64" + ] } } } diff --git a/packages/async-transform/package.json b/packages/async-transform/package.json index 855f14e29..bd48bce7a 100644 --- a/packages/async-transform/package.json +++ b/packages/async-transform/package.json @@ -2,22 +2,21 @@ "name": "@onlyoffice/async-transform", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf coverage node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, "dependencies": { - "@types/node": "20.12.12", - "typescript": "5.4.5" + "@types/node": "20.12.12" }, "devDependencies": { "@onlyoffice/stream-string": "workspace:^", "c8": "9.1.0", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/async-transform/tsconfig.build.json b/packages/async-transform/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/async-transform/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/async-transform/tsconfig.json b/packages/async-transform/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/async-transform/tsconfig.json +++ b/packages/async-transform/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/caller-position/package.json b/packages/caller-position/package.json index 0d711bca0..0eeafbe5e 100644 --- a/packages/caller-position/package.json +++ b/packages/caller-position/package.json @@ -2,20 +2,17 @@ "name": "@onlyoffice/caller-position", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf coverage node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, - "dependencies": { - "typescript": "5.4.5" - }, "devDependencies": { "c8": "9.1.0", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/caller-position/tsconfig.build.json b/packages/caller-position/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/caller-position/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/caller-position/tsconfig.json b/packages/caller-position/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/caller-position/tsconfig.json +++ b/packages/caller-position/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/combobox-container-html-element/lib/define.ts b/packages/combobox-container-html-element/lib/define.ts index 2b69a854c..09184fe8a 100644 --- a/packages/combobox-container-html-element/lib/define.ts +++ b/packages/combobox-container-html-element/lib/define.ts @@ -1,49 +1,19 @@ -import {ComboboxContainer} from "./element.ts" +import { + ComboboxContainer, +} from "./element.ts" import { ComboboxContainerChangeEvent, - type ComboboxContainerChangeEventListener, ComboboxContainerChangedEvent, - type ComboboxContainerChangedEventListener, - type GlobalComboboxContainerChangeHandler, - type GlobalComboboxContainerChangedHandler, } from "./events.ts" -declare global { - interface Window { - ComboboxContainer: typeof ComboboxContainer - ComboboxContainerChangeEvent: typeof ComboboxContainerChangeEvent - ComboboxContainerChangedEvent: typeof ComboboxContainerChangedEvent - } - - interface HTMLElementTagNameMap { - "combobox-container": ComboboxContainer - } - - namespace preact { - namespace JSX { - interface IntrinsicElements { - "combobox-container": HTMLAttributes - } - } - } - - interface GlobalEventHandlersEventMap { - comboboxcontainerchange: ComboboxContainerChangeEventListener - comboboxcontainerchanged: ComboboxContainerChangedEventListener - } - - interface GlobalEventHandlers { - oncomboboxcontainerchange: GlobalComboboxContainerChangeHandler | null - oncomboboxcontainerchanged: GlobalComboboxContainerChangedHandler | null - } -} - export function define(): void { if (window.customElements.get(ComboboxContainer.tagName)) { return } + window.ComboboxContainer = ComboboxContainer window.customElements.define(ComboboxContainer.tagName, ComboboxContainer) + window.ComboboxContainerChangeEvent = ComboboxContainerChangeEvent window.ComboboxContainerChangedEvent = ComboboxContainerChangedEvent } diff --git a/packages/combobox-container-html-element/lib/element.ts b/packages/combobox-container-html-element/lib/element.ts index a4c18363d..dbc307dc2 100644 --- a/packages/combobox-container-html-element/lib/element.ts +++ b/packages/combobox-container-html-element/lib/element.ts @@ -24,60 +24,16 @@ import { ComboboxContainerChangedEvent, type ComboboxContainerChangedEventListener, } from "./events.ts" - -export type ComboboxContainerAttributeName = - Exclude - -export interface ComboboxContainerAttributes { - "default-index"?: string - "disabled"?: string - "name"?: string - "page-size"?: string - "oncomboboxcontainerchange"?: string - "oncomboboxcontainerchanged"?: string -} - -export type ComboboxContainerFallbackStatesName = - keyof ComboboxContainerFallbackStates - -export type ComboboxContainerFallbackStates = { - [K in keyof ComboboxContainerStates as `state-${string & K}`]: string -} - -export type ComboboxContainerStateName = - keyof ComboboxContainerStates - -export interface ComboboxContainerStates { - selected?: boolean -} - -export type ComboboxContainerEvent = - Window[ComboboxContainerEventName] - -export type ComboboxContainerEventName = Exclude<{ - [K in keyof Window]: K extends `ComboboxContainer${string}Event` ? K : never -}[keyof Window], undefined> - -export type ComboboxContainerEventListener = - GlobalEventHandlersEventMap[ComboboxContainerEventType] - -export type ComboboxContainerEventType = { - [K in keyof GlobalEventHandlersEventMap]: K extends `comboboxcontainer${string}` ? K : never -}[keyof GlobalEventHandlersEventMap] - -export type ComboboxContainerEventHandler = - Exclude - -export type ComboboxContainerEventHandlerName = Exclude<{ - [K in keyof GlobalEventHandlers]: K extends `oncomboboxcontainer${string}` ? K : never -}[keyof GlobalEventHandlers], undefined> +import { + type ComboboxContainerAttributeName, +} from "./types.ts" /** * A accessible combobox container element with keyboard support. Follows the * {@link https://www.w3.org/WAI/ARIA/apg/patterns/combobox/ ARIA best practices guide on combobox}. */ export class ComboboxContainer extends HTMLElement { - static get tagName(): string { + static get tagName(): "combobox-container" { return "combobox-container" } diff --git a/packages/combobox-container-html-element/lib/events.ts b/packages/combobox-container-html-element/lib/events.ts index 0e39f7407..45ba31058 100644 --- a/packages/combobox-container-html-element/lib/events.ts +++ b/packages/combobox-container-html-element/lib/events.ts @@ -34,7 +34,11 @@ class ComboboxContainerEvent extends Event { } export class ComboboxContainerChangeEvent extends ComboboxContainerEvent { - static get type(): string { + static get handlerName(): `on${typeof ComboboxContainerChangeEvent.type}` { + return `on${this.type}` + } + + static get type(): "comboboxcontainerchange" { return "comboboxcontainerchange" } @@ -47,12 +51,16 @@ export interface ComboboxContainerChangeEventListener extends EventListener { (this: ComboboxContainer, ev: ComboboxContainerChangeEvent): void } -export interface GlobalComboboxContainerChangeHandler { +export interface GlobalComboboxContainerChangeEventHandler { (this: GlobalEventHandlers, ev: ComboboxContainerChangeEvent): void } export class ComboboxContainerChangedEvent extends ComboboxContainerEvent { - static get type(): string { + static get handlerName(): `on${typeof ComboboxContainerChangedEvent.type}` { + return `on${this.type}` + } + + static get type(): "comboboxcontainerchanged" { return "comboboxcontainerchanged" } @@ -65,6 +73,6 @@ export interface ComboboxContainerChangedEventListener extends EventListener { (this: ComboboxContainer, ev: ComboboxContainerChangedEvent): void } -export interface GlobalComboboxContainerChangedHandler { +export interface GlobalComboboxContainerChangedEventHandler { (this: GlobalEventHandlers, ev: ComboboxContainerChangedEvent): void } diff --git a/packages/combobox-container-html-element/lib/global.ts b/packages/combobox-container-html-element/lib/global.ts new file mode 100644 index 000000000..09cd213c8 --- /dev/null +++ b/packages/combobox-container-html-element/lib/global.ts @@ -0,0 +1,44 @@ +/* eslint @stylistic/max-len: ["error", {code: 140}] */ + +import { + type ComboboxContainer, +} from "./element.ts" +import { + type ComboboxContainerChangeEvent, + type ComboboxContainerChangedEvent, + type GlobalComboboxContainerChangeEventHandler, + type GlobalComboboxContainerChangedEventHandler, +} from "./events.ts" +import { + type ComboboxContainerAttributeMap, +} from "./types.ts" + +declare global { + namespace preact { + namespace JSX { + interface IntrinsicElements { + [ComboboxContainer.tagName]: HTMLAttributes & Partial + } + } + } + + interface Window { + ComboboxContainer: typeof ComboboxContainer + ComboboxContainerChangeEvent: typeof ComboboxContainerChangeEvent + ComboboxContainerChangedEvent: typeof ComboboxContainerChangedEvent + } + + interface HTMLElementTagNameMap { + [ComboboxContainer.tagName]: ComboboxContainer + } + + interface GlobalEventHandlersEventMap { + [ComboboxContainerChangeEvent.type]: ComboboxContainerChangeEvent + [ComboboxContainerChangedEvent.type]: ComboboxContainerChangedEvent + } + + interface GlobalEventHandlers { + [ComboboxContainerChangeEvent.handlerName]: GlobalComboboxContainerChangeEventHandler | null + [ComboboxContainerChangedEvent.handlerName]: GlobalComboboxContainerChangedEventHandler | null + } +} diff --git a/packages/combobox-container-html-element/lib/main.ts b/packages/combobox-container-html-element/lib/main.ts index 9d3d7e914..708544fe3 100644 --- a/packages/combobox-container-html-element/lib/main.ts +++ b/packages/combobox-container-html-element/lib/main.ts @@ -1,5 +1,8 @@ import {define} from "./define.ts" + export * from "./element.ts" export * from "./events.ts" +export * from "./global.ts" +export * from "./types.ts" define() diff --git a/packages/combobox-container-html-element/lib/types.ts b/packages/combobox-container-html-element/lib/types.ts new file mode 100644 index 000000000..3ae403c82 --- /dev/null +++ b/packages/combobox-container-html-element/lib/types.ts @@ -0,0 +1,75 @@ +import { + type ComboboxContainerChangeEvent, + type ComboboxContainerChangeEventListener, + type ComboboxContainerChangedEvent, + type ComboboxContainerChangedEventListener, + type GlobalComboboxContainerChangeEventHandler, + type GlobalComboboxContainerChangedEventHandler, +} from "./events.ts" + +export type ComboboxContainerAttribute = + ComboboxContainerAttributeMap[ComboboxContainerAttributeName] + +export type ComboboxContainerAttributeName = + keyof ComboboxContainerAttributeMap + +export type ComboboxContainerAttributeMap = { + [K in ComboboxContainerPropertyName]: string +} & { + [K in ComboboxContainerEventListenerName]: string +} + +export type ComboboxContainerProperty = + ComboboxContainerPropertyMap[ComboboxContainerPropertyName] + +export type ComboboxContainerPropertyName = + keyof ComboboxContainerPropertyMap + +export interface ComboboxContainerPropertyMap { + "default-index": string + "disabled": string + "name": string + "page-size": string +} + +export type ComboboxContainerFallbackState = + ComboboxContainerFallbackStateMap[ComboboxContainerFallbackStateName] + +export type ComboboxContainerFallbackStateName = + keyof ComboboxContainerFallbackStateMap + +export type ComboboxContainerFallbackStateMap = { + [K in keyof ComboboxContainerStateMap as `state-${string & K}`]: ComboboxContainerStateMap[K] +} + +export type ComboboxContainerState = + ComboboxContainerStateMap[ComboboxContainerStateName] + +export type ComboboxContainerStateName = + keyof ComboboxContainerStateMap + +export interface ComboboxContainerStateMap { + selected: boolean +} + +export type ComboboxContainerEventListener = + ComboboxContainerEventListenerMap[ComboboxContainerEventListenerName] + +export type ComboboxContainerEventListenerName = + keyof ComboboxContainerEventListenerMap + +export interface ComboboxContainerEventListenerMap { + [ComboboxContainerChangeEvent.handlerName]: ComboboxContainerChangeEventListener + [ComboboxContainerChangedEvent.handlerName]: ComboboxContainerChangedEventListener +} + +export type GlobalComboboxContainerEventHandler = + GlobalComboboxContainerEventHandlerMap[GlobalComboboxContainerEventHandlerName] + +export type GlobalComboboxContainerEventHandlerName = + keyof GlobalComboboxContainerEventHandlerMap + +export interface GlobalComboboxContainerEventHandlerMap { + [ComboboxContainerChangeEvent.handlerName]: GlobalComboboxContainerChangeEventHandler + [ComboboxContainerChangedEvent.handlerName]: GlobalComboboxContainerChangedEventHandler +} diff --git a/packages/combobox-container-html-element/package.json b/packages/combobox-container-html-element/package.json index def583152..83821b6ae 100644 --- a/packages/combobox-container-html-element/package.json +++ b/packages/combobox-container-html-element/package.json @@ -2,21 +2,24 @@ "name": "@onlyoffice/combobox-container-html-element", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf node_modules", - "demo": "wds . --watch", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "serve": "tsx node_modules/@web/dev-server/dist/bin.js --config wds.config.ts .", + "test:types": "tsc --noEmit", "test": "pnpm test:types" }, + "peerDependencies": { + "preact": "^10.0.0" + }, "dependencies": { - "typescript": "5.4.5" + "@types/web": "0.0.187" }, "devDependencies": { "@web/dev-server": "0.4.4", "@web/dev-server-esbuild": "1.0.2", - "esbuild": "0.23.0", "preact": "10.22.0", - "rimraf": "6.0.1" + "tsx": "4.16.5", + "typescript": "5.7.2" } } diff --git a/packages/combobox-container-html-element/tsconfig.build.json b/packages/combobox-container-html-element/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/combobox-container-html-element/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/combobox-container-html-element/tsconfig.json b/packages/combobox-container-html-element/tsconfig.json index 6f393c4e4..9536a0f41 100644 --- a/packages/combobox-container-html-element/tsconfig.json +++ b/packages/combobox-container-html-element/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib", "index.d.ts", "web-dev-server.config.mjs"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/combobox-container-html-element/wds.config.ts b/packages/combobox-container-html-element/wds.config.ts new file mode 100644 index 000000000..2f1e37805 --- /dev/null +++ b/packages/combobox-container-html-element/wds.config.ts @@ -0,0 +1,10 @@ +import {type DevServerConfig} from "@web/dev-server" +import {esbuildPlugin} from "@web/dev-server-esbuild" + +const config: DevServerConfig = { + nodeResolve: true, + plugins: [esbuildPlugin({ts: true})], + watch: true, +} + +export default config diff --git a/packages/combobox-container-html-element/web-dev-server.config.mjs b/packages/combobox-container-html-element/web-dev-server.config.mjs deleted file mode 100644 index 929d01ed7..000000000 --- a/packages/combobox-container-html-element/web-dev-server.config.mjs +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @typedef {import("@web/dev-server").DevServerConfig} DevServerConfig - */ - -import {esbuildPlugin} from "@web/dev-server-esbuild" - -export default config() - -/** - * @returns {DevServerConfig} - */ -function config() { - return { - nodeResolve: true, - plugins: [esbuildPlugin({ts: true})], - watch: true, - } -} diff --git a/packages/command/package.json b/packages/command/package.json index 386013c7d..5d85ded1d 100644 --- a/packages/command/package.json +++ b/packages/command/package.json @@ -2,22 +2,21 @@ "name": "@onlyoffice/command", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf coverage node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, "dependencies": { - "@types/node": "20.12.12", - "typescript": "5.4.5" + "@types/node": "20.12.12" }, "devDependencies": { "@onlyoffice/stream-string": "workspace:^", "c8": "9.1.0", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/command/tsconfig.build.json b/packages/command/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/command/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/command/tsconfig.json b/packages/command/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/command/tsconfig.json +++ b/packages/command/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/community-server-hosted-solutions-resource/package.json b/packages/community-server-hosted-solutions-resource/package.json index b5824afcc..d627a3608 100644 --- a/packages/community-server-hosted-solutions-resource/package.json +++ b/packages/community-server-hosted-solutions-resource/package.json @@ -6,20 +6,18 @@ "./*": "./dist/*" }, "scripts": { - "clean": "rimraf dist node_modules", "build": "tsx lib/main.ts", - "test:types": "tsc", + "test:types": "tsc --noEmit", "test": "pnpm test:types" }, "dependencies": { "@onlyoffice/service-declaration": "workspace:^", - "@types/node": "20.12.12", - "typescript": "5.4.5" + "@types/node": "20.12.12" }, "devDependencies": { "@onlyoffice/console": "workspace:^", "@onlyoffice/openapi-resource": "workspace:^", - "rimraf": "6.0.1", - "tsx": "4.16.5" + "tsx": "4.16.5", + "typescript": "5.7.2" } } diff --git a/packages/community-server-hosted-solutions-resource/tsconfig.json b/packages/community-server-hosted-solutions-resource/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/community-server-hosted-solutions-resource/tsconfig.json +++ b/packages/community-server-hosted-solutions-resource/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/community-server-resource/package.json b/packages/community-server-resource/package.json index e32685924..d2a781cdf 100644 --- a/packages/community-server-resource/package.json +++ b/packages/community-server-resource/package.json @@ -6,20 +6,18 @@ "./*": "./dist/*" }, "scripts": { - "clean": "rimraf dist node_modules", "build": "tsx lib/main.ts", - "test:types": "tsc", + "test:types": "tsc --noEmit", "test": "pnpm test:types" }, "dependencies": { "@onlyoffice/service-declaration": "workspace:^", - "@types/node": "20.12.12", - "typescript": "5.4.5" + "@types/node": "20.12.12" }, "devDependencies": { "@onlyoffice/console": "workspace:^", "@onlyoffice/openapi-resource": "workspace:^", - "rimraf": "6.0.1", - "tsx": "4.16.5" + "tsx": "4.16.5", + "typescript": "5.7.2" } } diff --git a/packages/community-server-resource/tsconfig.json b/packages/community-server-resource/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/community-server-resource/tsconfig.json +++ b/packages/community-server-resource/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/console/package.json b/packages/console/package.json index b646b9a8c..50c0ecd54 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -2,23 +2,22 @@ "name": "@onlyoffice/console", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf coverage node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, "dependencies": { "@types/node": "20.12.12", - "kleur": "4.1.5", - "typescript": "5.4.5" + "kleur": "4.1.5" }, "devDependencies": { "@onlyoffice/stream-string": "workspace:^", "c8": "9.1.0", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/console/tsconfig.build.json b/packages/console/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/console/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/console/tsconfig.json b/packages/console/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/console/tsconfig.json +++ b/packages/console/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/css-calc/package.json b/packages/css-calc/package.json index f83ff4fda..d86a71ed0 100644 --- a/packages/css-calc/package.json +++ b/packages/css-calc/package.json @@ -2,20 +2,17 @@ "name": "@onlyoffice/css-calc", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf coverage node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, - "dependencies": { - "typescript": "5.4.5" - }, "devDependencies": { "c8": "9.1.0", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/css-calc/tsconfig.build.json b/packages/css-calc/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/css-calc/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/css-calc/tsconfig.json b/packages/css-calc/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/css-calc/tsconfig.json +++ b/packages/css-calc/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/declaration-code-example/package.json b/packages/declaration-code-example/package.json index cd42eb827..f2bbf7005 100644 --- a/packages/declaration-code-example/package.json +++ b/packages/declaration-code-example/package.json @@ -2,20 +2,17 @@ "name": "@onlyoffice/declaration-code-example", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf coverage node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, - "dependencies": { - "typescript": "5.4.5" - }, "devDependencies": { "c8": "9.1.0", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/declaration-code-example/tsconfig.build.json b/packages/declaration-code-example/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/declaration-code-example/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/declaration-code-example/tsconfig.json b/packages/declaration-code-example/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/declaration-code-example/tsconfig.json +++ b/packages/declaration-code-example/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/declaration-reference/package.json b/packages/declaration-reference/package.json index 05926a80d..d665814d9 100644 --- a/packages/declaration-reference/package.json +++ b/packages/declaration-reference/package.json @@ -2,20 +2,17 @@ "name": "@onlyoffice/declaration-reference", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf coverage node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, - "dependencies": { - "typescript": "5.4.5" - }, "devDependencies": { "c8": "9.1.0", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/declaration-reference/tsconfig.build.json b/packages/declaration-reference/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/declaration-reference/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/declaration-reference/tsconfig.json b/packages/declaration-reference/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/declaration-reference/tsconfig.json +++ b/packages/declaration-reference/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/docspace-plugin-sdk-resource/config.ts b/packages/docspace-plugin-sdk-resource/config.ts deleted file mode 100644 index 5accdc920..000000000 --- a/packages/docspace-plugin-sdk-resource/config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {type Config} from "@onlyoffice/typedoc-resource" - -export const config: Config = [ - { - name: "main", - source: { - owner: "onlyoffice", - repo: "docspace-plugin-sdk-declarations", - reference: "develop", - path: "docspace-plugin-sdk.json", - }, - }, -] diff --git a/packages/docspace-plugin-sdk-resource/config.yml b/packages/docspace-plugin-sdk-resource/config.yml new file mode 100644 index 000000000..6a108d0c7 --- /dev/null +++ b/packages/docspace-plugin-sdk-resource/config.yml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=node_modules/@onlyoffice/typedoc-resource/lib/config.json + +- name: main + source: + owner: onlyoffice + repo: docspace-plugin-sdk-declarations + reference: develop + path: docspace-plugin-sdk.json diff --git a/packages/docspace-plugin-sdk-resource/package.json b/packages/docspace-plugin-sdk-resource/package.json index 3bfbfaa74..5b24020b6 100644 --- a/packages/docspace-plugin-sdk-resource/package.json +++ b/packages/docspace-plugin-sdk-resource/package.json @@ -2,16 +2,14 @@ "name": "@onlyoffice/docspace-plugin-sdk-resource", "type": "module", "private": true, - "main": "dist/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf dist node_modules", "build": "typedoc-resource typedoc" }, "dependencies": { "@onlyoffice/library-declaration": "workspace:^" }, "devDependencies": { - "@onlyoffice/typedoc-resource": "workspace:^", - "rimraf": "6.0.1" + "@onlyoffice/typedoc-resource": "workspace:^" } } diff --git a/packages/docspace-resource/package.json b/packages/docspace-resource/package.json index 58db3362f..647ea80db 100644 --- a/packages/docspace-resource/package.json +++ b/packages/docspace-resource/package.json @@ -6,20 +6,18 @@ "./*": "./dist/*" }, "scripts": { - "clean": "rimraf dist node_modules", "build": "tsx lib/main.ts", - "test:types": "tsc", + "test:types": "tsc --noEmit", "test": "pnpm test:types" }, "dependencies": { "@onlyoffice/service-declaration": "workspace:^", - "@types/node": "20.12.12", - "typescript": "5.4.5" + "@types/node": "20.12.12" }, "devDependencies": { "@onlyoffice/console": "workspace:^", "@onlyoffice/openapi-resource": "workspace:^", - "rimraf": "6.0.1", - "tsx": "4.16.5" + "tsx": "4.16.5", + "typescript": "5.7.2" } } diff --git a/packages/docspace-resource/tsconfig.json b/packages/docspace-resource/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/docspace-resource/tsconfig.json +++ b/packages/docspace-resource/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/docspace-sdk-js-resource/config.ts b/packages/docspace-sdk-js-resource/config.ts deleted file mode 100644 index b884a0ca5..000000000 --- a/packages/docspace-sdk-js-resource/config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {type Config} from "@onlyoffice/typedoc-resource" - -export const config: Config = [ - { - name: "main", - source: { - owner: "onlyoffice", - repo: "docspace-sdk-js-declarations", - reference: "develop", - path: "docspace-sdk-js.json", - }, - }, -] diff --git a/packages/docspace-sdk-js-resource/config.yml b/packages/docspace-sdk-js-resource/config.yml new file mode 100644 index 000000000..9a06dbdab --- /dev/null +++ b/packages/docspace-sdk-js-resource/config.yml @@ -0,0 +1,8 @@ +# yaml-language-server: $schema=node_modules/@onlyoffice/typedoc-resource/lib/config.json + +- name: main + source: + owner: onlyoffice + repo: docspace-sdk-js-declarations + reference: develop + path: docspace-sdk-js.json diff --git a/packages/docspace-sdk-js-resource/package.json b/packages/docspace-sdk-js-resource/package.json index 00c877dbb..494ee2bf7 100644 --- a/packages/docspace-sdk-js-resource/package.json +++ b/packages/docspace-sdk-js-resource/package.json @@ -2,16 +2,14 @@ "name": "@onlyoffice/docspace-sdk-js-resource", "type": "module", "private": true, - "main": "dist/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf dist node_modules", "build": "typedoc-resource typedoc" }, "dependencies": { "@onlyoffice/library-declaration": "workspace:^" }, "devDependencies": { - "@onlyoffice/typedoc-resource": "workspace:^", - "rimraf": "6.0.1" + "@onlyoffice/typedoc-resource": "workspace:^" } } diff --git a/packages/document-builder-hast-element/package.json b/packages/document-builder-hast-element/package.json index 41d0f9042..94f0a460d 100644 --- a/packages/document-builder-hast-element/package.json +++ b/packages/document-builder-hast-element/package.json @@ -2,25 +2,24 @@ "name": "@onlyoffice/document-builder-hast-element", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test:unit": "c8 --config ../../c8.config.json tsx node_modules/uvu/bin.js lib ^.*\\.test\\.ts$", "test": "pnpm test:types && pnpm test:unit" }, "dependencies": { "@onlyoffice/document-builder-html-element": "workspace:^", - "@onlyoffice/document-editor-hast-element": "workspace:^", - "typescript": "5.4.5" + "@onlyoffice/document-editor-hast-element": "workspace:^" }, "devDependencies": { "@onlyoffice/document-editor-html-element": "workspace:^", "@types/hast": "3.0.4", "c8": "9.1.0", "hast-util-to-html": "9.0.1", - "rimraf": "6.0.1", "tsx": "4.16.5", + "typescript": "5.7.2", "uvu": "0.5.6" } } diff --git a/packages/document-builder-hast-element/tsconfig.build.json b/packages/document-builder-hast-element/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/document-builder-hast-element/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/document-builder-hast-element/tsconfig.json b/packages/document-builder-hast-element/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/document-builder-hast-element/tsconfig.json +++ b/packages/document-builder-hast-element/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/document-builder-html-element/lib/element.ts b/packages/document-builder-html-element/lib/element.ts index 41f4cd9f1..1daece866 100644 --- a/packages/document-builder-html-element/lib/element.ts +++ b/packages/document-builder-html-element/lib/element.ts @@ -1,10 +1,10 @@ -import {DocumentEditor, type DocumentEditorAttributes} from "@onlyoffice/document-editor-html-element" +import {DocumentEditor, type DocumentEditorAttributeMap} from "@onlyoffice/document-editor-html-element" import {type DocEditorConnector} from "@onlyoffice/document-server-types" import {DocumentBuilderErrorEvent, DocumentBuilderReadyEvent} from "./events.ts" export type DocumentBuilderAttribute = Exclude -export interface DocumentBuilderAttributes extends DocumentEditorAttributes { +export interface DocumentBuilderAttributes extends DocumentEditorAttributeMap { command?: string } @@ -13,7 +13,7 @@ interface DocumentBuilderCommandListener extends EventListener { } // @ts-ignore TS2417 -// Since `DocumentBuilderAttribute` is a subset of `DocumentEditorAttributes` +// Since `DocumentBuilderAttribute` is a subset of `DocumentEditorAttributeMap` // the TypeScript error is not a cause for concern. export class DocumentBuilder extends DocumentEditor { static get tagName(): string { diff --git a/packages/document-builder-html-element/package.json b/packages/document-builder-html-element/package.json index 1d97d80b7..c908105a7 100644 --- a/packages/document-builder-html-element/package.json +++ b/packages/document-builder-html-element/package.json @@ -2,19 +2,22 @@ "name": "@onlyoffice/document-builder-html-element", "type": "module", "private": true, - "main": "lib/main.ts", + "main": "dist/main.js", "scripts": { - "clean": "rimraf node_modules", - "test:types": "tsc", + "build": "tsc --project tsconfig.build.json", + "test:types": "tsc --noEmit", "test": "pnpm test:types" }, + "peerDependencies": { + "preact": "^10.0.0" + }, "dependencies": { "@onlyoffice/document-editor-html-element": "workspace:^", "@onlyoffice/document-server-types": "workspace:^", - "typescript": "5.4.5" + "@types/web": "0.0.187" }, "devDependencies": { "preact": "10.22.0", - "rimraf": "6.0.1" + "typescript": "5.7.2" } } diff --git a/packages/document-builder-html-element/tsconfig.build.json b/packages/document-builder-html-element/tsconfig.build.json new file mode 100644 index 000000000..77cad4f9b --- /dev/null +++ b/packages/document-builder-html-element/tsconfig.build.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.build.json" +} diff --git a/packages/document-builder-html-element/tsconfig.json b/packages/document-builder-html-element/tsconfig.json index 02f06a977..9536a0f41 100644 --- a/packages/document-builder-html-element/tsconfig.json +++ b/packages/document-builder-html-element/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib", "index.d.ts"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/document-builder-resource/package.json b/packages/document-builder-resource/package.json index adbc65ad6..7c761697c 100644 --- a/packages/document-builder-resource/package.json +++ b/packages/document-builder-resource/package.json @@ -6,15 +6,13 @@ "./*": "./dist/*" }, "scripts": { - "clean": "rimraf dist node_modules", "build": "tsx lib/main.ts", - "test:types": "tsc", + "test:types": "tsc --noEmit", "test": "pnpm test:types" }, "dependencies": { "@onlyoffice/library-declaration": "workspace:^", - "@types/node": "20.12.12", - "typescript": "5.4.5" + "@types/node": "20.12.12" }, "devDependencies": { "@onlyoffice/console": "workspace:^", @@ -25,9 +23,9 @@ "@onlyoffice/stream-string": "workspace:^", "@types/stream-chain": "2.0.4", "@types/stream-json": "1.7.7", - "rimraf": "6.0.1", "stream-chain": "2.2.5", "stream-json": "1.8.0", - "tsx": "4.16.5" + "tsx": "4.16.5", + "typescript": "5.7.2" } } diff --git a/packages/document-builder-resource/tsconfig.json b/packages/document-builder-resource/tsconfig.json index f0d8cf437..9536a0f41 100644 --- a/packages/document-builder-resource/tsconfig.json +++ b/packages/document-builder-resource/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "../../tsconfig.base.json", - "include": ["lib"] + "extends": "../../tsconfig.base.json" } diff --git a/packages/document-builder-types/lib/types.d.ts b/packages/document-builder-types/lib/types.d.ts deleted file mode 100644 index 770858e36..000000000 --- a/packages/document-builder-types/lib/types.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * {@link https://api.onlyoffice.com/docbuilder/framework ONLYOFFICE Reference} - */ -export interface DocumentBuilder { - /** - * {@link https://api.onlyoffice.com/docbuilder/integrationapi/c/cdocbuilder/closefile ONLYOFFICE Reference} - */ - CloseFile(): void - - /** - * {@link https://api.onlyoffice.com/docbuilder/integrationapi/c/cdocbuilder/createfile ONLYOFFICE Reference} - */ - CreateFile(extension: string): void - - /** - * {@link https://api.onlyoffice.com/docbuilder/integrationapi/c/cdocbuilder/savefile ONLYOFFICE Reference} - */ - SaveFile(extension: string, path: string, payload?: string): void -} diff --git a/packages/document-builder-types/package.json b/packages/document-builder-types/package.json deleted file mode 100644 index 27a607ff5..000000000 --- a/packages/document-builder-types/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@onlyoffice/document-builder-types", - "type": "module", - "private": true, - "types": "lib/types.d.ts", - "scripts": { - "clean": "rimraf node_modules", - "test:types": "tsc", - "test": "pnpm test:types" - }, - "dependencies": { - "typescript": "5.4.5" - }, - "devDependencies": { - "rimraf": "6.0.1" - } -} diff --git a/packages/document-builder-types/tsconfig.json b/packages/document-builder-types/tsconfig.json deleted file mode 100644 index f0d8cf437..000000000 --- a/packages/document-builder-types/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "include": ["lib"] -} diff --git a/packages/document-editor-code-sample/lib/main.test.ts b/packages/document-editor-code-sample/lib/main.test.ts index 1d317d7a7..f30e73c5f 100644 --- a/packages/document-editor-code-sample/lib/main.test.ts +++ b/packages/document-editor-code-sample/lib/main.test.ts @@ -93,12 +93,12 @@ it("html(): includes config events", () => {