mlform 0.1.2 → 0.1.4

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 (299) hide show
  1. package/README.md +241 -88
  2. package/dist/design-system-CrrSGfFB.js +1352 -0
  3. package/dist/engine-nnhWPT2L.js +5301 -0
  4. package/dist/kit-Dt_1Fxlc.js +76 -0
  5. package/dist/mlform/design-system.mjs +2 -0
  6. package/dist/mlform/engine.mjs +3 -0
  7. package/dist/mlform/kit.mjs +3 -0
  8. package/dist/mlform/primitives.mjs +2 -0
  9. package/dist/mlform/questionnaire.mjs +640 -0
  10. package/dist/mlform/transport.mjs +2 -0
  11. package/dist/mlform.mjs +4 -709
  12. package/dist/primitives-Pi-ztAr6.js +5063 -0
  13. package/dist/transport-A1RsnZhD.js +2143 -0
  14. package/dist/types/src/design-system/constants.d.ts +34 -0
  15. package/dist/types/src/design-system/contract/component-keys.d.ts +2 -0
  16. package/dist/types/src/design-system/contract/component-tokens.d.ts +5 -0
  17. package/dist/types/src/design-system/contract/global-tokens.d.ts +7 -0
  18. package/dist/types/src/design-system/contract/index.d.ts +4 -0
  19. package/dist/types/src/design-system/contract/token-keys.d.ts +12 -0
  20. package/dist/types/src/design-system/index.d.ts +8 -0
  21. package/dist/types/src/design-system/recipes/contrast.d.ts +2 -0
  22. package/dist/types/src/design-system/recipes/default.d.ts +2 -0
  23. package/dist/types/src/design-system/recipes/index.d.ts +4 -0
  24. package/dist/types/src/design-system/recipes/minimal.d.ts +2 -0
  25. package/dist/types/src/design-system/recipes/soft.d.ts +2 -0
  26. package/dist/types/src/design-system/registry/builtins.d.ts +5 -0
  27. package/dist/types/src/design-system/registry/create-registry.d.ts +2 -0
  28. package/dist/types/src/design-system/registry/deep-freeze.d.ts +5 -0
  29. package/dist/types/src/design-system/registry/define-recipe.d.ts +2 -0
  30. package/dist/types/src/design-system/registry/define-theme.d.ts +2 -0
  31. package/dist/types/src/design-system/registry/define-token-maps.d.ts +6 -0
  32. package/dist/types/src/design-system/registry/index.d.ts +5 -0
  33. package/dist/types/src/design-system/resolve/diagnostics.d.ts +9 -0
  34. package/dist/types/src/design-system/resolve/index.d.ts +5 -0
  35. package/dist/types/src/design-system/resolve/merge-config.d.ts +2 -0
  36. package/dist/types/src/design-system/resolve/migrate-tokens.d.ts +44 -0
  37. package/dist/types/src/design-system/resolve/resolve-mode.d.ts +6 -0
  38. package/dist/types/src/design-system/resolve/resolve-recipe.d.ts +2 -0
  39. package/dist/types/src/design-system/resolve/resolve-theme.d.ts +2 -0
  40. package/dist/types/src/design-system/resolve/resolve-tokens.d.ts +2 -0
  41. package/dist/types/src/design-system/runtime/apply-tokens.d.ts +4 -0
  42. package/dist/types/src/design-system/runtime/attach-design-system.d.ts +11 -0
  43. package/dist/types/src/design-system/runtime/create-stylesheet.d.ts +11 -0
  44. package/dist/types/src/design-system/runtime/declarations.d.ts +5 -0
  45. package/dist/types/src/design-system/runtime/design-system-controller.d.ts +9 -0
  46. package/dist/types/src/design-system/runtime/host-state.d.ts +3 -0
  47. package/dist/types/src/design-system/runtime/hydrate-design-system.d.ts +25 -0
  48. package/dist/types/src/design-system/runtime/index.d.ts +8 -0
  49. package/dist/types/src/design-system/themes/cobalt.d.ts +2 -0
  50. package/dist/types/src/design-system/themes/graphite.d.ts +2 -0
  51. package/dist/types/src/design-system/themes/index.d.ts +5 -0
  52. package/dist/types/src/design-system/themes/neutral.d.ts +2 -0
  53. package/dist/types/src/design-system/themes/sage.d.ts +2 -0
  54. package/dist/types/src/design-system/themes/sunset.d.ts +2 -0
  55. package/dist/types/src/design-system/tokens/base.d.ts +5 -0
  56. package/dist/types/src/design-system/tokens/contrast.d.ts +8 -0
  57. package/dist/types/src/design-system/tokens/density.d.ts +9 -0
  58. package/dist/types/src/design-system/tokens/forced-colors.d.ts +12 -0
  59. package/dist/types/src/design-system/tokens/index.d.ts +5 -0
  60. package/dist/types/src/design-system/tokens/motion.d.ts +2 -0
  61. package/dist/types/src/design-system/types.d.ts +225 -0
  62. package/dist/types/src/engine/builtins/fields/boolean.d.ts +8 -0
  63. package/dist/types/src/engine/builtins/fields/category.d.ts +11 -0
  64. package/dist/types/src/engine/builtins/fields/date.d.ts +9 -0
  65. package/dist/types/src/engine/builtins/fields/long-text.d.ts +10 -0
  66. package/dist/types/src/engine/builtins/fields/multi-choice.d.ts +12 -0
  67. package/dist/types/src/engine/builtins/fields/number.d.ts +11 -0
  68. package/dist/types/src/engine/builtins/fields/rating.d.ts +9 -0
  69. package/dist/types/src/engine/builtins/fields/series.d.ts +20 -0
  70. package/dist/types/src/engine/builtins/fields/single-choice.d.ts +12 -0
  71. package/dist/types/src/engine/builtins/fields/text.d.ts +10 -0
  72. package/dist/types/src/engine/builtins/index.d.ts +97 -0
  73. package/dist/types/src/engine/builtins/reports/classifier.d.ts +8 -0
  74. package/dist/types/src/engine/builtins/reports/regressor.d.ts +8 -0
  75. package/dist/types/src/engine/builtins/shared.d.ts +49 -0
  76. package/dist/types/src/engine/comparison.d.ts +2 -0
  77. package/dist/types/src/engine/constants.d.ts +51 -0
  78. package/dist/types/src/engine/declarative/explanation.d.ts +2 -0
  79. package/dist/types/src/engine/declarative/field.d.ts +2 -0
  80. package/dist/types/src/engine/declarative/presentation.d.ts +61 -0
  81. package/dist/types/src/engine/declarative/report.d.ts +2 -0
  82. package/dist/types/src/engine/equality.d.ts +4 -0
  83. package/dist/types/src/engine/errors.d.ts +28 -0
  84. package/dist/types/src/engine/explanations/controller.d.ts +13 -0
  85. package/dist/types/src/engine/explanations/index.d.ts +1 -0
  86. package/dist/types/src/engine/fields/controller.d.ts +30 -0
  87. package/dist/types/src/engine/fields/index.d.ts +1 -0
  88. package/dist/types/src/engine/form.d.ts +2 -0
  89. package/dist/types/src/engine/index.d.ts +11 -0
  90. package/dist/types/src/engine/paths.d.ts +2 -0
  91. package/dist/types/src/engine/registry/index.d.ts +26 -0
  92. package/dist/types/src/engine/reports/controller.d.ts +19 -0
  93. package/dist/types/src/engine/reports/index.d.ts +1 -0
  94. package/dist/types/src/engine/schema/index.d.ts +7 -0
  95. package/dist/types/src/engine/state/engine.d.ts +60 -0
  96. package/dist/types/src/engine/state/index.d.ts +3 -0
  97. package/dist/types/src/engine/state/snapshots.d.ts +5 -0
  98. package/dist/types/src/engine/state/store.d.ts +13 -0
  99. package/dist/types/src/engine/submission/abort.d.ts +15 -0
  100. package/dist/types/src/engine/submission/explanations.d.ts +2 -0
  101. package/dist/types/src/engine/submission/index.d.ts +5 -0
  102. package/dist/types/src/engine/submission/lifecycle.d.ts +16 -0
  103. package/dist/types/src/engine/submission/pipeline.d.ts +2 -0
  104. package/dist/types/src/engine/submission/reports.d.ts +12 -0
  105. package/dist/types/src/engine/submission/request.d.ts +23 -0
  106. package/dist/types/src/engine/submission/result.d.ts +4 -0
  107. package/dist/types/src/engine/submission/submitter.d.ts +40 -0
  108. package/dist/types/src/engine/types/explanation.d.ts +109 -0
  109. package/dist/types/src/engine/types/field.d.ts +172 -0
  110. package/dist/types/src/engine/types/form.d.ts +120 -0
  111. package/dist/types/src/engine/types/index.d.ts +9 -0
  112. package/dist/types/src/engine/types/pipeline.d.ts +31 -0
  113. package/dist/types/src/engine/types/registry.d.ts +17 -0
  114. package/dist/types/src/engine/types/report.d.ts +87 -0
  115. package/dist/types/src/engine/types/transport.d.ts +41 -0
  116. package/dist/types/src/engine/utils.d.ts +9 -0
  117. package/dist/types/src/engine/validation/conditions.d.ts +11 -0
  118. package/dist/types/src/engine/validation/field.d.ts +29 -0
  119. package/dist/types/src/engine/validation/form.d.ts +35 -0
  120. package/dist/types/src/engine/validation/index.d.ts +3 -0
  121. package/dist/types/src/engine/values.d.ts +2 -0
  122. package/dist/types/src/index.d.ts +7 -0
  123. package/dist/types/src/kit/constants.d.ts +4 -0
  124. package/dist/types/src/kit/defaults.d.ts +11 -0
  125. package/dist/types/src/kit/index.d.ts +4 -0
  126. package/dist/types/src/kit/mount-form.d.ts +3 -0
  127. package/dist/types/src/kit/types.d.ts +52 -0
  128. package/dist/types/src/primitives/base-async-report-element.d.ts +19 -0
  129. package/dist/types/src/primitives/base-explanation-element.d.ts +21 -0
  130. package/dist/types/src/primitives/base-field-element.d.ts +21 -0
  131. package/dist/types/src/primitives/base-report-element.d.ts +15 -0
  132. package/dist/types/src/primitives/components/declarative-explanation.d.ts +5 -0
  133. package/dist/types/src/primitives/components/declarative-field.d.ts +6 -0
  134. package/dist/types/src/primitives/components/declarative-report.d.ts +5 -0
  135. package/dist/types/src/primitives/components/explanation-panel.d.ts +22 -0
  136. package/dist/types/src/primitives/components/field-frame.d.ts +21 -0
  137. package/dist/types/src/primitives/components/form-errors.d.ts +19 -0
  138. package/dist/types/src/primitives/components/form-root.d.ts +29 -0
  139. package/dist/types/src/primitives/components/presentation.d.ts +4 -0
  140. package/dist/types/src/primitives/components/report-frame.d.ts +22 -0
  141. package/dist/types/src/primitives/components/submit-button.d.ts +21 -0
  142. package/dist/types/src/primitives/components/unsupported-component.d.ts +14 -0
  143. package/dist/types/src/primitives/constants.d.ts +94 -0
  144. package/dist/types/src/primitives/controller-binding.d.ts +32 -0
  145. package/dist/types/src/primitives/fields/boolean-field.d.ts +6 -0
  146. package/dist/types/src/primitives/fields/category-field.d.ts +6 -0
  147. package/dist/types/src/primitives/fields/date-field.d.ts +6 -0
  148. package/dist/types/src/primitives/fields/long-text-field.d.ts +6 -0
  149. package/dist/types/src/primitives/fields/multi-choice-field.d.ts +6 -0
  150. package/dist/types/src/primitives/fields/number-field.d.ts +8 -0
  151. package/dist/types/src/primitives/fields/rating-field.d.ts +6 -0
  152. package/dist/types/src/primitives/fields/series-field.d.ts +8 -0
  153. package/dist/types/src/primitives/fields/single-choice-field.d.ts +6 -0
  154. package/dist/types/src/primitives/fields/text-field.d.ts +6 -0
  155. package/dist/types/src/primitives/index.d.ts +8 -0
  156. package/dist/types/src/primitives/mount-form.d.ts +4 -0
  157. package/dist/types/src/primitives/register.d.ts +0 -0
  158. package/dist/types/src/primitives/registry.d.ts +3 -0
  159. package/dist/types/src/primitives/reports/classifier-report.d.ts +5 -0
  160. package/dist/types/src/primitives/reports/regressor-report.d.ts +5 -0
  161. package/dist/types/src/primitives/types.d.ts +128 -0
  162. package/dist/types/src/primitives/utils.d.ts +3 -0
  163. package/dist/types/src/questionnaire/constants.d.ts +31 -0
  164. package/dist/types/src/questionnaire/defaults.d.ts +8 -0
  165. package/dist/types/src/questionnaire/engine/controller.d.ts +12 -0
  166. package/dist/types/src/questionnaire/engine/schema.d.ts +9 -0
  167. package/dist/types/src/questionnaire/errors.d.ts +3 -0
  168. package/dist/types/src/questionnaire/index.d.ts +6 -0
  169. package/dist/types/src/questionnaire/mount.d.ts +3 -0
  170. package/dist/types/src/questionnaire/primitives/components/questionnaire-root.d.ts +23 -0
  171. package/dist/types/src/questionnaire/primitives/components/step-indicator.d.ts +14 -0
  172. package/dist/types/src/questionnaire/primitives/register.d.ts +0 -0
  173. package/dist/types/src/questionnaire/types.d.ts +69 -0
  174. package/dist/types/src/shared/errors.d.ts +3 -0
  175. package/dist/types/src/shared/index.d.ts +1 -0
  176. package/dist/types/src/transport/capabilities.d.ts +7 -0
  177. package/dist/types/src/transport/clone.d.ts +6 -0
  178. package/dist/types/src/transport/composition/fallback.d.ts +2 -0
  179. package/dist/types/src/transport/composition/fanout.d.ts +3 -0
  180. package/dist/types/src/transport/composition/hedged.d.ts +2 -0
  181. package/dist/types/src/transport/composition/index.d.ts +7 -0
  182. package/dist/types/src/transport/composition/load-balancing.d.ts +2 -0
  183. package/dist/types/src/transport/composition/pipeline.d.ts +2 -0
  184. package/dist/types/src/transport/composition/racing.d.ts +2 -0
  185. package/dist/types/src/transport/composition/routing.d.ts +3 -0
  186. package/dist/types/src/transport/constants.d.ts +34 -0
  187. package/dist/types/src/transport/errors.d.ts +36 -0
  188. package/dist/types/src/transport/index.d.ts +9 -0
  189. package/dist/types/src/transport/internal.d.ts +110 -0
  190. package/dist/types/src/transport/middleware/auth.d.ts +2 -0
  191. package/dist/types/src/transport/middleware/cache.d.ts +2 -0
  192. package/dist/types/src/transport/middleware/circuit-breaker.d.ts +2 -0
  193. package/dist/types/src/transport/middleware/dedup.d.ts +2 -0
  194. package/dist/types/src/transport/middleware/index.d.ts +12 -0
  195. package/dist/types/src/transport/middleware/logging.d.ts +2 -0
  196. package/dist/types/src/transport/middleware/metrics.d.ts +2 -0
  197. package/dist/types/src/transport/middleware/pipe.d.ts +2 -0
  198. package/dist/types/src/transport/middleware/rate-limit.d.ts +2 -0
  199. package/dist/types/src/transport/middleware/retry.d.ts +2 -0
  200. package/dist/types/src/transport/middleware/timeout.d.ts +2 -0
  201. package/dist/types/src/transport/middleware/tracing.d.ts +2 -0
  202. package/dist/types/src/transport/middleware/transform.d.ts +3 -0
  203. package/dist/types/src/transport/policy-context.d.ts +3 -0
  204. package/dist/types/src/transport/protocols/graphql.d.ts +2 -0
  205. package/dist/types/src/transport/protocols/grpc.d.ts +5 -0
  206. package/dist/types/src/transport/protocols/index.d.ts +5 -0
  207. package/dist/types/src/transport/protocols/json.d.ts +2 -0
  208. package/dist/types/src/transport/protocols/sse.d.ts +2 -0
  209. package/dist/types/src/transport/protocols/websocket.d.ts +2 -0
  210. package/dist/types/src/transport/runtime.d.ts +4 -0
  211. package/dist/types/src/transport/state/cache-store.d.ts +2 -0
  212. package/dist/types/src/transport/state/circuit-breaker.d.ts +2 -0
  213. package/dist/types/src/transport/state/health.d.ts +2 -0
  214. package/dist/types/src/transport/state/index.d.ts +5 -0
  215. package/dist/types/src/transport/state/rate-limiter.d.ts +2 -0
  216. package/dist/types/src/transport/state/session.d.ts +2 -0
  217. package/dist/types/src/transport/types/capabilities.d.ts +35 -0
  218. package/dist/types/src/transport/types/core.d.ts +57 -0
  219. package/dist/types/src/transport/types/events.d.ts +50 -0
  220. package/dist/types/src/transport/types/index.d.ts +7 -0
  221. package/dist/types/src/transport/types/middleware.d.ts +3 -0
  222. package/dist/types/src/transport/types/options.d.ts +258 -0
  223. package/dist/types/src/transport/types/session.d.ts +48 -0
  224. package/dist/types/src/transport/types/state.d.ts +46 -0
  225. package/package.json +93 -37
  226. package/dist/FieldStrategy-pPekBtH-.js +0 -2318
  227. package/dist/ModelTypes-B9_veCKB.js +0 -5
  228. package/dist/ReportStrategy-DY3GC_mJ.js +0 -23
  229. package/dist/boolean-field-Cd3uhIPj.js +0 -104
  230. package/dist/category-field-D_Ms1x9u.js +0 -73
  231. package/dist/classifier-prediction-C5QzorTo.js +0 -193
  232. package/dist/custom-element-ttkHUa8w.js +0 -13
  233. package/dist/date-field-Cg_ja679.js +0 -162
  234. package/dist/error-card-BwjPChwf.js +0 -195
  235. package/dist/field-wrapper-DqIQl76d.js +0 -177
  236. package/dist/ml-layout-Dx63KKf7.js +0 -332
  237. package/dist/mlform/extensions.mjs +0 -38
  238. package/dist/mlform/strategies.mjs +0 -292
  239. package/dist/number-field-CC2DrVEb.js +0 -165
  240. package/dist/property-jKFNMQpR.js +0 -561
  241. package/dist/range-field-Cr7LEtsJ.js +0 -98
  242. package/dist/regressor-prediction-C18dHlfK.js +0 -236
  243. package/dist/src/core/app/DescriptorItem.d.ts +0 -6
  244. package/dist/src/core/app/DescriptorRegistry.d.ts +0 -13
  245. package/dist/src/core/app/DescriptorService.d.ts +0 -22
  246. package/dist/src/core/app/DescriptorStrategy.d.ts +0 -11
  247. package/dist/src/core/app/index.d.ts +0 -4
  248. package/dist/src/core/domain/index.d.ts +0 -24
  249. package/dist/src/core/index.d.ts +0 -3
  250. package/dist/src/core/ui/error-card.d.ts +0 -38
  251. package/dist/src/core/ui/field-wrapper.d.ts +0 -23
  252. package/dist/src/core/ui/index.d.ts +0 -3
  253. package/dist/src/core/ui/ml-layout.d.ts +0 -23
  254. package/dist/src/extensions/app/FieldStrategy.d.ts +0 -10
  255. package/dist/src/extensions/app/ReportStrategy.d.ts +0 -9
  256. package/dist/src/extensions/app/index.d.ts +0 -2
  257. package/dist/src/extensions/domain/BaseField.d.ts +0 -7
  258. package/dist/src/extensions/domain/BaseModel.d.ts +0 -6
  259. package/dist/src/extensions/domain/index.d.ts +0 -2
  260. package/dist/src/extensions/index.d.ts +0 -3
  261. package/dist/src/extensions/ui/field-element.d.ts +0 -9
  262. package/dist/src/extensions/ui/index.d.ts +0 -1
  263. package/dist/src/index.d.ts +0 -1
  264. package/dist/src/mlform/index.d.ts +0 -1
  265. package/dist/src/mlform/mlform.d.ts +0 -27
  266. package/dist/src/mlform/mlform.types.d.ts +0 -11
  267. package/dist/src/strategies/app/BooleanStrategy.d.ts +0 -12
  268. package/dist/src/strategies/app/CategoryStrategy.d.ts +0 -13
  269. package/dist/src/strategies/app/ClassifierStrategy.d.ts +0 -15
  270. package/dist/src/strategies/app/DateStrategy.d.ts +0 -15
  271. package/dist/src/strategies/app/NumberStrategy.d.ts +0 -29
  272. package/dist/src/strategies/app/RegressorStrategy.d.ts +0 -15
  273. package/dist/src/strategies/app/TextStrategy.d.ts +0 -16
  274. package/dist/src/strategies/app/index.d.ts +0 -7
  275. package/dist/src/strategies/domain/BooleanField.d.ts +0 -10
  276. package/dist/src/strategies/domain/CategoryField.d.ts +0 -11
  277. package/dist/src/strategies/domain/ClassifierModel.d.ts +0 -11
  278. package/dist/src/strategies/domain/DateField.d.ts +0 -13
  279. package/dist/src/strategies/domain/FieldTypes.d.ts +0 -7
  280. package/dist/src/strategies/domain/ModelTypes.d.ts +0 -4
  281. package/dist/src/strategies/domain/NumberField.d.ts +0 -15
  282. package/dist/src/strategies/domain/RegressorModel.d.ts +0 -11
  283. package/dist/src/strategies/domain/TextField.d.ts +0 -14
  284. package/dist/src/strategies/domain/index.d.ts +0 -9
  285. package/dist/src/strategies/index.d.ts +0 -1
  286. package/dist/src/strategies/ui/boolean-field.d.ts +0 -13
  287. package/dist/src/strategies/ui/category-field.d.ts +0 -14
  288. package/dist/src/strategies/ui/classifier-prediction.d.ts +0 -39
  289. package/dist/src/strategies/ui/date-field.d.ts +0 -18
  290. package/dist/src/strategies/ui/index.d.ts +0 -8
  291. package/dist/src/strategies/ui/number-field.d.ts +0 -19
  292. package/dist/src/strategies/ui/range-field.d.ts +0 -17
  293. package/dist/src/strategies/ui/regressor-prediction.d.ts +0 -29
  294. package/dist/src/strategies/ui/text-field.d.ts +0 -17
  295. package/dist/state-CLlTRyl1.js +0 -12
  296. package/dist/test/_fixtures/DummyField.d.ts +0 -9
  297. package/dist/test/setup.d.ts +0 -1
  298. package/dist/test/unit/DummyField.test.d.ts +0 -1
  299. package/dist/text-field-DwP-Fa1w.js +0 -114
@@ -1,7 +0,0 @@
1
- export { BooleanStrategy } from './BooleanStrategy';
2
- export { CategoryStrategy } from './CategoryStrategy';
3
- export { ClassifierStrategy } from './ClassifierStrategy';
4
- export { DateStrategy } from './DateStrategy';
5
- export { NumberStrategy } from './NumberStrategy';
6
- export { RegressorStrategy } from './RegressorStrategy';
7
- export { TextStrategy } from './TextStrategy';
@@ -1,10 +0,0 @@
1
- import { FieldTypes } from './FieldTypes';
2
- import * as z from "zod";
3
- export declare const BooleanFieldSchema: z.ZodObject<{
4
- type: z.ZodLiteral<FieldTypes.BOOLEAN>;
5
- value: z.ZodOptional<z.ZodBoolean>;
6
- title: z.ZodString;
7
- description: z.ZodOptional<z.ZodString>;
8
- required: z.ZodDefault<z.ZodBoolean>;
9
- }, z.core.$strict>;
10
- export type BooleanField = z.infer<typeof BooleanFieldSchema>;
@@ -1,11 +0,0 @@
1
- import { FieldTypes } from './FieldTypes';
2
- import * as z from "zod";
3
- export declare const CategoryFieldSchema: z.ZodObject<{
4
- type: z.ZodLiteral<FieldTypes.CATEGORY>;
5
- value: z.ZodOptional<z.ZodString>;
6
- options: z.ZodArray<z.ZodString>;
7
- title: z.ZodString;
8
- description: z.ZodOptional<z.ZodString>;
9
- required: z.ZodDefault<z.ZodBoolean>;
10
- }, z.core.$strict>;
11
- export type CategoryField = z.infer<typeof CategoryFieldSchema>;
@@ -1,11 +0,0 @@
1
- import { ModelTypes } from './ModelTypes';
2
- import * as z from "zod";
3
- export declare const ClassifierModelSchema: z.ZodObject<{
4
- type: z.ZodLiteral<ModelTypes.CLASSIFIER>;
5
- mapping: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
- probabilities: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber>>>;
7
- details: z.ZodDefault<z.ZodBoolean>;
8
- title: z.ZodOptional<z.ZodString>;
9
- execution_time: z.ZodOptional<z.ZodNumber>;
10
- }, z.core.$strict>;
11
- export type ClassifierModel = z.infer<typeof ClassifierModelSchema>;
@@ -1,13 +0,0 @@
1
- import { FieldTypes } from './FieldTypes';
2
- import * as z from "zod";
3
- export declare const DateFieldSchema: z.ZodObject<{
4
- type: z.ZodLiteral<FieldTypes.DATE>;
5
- value: z.ZodOptional<z.ZodISODateTime>;
6
- min: z.ZodOptional<z.ZodISODateTime>;
7
- max: z.ZodOptional<z.ZodISODateTime>;
8
- step: z.ZodOptional<z.ZodDefault<z.ZodInt>>;
9
- title: z.ZodString;
10
- description: z.ZodOptional<z.ZodString>;
11
- required: z.ZodDefault<z.ZodBoolean>;
12
- }, z.core.$strict>;
13
- export type DateField = z.infer<typeof DateFieldSchema>;
@@ -1,7 +0,0 @@
1
- export declare enum FieldTypes {
2
- TEXT = "text",
3
- NUMBER = "number",
4
- BOOLEAN = "boolean",
5
- CATEGORY = "category",
6
- DATE = "date"
7
- }
@@ -1,4 +0,0 @@
1
- export declare enum ModelTypes {
2
- REGRESSOR = "regressor",
3
- CLASSIFIER = "classifier"
4
- }
@@ -1,15 +0,0 @@
1
- import { FieldTypes } from './FieldTypes';
2
- import * as z from "zod";
3
- export declare const NumberFieldSchema: z.ZodObject<{
4
- type: z.ZodLiteral<FieldTypes.NUMBER>;
5
- min: z.ZodOptional<z.ZodNumber>;
6
- max: z.ZodOptional<z.ZodNumber>;
7
- step: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
8
- placeholder: z.ZodOptional<z.ZodString>;
9
- value: z.ZodOptional<z.ZodNumber>;
10
- unit: z.ZodOptional<z.ZodString>;
11
- title: z.ZodString;
12
- description: z.ZodOptional<z.ZodString>;
13
- required: z.ZodDefault<z.ZodBoolean>;
14
- }, z.core.$strict>;
15
- export type NumberField = z.infer<typeof NumberFieldSchema>;
@@ -1,11 +0,0 @@
1
- import { ModelTypes } from './ModelTypes';
2
- import * as z from "zod";
3
- export declare const RegressorModelSchema: z.ZodObject<{
4
- type: z.ZodLiteral<ModelTypes.REGRESSOR>;
5
- values: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
6
- unit: z.ZodOptional<z.ZodString>;
7
- interval: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
8
- title: z.ZodOptional<z.ZodString>;
9
- execution_time: z.ZodOptional<z.ZodNumber>;
10
- }, z.core.$strict>;
11
- export type RegressorModel = z.infer<typeof RegressorModelSchema>;
@@ -1,14 +0,0 @@
1
- import { FieldTypes } from './FieldTypes';
2
- import * as z from "zod";
3
- export declare const TextFieldSchema: z.ZodObject<{
4
- type: z.ZodLiteral<FieldTypes.TEXT>;
5
- value: z.ZodOptional<z.ZodString>;
6
- placeholder: z.ZodOptional<z.ZodString>;
7
- minLength: z.ZodOptional<z.ZodInt>;
8
- maxLength: z.ZodOptional<z.ZodInt>;
9
- pattern: z.ZodOptional<z.ZodString>;
10
- title: z.ZodString;
11
- description: z.ZodOptional<z.ZodString>;
12
- required: z.ZodDefault<z.ZodBoolean>;
13
- }, z.core.$strict>;
14
- export type TextField = z.infer<typeof TextFieldSchema>;
@@ -1,9 +0,0 @@
1
- export { type BooleanField, BooleanFieldSchema } from './BooleanField';
2
- export { type CategoryField, CategoryFieldSchema } from './CategoryField';
3
- export { type ClassifierModel, ClassifierModelSchema } from './ClassifierModel';
4
- export { type DateField, DateFieldSchema } from './DateField';
5
- export { FieldTypes } from './FieldTypes';
6
- export { ModelTypes } from './ModelTypes';
7
- export { type NumberField, NumberFieldSchema } from './NumberField';
8
- export { type RegressorModel, RegressorModelSchema } from './RegressorModel';
9
- export { type TextField, TextFieldSchema } from './TextField';
@@ -1 +0,0 @@
1
- export { BooleanStrategy, CategoryStrategy, ClassifierStrategy, DateStrategy, NumberStrategy, RegressorStrategy, TextStrategy, } from './app';
@@ -1,13 +0,0 @@
1
- import { FieldElement } from '../../extensions/ui';
2
- export declare class BooleanField extends FieldElement<boolean> {
3
- static styles: import('lit').CSSResultGroup[];
4
- defaultValue: string;
5
- firstUpdated(): void;
6
- private onChange;
7
- render(): import('lit-html').TemplateResult<1>;
8
- }
9
- declare global {
10
- interface HTMLElementTagNameMap {
11
- "boolean-field": BooleanField;
12
- }
13
- }
@@ -1,14 +0,0 @@
1
- import { FieldElement } from '../../extensions/ui';
2
- export declare class CategoryField extends FieldElement<string> {
3
- static styles: import('lit').CSSResultGroup[];
4
- optionList: string[];
5
- defaultValue: string;
6
- firstUpdated(): void;
7
- render(): import('lit-html').TemplateResult<1>;
8
- private handleChange;
9
- }
10
- declare global {
11
- interface HTMLElementTagNameMap {
12
- "category-field": CategoryField;
13
- }
14
- }
@@ -1,39 +0,0 @@
1
- import { LitElement } from 'lit';
2
- /**
3
- * <classifier-prediction>
4
- * --------------------------------------------------
5
- * Visualiza las predicciones de un clasificador.
6
- * - `mapping` → lista de etiquetas CSV
7
- * - `probabilities` → array plano o matriz de probabilidades
8
- * - `details` → modo detallado (true) o compacto (false)
9
- * - `title` → título del bloque
10
- *
11
- * Ejemplo de uso:
12
- * <classifier-prediction
13
- * title="Vehicle type"
14
- * mapping="Car,Motorcycle,Train"
15
- * probabilities="0.12,0.68,0.20"
16
- * details="true">
17
- * </classifier-prediction>
18
- * --------------------------------------------------
19
- */
20
- type FlatProbs = number[];
21
- type MatrixProbs = number[][];
22
- export declare class ClassifierPrediction extends LitElement {
23
- static styles: import('lit').CSSResult;
24
- title: string;
25
- mapping: string[];
26
- probabilities: FlatProbs | MatrixProbs;
27
- details: boolean;
28
- private _resolveMapping;
29
- private _flatToMatrix;
30
- private get _probMatrix();
31
- private get _predictions();
32
- render(): import('lit-html').TemplateResult<1>;
33
- }
34
- declare global {
35
- interface HTMLElementTagNameMap {
36
- "classifier-prediction": ClassifierPrediction;
37
- }
38
- }
39
- export {};
@@ -1,18 +0,0 @@
1
- import { FieldElement } from '../../extensions/ui';
2
- export declare class DateField extends FieldElement<Date> {
3
- static styles: import('lit').CSSResultGroup[];
4
- step: string;
5
- min: Date;
6
- max: Date;
7
- defaultValue: Date;
8
- protected firstUpdated(): void;
9
- render(): import('lit-html').TemplateResult<1>;
10
- private onInput;
11
- private startOfDayUTC;
12
- private formatDateUTC;
13
- }
14
- declare global {
15
- interface HTMLElementTagNameMap {
16
- "date-field": DateField;
17
- }
18
- }
@@ -1,8 +0,0 @@
1
- export { BooleanField } from './boolean-field';
2
- export { CategoryField } from './category-field';
3
- export { ClassifierPrediction } from './classifier-prediction';
4
- export { DateField } from './date-field';
5
- export { NumberField } from './number-field';
6
- export { RangeField } from './range-field';
7
- export { RegressorPrediction } from './regressor-prediction';
8
- export { TextField } from './text-field';
@@ -1,19 +0,0 @@
1
- import { FieldElement } from '../../extensions/ui';
2
- export declare class NumberField extends FieldElement<number> {
3
- static styles: import('lit').CSSResultGroup[];
4
- unit: string;
5
- step: string;
6
- min: string;
7
- max: string;
8
- defaultValue: string;
9
- placeholder: string;
10
- firstUpdated(): void;
11
- render(): import('lit-html').TemplateResult<1>;
12
- private onInput;
13
- private parseLocaleNumber;
14
- }
15
- declare global {
16
- interface HTMLElementTagNameMap {
17
- "number-field": NumberField;
18
- }
19
- }
@@ -1,17 +0,0 @@
1
- import { FieldElement } from '../../extensions/ui';
2
- export declare class RangeField extends FieldElement<number> {
3
- static styles: import('lit').CSSResultGroup[];
4
- unit: string;
5
- step: string;
6
- min: string;
7
- max: string;
8
- defaultValue: string;
9
- protected firstUpdated(): void;
10
- render(): import('lit-html').TemplateResult<1>;
11
- private onInput;
12
- }
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- "range-field": RangeField;
16
- }
17
- }
@@ -1,29 +0,0 @@
1
- import { LitElement } from 'lit';
2
- /**
3
- * <regressor-prediction>
4
- * – Barra ±3 × (max-min) con gradiente lineal continuo.
5
- * – Límites representados con marcadores más finos que sobresalen verticalmente
6
- * respecto a la barra.
7
- * – Etiquetas de los límites alineadas directamente bajo su marcador.
8
- */
9
- export declare class RegressorPrediction extends LitElement {
10
- static styles: import('lit').CSSResult;
11
- title: string;
12
- values: number[];
13
- unit: string;
14
- interval: [number, number];
15
- private min;
16
- private max;
17
- protected firstUpdated(): void;
18
- private _barExtents;
19
- private _hasInterval;
20
- private _calcPercent;
21
- /** Gradiente lineal continuo: rojo → naranja → amarillo → verde → amarillo → naranja → rojo */
22
- private _buildGradient;
23
- render(): import('lit-html').TemplateResult<1>;
24
- }
25
- declare global {
26
- interface HTMLElementTagNameMap {
27
- "regressor-prediction": RegressorPrediction;
28
- }
29
- }
@@ -1,17 +0,0 @@
1
- import { FieldElement } from '../../extensions/ui';
2
- export declare class TextField extends FieldElement<string> {
3
- static styles: import('lit').CSSResultGroup[];
4
- placeholder: string;
5
- pattern: string;
6
- defaultValue: string;
7
- minlength: string;
8
- maxlength: string;
9
- firstUpdated(): void;
10
- render(): import('lit-html').TemplateResult<1>;
11
- private onInput;
12
- }
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- "text-field": TextField;
16
- }
17
- }
@@ -1,12 +0,0 @@
1
- import { n as r } from "./property-jKFNMQpR.js";
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- function n(t) {
8
- return r({ ...t, state: !0, attribute: !1 });
9
- }
10
- export {
11
- n as r
12
- };
@@ -1,9 +0,0 @@
1
- import { z } from 'zod';
2
- import { DescriptorItem } from '../../src/core/app/DescriptorItem';
3
- export declare class DummyField {
4
- readonly type: string;
5
- readonly schema: z.ZodString;
6
- readonly comment: string;
7
- constructor(type?: string, schema?: z.ZodString, comment?: string);
8
- buildDescriptor(payload: Record<string, unknown>): DescriptorItem;
9
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,114 +0,0 @@
1
- import { FieldElement as u } from "./mlform/extensions.mjs";
2
- import { x as m, a as d, n as l } from "./property-jKFNMQpR.js";
3
- import { t as c } from "./custom-element-ttkHUa8w.js";
4
- var p = Object.defineProperty, g = Object.getOwnPropertyDescriptor, v = (t, e, r) => e in t ? p(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, a = (t, e, r, h) => {
5
- for (var n = h > 1 ? void 0 : h ? g(e, r) : e, s = t.length - 1, o; s >= 0; s--)
6
- (o = t[s]) && (n = (h ? o(e, r, n) : o(n)) || n);
7
- return h && n && p(e, r, n), n;
8
- }, f = (t, e, r) => v(t, e + "", r);
9
- let i = class extends u {
10
- placeholder = "Enter text...";
11
- pattern = "";
12
- firstUpdated() {
13
- if (this.defaultValue) {
14
- this.value = this.defaultValue, console.log(this.value);
15
- const t = new InputEvent("input", {
16
- bubbles: !0,
17
- composed: !0
18
- });
19
- Object.defineProperty(t, "target", {
20
- value: { value: this.defaultValue },
21
- writable: !1
22
- }), this.onInput(t);
23
- } else
24
- this.value = "";
25
- }
26
- render() {
27
- return m`
28
- <div class="input-wrapper">
29
- <input
30
- type="text"
31
- autocomplete="off"
32
- @input=${this.onInput}
33
- .value=${this.value}
34
- .placeholder=${this.placeholder}
35
- .minlength=${this.minlength}
36
- .maxlength=${this.maxlength}
37
- />
38
- </div>
39
- `;
40
- }
41
- onInput(t) {
42
- if (this.value = t.target.value, this.value === "") {
43
- this.dispatchState("empty");
44
- return;
45
- }
46
- if (this.minlength && this.maxlength && this.value.length < Number(this.minlength) && this.value.length > Number(this.maxlength)) {
47
- this.dispatchState(
48
- "error",
49
- `Length must be between ${this.minlength} and ${this.maxlength} characters.`
50
- );
51
- return;
52
- }
53
- if (this.minlength && this.value.length < Number(this.minlength)) {
54
- this.dispatchState(
55
- "error",
56
- `Minimum length is ${this.minlength} characters.`
57
- );
58
- return;
59
- }
60
- if (this.maxlength && this.value.length > Number(this.maxlength)) {
61
- this.dispatchState(
62
- "error",
63
- `Maximum length of ${this.maxlength} characters exceeded.`
64
- );
65
- return;
66
- }
67
- if (this.pattern !== "" && !new RegExp(this.pattern).test(this.value)) {
68
- this.dispatchState("error", "Invalid characters detected.");
69
- return;
70
- }
71
- this.dispatchState(
72
- "success",
73
- this.maxlength ? `Note recorded (${this.value.length}/${this.maxlength}).` : `Note recorded (Length: ${this.value.length}).`
74
- );
75
- }
76
- };
77
- f(i, "styles", [
78
- u.baseStyles,
79
- d`
80
- input[type="text"] {
81
- width: 100%;
82
- padding: 0.75rem 1rem;
83
- font-size: 1rem;
84
- border: 1px solid var(--ml-color-border);
85
- border-radius: var(--radius);
86
- outline: none;
87
- transition: border-color 0.2s ease;
88
- }
89
- input[type="text"]:focus {
90
- border-color: var(--ml-color-accent);
91
- }
92
- `
93
- ]);
94
- a([
95
- l({ type: String })
96
- ], i.prototype, "placeholder", 2);
97
- a([
98
- l({ type: String })
99
- ], i.prototype, "pattern", 2);
100
- a([
101
- l({ type: String })
102
- ], i.prototype, "defaultValue", 2);
103
- a([
104
- l({ type: String })
105
- ], i.prototype, "minlength", 2);
106
- a([
107
- l({ type: String })
108
- ], i.prototype, "maxlength", 2);
109
- i = a([
110
- c("text-field")
111
- ], i);
112
- export {
113
- i as TextField
114
- };