@frontmcp/ui 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -362
- package/bridge/core/bridge-factory.d.ts +1 -0
- package/bridge/core/bridge-factory.d.ts.map +1 -1
- package/bridge/index.d.ts +1 -1
- package/bridge/index.d.ts.map +1 -1
- package/bridge/index.js +39 -881
- package/bridge/runtime/index.d.ts +2 -1
- package/bridge/runtime/index.d.ts.map +1 -1
- package/bundler/browser-components.d.ts +42 -0
- package/bundler/browser-components.d.ts.map +1 -0
- package/bundler/bundler.d.ts +78 -4
- package/bundler/bundler.d.ts.map +1 -1
- package/bundler/index.d.ts +8 -8
- package/bundler/index.d.ts.map +1 -1
- package/bundler/index.js +1411 -2997
- package/bundler/types.d.ts +188 -7
- package/bundler/types.d.ts.map +1 -1
- package/components/alert.schema.d.ts +6 -6
- package/components/avatar.schema.d.ts +9 -9
- package/components/badge.schema.d.ts +9 -9
- package/components/button.schema.d.ts +9 -9
- package/components/card.schema.d.ts +7 -7
- package/components/form.schema.d.ts +24 -24
- package/components/index.js +128 -198
- package/components/modal.schema.d.ts +8 -8
- package/components/table.schema.d.ts +6 -6
- package/esm/bridge/{index.js → index.mjs} +40 -877
- package/esm/bundler/index.mjs +3136 -0
- package/esm/components/{index.js → index.mjs} +136 -196
- package/esm/index.mjs +5450 -0
- package/esm/layouts/index.mjs +409 -0
- package/esm/package.json +15 -32
- package/esm/react/{index.js → index.mjs} +71 -260
- package/esm/renderers/index.mjs +611 -0
- package/esm/universal/index.mjs +1951 -0
- package/esm/web-components/{index.js → index.mjs} +232 -287
- package/index.d.ts +22 -41
- package/index.d.ts.map +1 -1
- package/index.js +4286 -19607
- package/layouts/base.d.ts +2 -2
- package/layouts/base.d.ts.map +1 -1
- package/layouts/index.js +46 -539
- package/layouts/presets.d.ts.map +1 -1
- package/package.json +15 -32
- package/react/Alert.d.ts +1 -2
- package/react/Alert.d.ts.map +1 -1
- package/react/Badge.d.ts +1 -2
- package/react/Badge.d.ts.map +1 -1
- package/react/Button.d.ts +1 -2
- package/react/Button.d.ts.map +1 -1
- package/react/Card.d.ts +1 -2
- package/react/Card.d.ts.map +1 -1
- package/react/hooks/context.d.ts +1 -1
- package/react/hooks/context.d.ts.map +1 -1
- package/react/index.d.ts +5 -7
- package/react/index.d.ts.map +1 -1
- package/react/index.js +55 -269
- package/react/types.d.ts +1 -2
- package/react/types.d.ts.map +1 -1
- package/renderers/index.d.ts +15 -25
- package/renderers/index.d.ts.map +1 -1
- package/renderers/index.js +393 -1619
- package/renderers/mdx.renderer.d.ts +13 -34
- package/renderers/mdx.renderer.d.ts.map +1 -1
- package/{esm/runtime/adapters → renderers}/react.adapter.d.ts +2 -2
- package/renderers/react.adapter.d.ts.map +1 -0
- package/renderers/react.renderer.d.ts +25 -16
- package/renderers/react.renderer.d.ts.map +1 -1
- package/renderers/transpiler.d.ts +49 -0
- package/renderers/transpiler.d.ts.map +1 -0
- package/universal/cached-runtime.d.ts +25 -1
- package/universal/cached-runtime.d.ts.map +1 -1
- package/universal/index.js +2037 -0
- package/universal/runtime-builder.d.ts.map +1 -1
- package/universal/types.d.ts.map +1 -1
- package/web-components/elements/fmcp-input.d.ts.map +1 -1
- package/web-components/elements/fmcp-select.d.ts.map +1 -1
- package/web-components/index.d.ts +0 -1
- package/web-components/index.d.ts.map +1 -1
- package/web-components/index.js +224 -289
- package/adapters/index.d.ts +0 -13
- package/adapters/index.d.ts.map +0 -1
- package/adapters/index.js +0 -462
- package/adapters/platform-meta.d.ts +0 -166
- package/adapters/platform-meta.d.ts.map +0 -1
- package/adapters/response-builder.d.ts +0 -108
- package/adapters/response-builder.d.ts.map +0 -1
- package/adapters/serving-mode.d.ts +0 -107
- package/adapters/serving-mode.d.ts.map +0 -1
- package/base-template/bridge.d.ts +0 -90
- package/base-template/bridge.d.ts.map +0 -1
- package/base-template/default-base-template.d.ts +0 -92
- package/base-template/default-base-template.d.ts.map +0 -1
- package/base-template/index.d.ts +0 -15
- package/base-template/index.d.ts.map +0 -1
- package/base-template/index.js +0 -1398
- package/base-template/polyfills.d.ts +0 -31
- package/base-template/polyfills.d.ts.map +0 -1
- package/base-template/theme-styles.d.ts +0 -74
- package/base-template/theme-styles.d.ts.map +0 -1
- package/build/cdn-resources.d.ts +0 -243
- package/build/cdn-resources.d.ts.map +0 -1
- package/build/index.d.ts +0 -295
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -7096
- package/build/widget-manifest.d.ts +0 -362
- package/build/widget-manifest.d.ts.map +0 -1
- package/bundler/cache.d.ts +0 -173
- package/bundler/cache.d.ts.map +0 -1
- package/bundler/file-cache/component-builder.d.ts +0 -167
- package/bundler/file-cache/component-builder.d.ts.map +0 -1
- package/bundler/file-cache/hash-calculator.d.ts +0 -155
- package/bundler/file-cache/hash-calculator.d.ts.map +0 -1
- package/bundler/file-cache/index.d.ts +0 -12
- package/bundler/file-cache/index.d.ts.map +0 -1
- package/bundler/file-cache/storage/filesystem.d.ts +0 -149
- package/bundler/file-cache/storage/filesystem.d.ts.map +0 -1
- package/bundler/file-cache/storage/index.d.ts +0 -11
- package/bundler/file-cache/storage/index.d.ts.map +0 -1
- package/bundler/file-cache/storage/interface.d.ts +0 -152
- package/bundler/file-cache/storage/interface.d.ts.map +0 -1
- package/bundler/file-cache/storage/redis.d.ts +0 -139
- package/bundler/file-cache/storage/redis.d.ts.map +0 -1
- package/bundler/sandbox/enclave-adapter.d.ts +0 -121
- package/bundler/sandbox/enclave-adapter.d.ts.map +0 -1
- package/bundler/sandbox/executor.d.ts +0 -14
- package/bundler/sandbox/executor.d.ts.map +0 -1
- package/bundler/sandbox/policy.d.ts +0 -62
- package/bundler/sandbox/policy.d.ts.map +0 -1
- package/dependency/cdn-registry.d.ts +0 -98
- package/dependency/cdn-registry.d.ts.map +0 -1
- package/dependency/import-map.d.ts +0 -186
- package/dependency/import-map.d.ts.map +0 -1
- package/dependency/import-parser.d.ts +0 -82
- package/dependency/import-parser.d.ts.map +0 -1
- package/dependency/index.d.ts +0 -17
- package/dependency/index.d.ts.map +0 -1
- package/dependency/resolver.d.ts +0 -164
- package/dependency/resolver.d.ts.map +0 -1
- package/dependency/schemas.d.ts +0 -486
- package/dependency/schemas.d.ts.map +0 -1
- package/dependency/template-loader.d.ts +0 -204
- package/dependency/template-loader.d.ts.map +0 -1
- package/dependency/template-processor.d.ts +0 -118
- package/dependency/template-processor.d.ts.map +0 -1
- package/dependency/types.d.ts +0 -739
- package/dependency/types.d.ts.map +0 -1
- package/esm/adapters/index.d.ts +0 -13
- package/esm/adapters/index.d.ts.map +0 -1
- package/esm/adapters/index.js +0 -427
- package/esm/adapters/platform-meta.d.ts +0 -166
- package/esm/adapters/platform-meta.d.ts.map +0 -1
- package/esm/adapters/response-builder.d.ts +0 -108
- package/esm/adapters/response-builder.d.ts.map +0 -1
- package/esm/adapters/serving-mode.d.ts +0 -107
- package/esm/adapters/serving-mode.d.ts.map +0 -1
- package/esm/base-template/bridge.d.ts +0 -90
- package/esm/base-template/bridge.d.ts.map +0 -1
- package/esm/base-template/default-base-template.d.ts +0 -92
- package/esm/base-template/default-base-template.d.ts.map +0 -1
- package/esm/base-template/index.d.ts +0 -15
- package/esm/base-template/index.d.ts.map +0 -1
- package/esm/base-template/index.js +0 -1364
- package/esm/base-template/polyfills.d.ts +0 -31
- package/esm/base-template/polyfills.d.ts.map +0 -1
- package/esm/base-template/theme-styles.d.ts +0 -74
- package/esm/base-template/theme-styles.d.ts.map +0 -1
- package/esm/bridge/adapters/base-adapter.d.ts +0 -104
- package/esm/bridge/adapters/base-adapter.d.ts.map +0 -1
- package/esm/bridge/adapters/claude.adapter.d.ts +0 -67
- package/esm/bridge/adapters/claude.adapter.d.ts.map +0 -1
- package/esm/bridge/adapters/ext-apps.adapter.d.ts +0 -143
- package/esm/bridge/adapters/ext-apps.adapter.d.ts.map +0 -1
- package/esm/bridge/adapters/gemini.adapter.d.ts +0 -64
- package/esm/bridge/adapters/gemini.adapter.d.ts.map +0 -1
- package/esm/bridge/adapters/generic.adapter.d.ts +0 -56
- package/esm/bridge/adapters/generic.adapter.d.ts.map +0 -1
- package/esm/bridge/adapters/index.d.ts +0 -26
- package/esm/bridge/adapters/index.d.ts.map +0 -1
- package/esm/bridge/adapters/openai.adapter.d.ts +0 -65
- package/esm/bridge/adapters/openai.adapter.d.ts.map +0 -1
- package/esm/bridge/core/adapter-registry.d.ts +0 -122
- package/esm/bridge/core/adapter-registry.d.ts.map +0 -1
- package/esm/bridge/core/bridge-factory.d.ts +0 -199
- package/esm/bridge/core/bridge-factory.d.ts.map +0 -1
- package/esm/bridge/core/index.d.ts +0 -10
- package/esm/bridge/core/index.d.ts.map +0 -1
- package/esm/bridge/index.d.ts +0 -62
- package/esm/bridge/index.d.ts.map +0 -1
- package/esm/bridge/runtime/iife-generator.d.ts +0 -62
- package/esm/bridge/runtime/iife-generator.d.ts.map +0 -1
- package/esm/bridge/runtime/index.d.ts +0 -9
- package/esm/bridge/runtime/index.d.ts.map +0 -1
- package/esm/bridge/types.d.ts +0 -386
- package/esm/bridge/types.d.ts.map +0 -1
- package/esm/build/cdn-resources.d.ts +0 -243
- package/esm/build/cdn-resources.d.ts.map +0 -1
- package/esm/build/index.d.ts +0 -295
- package/esm/build/index.d.ts.map +0 -1
- package/esm/build/index.js +0 -7021
- package/esm/build/widget-manifest.d.ts +0 -362
- package/esm/build/widget-manifest.d.ts.map +0 -1
- package/esm/bundler/bundler.d.ts +0 -208
- package/esm/bundler/bundler.d.ts.map +0 -1
- package/esm/bundler/cache.d.ts +0 -173
- package/esm/bundler/cache.d.ts.map +0 -1
- package/esm/bundler/file-cache/component-builder.d.ts +0 -167
- package/esm/bundler/file-cache/component-builder.d.ts.map +0 -1
- package/esm/bundler/file-cache/hash-calculator.d.ts +0 -155
- package/esm/bundler/file-cache/hash-calculator.d.ts.map +0 -1
- package/esm/bundler/file-cache/index.d.ts +0 -12
- package/esm/bundler/file-cache/index.d.ts.map +0 -1
- package/esm/bundler/file-cache/storage/filesystem.d.ts +0 -149
- package/esm/bundler/file-cache/storage/filesystem.d.ts.map +0 -1
- package/esm/bundler/file-cache/storage/index.d.ts +0 -11
- package/esm/bundler/file-cache/storage/index.d.ts.map +0 -1
- package/esm/bundler/file-cache/storage/interface.d.ts +0 -152
- package/esm/bundler/file-cache/storage/interface.d.ts.map +0 -1
- package/esm/bundler/file-cache/storage/redis.d.ts +0 -139
- package/esm/bundler/file-cache/storage/redis.d.ts.map +0 -1
- package/esm/bundler/index.d.ts +0 -43
- package/esm/bundler/index.d.ts.map +0 -1
- package/esm/bundler/index.js +0 -4687
- package/esm/bundler/sandbox/enclave-adapter.d.ts +0 -121
- package/esm/bundler/sandbox/enclave-adapter.d.ts.map +0 -1
- package/esm/bundler/sandbox/executor.d.ts +0 -14
- package/esm/bundler/sandbox/executor.d.ts.map +0 -1
- package/esm/bundler/sandbox/policy.d.ts +0 -62
- package/esm/bundler/sandbox/policy.d.ts.map +0 -1
- package/esm/bundler/types.d.ts +0 -702
- package/esm/bundler/types.d.ts.map +0 -1
- package/esm/components/alert.d.ts +0 -66
- package/esm/components/alert.d.ts.map +0 -1
- package/esm/components/alert.schema.d.ts +0 -98
- package/esm/components/alert.schema.d.ts.map +0 -1
- package/esm/components/avatar.d.ts +0 -77
- package/esm/components/avatar.d.ts.map +0 -1
- package/esm/components/avatar.schema.d.ts +0 -170
- package/esm/components/avatar.schema.d.ts.map +0 -1
- package/esm/components/badge.d.ts +0 -64
- package/esm/components/badge.d.ts.map +0 -1
- package/esm/components/badge.schema.d.ts +0 -91
- package/esm/components/badge.schema.d.ts.map +0 -1
- package/esm/components/button.d.ts +0 -100
- package/esm/components/button.d.ts.map +0 -1
- package/esm/components/button.schema.d.ts +0 -120
- package/esm/components/button.schema.d.ts.map +0 -1
- package/esm/components/card.d.ts +0 -53
- package/esm/components/card.d.ts.map +0 -1
- package/esm/components/card.schema.d.ts +0 -93
- package/esm/components/card.schema.d.ts.map +0 -1
- package/esm/components/form.d.ts +0 -212
- package/esm/components/form.d.ts.map +0 -1
- package/esm/components/form.schema.d.ts +0 -365
- package/esm/components/form.schema.d.ts.map +0 -1
- package/esm/components/index.d.ts +0 -29
- package/esm/components/index.d.ts.map +0 -1
- package/esm/components/list.d.ts +0 -121
- package/esm/components/list.d.ts.map +0 -1
- package/esm/components/list.schema.d.ts +0 -129
- package/esm/components/list.schema.d.ts.map +0 -1
- package/esm/components/modal.d.ts +0 -100
- package/esm/components/modal.d.ts.map +0 -1
- package/esm/components/modal.schema.d.ts +0 -151
- package/esm/components/modal.schema.d.ts.map +0 -1
- package/esm/components/table.d.ts +0 -91
- package/esm/components/table.d.ts.map +0 -1
- package/esm/components/table.schema.d.ts +0 -123
- package/esm/components/table.schema.d.ts.map +0 -1
- package/esm/dependency/cdn-registry.d.ts +0 -98
- package/esm/dependency/cdn-registry.d.ts.map +0 -1
- package/esm/dependency/import-map.d.ts +0 -186
- package/esm/dependency/import-map.d.ts.map +0 -1
- package/esm/dependency/import-parser.d.ts +0 -82
- package/esm/dependency/import-parser.d.ts.map +0 -1
- package/esm/dependency/index.d.ts +0 -17
- package/esm/dependency/index.d.ts.map +0 -1
- package/esm/dependency/resolver.d.ts +0 -164
- package/esm/dependency/resolver.d.ts.map +0 -1
- package/esm/dependency/schemas.d.ts +0 -486
- package/esm/dependency/schemas.d.ts.map +0 -1
- package/esm/dependency/template-loader.d.ts +0 -204
- package/esm/dependency/template-loader.d.ts.map +0 -1
- package/esm/dependency/template-processor.d.ts +0 -118
- package/esm/dependency/template-processor.d.ts.map +0 -1
- package/esm/dependency/types.d.ts +0 -739
- package/esm/dependency/types.d.ts.map +0 -1
- package/esm/handlebars/expression-extractor.d.ts +0 -147
- package/esm/handlebars/expression-extractor.d.ts.map +0 -1
- package/esm/handlebars/helpers.d.ts +0 -339
- package/esm/handlebars/helpers.d.ts.map +0 -1
- package/esm/handlebars/index.d.ts +0 -195
- package/esm/handlebars/index.d.ts.map +0 -1
- package/esm/handlebars/index.js +0 -587
- package/esm/index.d.ts +0 -56
- package/esm/index.d.ts.map +0 -1
- package/esm/index.js +0 -20511
- package/esm/layouts/base.d.ts +0 -86
- package/esm/layouts/base.d.ts.map +0 -1
- package/esm/layouts/index.d.ts +0 -8
- package/esm/layouts/index.d.ts.map +0 -1
- package/esm/layouts/index.js +0 -892
- package/esm/layouts/presets.d.ts +0 -134
- package/esm/layouts/presets.d.ts.map +0 -1
- package/esm/pages/consent.d.ts +0 -117
- package/esm/pages/consent.d.ts.map +0 -1
- package/esm/pages/error.d.ts +0 -101
- package/esm/pages/error.d.ts.map +0 -1
- package/esm/pages/index.d.ts +0 -9
- package/esm/pages/index.d.ts.map +0 -1
- package/esm/pages/index.js +0 -1563
- package/esm/react/Alert.d.ts +0 -102
- package/esm/react/Alert.d.ts.map +0 -1
- package/esm/react/Badge.d.ts +0 -101
- package/esm/react/Badge.d.ts.map +0 -1
- package/esm/react/Button.d.ts +0 -109
- package/esm/react/Button.d.ts.map +0 -1
- package/esm/react/Card.d.ts +0 -104
- package/esm/react/Card.d.ts.map +0 -1
- package/esm/react/hooks/context.d.ts +0 -179
- package/esm/react/hooks/context.d.ts.map +0 -1
- package/esm/react/hooks/index.d.ts +0 -42
- package/esm/react/hooks/index.d.ts.map +0 -1
- package/esm/react/hooks/tools.d.ts +0 -284
- package/esm/react/hooks/tools.d.ts.map +0 -1
- package/esm/react/index.d.ts +0 -81
- package/esm/react/index.d.ts.map +0 -1
- package/esm/react/types.d.ts +0 -106
- package/esm/react/types.d.ts.map +0 -1
- package/esm/react/utils.d.ts +0 -43
- package/esm/react/utils.d.ts.map +0 -1
- package/esm/registry/index.d.ts +0 -46
- package/esm/registry/index.d.ts.map +0 -1
- package/esm/registry/index.js +0 -6422
- package/esm/registry/render-template.d.ts +0 -91
- package/esm/registry/render-template.d.ts.map +0 -1
- package/esm/registry/tool-ui.registry.d.ts +0 -294
- package/esm/registry/tool-ui.registry.d.ts.map +0 -1
- package/esm/registry/uri-utils.d.ts +0 -56
- package/esm/registry/uri-utils.d.ts.map +0 -1
- package/esm/render/index.d.ts +0 -8
- package/esm/render/index.d.ts.map +0 -1
- package/esm/render/prerender.d.ts +0 -57
- package/esm/render/prerender.d.ts.map +0 -1
- package/esm/renderers/cache.d.ts +0 -145
- package/esm/renderers/cache.d.ts.map +0 -1
- package/esm/renderers/html.renderer.d.ts +0 -123
- package/esm/renderers/html.renderer.d.ts.map +0 -1
- package/esm/renderers/index.d.ts +0 -36
- package/esm/renderers/index.d.ts.map +0 -1
- package/esm/renderers/index.js +0 -1827
- package/esm/renderers/mdx.renderer.d.ts +0 -120
- package/esm/renderers/mdx.renderer.d.ts.map +0 -1
- package/esm/renderers/react.renderer.d.ts +0 -96
- package/esm/renderers/react.renderer.d.ts.map +0 -1
- package/esm/renderers/registry.d.ts +0 -134
- package/esm/renderers/registry.d.ts.map +0 -1
- package/esm/renderers/types.d.ts +0 -342
- package/esm/renderers/types.d.ts.map +0 -1
- package/esm/renderers/utils/detect.d.ts +0 -107
- package/esm/renderers/utils/detect.d.ts.map +0 -1
- package/esm/renderers/utils/hash.d.ts +0 -40
- package/esm/renderers/utils/hash.d.ts.map +0 -1
- package/esm/renderers/utils/index.d.ts +0 -9
- package/esm/renderers/utils/index.d.ts.map +0 -1
- package/esm/renderers/utils/transpiler.d.ts +0 -89
- package/esm/renderers/utils/transpiler.d.ts.map +0 -1
- package/esm/runtime/adapters/html.adapter.d.ts +0 -59
- package/esm/runtime/adapters/html.adapter.d.ts.map +0 -1
- package/esm/runtime/adapters/index.d.ts +0 -26
- package/esm/runtime/adapters/index.d.ts.map +0 -1
- package/esm/runtime/adapters/mdx.adapter.d.ts +0 -73
- package/esm/runtime/adapters/mdx.adapter.d.ts.map +0 -1
- package/esm/runtime/adapters/react.adapter.d.ts.map +0 -1
- package/esm/runtime/adapters/types.d.ts +0 -95
- package/esm/runtime/adapters/types.d.ts.map +0 -1
- package/esm/runtime/csp.d.ts +0 -48
- package/esm/runtime/csp.d.ts.map +0 -1
- package/esm/runtime/index.d.ts +0 -17
- package/esm/runtime/index.d.ts.map +0 -1
- package/esm/runtime/index.js +0 -5186
- package/esm/runtime/mcp-bridge.d.ts +0 -101
- package/esm/runtime/mcp-bridge.d.ts.map +0 -1
- package/esm/runtime/renderer-runtime.d.ts +0 -133
- package/esm/runtime/renderer-runtime.d.ts.map +0 -1
- package/esm/runtime/sanitizer.d.ts +0 -172
- package/esm/runtime/sanitizer.d.ts.map +0 -1
- package/esm/runtime/types.d.ts +0 -415
- package/esm/runtime/types.d.ts.map +0 -1
- package/esm/runtime/wrapper.d.ts +0 -421
- package/esm/runtime/wrapper.d.ts.map +0 -1
- package/esm/styles/index.d.ts +0 -8
- package/esm/styles/index.d.ts.map +0 -1
- package/esm/styles/index.js +0 -171
- package/esm/styles/variants.d.ts +0 -51
- package/esm/styles/variants.d.ts.map +0 -1
- package/esm/theme/cdn.d.ts +0 -195
- package/esm/theme/cdn.d.ts.map +0 -1
- package/esm/theme/index.d.ts +0 -18
- package/esm/theme/index.d.ts.map +0 -1
- package/esm/theme/index.js +0 -700
- package/esm/theme/platforms.d.ts +0 -107
- package/esm/theme/platforms.d.ts.map +0 -1
- package/esm/theme/presets/github-openai.d.ts +0 -50
- package/esm/theme/presets/github-openai.d.ts.map +0 -1
- package/esm/theme/presets/index.d.ts +0 -11
- package/esm/theme/presets/index.d.ts.map +0 -1
- package/esm/theme/theme.d.ts +0 -396
- package/esm/theme/theme.d.ts.map +0 -1
- package/esm/tool-template/builder.d.ts +0 -213
- package/esm/tool-template/builder.d.ts.map +0 -1
- package/esm/tool-template/index.d.ts +0 -16
- package/esm/tool-template/index.d.ts.map +0 -1
- package/esm/tool-template/index.js +0 -3515
- package/esm/types/index.d.ts +0 -14
- package/esm/types/index.d.ts.map +0 -1
- package/esm/types/index.js +0 -75
- package/esm/types/ui-config.d.ts +0 -639
- package/esm/types/ui-config.d.ts.map +0 -1
- package/esm/types/ui-runtime.d.ts +0 -1007
- package/esm/types/ui-runtime.d.ts.map +0 -1
- package/esm/typings/cache/cache-adapter.d.ts +0 -125
- package/esm/typings/cache/cache-adapter.d.ts.map +0 -1
- package/esm/typings/cache/index.d.ts +0 -10
- package/esm/typings/cache/index.d.ts.map +0 -1
- package/esm/typings/cache/memory-cache.d.ts +0 -92
- package/esm/typings/cache/memory-cache.d.ts.map +0 -1
- package/esm/typings/dts-parser.d.ts +0 -90
- package/esm/typings/dts-parser.d.ts.map +0 -1
- package/esm/typings/index.d.ts +0 -48
- package/esm/typings/index.d.ts.map +0 -1
- package/esm/typings/schemas.d.ts +0 -232
- package/esm/typings/schemas.d.ts.map +0 -1
- package/esm/typings/type-fetcher.d.ts +0 -89
- package/esm/typings/type-fetcher.d.ts.map +0 -1
- package/esm/typings/types.d.ts +0 -320
- package/esm/typings/types.d.ts.map +0 -1
- package/esm/universal/UniversalApp.d.ts +0 -108
- package/esm/universal/UniversalApp.d.ts.map +0 -1
- package/esm/universal/cached-runtime.d.ts +0 -115
- package/esm/universal/cached-runtime.d.ts.map +0 -1
- package/esm/universal/context.d.ts +0 -122
- package/esm/universal/context.d.ts.map +0 -1
- package/esm/universal/index.d.ts +0 -57
- package/esm/universal/index.d.ts.map +0 -1
- package/esm/universal/renderers/html.renderer.d.ts +0 -37
- package/esm/universal/renderers/html.renderer.d.ts.map +0 -1
- package/esm/universal/renderers/index.d.ts +0 -112
- package/esm/universal/renderers/index.d.ts.map +0 -1
- package/esm/universal/renderers/markdown.renderer.d.ts +0 -33
- package/esm/universal/renderers/markdown.renderer.d.ts.map +0 -1
- package/esm/universal/renderers/mdx.renderer.d.ts +0 -38
- package/esm/universal/renderers/mdx.renderer.d.ts.map +0 -1
- package/esm/universal/renderers/react.renderer.d.ts +0 -46
- package/esm/universal/renderers/react.renderer.d.ts.map +0 -1
- package/esm/universal/runtime-builder.d.ts +0 -33
- package/esm/universal/runtime-builder.d.ts.map +0 -1
- package/esm/universal/store.d.ts +0 -135
- package/esm/universal/store.d.ts.map +0 -1
- package/esm/universal/types.d.ts +0 -199
- package/esm/universal/types.d.ts.map +0 -1
- package/esm/utils/escape-html.d.ts +0 -58
- package/esm/utils/escape-html.d.ts.map +0 -1
- package/esm/utils/index.d.ts +0 -10
- package/esm/utils/index.d.ts.map +0 -1
- package/esm/utils/index.js +0 -40
- package/esm/utils/safe-stringify.d.ts +0 -30
- package/esm/utils/safe-stringify.d.ts.map +0 -1
- package/esm/validation/error-box.d.ts +0 -56
- package/esm/validation/error-box.d.ts.map +0 -1
- package/esm/validation/index.d.ts +0 -13
- package/esm/validation/index.d.ts.map +0 -1
- package/esm/validation/index.js +0 -562
- package/esm/validation/schema-paths.d.ts +0 -118
- package/esm/validation/schema-paths.d.ts.map +0 -1
- package/esm/validation/template-validator.d.ts +0 -143
- package/esm/validation/template-validator.d.ts.map +0 -1
- package/esm/validation/wrapper.d.ts +0 -97
- package/esm/validation/wrapper.d.ts.map +0 -1
- package/esm/web-components/core/attribute-parser.d.ts +0 -82
- package/esm/web-components/core/attribute-parser.d.ts.map +0 -1
- package/esm/web-components/core/base-element.d.ts +0 -197
- package/esm/web-components/core/base-element.d.ts.map +0 -1
- package/esm/web-components/core/index.d.ts +0 -9
- package/esm/web-components/core/index.d.ts.map +0 -1
- package/esm/web-components/elements/fmcp-alert.d.ts +0 -46
- package/esm/web-components/elements/fmcp-alert.d.ts.map +0 -1
- package/esm/web-components/elements/fmcp-badge.d.ts +0 -47
- package/esm/web-components/elements/fmcp-badge.d.ts.map +0 -1
- package/esm/web-components/elements/fmcp-button.d.ts +0 -117
- package/esm/web-components/elements/fmcp-button.d.ts.map +0 -1
- package/esm/web-components/elements/fmcp-card.d.ts +0 -53
- package/esm/web-components/elements/fmcp-card.d.ts.map +0 -1
- package/esm/web-components/elements/fmcp-input.d.ts +0 -96
- package/esm/web-components/elements/fmcp-input.d.ts.map +0 -1
- package/esm/web-components/elements/fmcp-select.d.ts +0 -100
- package/esm/web-components/elements/fmcp-select.d.ts.map +0 -1
- package/esm/web-components/elements/index.d.ts +0 -13
- package/esm/web-components/elements/index.d.ts.map +0 -1
- package/esm/web-components/index.d.ts +0 -50
- package/esm/web-components/index.d.ts.map +0 -1
- package/esm/web-components/register.d.ts +0 -57
- package/esm/web-components/register.d.ts.map +0 -1
- package/esm/web-components/types.d.ts +0 -122
- package/esm/web-components/types.d.ts.map +0 -1
- package/esm/widgets/index.d.ts +0 -8
- package/esm/widgets/index.d.ts.map +0 -1
- package/esm/widgets/index.js +0 -941
- package/esm/widgets/progress.d.ts +0 -133
- package/esm/widgets/progress.d.ts.map +0 -1
- package/esm/widgets/resource.d.ts +0 -163
- package/esm/widgets/resource.d.ts.map +0 -1
- package/handlebars/expression-extractor.d.ts +0 -147
- package/handlebars/expression-extractor.d.ts.map +0 -1
- package/handlebars/helpers.d.ts +0 -339
- package/handlebars/helpers.d.ts.map +0 -1
- package/handlebars/index.d.ts +0 -195
- package/handlebars/index.d.ts.map +0 -1
- package/handlebars/index.js +0 -666
- package/pages/consent.d.ts +0 -117
- package/pages/consent.d.ts.map +0 -1
- package/pages/error.d.ts +0 -101
- package/pages/error.d.ts.map +0 -1
- package/pages/index.d.ts +0 -9
- package/pages/index.d.ts.map +0 -1
- package/pages/index.js +0 -1602
- package/react/utils.d.ts +0 -43
- package/react/utils.d.ts.map +0 -1
- package/registry/index.d.ts +0 -46
- package/registry/index.d.ts.map +0 -1
- package/registry/index.js +0 -6465
- package/registry/render-template.d.ts +0 -91
- package/registry/render-template.d.ts.map +0 -1
- package/registry/tool-ui.registry.d.ts +0 -294
- package/registry/tool-ui.registry.d.ts.map +0 -1
- package/registry/uri-utils.d.ts +0 -56
- package/registry/uri-utils.d.ts.map +0 -1
- package/renderers/cache.d.ts +0 -145
- package/renderers/cache.d.ts.map +0 -1
- package/renderers/html.renderer.d.ts +0 -123
- package/renderers/html.renderer.d.ts.map +0 -1
- package/renderers/registry.d.ts +0 -134
- package/renderers/registry.d.ts.map +0 -1
- package/renderers/types.d.ts +0 -342
- package/renderers/types.d.ts.map +0 -1
- package/renderers/utils/detect.d.ts +0 -107
- package/renderers/utils/detect.d.ts.map +0 -1
- package/renderers/utils/hash.d.ts +0 -40
- package/renderers/utils/hash.d.ts.map +0 -1
- package/renderers/utils/index.d.ts +0 -9
- package/renderers/utils/index.d.ts.map +0 -1
- package/renderers/utils/transpiler.d.ts +0 -89
- package/renderers/utils/transpiler.d.ts.map +0 -1
- package/runtime/adapters/html.adapter.d.ts +0 -59
- package/runtime/adapters/html.adapter.d.ts.map +0 -1
- package/runtime/adapters/index.d.ts +0 -26
- package/runtime/adapters/index.d.ts.map +0 -1
- package/runtime/adapters/mdx.adapter.d.ts +0 -73
- package/runtime/adapters/mdx.adapter.d.ts.map +0 -1
- package/runtime/adapters/react.adapter.d.ts +0 -70
- package/runtime/adapters/react.adapter.d.ts.map +0 -1
- package/runtime/adapters/types.d.ts +0 -95
- package/runtime/adapters/types.d.ts.map +0 -1
- package/runtime/csp.d.ts +0 -48
- package/runtime/csp.d.ts.map +0 -1
- package/runtime/index.d.ts +0 -17
- package/runtime/index.d.ts.map +0 -1
- package/runtime/index.js +0 -5264
- package/runtime/mcp-bridge.d.ts +0 -101
- package/runtime/mcp-bridge.d.ts.map +0 -1
- package/runtime/renderer-runtime.d.ts +0 -133
- package/runtime/renderer-runtime.d.ts.map +0 -1
- package/runtime/sanitizer.d.ts +0 -172
- package/runtime/sanitizer.d.ts.map +0 -1
- package/runtime/types.d.ts +0 -415
- package/runtime/types.d.ts.map +0 -1
- package/runtime/wrapper.d.ts +0 -421
- package/runtime/wrapper.d.ts.map +0 -1
- package/styles/index.d.ts +0 -8
- package/styles/index.d.ts.map +0 -1
- package/styles/index.js +0 -222
- package/styles/variants.d.ts +0 -51
- package/styles/variants.d.ts.map +0 -1
- package/theme/cdn.d.ts +0 -195
- package/theme/cdn.d.ts.map +0 -1
- package/theme/index.d.ts +0 -18
- package/theme/index.d.ts.map +0 -1
- package/theme/index.js +0 -757
- package/theme/platforms.d.ts +0 -107
- package/theme/platforms.d.ts.map +0 -1
- package/theme/presets/github-openai.d.ts +0 -50
- package/theme/presets/github-openai.d.ts.map +0 -1
- package/theme/presets/index.d.ts +0 -11
- package/theme/presets/index.d.ts.map +0 -1
- package/theme/theme.d.ts +0 -396
- package/theme/theme.d.ts.map +0 -1
- package/tool-template/builder.d.ts +0 -213
- package/tool-template/builder.d.ts.map +0 -1
- package/tool-template/index.d.ts +0 -16
- package/tool-template/index.d.ts.map +0 -1
- package/tool-template/index.js +0 -3559
- package/types/index.d.ts +0 -14
- package/types/index.d.ts.map +0 -1
- package/types/index.js +0 -108
- package/types/ui-config.d.ts +0 -639
- package/types/ui-config.d.ts.map +0 -1
- package/types/ui-runtime.d.ts +0 -1007
- package/types/ui-runtime.d.ts.map +0 -1
- package/typings/cache/cache-adapter.d.ts +0 -125
- package/typings/cache/cache-adapter.d.ts.map +0 -1
- package/typings/cache/index.d.ts +0 -10
- package/typings/cache/index.d.ts.map +0 -1
- package/typings/cache/memory-cache.d.ts +0 -92
- package/typings/cache/memory-cache.d.ts.map +0 -1
- package/typings/dts-parser.d.ts +0 -90
- package/typings/dts-parser.d.ts.map +0 -1
- package/typings/index.d.ts +0 -48
- package/typings/index.d.ts.map +0 -1
- package/typings/schemas.d.ts +0 -232
- package/typings/schemas.d.ts.map +0 -1
- package/typings/type-fetcher.d.ts +0 -89
- package/typings/type-fetcher.d.ts.map +0 -1
- package/typings/types.d.ts +0 -320
- package/typings/types.d.ts.map +0 -1
- package/utils/escape-html.d.ts +0 -58
- package/utils/escape-html.d.ts.map +0 -1
- package/utils/index.d.ts +0 -10
- package/utils/index.d.ts.map +0 -1
- package/utils/index.js +0 -70
- package/utils/safe-stringify.d.ts +0 -30
- package/utils/safe-stringify.d.ts.map +0 -1
- package/validation/error-box.d.ts +0 -56
- package/validation/error-box.d.ts.map +0 -1
- package/validation/index.d.ts +0 -13
- package/validation/index.d.ts.map +0 -1
- package/validation/index.js +0 -603
- package/validation/schema-paths.d.ts +0 -118
- package/validation/schema-paths.d.ts.map +0 -1
- package/validation/template-validator.d.ts +0 -143
- package/validation/template-validator.d.ts.map +0 -1
- package/validation/wrapper.d.ts +0 -97
- package/validation/wrapper.d.ts.map +0 -1
- package/widgets/index.d.ts +0 -8
- package/widgets/index.d.ts.map +0 -1
- package/widgets/index.js +0 -978
- package/widgets/progress.d.ts +0 -133
- package/widgets/progress.d.ts.map +0 -1
- package/widgets/resource.d.ts +0 -163
- package/widgets/resource.d.ts.map +0 -1
- /package/esm/render/{index.js → index.mjs} +0 -0
|
@@ -1,486 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dependency Resolution Schemas
|
|
3
|
-
*
|
|
4
|
-
* Zod validation schemas for CDN dependency configuration,
|
|
5
|
-
* bundle options, and file template configurations.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import { z } from 'zod';
|
|
10
|
-
/**
|
|
11
|
-
* Supported CDN providers.
|
|
12
|
-
*/
|
|
13
|
-
export declare const cdnProviderSchema: z.ZodEnum<{
|
|
14
|
-
cloudflare: "cloudflare";
|
|
15
|
-
jsdelivr: "jsdelivr";
|
|
16
|
-
unpkg: "unpkg";
|
|
17
|
-
"esm.sh": "esm.sh";
|
|
18
|
-
skypack: "skypack";
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Platform types that affect CDN selection.
|
|
22
|
-
*/
|
|
23
|
-
export declare const cdnPlatformTypeSchema: z.ZodEnum<{
|
|
24
|
-
claude: "claude";
|
|
25
|
-
openai: "openai";
|
|
26
|
-
cursor: "cursor";
|
|
27
|
-
gemini: "gemini";
|
|
28
|
-
continue: "continue";
|
|
29
|
-
cody: "cody";
|
|
30
|
-
unknown: "unknown";
|
|
31
|
-
}>;
|
|
32
|
-
/**
|
|
33
|
-
* Schema for validating CDN dependency configuration.
|
|
34
|
-
*/
|
|
35
|
-
export declare const cdnDependencySchema: z.ZodObject<{
|
|
36
|
-
url: z.ZodString;
|
|
37
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
38
|
-
global: z.ZodOptional<z.ZodString>;
|
|
39
|
-
exports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
-
esm: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
-
crossorigin: z.ZodOptional<z.ZodEnum<{
|
|
42
|
-
anonymous: "anonymous";
|
|
43
|
-
"use-credentials": "use-credentials";
|
|
44
|
-
}>>;
|
|
45
|
-
peerDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
-
}, z.core.$strict>;
|
|
47
|
-
export type CDNDependencyInput = z.input<typeof cdnDependencySchema>;
|
|
48
|
-
export type CDNDependencyOutput = z.output<typeof cdnDependencySchema>;
|
|
49
|
-
/**
|
|
50
|
-
* Target JavaScript version.
|
|
51
|
-
*/
|
|
52
|
-
export declare const bundleTargetSchema: z.ZodEnum<{
|
|
53
|
-
es2018: "es2018";
|
|
54
|
-
es2019: "es2019";
|
|
55
|
-
es2020: "es2020";
|
|
56
|
-
es2021: "es2021";
|
|
57
|
-
es2022: "es2022";
|
|
58
|
-
esnext: "esnext";
|
|
59
|
-
}>;
|
|
60
|
-
/**
|
|
61
|
-
* Schema for file bundle options.
|
|
62
|
-
*/
|
|
63
|
-
export declare const fileBundleOptionsSchema: z.ZodObject<{
|
|
64
|
-
minify: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
sourceMaps: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
-
target: z.ZodOptional<z.ZodEnum<{
|
|
67
|
-
es2018: "es2018";
|
|
68
|
-
es2019: "es2019";
|
|
69
|
-
es2020: "es2020";
|
|
70
|
-
es2021: "es2021";
|
|
71
|
-
es2022: "es2022";
|
|
72
|
-
esnext: "esnext";
|
|
73
|
-
}>>;
|
|
74
|
-
treeShake: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
-
jsxFactory: z.ZodOptional<z.ZodString>;
|
|
76
|
-
jsxFragment: z.ZodOptional<z.ZodString>;
|
|
77
|
-
jsxImportSource: z.ZodOptional<z.ZodString>;
|
|
78
|
-
}, z.core.$strict>;
|
|
79
|
-
export type FileBundleOptionsInput = z.input<typeof fileBundleOptionsSchema>;
|
|
80
|
-
export type FileBundleOptionsOutput = z.output<typeof fileBundleOptionsSchema>;
|
|
81
|
-
/**
|
|
82
|
-
* Schema for file-based template configuration.
|
|
83
|
-
* These fields extend UITemplateConfig for file-based templates.
|
|
84
|
-
*/
|
|
85
|
-
export declare const fileTemplateConfigSchema: z.ZodObject<{
|
|
86
|
-
externals: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
88
|
-
url: z.ZodString;
|
|
89
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
90
|
-
global: z.ZodOptional<z.ZodString>;
|
|
91
|
-
exports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
-
esm: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
-
crossorigin: z.ZodOptional<z.ZodEnum<{
|
|
94
|
-
anonymous: "anonymous";
|
|
95
|
-
"use-credentials": "use-credentials";
|
|
96
|
-
}>>;
|
|
97
|
-
peerDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
98
|
-
}, z.core.$strict>>>;
|
|
99
|
-
bundleOptions: z.ZodOptional<z.ZodObject<{
|
|
100
|
-
minify: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
-
sourceMaps: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
-
target: z.ZodOptional<z.ZodEnum<{
|
|
103
|
-
es2018: "es2018";
|
|
104
|
-
es2019: "es2019";
|
|
105
|
-
es2020: "es2020";
|
|
106
|
-
es2021: "es2021";
|
|
107
|
-
es2022: "es2022";
|
|
108
|
-
esnext: "esnext";
|
|
109
|
-
}>>;
|
|
110
|
-
treeShake: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
-
jsxFactory: z.ZodOptional<z.ZodString>;
|
|
112
|
-
jsxFragment: z.ZodOptional<z.ZodString>;
|
|
113
|
-
jsxImportSource: z.ZodOptional<z.ZodString>;
|
|
114
|
-
}, z.core.$strict>>;
|
|
115
|
-
}, z.core.$strict>;
|
|
116
|
-
export type FileTemplateConfigInput = z.input<typeof fileTemplateConfigSchema>;
|
|
117
|
-
export type FileTemplateConfigOutput = z.output<typeof fileTemplateConfigSchema>;
|
|
118
|
-
/**
|
|
119
|
-
* Schema for browser import maps.
|
|
120
|
-
*/
|
|
121
|
-
export declare const importMapSchema: z.ZodObject<{
|
|
122
|
-
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
123
|
-
scopes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
124
|
-
integrity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
125
|
-
}, z.core.$strict>;
|
|
126
|
-
export type ImportMapInput = z.input<typeof importMapSchema>;
|
|
127
|
-
export type ImportMapOutput = z.output<typeof importMapSchema>;
|
|
128
|
-
/**
|
|
129
|
-
* Schema for a resolved dependency entry.
|
|
130
|
-
*/
|
|
131
|
-
export declare const resolvedDependencySchema: z.ZodObject<{
|
|
132
|
-
packageName: z.ZodString;
|
|
133
|
-
version: z.ZodString;
|
|
134
|
-
cdnUrl: z.ZodString;
|
|
135
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
136
|
-
global: z.ZodOptional<z.ZodString>;
|
|
137
|
-
esm: z.ZodBoolean;
|
|
138
|
-
provider: z.ZodEnum<{
|
|
139
|
-
cloudflare: "cloudflare";
|
|
140
|
-
jsdelivr: "jsdelivr";
|
|
141
|
-
unpkg: "unpkg";
|
|
142
|
-
"esm.sh": "esm.sh";
|
|
143
|
-
skypack: "skypack";
|
|
144
|
-
}>;
|
|
145
|
-
}, z.core.$strict>;
|
|
146
|
-
export type ResolvedDependencyInput = z.input<typeof resolvedDependencySchema>;
|
|
147
|
-
export type ResolvedDependencyOutput = z.output<typeof resolvedDependencySchema>;
|
|
148
|
-
/**
|
|
149
|
-
* Schema for build manifest metadata.
|
|
150
|
-
*/
|
|
151
|
-
export declare const buildManifestMetadataSchema: z.ZodObject<{
|
|
152
|
-
createdAt: z.ZodString;
|
|
153
|
-
buildTimeMs: z.ZodNumber;
|
|
154
|
-
totalSize: z.ZodNumber;
|
|
155
|
-
bundlerVersion: z.ZodOptional<z.ZodString>;
|
|
156
|
-
}, z.core.$strict>;
|
|
157
|
-
/**
|
|
158
|
-
* Schema for build outputs.
|
|
159
|
-
*/
|
|
160
|
-
export declare const buildManifestOutputsSchema: z.ZodObject<{
|
|
161
|
-
code: z.ZodString;
|
|
162
|
-
sourceMap: z.ZodOptional<z.ZodString>;
|
|
163
|
-
ssrHtml: z.ZodOptional<z.ZodString>;
|
|
164
|
-
}, z.core.$strict>;
|
|
165
|
-
/**
|
|
166
|
-
* Schema for component build manifest.
|
|
167
|
-
*/
|
|
168
|
-
export declare const componentBuildManifestSchema: z.ZodObject<{
|
|
169
|
-
version: z.ZodLiteral<"1.0">;
|
|
170
|
-
buildId: z.ZodString;
|
|
171
|
-
toolName: z.ZodString;
|
|
172
|
-
entryPath: z.ZodString;
|
|
173
|
-
contentHash: z.ZodString;
|
|
174
|
-
dependencies: z.ZodArray<z.ZodObject<{
|
|
175
|
-
packageName: z.ZodString;
|
|
176
|
-
version: z.ZodString;
|
|
177
|
-
cdnUrl: z.ZodString;
|
|
178
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
179
|
-
global: z.ZodOptional<z.ZodString>;
|
|
180
|
-
esm: z.ZodBoolean;
|
|
181
|
-
provider: z.ZodEnum<{
|
|
182
|
-
cloudflare: "cloudflare";
|
|
183
|
-
jsdelivr: "jsdelivr";
|
|
184
|
-
unpkg: "unpkg";
|
|
185
|
-
"esm.sh": "esm.sh";
|
|
186
|
-
skypack: "skypack";
|
|
187
|
-
}>;
|
|
188
|
-
}, z.core.$strict>>;
|
|
189
|
-
outputs: z.ZodObject<{
|
|
190
|
-
code: z.ZodString;
|
|
191
|
-
sourceMap: z.ZodOptional<z.ZodString>;
|
|
192
|
-
ssrHtml: z.ZodOptional<z.ZodString>;
|
|
193
|
-
}, z.core.$strict>;
|
|
194
|
-
importMap: z.ZodObject<{
|
|
195
|
-
imports: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
196
|
-
scopes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
197
|
-
integrity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
198
|
-
}, z.core.$strict>;
|
|
199
|
-
metadata: z.ZodObject<{
|
|
200
|
-
createdAt: z.ZodString;
|
|
201
|
-
buildTimeMs: z.ZodNumber;
|
|
202
|
-
totalSize: z.ZodNumber;
|
|
203
|
-
bundlerVersion: z.ZodOptional<z.ZodString>;
|
|
204
|
-
}, z.core.$strict>;
|
|
205
|
-
}, z.core.$strict>;
|
|
206
|
-
export type ComponentBuildManifestInput = z.input<typeof componentBuildManifestSchema>;
|
|
207
|
-
export type ComponentBuildManifestOutput = z.output<typeof componentBuildManifestSchema>;
|
|
208
|
-
/**
|
|
209
|
-
* Schema for CDN provider configuration.
|
|
210
|
-
*/
|
|
211
|
-
export declare const cdnProviderConfigSchema: z.ZodRecord<z.ZodEnum<{
|
|
212
|
-
cloudflare: "cloudflare";
|
|
213
|
-
jsdelivr: "jsdelivr";
|
|
214
|
-
unpkg: "unpkg";
|
|
215
|
-
"esm.sh": "esm.sh";
|
|
216
|
-
skypack: "skypack";
|
|
217
|
-
}>, z.ZodObject<{
|
|
218
|
-
url: z.ZodString;
|
|
219
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
220
|
-
global: z.ZodOptional<z.ZodString>;
|
|
221
|
-
exports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
-
esm: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
-
crossorigin: z.ZodOptional<z.ZodEnum<{
|
|
224
|
-
anonymous: "anonymous";
|
|
225
|
-
"use-credentials": "use-credentials";
|
|
226
|
-
}>>;
|
|
227
|
-
peerDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
228
|
-
}, z.core.$strict>>;
|
|
229
|
-
/**
|
|
230
|
-
* Schema for package metadata in registry.
|
|
231
|
-
*/
|
|
232
|
-
export declare const packageMetadataSchema: z.ZodObject<{
|
|
233
|
-
description: z.ZodOptional<z.ZodString>;
|
|
234
|
-
homepage: z.ZodOptional<z.ZodString>;
|
|
235
|
-
license: z.ZodOptional<z.ZodString>;
|
|
236
|
-
}, z.core.$strict>;
|
|
237
|
-
/**
|
|
238
|
-
* Schema for a CDN registry entry.
|
|
239
|
-
*/
|
|
240
|
-
export declare const cdnRegistryEntrySchema: z.ZodObject<{
|
|
241
|
-
packageName: z.ZodString;
|
|
242
|
-
defaultVersion: z.ZodString;
|
|
243
|
-
providers: z.ZodRecord<z.ZodEnum<{
|
|
244
|
-
cloudflare: "cloudflare";
|
|
245
|
-
jsdelivr: "jsdelivr";
|
|
246
|
-
unpkg: "unpkg";
|
|
247
|
-
"esm.sh": "esm.sh";
|
|
248
|
-
skypack: "skypack";
|
|
249
|
-
}>, z.ZodObject<{
|
|
250
|
-
url: z.ZodString;
|
|
251
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
252
|
-
global: z.ZodOptional<z.ZodString>;
|
|
253
|
-
exports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
254
|
-
esm: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
-
crossorigin: z.ZodOptional<z.ZodEnum<{
|
|
256
|
-
anonymous: "anonymous";
|
|
257
|
-
"use-credentials": "use-credentials";
|
|
258
|
-
}>>;
|
|
259
|
-
peerDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
260
|
-
}, z.core.$strict>>;
|
|
261
|
-
preferredProviders: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
262
|
-
cloudflare: "cloudflare";
|
|
263
|
-
jsdelivr: "jsdelivr";
|
|
264
|
-
unpkg: "unpkg";
|
|
265
|
-
"esm.sh": "esm.sh";
|
|
266
|
-
skypack: "skypack";
|
|
267
|
-
}>>>;
|
|
268
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
269
|
-
description: z.ZodOptional<z.ZodString>;
|
|
270
|
-
homepage: z.ZodOptional<z.ZodString>;
|
|
271
|
-
license: z.ZodOptional<z.ZodString>;
|
|
272
|
-
}, z.core.$strict>>;
|
|
273
|
-
}, z.core.$strict>;
|
|
274
|
-
export type CDNRegistryEntryInput = z.input<typeof cdnRegistryEntrySchema>;
|
|
275
|
-
export type CDNRegistryEntryOutput = z.output<typeof cdnRegistryEntrySchema>;
|
|
276
|
-
/**
|
|
277
|
-
* Schema for dependency resolver options.
|
|
278
|
-
*/
|
|
279
|
-
export declare const dependencyResolverOptionsSchema: z.ZodObject<{
|
|
280
|
-
platform: z.ZodOptional<z.ZodEnum<{
|
|
281
|
-
claude: "claude";
|
|
282
|
-
openai: "openai";
|
|
283
|
-
cursor: "cursor";
|
|
284
|
-
gemini: "gemini";
|
|
285
|
-
continue: "continue";
|
|
286
|
-
cody: "cody";
|
|
287
|
-
unknown: "unknown";
|
|
288
|
-
}>>;
|
|
289
|
-
preferredProviders: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
290
|
-
cloudflare: "cloudflare";
|
|
291
|
-
jsdelivr: "jsdelivr";
|
|
292
|
-
unpkg: "unpkg";
|
|
293
|
-
"esm.sh": "esm.sh";
|
|
294
|
-
skypack: "skypack";
|
|
295
|
-
}>>>;
|
|
296
|
-
customRegistry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
297
|
-
packageName: z.ZodString;
|
|
298
|
-
defaultVersion: z.ZodString;
|
|
299
|
-
providers: z.ZodRecord<z.ZodEnum<{
|
|
300
|
-
cloudflare: "cloudflare";
|
|
301
|
-
jsdelivr: "jsdelivr";
|
|
302
|
-
unpkg: "unpkg";
|
|
303
|
-
"esm.sh": "esm.sh";
|
|
304
|
-
skypack: "skypack";
|
|
305
|
-
}>, z.ZodObject<{
|
|
306
|
-
url: z.ZodString;
|
|
307
|
-
integrity: z.ZodOptional<z.ZodString>;
|
|
308
|
-
global: z.ZodOptional<z.ZodString>;
|
|
309
|
-
exports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
310
|
-
esm: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
-
crossorigin: z.ZodOptional<z.ZodEnum<{
|
|
312
|
-
anonymous: "anonymous";
|
|
313
|
-
"use-credentials": "use-credentials";
|
|
314
|
-
}>>;
|
|
315
|
-
peerDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
316
|
-
}, z.core.$strict>>;
|
|
317
|
-
preferredProviders: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
318
|
-
cloudflare: "cloudflare";
|
|
319
|
-
jsdelivr: "jsdelivr";
|
|
320
|
-
unpkg: "unpkg";
|
|
321
|
-
"esm.sh": "esm.sh";
|
|
322
|
-
skypack: "skypack";
|
|
323
|
-
}>>>;
|
|
324
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
325
|
-
description: z.ZodOptional<z.ZodString>;
|
|
326
|
-
homepage: z.ZodOptional<z.ZodString>;
|
|
327
|
-
license: z.ZodOptional<z.ZodString>;
|
|
328
|
-
}, z.core.$strict>>;
|
|
329
|
-
}, z.core.$strict>>>;
|
|
330
|
-
strictMode: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
-
requireIntegrity: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
-
}, z.core.$strict>;
|
|
333
|
-
export type DependencyResolverOptionsInput = z.input<typeof dependencyResolverOptionsSchema>;
|
|
334
|
-
export type DependencyResolverOptionsOutput = z.output<typeof dependencyResolverOptionsSchema>;
|
|
335
|
-
/**
|
|
336
|
-
* Import type enumeration.
|
|
337
|
-
*/
|
|
338
|
-
export declare const importTypeSchema: z.ZodEnum<{
|
|
339
|
-
named: "named";
|
|
340
|
-
default: "default";
|
|
341
|
-
namespace: "namespace";
|
|
342
|
-
"side-effect": "side-effect";
|
|
343
|
-
dynamic: "dynamic";
|
|
344
|
-
}>;
|
|
345
|
-
/**
|
|
346
|
-
* Schema for a parsed import statement.
|
|
347
|
-
*/
|
|
348
|
-
export declare const parsedImportSchema: z.ZodObject<{
|
|
349
|
-
statement: z.ZodString;
|
|
350
|
-
specifier: z.ZodString;
|
|
351
|
-
type: z.ZodEnum<{
|
|
352
|
-
named: "named";
|
|
353
|
-
default: "default";
|
|
354
|
-
namespace: "namespace";
|
|
355
|
-
"side-effect": "side-effect";
|
|
356
|
-
dynamic: "dynamic";
|
|
357
|
-
}>;
|
|
358
|
-
namedImports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
359
|
-
defaultImport: z.ZodOptional<z.ZodString>;
|
|
360
|
-
namespaceImport: z.ZodOptional<z.ZodString>;
|
|
361
|
-
line: z.ZodNumber;
|
|
362
|
-
column: z.ZodNumber;
|
|
363
|
-
}, z.core.$strict>;
|
|
364
|
-
export type ParsedImportInput = z.input<typeof parsedImportSchema>;
|
|
365
|
-
export type ParsedImportOutput = z.output<typeof parsedImportSchema>;
|
|
366
|
-
/**
|
|
367
|
-
* Schema for parsed import results.
|
|
368
|
-
*/
|
|
369
|
-
export declare const parsedImportResultSchema: z.ZodObject<{
|
|
370
|
-
imports: z.ZodArray<z.ZodObject<{
|
|
371
|
-
statement: z.ZodString;
|
|
372
|
-
specifier: z.ZodString;
|
|
373
|
-
type: z.ZodEnum<{
|
|
374
|
-
named: "named";
|
|
375
|
-
default: "default";
|
|
376
|
-
namespace: "namespace";
|
|
377
|
-
"side-effect": "side-effect";
|
|
378
|
-
dynamic: "dynamic";
|
|
379
|
-
}>;
|
|
380
|
-
namedImports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
381
|
-
defaultImport: z.ZodOptional<z.ZodString>;
|
|
382
|
-
namespaceImport: z.ZodOptional<z.ZodString>;
|
|
383
|
-
line: z.ZodNumber;
|
|
384
|
-
column: z.ZodNumber;
|
|
385
|
-
}, z.core.$strict>>;
|
|
386
|
-
externalImports: z.ZodArray<z.ZodObject<{
|
|
387
|
-
statement: z.ZodString;
|
|
388
|
-
specifier: z.ZodString;
|
|
389
|
-
type: z.ZodEnum<{
|
|
390
|
-
named: "named";
|
|
391
|
-
default: "default";
|
|
392
|
-
namespace: "namespace";
|
|
393
|
-
"side-effect": "side-effect";
|
|
394
|
-
dynamic: "dynamic";
|
|
395
|
-
}>;
|
|
396
|
-
namedImports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
397
|
-
defaultImport: z.ZodOptional<z.ZodString>;
|
|
398
|
-
namespaceImport: z.ZodOptional<z.ZodString>;
|
|
399
|
-
line: z.ZodNumber;
|
|
400
|
-
column: z.ZodNumber;
|
|
401
|
-
}, z.core.$strict>>;
|
|
402
|
-
relativeImports: z.ZodArray<z.ZodObject<{
|
|
403
|
-
statement: z.ZodString;
|
|
404
|
-
specifier: z.ZodString;
|
|
405
|
-
type: z.ZodEnum<{
|
|
406
|
-
named: "named";
|
|
407
|
-
default: "default";
|
|
408
|
-
namespace: "namespace";
|
|
409
|
-
"side-effect": "side-effect";
|
|
410
|
-
dynamic: "dynamic";
|
|
411
|
-
}>;
|
|
412
|
-
namedImports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
413
|
-
defaultImport: z.ZodOptional<z.ZodString>;
|
|
414
|
-
namespaceImport: z.ZodOptional<z.ZodString>;
|
|
415
|
-
line: z.ZodNumber;
|
|
416
|
-
column: z.ZodNumber;
|
|
417
|
-
}, z.core.$strict>>;
|
|
418
|
-
externalPackages: z.ZodArray<z.ZodString>;
|
|
419
|
-
}, z.core.$strict>;
|
|
420
|
-
export type ParsedImportResultInput = z.input<typeof parsedImportResultSchema>;
|
|
421
|
-
export type ParsedImportResultOutput = z.output<typeof parsedImportResultSchema>;
|
|
422
|
-
/**
|
|
423
|
-
* Schema for cache statistics.
|
|
424
|
-
*/
|
|
425
|
-
export declare const cacheStatsSchema: z.ZodObject<{
|
|
426
|
-
entries: z.ZodNumber;
|
|
427
|
-
totalSize: z.ZodNumber;
|
|
428
|
-
hits: z.ZodNumber;
|
|
429
|
-
misses: z.ZodNumber;
|
|
430
|
-
hitRate: z.ZodNumber;
|
|
431
|
-
}, z.core.$strict>;
|
|
432
|
-
export type CacheStatsInput = z.input<typeof cacheStatsSchema>;
|
|
433
|
-
export type CacheStatsOutput = z.output<typeof cacheStatsSchema>;
|
|
434
|
-
/**
|
|
435
|
-
* Safe parse result type.
|
|
436
|
-
*/
|
|
437
|
-
export type SafeParseResult<T> = {
|
|
438
|
-
success: true;
|
|
439
|
-
data: T;
|
|
440
|
-
} | {
|
|
441
|
-
success: false;
|
|
442
|
-
error: z.ZodError;
|
|
443
|
-
};
|
|
444
|
-
/**
|
|
445
|
-
* Validate a CDN dependency configuration.
|
|
446
|
-
*
|
|
447
|
-
* @param data - Data to validate
|
|
448
|
-
* @returns Validated CDN dependency or throws ZodError
|
|
449
|
-
*/
|
|
450
|
-
export declare function validateCDNDependency(data: unknown): CDNDependencyOutput;
|
|
451
|
-
/**
|
|
452
|
-
* Safely validate a CDN dependency configuration.
|
|
453
|
-
*
|
|
454
|
-
* @param data - Data to validate
|
|
455
|
-
* @returns Safe parse result with success flag
|
|
456
|
-
*/
|
|
457
|
-
export declare function safeParseCDNDependency(data: unknown): SafeParseResult<CDNDependencyOutput>;
|
|
458
|
-
/**
|
|
459
|
-
* Validate file template configuration.
|
|
460
|
-
*
|
|
461
|
-
* @param data - Data to validate
|
|
462
|
-
* @returns Validated file template config or throws ZodError
|
|
463
|
-
*/
|
|
464
|
-
export declare function validateFileTemplateConfig(data: unknown): FileTemplateConfigOutput;
|
|
465
|
-
/**
|
|
466
|
-
* Safely validate file template configuration.
|
|
467
|
-
*
|
|
468
|
-
* @param data - Data to validate
|
|
469
|
-
* @returns Safe parse result with success flag
|
|
470
|
-
*/
|
|
471
|
-
export declare function safeParseFileTemplateConfig(data: unknown): SafeParseResult<FileTemplateConfigOutput>;
|
|
472
|
-
/**
|
|
473
|
-
* Validate a component build manifest.
|
|
474
|
-
*
|
|
475
|
-
* @param data - Data to validate
|
|
476
|
-
* @returns Validated manifest or throws ZodError
|
|
477
|
-
*/
|
|
478
|
-
export declare function validateBuildManifest(data: unknown): ComponentBuildManifestOutput;
|
|
479
|
-
/**
|
|
480
|
-
* Safely validate a component build manifest.
|
|
481
|
-
*
|
|
482
|
-
* @param data - Data to validate
|
|
483
|
-
* @returns Safe parse result with success flag
|
|
484
|
-
*/
|
|
485
|
-
export declare function safeParseBuildManifest(data: unknown): SafeParseResult<ComponentBuildManifestOutput>;
|
|
486
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/dependency/schemas.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Template Loader
|
|
3
|
-
*
|
|
4
|
-
* Handles loading templates from various sources:
|
|
5
|
-
* - Inline strings
|
|
6
|
-
* - File paths
|
|
7
|
-
* - CDN URLs
|
|
8
|
-
*
|
|
9
|
-
* Supports caching for URL templates with ETag validation.
|
|
10
|
-
*
|
|
11
|
-
* @packageDocumentation
|
|
12
|
-
*/
|
|
13
|
-
import { type TemplateMode, type TemplateSource, type TemplateFormat, type ResolvedTemplate, type UrlFetchResult } from './types';
|
|
14
|
-
/**
|
|
15
|
-
* Get the URL cache (for testing/debugging).
|
|
16
|
-
*/
|
|
17
|
-
export declare function getUrlCache(): Map<string, UrlFetchResult>;
|
|
18
|
-
/**
|
|
19
|
-
* Clear the URL cache.
|
|
20
|
-
*/
|
|
21
|
-
export declare function clearUrlCache(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Detect the source type of a template string.
|
|
24
|
-
*
|
|
25
|
-
* @param template - Template string (inline content, file path, or URL)
|
|
26
|
-
* @returns TemplateSource discriminated union
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```typescript
|
|
30
|
-
* detectTemplateSource('https://cdn.example.com/widget.html')
|
|
31
|
-
* // => { type: 'url', url: 'https://cdn.example.com/widget.html' }
|
|
32
|
-
*
|
|
33
|
-
* detectTemplateSource('./widgets/chart.tsx')
|
|
34
|
-
* // => { type: 'file', path: './widgets/chart.tsx' }
|
|
35
|
-
*
|
|
36
|
-
* detectTemplateSource('<div>{{output.data}}</div>')
|
|
37
|
-
* // => { type: 'inline', content: '<div>{{output.data}}</div>' }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export declare function detectTemplateSource(template: string): TemplateSource;
|
|
41
|
-
/**
|
|
42
|
-
* Check if a template mode is file-based (file or URL).
|
|
43
|
-
*/
|
|
44
|
-
export declare function isFileBasedTemplate(mode: TemplateMode): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Validate that a URL is allowed for template fetching.
|
|
47
|
-
* Only HTTPS URLs are allowed.
|
|
48
|
-
*
|
|
49
|
-
* @param url - URL to validate
|
|
50
|
-
* @throws Error if URL is not HTTPS
|
|
51
|
-
*/
|
|
52
|
-
export declare function validateTemplateUrl(url: string): void;
|
|
53
|
-
/**
|
|
54
|
-
* Detect template format from a URL.
|
|
55
|
-
*
|
|
56
|
-
* @param url - URL to detect format from
|
|
57
|
-
* @returns Detected template format
|
|
58
|
-
*/
|
|
59
|
-
export declare function detectFormatFromUrl(url: string): TemplateFormat;
|
|
60
|
-
/**
|
|
61
|
-
* Options for fetching a template from URL.
|
|
62
|
-
*/
|
|
63
|
-
export interface FetchTemplateOptions {
|
|
64
|
-
/**
|
|
65
|
-
* Request timeout in milliseconds.
|
|
66
|
-
* @default 30000 (30 seconds)
|
|
67
|
-
*/
|
|
68
|
-
timeout?: number;
|
|
69
|
-
/**
|
|
70
|
-
* Whether to skip cache and always fetch fresh.
|
|
71
|
-
* @default false
|
|
72
|
-
*/
|
|
73
|
-
skipCache?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Custom headers to include in the request.
|
|
76
|
-
*/
|
|
77
|
-
headers?: Record<string, string>;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Fetch a template from a URL with ETag caching support.
|
|
81
|
-
*
|
|
82
|
-
* @param url - HTTPS URL to fetch from
|
|
83
|
-
* @param options - Fetch options
|
|
84
|
-
* @returns Fetched content with metadata
|
|
85
|
-
* @throws Error if URL is not HTTPS or fetch fails
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```typescript
|
|
89
|
-
* const result = await fetchTemplateFromUrl('https://cdn.example.com/widget.html');
|
|
90
|
-
* console.log(result.content); // Template HTML
|
|
91
|
-
* console.log(result.etag); // "abc123" (for cache validation)
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
export declare function fetchTemplateFromUrl(url: string, options?: FetchTemplateOptions): Promise<UrlFetchResult>;
|
|
95
|
-
/**
|
|
96
|
-
* Options for reading a template from file.
|
|
97
|
-
*/
|
|
98
|
-
export interface ReadTemplateOptions {
|
|
99
|
-
/**
|
|
100
|
-
* Base path for resolving relative file paths.
|
|
101
|
-
* @default process.cwd()
|
|
102
|
-
*/
|
|
103
|
-
basePath?: string;
|
|
104
|
-
/**
|
|
105
|
-
* File encoding.
|
|
106
|
-
* @default 'utf-8'
|
|
107
|
-
*/
|
|
108
|
-
encoding?: BufferEncoding;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Read a template from a file path.
|
|
112
|
-
*
|
|
113
|
-
* @param filePath - Relative or absolute file path
|
|
114
|
-
* @param options - Read options
|
|
115
|
-
* @returns Template content
|
|
116
|
-
* @throws Error if file cannot be read
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* ```typescript
|
|
120
|
-
* const content = await readTemplateFromFile('./widgets/chart.tsx');
|
|
121
|
-
* console.log(content); // File contents
|
|
122
|
-
*
|
|
123
|
-
* const content2 = await readTemplateFromFile('./widgets/chart.tsx', {
|
|
124
|
-
* basePath: '/app/src',
|
|
125
|
-
* });
|
|
126
|
-
* ```
|
|
127
|
-
*/
|
|
128
|
-
export declare function readTemplateFromFile(filePath: string, options?: ReadTemplateOptions): Promise<string>;
|
|
129
|
-
/**
|
|
130
|
-
* Resolve a file path to an absolute path.
|
|
131
|
-
*
|
|
132
|
-
* @param filePath - Relative or absolute file path
|
|
133
|
-
* @param basePath - Base path for resolving relative paths
|
|
134
|
-
* @returns Absolute file path
|
|
135
|
-
*/
|
|
136
|
-
export declare function resolveFilePath(filePath: string, basePath?: string): string;
|
|
137
|
-
/**
|
|
138
|
-
* Options for resolving a template.
|
|
139
|
-
*/
|
|
140
|
-
export interface ResolveTemplateOptions {
|
|
141
|
-
/**
|
|
142
|
-
* Base path for resolving relative file paths.
|
|
143
|
-
* @default process.cwd()
|
|
144
|
-
*/
|
|
145
|
-
basePath?: string;
|
|
146
|
-
/**
|
|
147
|
-
* Whether to skip URL cache.
|
|
148
|
-
* @default false
|
|
149
|
-
*/
|
|
150
|
-
skipCache?: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* Request timeout for URL fetches in milliseconds.
|
|
153
|
-
* @default 30000
|
|
154
|
-
*/
|
|
155
|
-
timeout?: number;
|
|
156
|
-
/**
|
|
157
|
-
* Override the detected format.
|
|
158
|
-
*/
|
|
159
|
-
format?: TemplateFormat;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Resolve a template from any source (inline, file, or URL).
|
|
163
|
-
*
|
|
164
|
-
* This is the main entry point for loading templates. It:
|
|
165
|
-
* 1. Detects the source type (inline, file, URL)
|
|
166
|
-
* 2. Loads the content from the appropriate source
|
|
167
|
-
* 3. Detects the format from file extension
|
|
168
|
-
* 4. Computes content hash for caching
|
|
169
|
-
*
|
|
170
|
-
* @param template - Template string (inline content, file path, or URL)
|
|
171
|
-
* @param options - Resolution options
|
|
172
|
-
* @returns Resolved template with content and metadata
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
* ```typescript
|
|
176
|
-
* // Inline template
|
|
177
|
-
* const inline = await resolveTemplate('<div>{{output}}</div>');
|
|
178
|
-
*
|
|
179
|
-
* // File template
|
|
180
|
-
* const file = await resolveTemplate('./widgets/chart.tsx', {
|
|
181
|
-
* basePath: '/app/src',
|
|
182
|
-
* });
|
|
183
|
-
*
|
|
184
|
-
* // URL template
|
|
185
|
-
* const url = await resolveTemplate('https://cdn.example.com/widget.html');
|
|
186
|
-
* ```
|
|
187
|
-
*/
|
|
188
|
-
export declare function resolveTemplate(template: string, options?: ResolveTemplateOptions): Promise<ResolvedTemplate>;
|
|
189
|
-
/**
|
|
190
|
-
* Check if a resolved template needs re-fetching based on cache state.
|
|
191
|
-
* Only applicable for URL templates.
|
|
192
|
-
*
|
|
193
|
-
* @param resolved - Previously resolved template
|
|
194
|
-
* @returns true if the template should be re-fetched
|
|
195
|
-
*/
|
|
196
|
-
export declare function needsRefetch(resolved: ResolvedTemplate): boolean;
|
|
197
|
-
/**
|
|
198
|
-
* Invalidate a cached URL template.
|
|
199
|
-
*
|
|
200
|
-
* @param url - URL to invalidate
|
|
201
|
-
* @returns true if the entry was removed
|
|
202
|
-
*/
|
|
203
|
-
export declare function invalidateUrlCache(url: string): boolean;
|
|
204
|
-
//# sourceMappingURL=template-loader.d.ts.map
|