pupt-lib 1.2.5 → 1.3.0

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.
Files changed (182) hide show
  1. package/README.md +292 -256
  2. package/dist/index.d.ts +458 -29
  3. package/dist/index.js +2061 -362
  4. package/dist/jsx-dev-runtime.d.ts +483 -0
  5. package/dist/jsx-runtime/index.d.ts +2 -29
  6. package/dist/jsx-runtime/jsx-dev-runtime.d.ts +2 -26
  7. package/package.json +4 -4
  8. package/dist/api.d.ts +0 -38
  9. package/dist/api.d.ts.map +0 -1
  10. package/dist/component.d.ts +0 -83
  11. package/dist/component.d.ts.map +0 -1
  12. package/dist/components/ask/Choice.d.ts +0 -156
  13. package/dist/components/ask/Choice.d.ts.map +0 -1
  14. package/dist/components/ask/Confirm.d.ts +0 -61
  15. package/dist/components/ask/Confirm.d.ts.map +0 -1
  16. package/dist/components/ask/Date.d.ts +0 -79
  17. package/dist/components/ask/Date.d.ts.map +0 -1
  18. package/dist/components/ask/Editor.d.ts +0 -67
  19. package/dist/components/ask/Editor.d.ts.map +0 -1
  20. package/dist/components/ask/File.d.ts +0 -85
  21. package/dist/components/ask/File.d.ts.map +0 -1
  22. package/dist/components/ask/Label.d.ts +0 -28
  23. package/dist/components/ask/Label.d.ts.map +0 -1
  24. package/dist/components/ask/MultiSelect.d.ts +0 -148
  25. package/dist/components/ask/MultiSelect.d.ts.map +0 -1
  26. package/dist/components/ask/Number.d.ts +0 -73
  27. package/dist/components/ask/Number.d.ts.map +0 -1
  28. package/dist/components/ask/Option.d.ts +0 -29
  29. package/dist/components/ask/Option.d.ts.map +0 -1
  30. package/dist/components/ask/Path.d.ts +0 -73
  31. package/dist/components/ask/Path.d.ts.map +0 -1
  32. package/dist/components/ask/Rating.d.ts +0 -79
  33. package/dist/components/ask/Rating.d.ts.map +0 -1
  34. package/dist/components/ask/ReviewFile.d.ts +0 -79
  35. package/dist/components/ask/ReviewFile.d.ts.map +0 -1
  36. package/dist/components/ask/Secret.d.ts +0 -67
  37. package/dist/components/ask/Secret.d.ts.map +0 -1
  38. package/dist/components/ask/Select.d.ts +0 -136
  39. package/dist/components/ask/Select.d.ts.map +0 -1
  40. package/dist/components/ask/Text.d.ts +0 -67
  41. package/dist/components/ask/Text.d.ts.map +0 -1
  42. package/dist/components/ask/index.d.ts +0 -34
  43. package/dist/components/ask/index.d.ts.map +0 -1
  44. package/dist/components/ask/utils.d.ts +0 -26
  45. package/dist/components/ask/utils.d.ts.map +0 -1
  46. package/dist/components/control/ForEach.d.ts +0 -32
  47. package/dist/components/control/ForEach.d.ts.map +0 -1
  48. package/dist/components/control/If.d.ts +0 -24
  49. package/dist/components/control/If.d.ts.map +0 -1
  50. package/dist/components/data/Code.d.ts +0 -31
  51. package/dist/components/data/Code.d.ts.map +0 -1
  52. package/dist/components/data/Data.d.ts +0 -31
  53. package/dist/components/data/Data.d.ts.map +0 -1
  54. package/dist/components/data/File.d.ts +0 -37
  55. package/dist/components/data/File.d.ts.map +0 -1
  56. package/dist/components/data/Json.d.ts +0 -25
  57. package/dist/components/data/Json.d.ts.map +0 -1
  58. package/dist/components/data/Xml.d.ts +0 -25
  59. package/dist/components/data/Xml.d.ts.map +0 -1
  60. package/dist/components/data/index.d.ts +0 -6
  61. package/dist/components/data/index.d.ts.map +0 -1
  62. package/dist/components/examples/Example.d.ts +0 -17
  63. package/dist/components/examples/Example.d.ts.map +0 -1
  64. package/dist/components/examples/ExampleInput.d.ts +0 -13
  65. package/dist/components/examples/ExampleInput.d.ts.map +0 -1
  66. package/dist/components/examples/ExampleOutput.d.ts +0 -13
  67. package/dist/components/examples/ExampleOutput.d.ts.map +0 -1
  68. package/dist/components/examples/Examples.d.ts +0 -13
  69. package/dist/components/examples/Examples.d.ts.map +0 -1
  70. package/dist/components/examples/index.d.ts +0 -5
  71. package/dist/components/examples/index.d.ts.map +0 -1
  72. package/dist/components/index.d.ts +0 -11
  73. package/dist/components/index.d.ts.map +0 -1
  74. package/dist/components/meta/Uses.d.ts +0 -98
  75. package/dist/components/meta/Uses.d.ts.map +0 -1
  76. package/dist/components/meta/index.d.ts +0 -2
  77. package/dist/components/meta/index.d.ts.map +0 -1
  78. package/dist/components/post-execution/OpenUrl.d.ts +0 -29
  79. package/dist/components/post-execution/OpenUrl.d.ts.map +0 -1
  80. package/dist/components/post-execution/PostExecution.d.ts +0 -13
  81. package/dist/components/post-execution/PostExecution.d.ts.map +0 -1
  82. package/dist/components/post-execution/ReviewFile.d.ts +0 -29
  83. package/dist/components/post-execution/ReviewFile.d.ts.map +0 -1
  84. package/dist/components/post-execution/RunCommand.d.ts +0 -35
  85. package/dist/components/post-execution/RunCommand.d.ts.map +0 -1
  86. package/dist/components/post-execution/index.d.ts +0 -5
  87. package/dist/components/post-execution/index.d.ts.map +0 -1
  88. package/dist/components/reasoning/Step.d.ts +0 -25
  89. package/dist/components/reasoning/Step.d.ts.map +0 -1
  90. package/dist/components/reasoning/Steps.d.ts +0 -14
  91. package/dist/components/reasoning/Steps.d.ts.map +0 -1
  92. package/dist/components/reasoning/index.d.ts +0 -3
  93. package/dist/components/reasoning/index.d.ts.map +0 -1
  94. package/dist/components/structural/Audience.d.ts +0 -25
  95. package/dist/components/structural/Audience.d.ts.map +0 -1
  96. package/dist/components/structural/Constraint.d.ts +0 -31
  97. package/dist/components/structural/Constraint.d.ts.map +0 -1
  98. package/dist/components/structural/Context.d.ts +0 -25
  99. package/dist/components/structural/Context.d.ts.map +0 -1
  100. package/dist/components/structural/Criterion.d.ts +0 -13
  101. package/dist/components/structural/Criterion.d.ts.map +0 -1
  102. package/dist/components/structural/Format.d.ts +0 -37
  103. package/dist/components/structural/Format.d.ts.map +0 -1
  104. package/dist/components/structural/Prompt.d.ts +0 -43
  105. package/dist/components/structural/Prompt.d.ts.map +0 -1
  106. package/dist/components/structural/Role.d.ts +0 -37
  107. package/dist/components/structural/Role.d.ts.map +0 -1
  108. package/dist/components/structural/Section.d.ts +0 -31
  109. package/dist/components/structural/Section.d.ts.map +0 -1
  110. package/dist/components/structural/SuccessCriteria.d.ts +0 -25
  111. package/dist/components/structural/SuccessCriteria.d.ts.map +0 -1
  112. package/dist/components/structural/Task.d.ts +0 -25
  113. package/dist/components/structural/Task.d.ts.map +0 -1
  114. package/dist/components/structural/Tone.d.ts +0 -25
  115. package/dist/components/structural/Tone.d.ts.map +0 -1
  116. package/dist/components/structural/index.d.ts +0 -12
  117. package/dist/components/structural/index.d.ts.map +0 -1
  118. package/dist/components/utility/Cwd.d.ts +0 -11
  119. package/dist/components/utility/Cwd.d.ts.map +0 -1
  120. package/dist/components/utility/DateTime.d.ts +0 -23
  121. package/dist/components/utility/DateTime.d.ts.map +0 -1
  122. package/dist/components/utility/Hostname.d.ts +0 -11
  123. package/dist/components/utility/Hostname.d.ts.map +0 -1
  124. package/dist/components/utility/Timestamp.d.ts +0 -11
  125. package/dist/components/utility/Timestamp.d.ts.map +0 -1
  126. package/dist/components/utility/UUID.d.ts +0 -11
  127. package/dist/components/utility/UUID.d.ts.map +0 -1
  128. package/dist/components/utility/Username.d.ts +0 -11
  129. package/dist/components/utility/Username.d.ts.map +0 -1
  130. package/dist/components/utility/index.d.ts +0 -7
  131. package/dist/components/utility/index.d.ts.map +0 -1
  132. package/dist/create-prompt.d.ts +0 -118
  133. package/dist/create-prompt.d.ts.map +0 -1
  134. package/dist/index.d.ts.map +0 -1
  135. package/dist/jsx-runtime/index.d.ts.map +0 -1
  136. package/dist/jsx-runtime/jsx-dev-runtime.d.ts.map +0 -1
  137. package/dist/render.d.ts +0 -19
  138. package/dist/render.d.ts.map +0 -1
  139. package/dist/services/babel-plugins/index.d.ts +0 -3
  140. package/dist/services/babel-plugins/index.d.ts.map +0 -1
  141. package/dist/services/babel-plugins/name-hoisting.d.ts +0 -8
  142. package/dist/services/babel-plugins/name-hoisting.d.ts.map +0 -1
  143. package/dist/services/babel-plugins/uses-to-import.d.ts +0 -16
  144. package/dist/services/babel-plugins/uses-to-import.d.ts.map +0 -1
  145. package/dist/services/browser-support.d.ts +0 -185
  146. package/dist/services/browser-support.d.ts.map +0 -1
  147. package/dist/services/file-search-engine.d.ts +0 -162
  148. package/dist/services/file-search-engine.d.ts.map +0 -1
  149. package/dist/services/formula-parser.d.ts +0 -9
  150. package/dist/services/formula-parser.d.ts.map +0 -1
  151. package/dist/services/input-iterator.d.ts +0 -54
  152. package/dist/services/input-iterator.d.ts.map +0 -1
  153. package/dist/services/module-evaluator.d.ts +0 -38
  154. package/dist/services/module-evaluator.d.ts.map +0 -1
  155. package/dist/services/module-loader.d.ts +0 -92
  156. package/dist/services/module-loader.d.ts.map +0 -1
  157. package/dist/services/preprocessor.d.ts +0 -52
  158. package/dist/services/preprocessor.d.ts.map +0 -1
  159. package/dist/services/prop-validator.d.ts +0 -21
  160. package/dist/services/prop-validator.d.ts.map +0 -1
  161. package/dist/services/search-engine.d.ts +0 -10
  162. package/dist/services/search-engine.d.ts.map +0 -1
  163. package/dist/services/transformer.d.ts +0 -38
  164. package/dist/services/transformer.d.ts.map +0 -1
  165. package/dist/types/component.d.ts +0 -30
  166. package/dist/types/component.d.ts.map +0 -1
  167. package/dist/types/context.d.ts +0 -341
  168. package/dist/types/context.d.ts.map +0 -1
  169. package/dist/types/element.d.ts +0 -47
  170. package/dist/types/element.d.ts.map +0 -1
  171. package/dist/types/index.d.ts +0 -11
  172. package/dist/types/index.d.ts.map +0 -1
  173. package/dist/types/input.d.ts +0 -61
  174. package/dist/types/input.d.ts.map +0 -1
  175. package/dist/types/module.d.ts +0 -61
  176. package/dist/types/module.d.ts.map +0 -1
  177. package/dist/types/render.d.ts +0 -92
  178. package/dist/types/render.d.ts.map +0 -1
  179. package/dist/types/search.d.ts +0 -59
  180. package/dist/types/search.d.ts.map +0 -1
  181. package/dist/types/symbols.d.ts +0 -9
  182. package/dist/types/symbols.d.ts.map +0 -1
@@ -1,25 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const successCriteriaSchema: z.ZodObject<{
5
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
6
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
8
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
10
- }, z.ZodTypeAny, "passthrough">>;
11
- type SuccessCriteriaProps = z.infer<typeof successCriteriaSchema> & {
12
- children: PuptNode;
13
- };
14
- export declare class SuccessCriteria extends Component<SuccessCriteriaProps> {
15
- static schema: z.ZodObject<{
16
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
17
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
18
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
19
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
20
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
21
- }, z.ZodTypeAny, "passthrough">>;
22
- render({ delimiter, children }: SuccessCriteriaProps, _resolvedValue: void, _context: RenderContext): PuptNode;
23
- }
24
- export {};
25
- //# sourceMappingURL=SuccessCriteria.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SuccessCriteria.d.ts","sourceRoot":"","sources":["../../../src/components/structural/SuccessCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,qBAAqB;;;;;;gCAElB,CAAC;AAEjB,KAAK,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE3F,qBAAa,eAAgB,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAClE,MAAM,CAAC,MAAM;;;;;;qCAAyB;IAEtC,MAAM,CAAC,EAAE,SAAiB,EAAE,QAAQ,EAAE,EAAE,oBAAoB,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAYvH"}
@@ -1,25 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const taskSchema: z.ZodObject<{
5
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
6
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
8
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
10
- }, z.ZodTypeAny, "passthrough">>;
11
- type TaskProps = z.infer<typeof taskSchema> & {
12
- children: PuptNode;
13
- };
14
- export declare class Task extends Component<TaskProps> {
15
- static schema: z.ZodObject<{
16
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
17
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
18
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
19
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
20
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
21
- }, z.ZodTypeAny, "passthrough">>;
22
- render({ delimiter, children }: TaskProps, _resolvedValue: void, _context: RenderContext): PuptNode;
23
- }
24
- export {};
25
- //# sourceMappingURL=Task.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../../src/components/structural/Task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,UAAU;;;;;;gCAEP,CAAC;AAEjB,KAAK,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC;AAErE,qBAAa,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IAC5C,MAAM,CAAC,MAAM;;;;;;qCAAc;IAE3B,MAAM,CAAC,EAAE,SAAiB,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAY5G"}
@@ -1,25 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const toneSchema: z.ZodObject<{
5
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
6
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
8
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
10
- }, z.ZodTypeAny, "passthrough">>;
11
- type ToneProps = z.infer<typeof toneSchema> & {
12
- children: PuptNode;
13
- };
14
- export declare class Tone extends Component<ToneProps> {
15
- static schema: z.ZodObject<{
16
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
17
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
18
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
19
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
20
- delimiter: z.ZodOptional<z.ZodEnum<["xml", "markdown", "none"]>>;
21
- }, z.ZodTypeAny, "passthrough">>;
22
- render({ delimiter, children }: ToneProps, _resolvedValue: void, _context: RenderContext): PuptNode;
23
- }
24
- export {};
25
- //# sourceMappingURL=Tone.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tone.d.ts","sourceRoot":"","sources":["../../../src/components/structural/Tone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,UAAU;;;;;;gCAEP,CAAC;AAEjB,KAAK,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC;AAErE,qBAAa,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IAC5C,MAAM,CAAC,MAAM;;;;;;qCAAc;IAE3B,MAAM,CAAC,EAAE,SAAiB,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAY5G"}
@@ -1,12 +0,0 @@
1
- export { Prompt } from './Prompt';
2
- export { Section } from './Section';
3
- export { Role } from './Role';
4
- export { Task } from './Task';
5
- export { Context } from './Context';
6
- export { Constraint } from './Constraint';
7
- export { Format } from './Format';
8
- export { Audience } from './Audience';
9
- export { Tone } from './Tone';
10
- export { SuccessCriteria } from './SuccessCriteria';
11
- export { Criterion } from './Criterion';
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/structural/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const cwdSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
5
- type CwdProps = z.infer<typeof cwdSchema>;
6
- export declare class Cwd extends Component<CwdProps> {
7
- static schema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
8
- render(_props: CwdProps, _resolvedValue: void, _context: RenderContext): PuptNode;
9
- }
10
- export {};
11
- //# sourceMappingURL=Cwd.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Cwd.d.ts","sourceRoot":"","sources":["../../../src/components/utility/Cwd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,SAAS,uJAA6B,CAAC;AAEpD,KAAK,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE1C,qBAAa,GAAI,SAAQ,SAAS,CAAC,QAAQ,CAAC;IAC1C,MAAM,CAAC,MAAM,wJAAa;IAE1B,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAGlF"}
@@ -1,23 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const dateTimeSchema: z.ZodObject<{
5
- format: z.ZodOptional<z.ZodString>;
6
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7
- format: z.ZodOptional<z.ZodString>;
8
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9
- format: z.ZodOptional<z.ZodString>;
10
- }, z.ZodTypeAny, "passthrough">>;
11
- type DateTimeProps = z.infer<typeof dateTimeSchema>;
12
- export declare class DateTime extends Component<DateTimeProps> {
13
- static schema: z.ZodObject<{
14
- format: z.ZodOptional<z.ZodString>;
15
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
16
- format: z.ZodOptional<z.ZodString>;
17
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
18
- format: z.ZodOptional<z.ZodString>;
19
- }, z.ZodTypeAny, "passthrough">>;
20
- render({ format }: DateTimeProps, _resolvedValue: void, _context: RenderContext): PuptNode;
21
- }
22
- export {};
23
- //# sourceMappingURL=DateTime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../src/components/utility/DateTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,cAAc;;;;;;gCAEX,CAAC;AAEjB,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEpD,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,CAAC;IACpD,MAAM,CAAC,MAAM;;;;;;qCAAkB;IAE/B,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAkB3F"}
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const hostnameSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
5
- type HostnameProps = z.infer<typeof hostnameSchema>;
6
- export declare class Hostname extends Component<HostnameProps> {
7
- static schema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
8
- render(_props: HostnameProps, _resolvedValue: void, context: RenderContext): PuptNode;
9
- }
10
- export {};
11
- //# sourceMappingURL=Hostname.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Hostname.d.ts","sourceRoot":"","sources":["../../../src/components/utility/Hostname.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,cAAc,uJAA6B,CAAC;AAEzD,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEpD,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,CAAC;IACpD,MAAM,CAAC,MAAM,wJAAkB;IAE/B,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,GAAG,QAAQ;CAItF"}
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const timestampSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
5
- type TimestampProps = z.infer<typeof timestampSchema>;
6
- export declare class Timestamp extends Component<TimestampProps> {
7
- static schema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
8
- render(_props: TimestampProps, _resolvedValue: void, _context: RenderContext): PuptNode;
9
- }
10
- export {};
11
- //# sourceMappingURL=Timestamp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timestamp.d.ts","sourceRoot":"","sources":["../../../src/components/utility/Timestamp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,eAAe,uJAA6B,CAAC;AAE1D,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAEtD,qBAAa,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IACtD,MAAM,CAAC,MAAM,wJAAmB;IAEhC,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAIxF"}
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const uuidSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
5
- type UUIDProps = z.infer<typeof uuidSchema>;
6
- export declare class UUID extends Component<UUIDProps> {
7
- static schema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
8
- render(_props: UUIDProps, _resolvedValue: void, _context: RenderContext): PuptNode;
9
- }
10
- export {};
11
- //# sourceMappingURL=UUID.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UUID.d.ts","sourceRoot":"","sources":["../../../src/components/utility/UUID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,UAAU,uJAA6B,CAAC;AAErD,KAAK,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE5C,qBAAa,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IAC5C,MAAM,CAAC,MAAM,wJAAc;IAE3B,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,GAAG,QAAQ;CAInF"}
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { Component } from '../../component';
3
- import { PuptNode, RenderContext } from '../../types';
4
- export declare const usernameSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
5
- type UsernameProps = z.infer<typeof usernameSchema>;
6
- export declare class Username extends Component<UsernameProps> {
7
- static schema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
8
- render(_props: UsernameProps, _resolvedValue: void, context: RenderContext): PuptNode;
9
- }
10
- export {};
11
- //# sourceMappingURL=Username.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Username.d.ts","sourceRoot":"","sources":["../../../src/components/utility/Username.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,cAAc,uJAA6B,CAAC;AAEzD,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEpD,qBAAa,QAAS,SAAQ,SAAS,CAAC,aAAa,CAAC;IACpD,MAAM,CAAC,MAAM,wJAAkB;IAE/B,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,GAAG,QAAQ;CAItF"}
@@ -1,7 +0,0 @@
1
- export { UUID } from './UUID';
2
- export { Timestamp } from './Timestamp';
3
- export { DateTime } from './DateTime';
4
- export { Hostname } from './Hostname';
5
- export { Username } from './Username';
6
- export { Cwd } from './Cwd';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/utility/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC"}
@@ -1,118 +0,0 @@
1
- import { PuptElement, ComponentType } from './types';
2
- /**
3
- * Custom component registration for browser environments.
4
- *
5
- * In browser environments, dynamically evaluated code can only import from URLs
6
- * that the import map knows about. For custom components that aren't published
7
- * to npm, you can pass them here and reference them by name in your source.
8
- *
9
- * @example
10
- * ```typescript
11
- * const element = await createPromptFromSource(source, 'test.prompt', {
12
- * components: {
13
- * MyHeader: MyHeaderComponent,
14
- * CustomCard: CustomCardComponent,
15
- * }
16
- * });
17
- * ```
18
- *
19
- * Then in your source:
20
- * ```tsx
21
- * <Prompt name="test">
22
- * <MyHeader>Title</MyHeader>
23
- * <CustomCard>Content</CustomCard>
24
- * </Prompt>
25
- * ```
26
- */
27
- export interface CreatePromptOptions {
28
- /**
29
- * Custom components to make available in the evaluated source.
30
- * Keys are component names, values are component classes.
31
- *
32
- * In browser environments, this is the primary way to use custom components
33
- * that aren't published to npm.
34
- */
35
- components?: Record<string, ComponentType>;
36
- }
37
- /**
38
- * Global key used for injecting custom components.
39
- * @internal
40
- */
41
- export declare const CUSTOM_COMPONENTS_GLOBAL = "__PUPT_CUSTOM_COMPONENTS__";
42
- /**
43
- * Declare the global type for TypeScript
44
- */
45
- declare global {
46
- var __PUPT_CUSTOM_COMPONENTS__: Record<string, ComponentType> | undefined;
47
- }
48
- /**
49
- * Create a PuptElement from a TSX source string.
50
- * Transforms the JSX and evaluates it to produce an element tree.
51
- *
52
- * For .prompt files or raw JSX without imports, built-in component imports
53
- * are automatically injected.
54
- *
55
- * For .tsx files with imports, the source is used as-is.
56
- *
57
- * @param source - TSX source code
58
- * @param filename - Filename for error messages and source maps
59
- * @param options - Optional configuration
60
- * @returns The default export as a PuptElement
61
- *
62
- * @example
63
- * ```typescript
64
- * // .tsx file with imports
65
- * const source = `
66
- * import { Prompt, Role } from 'pupt-lib';
67
- * export default (
68
- * <Prompt name="test">
69
- * <Role>Assistant</Role>
70
- * </Prompt>
71
- * );
72
- * `;
73
- * const element = await createPromptFromSource(source, 'test.tsx');
74
- * ```
75
- *
76
- * @example
77
- * ```typescript
78
- * // .prompt file (auto-imports built-in components)
79
- * const source = `
80
- * <Prompt name="test">
81
- * <Role>Assistant</Role>
82
- * </Prompt>
83
- * `;
84
- * const element = await createPromptFromSource(source, 'test.prompt');
85
- * ```
86
- *
87
- * @example
88
- * ```typescript
89
- * // Using custom components in browser environments
90
- * const source = `
91
- * <Prompt name="test">
92
- * <MyCustomHeader>Welcome</MyCustomHeader>
93
- * </Prompt>
94
- * `;
95
- * const element = await createPromptFromSource(source, 'test.prompt', {
96
- * components: {
97
- * MyCustomHeader: MyCustomHeaderComponent,
98
- * }
99
- * });
100
- * ```
101
- */
102
- export declare function createPromptFromSource(source: string, filename: string, options?: CreatePromptOptions): Promise<PuptElement>;
103
- /**
104
- * Create a PuptElement by loading and transforming a TSX file.
105
- * Reads the file, transforms the JSX, and evaluates it.
106
- *
107
- * @param filePath - Path to the TSX file
108
- * @param options - Optional configuration
109
- * @returns The default export as a PuptElement
110
- *
111
- * @example
112
- * ```typescript
113
- * const element = await createPrompt('./prompts/greeting.tsx');
114
- * const result = render(element, { inputs: { name: 'World' } });
115
- * ```
116
- */
117
- export declare function createPrompt(filePath: string, options?: CreatePromptOptions): Promise<PuptElement>;
118
- //# sourceMappingURL=create-prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-prompt.d.ts","sourceRoot":"","sources":["../src/create-prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC5C;AAED;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ources":["../../src/jsx-runtime/jsx-dev-runtime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtD,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,EACxC,KAAK,EAAE,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,EAClC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,iBAAiB,EAAE,OAAO,EAC1B,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,OAAO,GACb,WAAW,CAAC,CAAC,CAAC,CAIhB"}
package/dist/render.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import { PuptElement, RenderResult, RenderOptions } from './types';
2
- /**
3
- * Render a PuptElement tree to a string.
4
- *
5
- * This function is async to support components with async render methods.
6
- * Components can perform async operations like API calls in their render methods.
7
- *
8
- * @param element - The root PuptElement to render
9
- * @param options - Render options including inputs and environment
10
- * @returns A Promise resolving to the RenderResult
11
- *
12
- * @example
13
- * ```typescript
14
- * const result = await render(<MyPrompt />);
15
- * console.log(result.text);
16
- * ```
17
- */
18
- export declare function render(element: PuptElement, options?: RenderOptions): Promise<RenderResult>;
19
- //# sourceMappingURL=render.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,YAAY,EAAE,aAAa,EAAmD,MAAM,SAAS,CAAC;AAuInI;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,MAAM,CAC1B,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAwCvB"}
@@ -1,3 +0,0 @@
1
- export { usesToImportPlugin } from './uses-to-import';
2
- export { nameHoistingPlugin } from './name-hoisting';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/babel-plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,8 +0,0 @@
1
- import { PluginObj, types as BabelTypes } from '@babel/core';
2
- /**
3
- * Babel plugin that hoists named JSX elements to variable declarations.
4
- */
5
- export declare function nameHoistingPlugin({ types: t }: {
6
- types: typeof BabelTypes;
7
- }): PluginObj;
8
- //# sourceMappingURL=name-hoisting.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"name-hoisting.d.ts","sourceRoot":"","sources":["../../../src/services/babel-plugins/name-hoisting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,UAAU,EAAY,MAAM,aAAa,CAAC;AA0K5E;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAAE,KAAK,EAAE,OAAO,UAAU,CAAA;CAAE,GAAG,SAAS,CA0GxF"}
@@ -1,16 +0,0 @@
1
- import { PluginObj, types as BabelTypes } from '@babel/core';
2
- interface PluginState {
3
- file: {
4
- path: {
5
- unshiftContainer: (key: string, node: BabelTypes.Statement | BabelTypes.Statement[]) => void;
6
- };
7
- };
8
- }
9
- /**
10
- * Babel plugin that transforms <Uses> elements to import declarations.
11
- */
12
- export declare function usesToImportPlugin({ types: t }: {
13
- types: typeof BabelTypes;
14
- }): PluginObj<PluginState>;
15
- export {};
16
- //# sourceMappingURL=uses-to-import.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uses-to-import.d.ts","sourceRoot":"","sources":["../../../src/services/babel-plugins/uses-to-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAElE,UAAU,WAAW;IACnB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,KAAK,IAAI,CAAC;SAC9F,CAAC;KACH,CAAC;CACH;AA0GD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAAE,KAAK,EAAE,OAAO,UAAU,CAAA;CAAE,GAAG,SAAS,CAAC,WAAW,CAAC,CA6CrG"}
@@ -1,185 +0,0 @@
1
- /**
2
- * Browser support utilities for pupt-lib.
3
- * Provides import map generation and CDN URL resolution for browser environments.
4
- */
5
- /**
6
- * Supported CDN providers
7
- */
8
- export type CdnProvider = 'esm.sh' | 'unpkg' | 'jsdelivr' | 'skypack';
9
- /**
10
- * Options for CDN resolution
11
- */
12
- export interface CdnOptions {
13
- /** CDN provider to use */
14
- cdn?: CdnProvider;
15
- /** Custom template URL with {name}, {version}, and optionally {path} placeholders */
16
- cdnTemplate?: string;
17
- /** Optional path within the package (e.g., 'dist/index.js') */
18
- path?: string;
19
- /** Optional scopes for import map */
20
- scopes?: Record<string, Record<string, string>>;
21
- }
22
- /**
23
- * Represents a dependency for import map generation
24
- */
25
- export interface Dependency {
26
- name: string;
27
- version: string;
28
- }
29
- /**
30
- * Standard import map structure
31
- * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap
32
- */
33
- export interface ImportMap {
34
- imports: Record<string, string>;
35
- scopes?: Record<string, Record<string, string>>;
36
- }
37
- /**
38
- * Resolve a CDN URL for a package.
39
- *
40
- * @param name - Package name (e.g., '@acme/pkg' or 'lodash')
41
- * @param version - Package version (e.g., '1.0.0')
42
- * @param options - CDN options
43
- * @returns The resolved CDN URL
44
- *
45
- * @example
46
- * ```typescript
47
- * resolveCdn('@acme/pkg', '1.0.0', { cdn: 'esm.sh' });
48
- * // => 'https://esm.sh/@acme/pkg@1.0.0'
49
- *
50
- * resolveCdn('@acme/pkg', '1.0.0', { cdn: 'unpkg' });
51
- * // => 'https://unpkg.com/@acme/pkg@1.0.0'
52
- *
53
- * resolveCdn('@acme/pkg', '1.0.0', {
54
- * cdnTemplate: 'https://cdn.example.com/{name}@{version}'
55
- * });
56
- * // => 'https://cdn.example.com/@acme/pkg@1.0.0'
57
- * ```
58
- */
59
- export declare function resolveCdn(name: string, version: string, options: CdnOptions): string;
60
- /**
61
- * Generate an import map for a list of dependencies.
62
- *
63
- * @param dependencies - Array of dependencies with name and version
64
- * @param options - CDN options
65
- * @returns An ImportMap object ready to be serialized
66
- *
67
- * @example
68
- * ```typescript
69
- * const deps = [
70
- * { name: 'pupt-lib', version: '1.0.0' },
71
- * { name: '@acme/prompts', version: '2.0.0' },
72
- * ];
73
- *
74
- * const importMap = generateImportMap(deps, { cdn: 'esm.sh' });
75
- * // => {
76
- * // imports: {
77
- * // 'pupt-lib': 'https://esm.sh/pupt-lib@1.0.0',
78
- * // '@acme/prompts': 'https://esm.sh/@acme/prompts@2.0.0'
79
- * // }
80
- * // }
81
- * ```
82
- */
83
- export declare function generateImportMap(dependencies: Dependency[], options: CdnOptions): ImportMap;
84
- /**
85
- * Serialize an import map to a JSON string for embedding in HTML.
86
- *
87
- * @param importMap - The import map to serialize
88
- * @returns JSON string
89
- *
90
- * @example
91
- * ```typescript
92
- * const json = serializeImportMap(importMap);
93
- * // Use in HTML: <script type="importmap">${json}</script>
94
- * ```
95
- */
96
- export declare function serializeImportMap(importMap: ImportMap): string;
97
- /**
98
- * Generate an HTML script tag with an import map.
99
- *
100
- * @param dependencies - Array of dependencies with name and version
101
- * @param options - CDN options
102
- * @returns HTML string for the import map script tag
103
- *
104
- * @example
105
- * ```typescript
106
- * const html = generateImportMapScript(deps, { cdn: 'esm.sh' });
107
- * // => <script type="importmap">{"imports": {...}}</script>
108
- * ```
109
- */
110
- export declare function generateImportMapScript(dependencies: Dependency[], options: CdnOptions): string;
111
- /**
112
- * Options for generating pupt-lib import map
113
- */
114
- export interface PuptLibImportMapOptions {
115
- /** CDN provider to use (default: 'esm.sh') */
116
- cdn?: CdnProvider;
117
- /** Custom CDN template URL */
118
- cdnTemplate?: string;
119
- /** pupt-lib version (default: current installed version) */
120
- puptLibVersion?: string;
121
- /** Additional dependencies to include */
122
- additionalDependencies?: Dependency[];
123
- }
124
- /**
125
- * Generate an import map for browser usage of pupt-lib.
126
- *
127
- * This creates the minimal import map required to use `createPromptFromSource`
128
- * in browser environments. It includes:
129
- * - pupt-lib main entry
130
- * - pupt-lib/jsx-runtime subpath
131
- *
132
- * Note: zod, minisearch, and @babel/standalone are bundled into pupt-lib's dist
133
- * and do not need separate import map entries.
134
- *
135
- * @param options - Configuration options
136
- * @returns An ImportMap object ready to be serialized
137
- *
138
- * @example
139
- * ```typescript
140
- * // Using esm.sh (default)
141
- * const importMap = generatePuptLibImportMap({ puptLibVersion: '1.1.0' });
142
- *
143
- * // Using unpkg
144
- * const importMap = generatePuptLibImportMap({
145
- * puptLibVersion: '1.1.0',
146
- * cdn: 'unpkg'
147
- * });
148
- *
149
- * // With additional dependencies
150
- * const importMap = generatePuptLibImportMap({
151
- * puptLibVersion: '1.1.0',
152
- * additionalDependencies: [
153
- * { name: 'my-component-lib', version: '2.0.0' }
154
- * ]
155
- * });
156
- * ```
157
- *
158
- * @example
159
- * ```html
160
- * <!-- Usage in HTML -->
161
- * <script type="importmap">
162
- * {
163
- * "imports": {
164
- * "pupt-lib": "https://esm.sh/pupt-lib@1.1.0",
165
- * "pupt-lib/jsx-runtime": "https://esm.sh/pupt-lib@1.1.0/jsx-runtime"
166
- * }
167
- * }
168
- * </script>
169
- * ```
170
- */
171
- export declare function generatePuptLibImportMap(options?: PuptLibImportMapOptions): ImportMap;
172
- /**
173
- * Generate an HTML script tag with the pupt-lib import map.
174
- *
175
- * @param options - Configuration options
176
- * @returns HTML string for the import map script tag
177
- *
178
- * @example
179
- * ```typescript
180
- * const html = generatePuptLibImportMapScript({ puptLibVersion: '1.1.0' });
181
- * // Use in HTML head: document.head.insertAdjacentHTML('afterbegin', html);
182
- * ```
183
- */
184
- export declare function generatePuptLibImportMapScript(options?: PuptLibImportMapOptions): string;
185
- //# sourceMappingURL=browser-support.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser-support.d.ts","sourceRoot":"","sources":["../../src/services/browser-support.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAYtE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,0BAA0B;IAC1B,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC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