@easyops-cn/a2ui-react 0.0.0 → 0.0.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 +12 -8
- package/dist/0.8/A2UIRenderer.d.ts +49 -0
- package/dist/0.8/A2UIRenderer.test.d.ts +6 -0
- package/dist/0.8/components/ComponentRenderer.d.ts +39 -0
- package/dist/0.8/components/ComponentRenderer.test.d.ts +6 -0
- package/dist/0.8/components/UnknownComponent.d.ts +18 -0
- package/dist/0.8/components/display/AudioPlayerComponent.d.ts +5 -0
- package/dist/0.8/components/display/DividerComponent.d.ts +5 -0
- package/dist/0.8/components/display/IconComponent.d.ts +5 -0
- package/dist/0.8/components/display/ImageComponent.d.ts +6 -0
- package/dist/0.8/components/display/TextComponent.d.ts +6 -0
- package/dist/0.8/components/display/VideoComponent.d.ts +5 -0
- package/dist/0.8/components/display/display.test.d.ts +7 -0
- package/dist/0.8/components/display/index.d.ts +9 -0
- package/dist/0.8/components/index.d.ts +7 -0
- package/dist/0.8/components/interactive/ButtonComponent.d.ts +5 -0
- package/dist/0.8/components/interactive/CheckBoxComponent.d.ts +5 -0
- package/dist/0.8/components/interactive/DateTimeInputComponent.d.ts +5 -0
- package/dist/0.8/components/interactive/MultipleChoiceComponent.d.ts +7 -0
- package/dist/0.8/components/interactive/SliderComponent.d.ts +5 -0
- package/dist/0.8/components/interactive/TextFieldComponent.d.ts +5 -0
- package/dist/0.8/components/interactive/index.d.ts +9 -0
- package/dist/0.8/components/interactive/interactive.test.d.ts +7 -0
- package/dist/0.8/components/layout/CardComponent.d.ts +5 -0
- package/dist/0.8/components/layout/ColumnComponent.d.ts +5 -0
- package/dist/0.8/components/layout/ListComponent.d.ts +5 -0
- package/dist/0.8/components/layout/ModalComponent.d.ts +5 -0
- package/dist/0.8/components/layout/RowComponent.d.ts +5 -0
- package/dist/0.8/components/layout/TabsComponent.d.ts +5 -0
- package/dist/0.8/components/layout/index.d.ts +9 -0
- package/dist/0.8/components/layout/layout.test.d.ts +7 -0
- package/dist/0.8/contexts/A2UIProvider.d.ts +34 -0
- package/dist/0.8/contexts/A2UIProvider.test.d.ts +6 -0
- package/dist/0.8/contexts/ActionContext.d.ts +33 -0
- package/dist/0.8/contexts/ActionContext.test.d.ts +6 -0
- package/dist/0.8/contexts/ComponentsMapContext.d.ts +63 -0
- package/dist/0.8/contexts/DataModelContext.d.ts +43 -0
- package/dist/0.8/contexts/DataModelContext.test.d.ts +6 -0
- package/dist/0.8/contexts/SurfaceContext.d.ts +45 -0
- package/dist/0.8/contexts/SurfaceContext.test.d.ts +6 -0
- package/dist/0.8/hooks/useA2UIMessageHandler.d.ts +41 -0
- package/dist/0.8/hooks/useA2UIMessageHandler.test.d.ts +6 -0
- package/{src/0.8/hooks/useComponent.ts → dist/0.8/hooks/useComponent.d.ts} +2 -18
- package/dist/0.8/hooks/useComponent.test.d.ts +6 -0
- package/dist/0.8/hooks/useDataBinding.d.ts +50 -0
- package/dist/0.8/hooks/useDataBinding.test.d.ts +6 -0
- package/{src/0.8/hooks/useDispatchAction.ts → dist/0.8/hooks/useDispatchAction.d.ts} +2 -15
- package/dist/0.8/hooks/useDispatchAction.test.d.ts +6 -0
- package/{src/0.8/hooks/useSurface.ts → dist/0.8/hooks/useSurface.d.ts} +2 -15
- package/dist/0.8/hooks/useSurface.test.d.ts +6 -0
- package/{src/0.8/index.ts → dist/0.8/index.d.ts} +7 -21
- package/{src/0.8/types/index.ts → dist/0.8/types/index.d.ts} +128 -213
- package/dist/0.8/utils/dataBinding.d.ts +95 -0
- package/dist/0.8/utils/dataBinding.test.d.ts +6 -0
- package/dist/0.8/utils/pathUtils.d.ts +63 -0
- package/dist/0.8/utils/pathUtils.test.d.ts +6 -0
- package/dist/a2ui-react.js +4 -0
- package/dist/a2ui-react10.js +54 -0
- package/dist/a2ui-react100.js +24 -0
- package/dist/a2ui-react101.js +255 -0
- package/dist/a2ui-react102.js +163 -0
- package/dist/a2ui-react103.js +19 -0
- package/dist/a2ui-react104.js +251 -0
- package/dist/a2ui-react105.js +61 -0
- package/dist/a2ui-react106.js +35 -0
- package/dist/a2ui-react107.js +436 -0
- package/dist/a2ui-react108.js +16 -0
- package/dist/a2ui-react109.js +234 -0
- package/dist/a2ui-react11.js +9 -0
- package/dist/a2ui-react110.js +6 -0
- package/dist/a2ui-react111.js +6 -0
- package/dist/a2ui-react112.js +6 -0
- package/dist/a2ui-react113.js +239 -0
- package/dist/a2ui-react114.js +845 -0
- package/dist/a2ui-react115.js +6 -0
- package/dist/a2ui-react116.js +10 -0
- package/dist/a2ui-react117.js +8 -0
- package/dist/a2ui-react118.js +8 -0
- package/dist/a2ui-react119.js +20 -0
- package/dist/a2ui-react12.js +32 -0
- package/dist/a2ui-react120.js +8 -0
- package/dist/a2ui-react121.js +8 -0
- package/dist/a2ui-react122.js +9 -0
- package/dist/a2ui-react123.js +16 -0
- package/dist/a2ui-react124.js +18 -0
- package/dist/a2ui-react125.js +11 -0
- package/dist/a2ui-react126.js +9 -0
- package/dist/a2ui-react127.js +13 -0
- package/dist/a2ui-react128.js +17 -0
- package/dist/a2ui-react129.js +8 -0
- package/dist/a2ui-react13.js +36 -0
- package/dist/a2ui-react130.js +17 -0
- package/dist/a2ui-react131.js +8 -0
- package/dist/a2ui-react132.js +10 -0
- package/dist/a2ui-react133.js +9 -0
- package/dist/a2ui-react134.js +7 -0
- package/dist/a2ui-react135.js +9 -0
- package/dist/a2ui-react136.js +548 -0
- package/dist/a2ui-react137.js +49 -0
- package/dist/a2ui-react138.js +20 -0
- package/dist/a2ui-react139.js +21 -0
- package/dist/a2ui-react14.js +114 -0
- package/dist/a2ui-react140.js +11 -0
- package/dist/a2ui-react141.js +9 -0
- package/dist/a2ui-react142.js +10 -0
- package/dist/a2ui-react143.js +8 -0
- package/dist/a2ui-react144.js +9 -0
- package/dist/a2ui-react145.js +12 -0
- package/dist/a2ui-react146.js +8 -0
- package/dist/a2ui-react147.js +11 -0
- package/dist/a2ui-react148.js +15 -0
- package/dist/a2ui-react149.js +8 -0
- package/dist/a2ui-react15.js +18 -0
- package/dist/a2ui-react150.js +12 -0
- package/dist/a2ui-react151.js +10 -0
- package/dist/a2ui-react152.js +12 -0
- package/dist/a2ui-react153.js +16 -0
- package/dist/a2ui-react154.js +8 -0
- package/dist/a2ui-react155.js +8 -0
- package/dist/a2ui-react156.js +8 -0
- package/dist/a2ui-react157.js +7 -0
- package/dist/a2ui-react158.js +14 -0
- package/dist/a2ui-react159.js +13 -0
- package/dist/a2ui-react16.js +19 -0
- package/dist/a2ui-react160.js +13 -0
- package/dist/a2ui-react161.js +14 -0
- package/dist/a2ui-react162.js +14 -0
- package/dist/a2ui-react163.js +35 -0
- package/dist/a2ui-react164.js +67 -0
- package/dist/a2ui-react165.js +11 -0
- package/dist/a2ui-react166.js +11 -0
- package/dist/a2ui-react167.js +10 -0
- package/dist/a2ui-react168.js +13 -0
- package/dist/a2ui-react169.js +10 -0
- package/dist/a2ui-react17.js +18 -0
- package/dist/a2ui-react170.js +10 -0
- package/dist/a2ui-react171.js +9 -0
- package/dist/a2ui-react172.js +17 -0
- package/dist/a2ui-react173.js +21 -0
- package/dist/a2ui-react174.js +18 -0
- package/dist/a2ui-react175.js +35 -0
- package/dist/a2ui-react176.js +14 -0
- package/dist/a2ui-react177.js +7 -0
- package/dist/a2ui-react178.js +58 -0
- package/dist/a2ui-react179.js +25 -0
- package/dist/a2ui-react18.js +58 -0
- package/dist/a2ui-react180.js +43 -0
- package/dist/a2ui-react181.js +63 -0
- package/dist/a2ui-react182.js +34 -0
- package/dist/a2ui-react183.js +15 -0
- package/dist/a2ui-react184.js +67 -0
- package/dist/a2ui-react185.js +67 -0
- package/dist/a2ui-react186.js +69 -0
- package/dist/a2ui-react187.js +69 -0
- package/dist/a2ui-react188.js +42 -0
- package/dist/a2ui-react189.js +43 -0
- package/dist/a2ui-react19.js +58 -0
- package/dist/a2ui-react190.js +55 -0
- package/dist/a2ui-react191.js +45 -0
- package/dist/a2ui-react192.js +41 -0
- package/dist/a2ui-react193.js +72 -0
- package/dist/a2ui-react194.js +72 -0
- package/dist/a2ui-react195.js +97 -0
- package/dist/a2ui-react196.js +42 -0
- package/dist/a2ui-react197.js +42 -0
- package/dist/a2ui-react198.js +42 -0
- package/dist/a2ui-react199.js +27 -0
- package/dist/a2ui-react2.js +11 -0
- package/dist/a2ui-react20.js +51 -0
- package/dist/a2ui-react200.js +26 -0
- package/dist/a2ui-react201.js +26 -0
- package/dist/a2ui-react202.js +27 -0
- package/dist/a2ui-react203.js +26 -0
- package/dist/a2ui-react204.js +26 -0
- package/dist/a2ui-react205.js +16 -0
- package/dist/a2ui-react206.js +41 -0
- package/dist/a2ui-react207.js +41 -0
- package/dist/a2ui-react208.js +16 -0
- package/dist/a2ui-react209.js +16 -0
- package/dist/a2ui-react21.js +14 -0
- package/dist/a2ui-react210.js +32 -0
- package/dist/a2ui-react211.js +32 -0
- package/dist/a2ui-react212.js +6 -0
- package/dist/a2ui-react213.js +9 -0
- package/dist/a2ui-react214.js +50 -0
- package/dist/a2ui-react215.js +29 -0
- package/dist/a2ui-react216.js +68 -0
- package/dist/a2ui-react217.js +10 -0
- package/dist/a2ui-react218.js +127 -0
- package/dist/a2ui-react219.js +17 -0
- package/dist/a2ui-react22.js +29 -0
- package/dist/a2ui-react220.js +136 -0
- package/dist/a2ui-react221.js +13 -0
- package/dist/a2ui-react222.js +219 -0
- package/dist/a2ui-react223.js +15 -0
- package/dist/a2ui-react224.js +36 -0
- package/dist/a2ui-react225.js +49 -0
- package/dist/a2ui-react226.js +10 -0
- package/dist/a2ui-react227.js +52 -0
- package/dist/a2ui-react228.js +6 -0
- package/dist/a2ui-react229.js +8 -0
- package/dist/a2ui-react23.js +25 -0
- package/dist/a2ui-react230.js +30 -0
- package/dist/a2ui-react231.js +52 -0
- package/dist/a2ui-react232.js +11 -0
- package/dist/a2ui-react233.js +70 -0
- package/dist/a2ui-react234.js +49 -0
- package/dist/a2ui-react235.js +27 -0
- package/dist/a2ui-react236.js +49 -0
- package/dist/a2ui-react237.js +183 -0
- package/dist/a2ui-react238.js +70 -0
- package/dist/a2ui-react239.js +33 -0
- package/dist/a2ui-react24.js +29 -0
- package/dist/a2ui-react240.js +11 -0
- package/dist/a2ui-react241.js +155 -0
- package/dist/a2ui-react242.js +110 -0
- package/dist/a2ui-react243.js +22 -0
- package/dist/a2ui-react244.js +100 -0
- package/dist/a2ui-react245.js +49 -0
- package/dist/a2ui-react246.js +14 -0
- package/dist/a2ui-react247.js +208 -0
- package/dist/a2ui-react248.js +24 -0
- package/dist/a2ui-react249.js +402 -0
- package/dist/a2ui-react25.js +27 -0
- package/dist/a2ui-react250.js +49 -0
- package/dist/a2ui-react251.js +49 -0
- package/dist/a2ui-react252.js +54 -0
- package/dist/a2ui-react253.js +7 -0
- package/dist/a2ui-react254.js +7 -0
- package/dist/a2ui-react255.js +18 -0
- package/dist/a2ui-react256.js +8 -0
- package/dist/a2ui-react257.js +10 -0
- package/dist/a2ui-react258.js +19 -0
- package/dist/a2ui-react259.js +7 -0
- package/dist/a2ui-react26.js +44 -0
- package/dist/a2ui-react260.js +7 -0
- package/dist/a2ui-react261.js +8 -0
- package/dist/a2ui-react262.js +8 -0
- package/dist/a2ui-react263.js +7 -0
- package/dist/a2ui-react264.js +7 -0
- package/dist/a2ui-react265.js +9 -0
- package/dist/a2ui-react266.js +27 -0
- package/dist/a2ui-react267.js +9 -0
- package/dist/a2ui-react268.js +7 -0
- package/dist/a2ui-react269.js +9 -0
- package/dist/a2ui-react27.js +100 -0
- package/dist/a2ui-react270.js +8 -0
- package/dist/a2ui-react271.js +7 -0
- package/dist/a2ui-react272.js +8 -0
- package/dist/a2ui-react273.js +7 -0
- package/dist/a2ui-react274.js +11 -0
- package/dist/a2ui-react275.js +8 -0
- package/dist/a2ui-react276.js +7 -0
- package/dist/a2ui-react277.js +7 -0
- package/dist/a2ui-react278.js +9 -0
- package/dist/a2ui-react279.js +148 -0
- package/dist/a2ui-react28.js +82 -0
- package/dist/a2ui-react280.js +42 -0
- package/dist/a2ui-react281.js +7 -0
- package/dist/a2ui-react282.js +10 -0
- package/dist/a2ui-react283.js +16 -0
- package/dist/a2ui-react284.js +10 -0
- package/dist/a2ui-react285.js +34 -0
- package/dist/a2ui-react286.js +13 -0
- package/dist/a2ui-react287.js +13 -0
- package/dist/a2ui-react288.js +11 -0
- package/dist/a2ui-react289.js +16 -0
- package/dist/a2ui-react29.js +43 -0
- package/dist/a2ui-react290.js +104 -0
- package/dist/a2ui-react291.js +22 -0
- package/dist/a2ui-react292.js +56 -0
- package/dist/a2ui-react293.js +75 -0
- package/dist/a2ui-react294.js +12 -0
- package/dist/a2ui-react295.js +23 -0
- package/dist/a2ui-react296.js +19 -0
- package/dist/a2ui-react297.js +26 -0
- package/dist/a2ui-react298.js +9 -0
- package/dist/a2ui-react299.js +8 -0
- package/dist/a2ui-react3.js +40 -0
- package/dist/a2ui-react30.js +41 -0
- package/dist/a2ui-react300.js +26 -0
- package/dist/a2ui-react301.js +37 -0
- package/dist/a2ui-react302.js +18 -0
- package/dist/a2ui-react303.js +9 -0
- package/dist/a2ui-react304.js +7 -0
- package/dist/a2ui-react305.js +7 -0
- package/dist/a2ui-react306.js +7 -0
- package/dist/a2ui-react307.js +7 -0
- package/dist/a2ui-react308.js +6 -0
- package/dist/a2ui-react309.js +9 -0
- package/dist/a2ui-react31.js +86 -0
- package/dist/a2ui-react310.js +26 -0
- package/dist/a2ui-react311.js +10 -0
- package/dist/a2ui-react312.js +9 -0
- package/dist/a2ui-react313.js +8 -0
- package/dist/a2ui-react314.js +6 -0
- package/dist/a2ui-react315.js +6 -0
- package/dist/a2ui-react316.js +7 -0
- package/dist/a2ui-react317.js +6 -0
- package/dist/a2ui-react318.js +7 -0
- package/dist/a2ui-react319.js +6 -0
- package/dist/a2ui-react32.js +46 -0
- package/dist/a2ui-react320.js +6 -0
- package/dist/a2ui-react321.js +6 -0
- package/dist/a2ui-react322.js +9 -0
- package/dist/a2ui-react323.js +18 -0
- package/dist/a2ui-react324.js +31 -0
- package/dist/a2ui-react325.js +15 -0
- package/dist/a2ui-react326.js +27 -0
- package/dist/a2ui-react327.js +31 -0
- package/dist/a2ui-react328.js +7 -0
- package/dist/a2ui-react329.js +19 -0
- package/dist/a2ui-react33.js +44 -0
- package/dist/a2ui-react330.js +8 -0
- package/dist/a2ui-react331.js +8 -0
- package/dist/a2ui-react332.js +61 -0
- package/dist/a2ui-react333.js +69 -0
- package/dist/a2ui-react334.js +9 -0
- package/dist/a2ui-react335.js +7 -0
- package/dist/a2ui-react336.js +26 -0
- package/dist/a2ui-react337.js +19 -0
- package/dist/a2ui-react338.js +10 -0
- package/dist/a2ui-react339.js +13 -0
- package/dist/a2ui-react34.js +8 -0
- package/dist/a2ui-react340.js +13 -0
- package/dist/a2ui-react341.js +24 -0
- package/dist/a2ui-react342.js +13 -0
- package/dist/a2ui-react343.js +12 -0
- package/dist/a2ui-react344.js +12 -0
- package/dist/a2ui-react345.js +7 -0
- package/dist/a2ui-react346.js +8 -0
- package/dist/a2ui-react347.js +19 -0
- package/dist/a2ui-react348.js +12 -0
- package/dist/a2ui-react349.js +21 -0
- package/dist/a2ui-react35.js +16 -0
- package/dist/a2ui-react350.js +18 -0
- package/dist/a2ui-react351.js +15 -0
- package/dist/a2ui-react352.js +32 -0
- package/dist/a2ui-react353.js +15 -0
- package/dist/a2ui-react354.js +28 -0
- package/dist/a2ui-react355.js +8 -0
- package/dist/a2ui-react356.js +11 -0
- package/dist/a2ui-react357.js +22 -0
- package/dist/a2ui-react358.js +7 -0
- package/dist/a2ui-react359.js +5 -0
- package/dist/a2ui-react36.js +23 -0
- package/dist/a2ui-react360.js +26 -0
- package/dist/a2ui-react361.js +115 -0
- package/dist/a2ui-react362.js +18 -0
- package/dist/a2ui-react363.js +527 -0
- package/dist/a2ui-react364.js +130 -0
- package/dist/a2ui-react365.js +136 -0
- package/dist/a2ui-react366.js +7 -0
- package/dist/a2ui-react367.js +15 -0
- package/dist/a2ui-react368.js +67 -0
- package/dist/a2ui-react369.js +71 -0
- package/dist/a2ui-react37.js +15 -0
- package/dist/a2ui-react370.js +11 -0
- package/dist/a2ui-react371.js +16 -0
- package/dist/a2ui-react372.js +68 -0
- package/dist/a2ui-react373.js +6 -0
- package/dist/a2ui-react374.js +25 -0
- package/dist/a2ui-react375.js +15 -0
- package/dist/a2ui-react376.js +30 -0
- package/dist/a2ui-react377.js +7 -0
- package/dist/a2ui-react378.js +25 -0
- package/dist/a2ui-react38.js +10 -0
- package/dist/a2ui-react39.js +10 -0
- package/dist/a2ui-react4.js +76 -0
- package/dist/a2ui-react40.js +14 -0
- package/dist/a2ui-react41.js +14 -0
- package/dist/a2ui-react42.js +16 -0
- package/dist/a2ui-react43.js +12 -0
- package/dist/a2ui-react44.js +15 -0
- package/dist/a2ui-react45.js +15 -0
- package/dist/a2ui-react46.js +9 -0
- package/dist/a2ui-react47.js +11 -0
- package/dist/a2ui-react48.js +16 -0
- package/dist/a2ui-react49.js +10 -0
- package/dist/a2ui-react5.js +8 -0
- package/dist/a2ui-react50.js +14 -0
- package/dist/a2ui-react51.js +9 -0
- package/dist/a2ui-react52.js +9 -0
- package/dist/a2ui-react53.js +15 -0
- package/dist/a2ui-react54.js +17 -0
- package/dist/a2ui-react55.js +10 -0
- package/dist/a2ui-react56.js +10 -0
- package/dist/a2ui-react57.js +10 -0
- package/dist/a2ui-react58.js +9 -0
- package/dist/a2ui-react59.js +9 -0
- package/dist/a2ui-react6.js +28 -0
- package/dist/a2ui-react60.js +9 -0
- package/dist/a2ui-react61.js +15 -0
- package/dist/a2ui-react62.js +10 -0
- package/dist/a2ui-react63.js +15 -0
- package/dist/a2ui-react64.js +10 -0
- package/dist/a2ui-react65.js +14 -0
- package/dist/a2ui-react66.js +22 -0
- package/dist/a2ui-react67.js +14 -0
- package/dist/a2ui-react68.js +10 -0
- package/dist/a2ui-react69.js +17 -0
- package/dist/a2ui-react7.js +10 -0
- package/dist/a2ui-react70.js +15 -0
- package/dist/a2ui-react71.js +10 -0
- package/dist/a2ui-react72.js +12 -0
- package/dist/a2ui-react73.js +9 -0
- package/dist/a2ui-react74.js +6 -0
- package/dist/a2ui-react75.js +15 -0
- package/dist/a2ui-react76.js +11 -0
- package/dist/a2ui-react77.js +14 -0
- package/dist/a2ui-react78.js +9 -0
- package/dist/a2ui-react79.js +9 -0
- package/dist/a2ui-react8.js +21 -0
- package/dist/a2ui-react80.js +9 -0
- package/dist/a2ui-react81.js +10 -0
- package/dist/a2ui-react82.js +26 -0
- package/dist/a2ui-react83.js +29 -0
- package/dist/a2ui-react84.js +67 -0
- package/dist/a2ui-react85.js +77 -0
- package/dist/a2ui-react86.js +53 -0
- package/dist/a2ui-react87.js +31 -0
- package/dist/a2ui-react88.js +22 -0
- package/dist/a2ui-react89.js +21 -0
- package/dist/a2ui-react9.js +88 -0
- package/{src/components/ui/textarea.tsx → dist/a2ui-react90.js} +17 -17
- package/dist/a2ui-react91.js +176 -0
- package/dist/a2ui-react92.js +38 -0
- package/dist/a2ui-react93.js +88 -0
- package/dist/a2ui-react94.js +9 -0
- package/dist/a2ui-react95.js +58 -0
- package/dist/a2ui-react96.js +146 -0
- package/dist/a2ui-react97.js +63 -0
- package/dist/a2ui-react98.js +17 -0
- package/dist/a2ui-react99.js +2765 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/native-select.d.ts +7 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/package.json +10 -2
- package/.claude/commands/speckit.analyze.md +0 -184
- package/.claude/commands/speckit.checklist.md +0 -294
- package/.claude/commands/speckit.clarify.md +0 -181
- package/.claude/commands/speckit.constitution.md +0 -82
- package/.claude/commands/speckit.implement.md +0 -135
- package/.claude/commands/speckit.plan.md +0 -89
- package/.claude/commands/speckit.specify.md +0 -256
- package/.claude/commands/speckit.tasks.md +0 -137
- package/.claude/commands/speckit.taskstoissues.md +0 -30
- package/.github/workflows/deploy.yml +0 -69
- package/.husky/pre-commit +0 -1
- package/.prettierignore +0 -4
- package/.prettierrc +0 -7
- package/.specify/memory/constitution.md +0 -73
- package/.specify/scripts/bash/check-prerequisites.sh +0 -166
- package/.specify/scripts/bash/common.sh +0 -156
- package/.specify/scripts/bash/create-new-feature.sh +0 -297
- package/.specify/scripts/bash/setup-plan.sh +0 -61
- package/.specify/scripts/bash/update-agent-context.sh +0 -799
- package/.specify/templates/agent-file-template.md +0 -28
- package/.specify/templates/checklist-template.md +0 -40
- package/.specify/templates/plan-template.md +0 -105
- package/.specify/templates/spec-template.md +0 -115
- package/.specify/templates/tasks-template.md +0 -250
- package/CLAUDE.md +0 -105
- package/CONTRIBUTING.md +0 -97
- package/components.json +0 -21
- package/eslint.config.js +0 -25
- package/netlify.toml +0 -50
- package/playground/README.md +0 -75
- package/playground/index.html +0 -22
- package/playground/package.json +0 -32
- package/playground/public/favicon.svg +0 -8
- package/playground/src/App.css +0 -256
- package/playground/src/App.tsx +0 -115
- package/playground/src/assets/react.svg +0 -1
- package/playground/src/components/ErrorDisplay.tsx +0 -13
- package/playground/src/components/ExampleSelector.tsx +0 -64
- package/playground/src/components/Header.tsx +0 -47
- package/playground/src/components/JsonEditor.tsx +0 -32
- package/playground/src/components/Preview.tsx +0 -78
- package/playground/src/components/ThemeToggle.tsx +0 -19
- package/playground/src/data/examples.ts +0 -1571
- package/playground/src/hooks/useTheme.ts +0 -55
- package/playground/src/index.css +0 -220
- package/playground/src/main.tsx +0 -10
- package/playground/tsconfig.app.json +0 -34
- package/playground/tsconfig.json +0 -13
- package/playground/tsconfig.node.json +0 -26
- package/playground/vite.config.ts +0 -31
- package/specs/001-a2ui-renderer/checklists/requirements.md +0 -41
- package/specs/001-a2ui-renderer/data-model.md +0 -140
- package/specs/001-a2ui-renderer/plan.md +0 -123
- package/specs/001-a2ui-renderer/quickstart.md +0 -141
- package/specs/001-a2ui-renderer/research.md +0 -140
- package/specs/001-a2ui-renderer/spec.md +0 -165
- package/specs/001-a2ui-renderer/tasks.md +0 -310
- package/specs/002-playground/checklists/requirements.md +0 -37
- package/specs/002-playground/contracts/components.md +0 -120
- package/specs/002-playground/data-model.md +0 -149
- package/specs/002-playground/plan.md +0 -73
- package/specs/002-playground/quickstart.md +0 -158
- package/specs/002-playground/research.md +0 -117
- package/specs/002-playground/spec.md +0 -109
- package/specs/002-playground/tasks.md +0 -224
- package/src/0.8/A2UIRender.test.tsx +0 -793
- package/src/0.8/A2UIRender.tsx +0 -142
- package/src/0.8/components/ComponentRenderer.test.tsx +0 -373
- package/src/0.8/components/ComponentRenderer.tsx +0 -163
- package/src/0.8/components/UnknownComponent.tsx +0 -49
- package/src/0.8/components/display/AudioPlayerComponent.tsx +0 -37
- package/src/0.8/components/display/DividerComponent.tsx +0 -23
- package/src/0.8/components/display/IconComponent.tsx +0 -137
- package/src/0.8/components/display/ImageComponent.tsx +0 -57
- package/src/0.8/components/display/TextComponent.tsx +0 -56
- package/src/0.8/components/display/VideoComponent.tsx +0 -31
- package/src/0.8/components/display/display.test.tsx +0 -660
- package/src/0.8/components/display/index.ts +0 -10
- package/src/0.8/components/index.ts +0 -14
- package/src/0.8/components/interactive/ButtonComponent.tsx +0 -44
- package/src/0.8/components/interactive/CheckBoxComponent.tsx +0 -45
- package/src/0.8/components/interactive/DateTimeInputComponent.tsx +0 -176
- package/src/0.8/components/interactive/MultipleChoiceComponent.tsx +0 -157
- package/src/0.8/components/interactive/SliderComponent.tsx +0 -53
- package/src/0.8/components/interactive/TextFieldComponent.tsx +0 -65
- package/src/0.8/components/interactive/index.ts +0 -10
- package/src/0.8/components/interactive/interactive.test.tsx +0 -618
- package/src/0.8/components/layout/CardComponent.tsx +0 -30
- package/src/0.8/components/layout/ColumnComponent.tsx +0 -93
- package/src/0.8/components/layout/ListComponent.tsx +0 -81
- package/src/0.8/components/layout/ModalComponent.tsx +0 -41
- package/src/0.8/components/layout/RowComponent.tsx +0 -94
- package/src/0.8/components/layout/TabsComponent.tsx +0 -59
- package/src/0.8/components/layout/index.ts +0 -10
- package/src/0.8/components/layout/layout.test.tsx +0 -558
- package/src/0.8/contexts/A2UIProvider.test.tsx +0 -226
- package/src/0.8/contexts/A2UIProvider.tsx +0 -54
- package/src/0.8/contexts/ActionContext.test.tsx +0 -242
- package/src/0.8/contexts/ActionContext.tsx +0 -105
- package/src/0.8/contexts/ComponentsMapContext.tsx +0 -125
- package/src/0.8/contexts/DataModelContext.test.tsx +0 -335
- package/src/0.8/contexts/DataModelContext.tsx +0 -184
- package/src/0.8/contexts/SurfaceContext.test.tsx +0 -339
- package/src/0.8/contexts/SurfaceContext.tsx +0 -197
- package/src/0.8/hooks/useA2UIMessageHandler.test.tsx +0 -399
- package/src/0.8/hooks/useA2UIMessageHandler.ts +0 -123
- package/src/0.8/hooks/useComponent.test.tsx +0 -148
- package/src/0.8/hooks/useDataBinding.test.tsx +0 -334
- package/src/0.8/hooks/useDataBinding.ts +0 -99
- package/src/0.8/hooks/useDispatchAction.test.tsx +0 -83
- package/src/0.8/hooks/useSurface.test.tsx +0 -114
- package/src/0.8/schemas/client_to_server.json +0 -50
- package/src/0.8/schemas/server_to_client.json +0 -148
- package/src/0.8/schemas/standard_catalog_definition.json +0 -661
- package/src/0.8/utils/dataBinding.test.ts +0 -443
- package/src/0.8/utils/dataBinding.ts +0 -212
- package/src/0.8/utils/pathUtils.test.ts +0 -353
- package/src/0.8/utils/pathUtils.ts +0 -200
- package/src/components/ui/button.tsx +0 -62
- package/src/components/ui/calendar.tsx +0 -220
- package/src/components/ui/card.tsx +0 -92
- package/src/components/ui/checkbox.tsx +0 -30
- package/src/components/ui/dialog.tsx +0 -141
- package/src/components/ui/input.tsx +0 -21
- package/src/components/ui/label.tsx +0 -22
- package/src/components/ui/native-select.tsx +0 -53
- package/src/components/ui/popover.tsx +0 -46
- package/src/components/ui/select.tsx +0 -188
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/slider.tsx +0 -61
- package/src/components/ui/tabs.tsx +0 -64
- package/src/index.ts +0 -1
- package/src/lib/utils.ts +0 -6
- package/tsconfig.json +0 -28
- package/vite.config.ts +0 -29
- package/vitest.config.ts +0 -22
- package/vitest.setup.ts +0 -8
- package/website/README.md +0 -4
- package/website/assets/favicon.svg +0 -8
- package/website/content/.gitkeep +0 -0
- package/website/content/index.md +0 -122
- package/website/global.d.ts +0 -9
- package/website/package.json +0 -17
- package/website/plain.config.js +0 -28
- package/website/serve.json +0 -6
- package/website/src/client/color-mode-switch.css +0 -47
- package/website/src/client/index.js +0 -61
- package/website/src/client/moon.svg +0 -1
- package/website/src/client/sun.svg +0 -1
- package/website/src/components/Footer.jsx +0 -9
- package/website/src/components/Header.jsx +0 -44
- package/website/src/components/Page.jsx +0 -28
- package/website/src/global.css +0 -423
|
@@ -4,445 +4,360 @@
|
|
|
4
4
|
* Core type definitions for the A2UI React renderer.
|
|
5
5
|
* Based on the A2UI specification documents.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
// ============ Value Types ============
|
|
9
|
-
|
|
10
7
|
/**
|
|
11
8
|
* Represents a value source - either a literal value or a reference to a data model path.
|
|
12
9
|
*/
|
|
13
|
-
export type ValueSource =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
export type ValueSource = {
|
|
11
|
+
literalString: string;
|
|
12
|
+
} | {
|
|
13
|
+
literalNumber: number;
|
|
14
|
+
} | {
|
|
15
|
+
literalBoolean: boolean;
|
|
16
|
+
} | {
|
|
17
|
+
literalArray: string[];
|
|
18
|
+
} | {
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
22
21
|
/**
|
|
23
22
|
* Primitive values that can be stored in the data model.
|
|
24
23
|
*/
|
|
25
|
-
export type DataModelValue =
|
|
26
|
-
| string
|
|
27
|
-
| number
|
|
28
|
-
| boolean
|
|
29
|
-
| null
|
|
30
|
-
| DataModel
|
|
31
|
-
| unknown[]
|
|
32
|
-
|
|
24
|
+
export type DataModelValue = string | number | boolean | null | DataModel | unknown[];
|
|
33
25
|
/**
|
|
34
26
|
* The data model is a hierarchical key-value store.
|
|
35
27
|
* Components reference data using paths like "/user/name".
|
|
36
28
|
*/
|
|
37
29
|
export interface DataModel {
|
|
38
|
-
|
|
30
|
+
[key: string]: DataModelValue;
|
|
39
31
|
}
|
|
40
|
-
|
|
41
32
|
/**
|
|
42
33
|
* Data entry from server messages (dataModelUpdate).
|
|
43
34
|
*/
|
|
44
35
|
export interface DataEntry {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
key: string;
|
|
37
|
+
valueString?: string;
|
|
38
|
+
valueNumber?: number;
|
|
39
|
+
valueBoolean?: boolean;
|
|
40
|
+
valueMap?: DataEntry[];
|
|
50
41
|
}
|
|
51
|
-
|
|
52
|
-
// ============ Surface ============
|
|
53
|
-
|
|
54
42
|
/**
|
|
55
43
|
* Surface styles configuration.
|
|
56
44
|
*/
|
|
57
45
|
export interface SurfaceStyles {
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
font?: string;
|
|
47
|
+
primaryColor?: string;
|
|
60
48
|
}
|
|
61
|
-
|
|
62
49
|
/**
|
|
63
50
|
* A Surface is the top-level container for A2UI rendering.
|
|
64
51
|
*/
|
|
65
52
|
export interface Surface {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
53
|
+
surfaceId: string;
|
|
54
|
+
root: string;
|
|
55
|
+
components: Map<string, ComponentDefinition>;
|
|
56
|
+
styles?: SurfaceStyles;
|
|
70
57
|
}
|
|
71
|
-
|
|
72
|
-
// ============ Component Definition ============
|
|
73
|
-
|
|
74
58
|
/**
|
|
75
59
|
* Base component properties that all components share.
|
|
76
60
|
*/
|
|
77
61
|
export interface ComponentDefinition {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
62
|
+
id: string;
|
|
63
|
+
weight?: number;
|
|
64
|
+
component: {
|
|
65
|
+
[componentType: string]: ComponentProps;
|
|
66
|
+
};
|
|
83
67
|
}
|
|
84
|
-
|
|
85
68
|
/**
|
|
86
69
|
* Generic component properties type.
|
|
87
70
|
*/
|
|
88
|
-
export type ComponentProps = Record<string, unknown
|
|
89
|
-
|
|
90
|
-
// ============ Children Definition ============
|
|
91
|
-
|
|
71
|
+
export type ComponentProps = Record<string, unknown>;
|
|
92
72
|
/**
|
|
93
73
|
* Template binding for dynamic child generation.
|
|
94
74
|
*/
|
|
95
75
|
export interface TemplateBinding {
|
|
96
|
-
|
|
97
|
-
|
|
76
|
+
componentId: string;
|
|
77
|
+
dataBinding: string;
|
|
98
78
|
}
|
|
99
|
-
|
|
100
79
|
/**
|
|
101
80
|
* Children definition for container components.
|
|
102
81
|
*/
|
|
103
82
|
export interface ChildrenDefinition {
|
|
104
|
-
|
|
105
|
-
|
|
83
|
+
explicitList?: string[];
|
|
84
|
+
template?: TemplateBinding;
|
|
106
85
|
}
|
|
107
|
-
|
|
108
|
-
// ============ Action ============
|
|
109
|
-
|
|
110
86
|
/**
|
|
111
87
|
* A single item in the action context.
|
|
112
88
|
*/
|
|
113
89
|
export interface ActionContextItem {
|
|
114
|
-
|
|
115
|
-
|
|
90
|
+
key: string;
|
|
91
|
+
value: ValueSource;
|
|
116
92
|
}
|
|
117
|
-
|
|
118
93
|
/**
|
|
119
94
|
* Action definition (attached to Button components).
|
|
120
95
|
*/
|
|
121
96
|
export interface Action {
|
|
122
|
-
|
|
123
|
-
|
|
97
|
+
name: string;
|
|
98
|
+
context?: ActionContextItem[];
|
|
124
99
|
}
|
|
125
|
-
|
|
126
100
|
/**
|
|
127
101
|
* Resolved action payload sent to the action handler.
|
|
128
102
|
*/
|
|
129
103
|
export interface ActionPayload {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
104
|
+
surfaceId: string;
|
|
105
|
+
name: string;
|
|
106
|
+
context: Record<string, unknown>;
|
|
107
|
+
sourceComponentId: string;
|
|
134
108
|
}
|
|
135
|
-
|
|
136
109
|
/**
|
|
137
110
|
* Action handler callback type.
|
|
138
111
|
*/
|
|
139
|
-
export type ActionHandler = (action: ActionPayload) => void
|
|
140
|
-
|
|
141
|
-
// ============ Message Types ============
|
|
142
|
-
|
|
112
|
+
export type ActionHandler = (action: ActionPayload) => void;
|
|
143
113
|
/**
|
|
144
114
|
* BeginRendering message payload - initializes a new Surface.
|
|
145
115
|
*/
|
|
146
116
|
export interface BeginRenderingPayload {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
117
|
+
surfaceId: string;
|
|
118
|
+
root: string;
|
|
119
|
+
catalogId?: string;
|
|
120
|
+
styles?: SurfaceStyles;
|
|
151
121
|
}
|
|
152
|
-
|
|
153
122
|
/**
|
|
154
123
|
* SurfaceUpdate message payload - updates the component tree.
|
|
155
124
|
*/
|
|
156
125
|
export interface SurfaceUpdatePayload {
|
|
157
|
-
|
|
158
|
-
|
|
126
|
+
surfaceId: string;
|
|
127
|
+
components: ComponentDefinition[];
|
|
159
128
|
}
|
|
160
|
-
|
|
161
129
|
/**
|
|
162
130
|
* DataModelUpdate message payload - updates the data model.
|
|
163
131
|
*/
|
|
164
132
|
export interface DataModelUpdatePayload {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
133
|
+
surfaceId: string;
|
|
134
|
+
path?: string;
|
|
135
|
+
contents: DataEntry[];
|
|
168
136
|
}
|
|
169
|
-
|
|
170
137
|
/**
|
|
171
138
|
* DeleteSurface message payload - removes a Surface.
|
|
172
139
|
*/
|
|
173
140
|
export interface DeleteSurfacePayload {
|
|
174
|
-
|
|
141
|
+
surfaceId: string;
|
|
175
142
|
}
|
|
176
|
-
|
|
177
143
|
/**
|
|
178
144
|
* A2UI message from server to client.
|
|
179
145
|
* Only one of the fields should be set per message.
|
|
180
146
|
*/
|
|
181
147
|
export interface A2UIMessage {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
148
|
+
beginRendering?: BeginRenderingPayload;
|
|
149
|
+
surfaceUpdate?: SurfaceUpdatePayload;
|
|
150
|
+
dataModelUpdate?: DataModelUpdatePayload;
|
|
151
|
+
deleteSurface?: DeleteSurfacePayload;
|
|
186
152
|
}
|
|
187
|
-
|
|
188
|
-
// ============ Base Component Props ============
|
|
189
|
-
|
|
190
153
|
/**
|
|
191
154
|
* Base props shared by all A2UI components.
|
|
192
155
|
*/
|
|
193
156
|
export interface BaseComponentProps {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
157
|
+
surfaceId: string;
|
|
158
|
+
componentId: string;
|
|
159
|
+
weight?: number;
|
|
197
160
|
}
|
|
198
|
-
|
|
199
|
-
// ============ Display Component Props ============
|
|
200
|
-
|
|
201
161
|
/**
|
|
202
162
|
* Text component properties.
|
|
203
163
|
*/
|
|
204
164
|
export interface TextComponentProps extends BaseComponentProps {
|
|
205
|
-
|
|
206
|
-
|
|
165
|
+
text?: ValueSource;
|
|
166
|
+
usageHint?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'caption' | 'body';
|
|
207
167
|
}
|
|
208
|
-
|
|
209
168
|
/**
|
|
210
169
|
* Image component properties.
|
|
211
170
|
*/
|
|
212
171
|
export interface ImageComponentProps extends BaseComponentProps {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
| 'avatar'
|
|
218
|
-
| 'smallFeature'
|
|
219
|
-
| 'mediumFeature'
|
|
220
|
-
| 'largeFeature'
|
|
221
|
-
| 'header'
|
|
222
|
-
}
|
|
223
|
-
|
|
172
|
+
url?: ValueSource;
|
|
173
|
+
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
174
|
+
usageHint?: 'icon' | 'avatar' | 'smallFeature' | 'mediumFeature' | 'largeFeature' | 'header';
|
|
175
|
+
}
|
|
224
176
|
/**
|
|
225
177
|
* Icon component properties.
|
|
226
178
|
*/
|
|
227
179
|
export interface IconComponentProps extends BaseComponentProps {
|
|
228
|
-
|
|
180
|
+
name?: ValueSource;
|
|
229
181
|
}
|
|
230
|
-
|
|
231
182
|
/**
|
|
232
183
|
* Video component properties.
|
|
233
184
|
*/
|
|
234
185
|
export interface VideoComponentProps extends BaseComponentProps {
|
|
235
|
-
|
|
186
|
+
url?: ValueSource;
|
|
236
187
|
}
|
|
237
|
-
|
|
238
188
|
/**
|
|
239
189
|
* AudioPlayer component properties.
|
|
240
190
|
*/
|
|
241
191
|
export interface AudioPlayerComponentProps extends BaseComponentProps {
|
|
242
|
-
|
|
243
|
-
|
|
192
|
+
url?: ValueSource;
|
|
193
|
+
description?: ValueSource;
|
|
244
194
|
}
|
|
245
|
-
|
|
246
195
|
/**
|
|
247
196
|
* Divider component properties.
|
|
248
197
|
*/
|
|
249
198
|
export interface DividerComponentProps extends BaseComponentProps {
|
|
250
|
-
|
|
199
|
+
axis?: 'horizontal' | 'vertical';
|
|
251
200
|
}
|
|
252
|
-
|
|
253
|
-
// ============ Layout Component Props ============
|
|
254
|
-
|
|
255
201
|
/**
|
|
256
202
|
* Distribution values for flex layouts.
|
|
257
203
|
*/
|
|
258
|
-
export type Distribution =
|
|
259
|
-
| 'start'
|
|
260
|
-
| 'center'
|
|
261
|
-
| 'end'
|
|
262
|
-
| 'spaceBetween'
|
|
263
|
-
| 'spaceAround'
|
|
264
|
-
| 'spaceEvenly'
|
|
265
|
-
|
|
204
|
+
export type Distribution = 'start' | 'center' | 'end' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly';
|
|
266
205
|
/**
|
|
267
206
|
* Alignment values for flex layouts.
|
|
268
207
|
*/
|
|
269
|
-
export type Alignment = 'start' | 'center' | 'end' | 'stretch'
|
|
270
|
-
|
|
208
|
+
export type Alignment = 'start' | 'center' | 'end' | 'stretch';
|
|
271
209
|
/**
|
|
272
210
|
* Row component properties.
|
|
273
211
|
*/
|
|
274
212
|
export interface RowComponentProps extends BaseComponentProps {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
213
|
+
children?: ChildrenDefinition;
|
|
214
|
+
distribution?: Distribution;
|
|
215
|
+
alignment?: Alignment;
|
|
278
216
|
}
|
|
279
|
-
|
|
280
217
|
/**
|
|
281
218
|
* Column component properties.
|
|
282
219
|
*/
|
|
283
220
|
export interface ColumnComponentProps extends BaseComponentProps {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
221
|
+
children?: ChildrenDefinition;
|
|
222
|
+
distribution?: Distribution;
|
|
223
|
+
alignment?: Alignment;
|
|
287
224
|
}
|
|
288
|
-
|
|
289
225
|
/**
|
|
290
226
|
* List component properties.
|
|
291
227
|
*/
|
|
292
228
|
export interface ListComponentProps extends BaseComponentProps {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
229
|
+
children?: ChildrenDefinition;
|
|
230
|
+
direction?: 'vertical' | 'horizontal';
|
|
231
|
+
alignment?: Alignment;
|
|
296
232
|
}
|
|
297
|
-
|
|
298
233
|
/**
|
|
299
234
|
* Card component properties.
|
|
300
235
|
*/
|
|
301
236
|
export interface CardComponentProps extends BaseComponentProps {
|
|
302
|
-
|
|
237
|
+
child?: string;
|
|
303
238
|
}
|
|
304
|
-
|
|
305
239
|
/**
|
|
306
240
|
* Tab item definition.
|
|
307
241
|
*/
|
|
308
242
|
export interface TabItem {
|
|
309
|
-
|
|
310
|
-
|
|
243
|
+
title?: ValueSource;
|
|
244
|
+
child: string;
|
|
311
245
|
}
|
|
312
|
-
|
|
313
246
|
/**
|
|
314
247
|
* Tabs component properties.
|
|
315
248
|
*/
|
|
316
249
|
export interface TabsComponentProps extends BaseComponentProps {
|
|
317
|
-
|
|
250
|
+
tabItems?: TabItem[];
|
|
318
251
|
}
|
|
319
|
-
|
|
320
252
|
/**
|
|
321
253
|
* Modal component properties.
|
|
322
254
|
*/
|
|
323
255
|
export interface ModalComponentProps extends BaseComponentProps {
|
|
324
|
-
|
|
325
|
-
|
|
256
|
+
entryPointChild?: string;
|
|
257
|
+
contentChild?: string;
|
|
326
258
|
}
|
|
327
|
-
|
|
328
|
-
// ============ Interactive Component Props ============
|
|
329
|
-
|
|
330
259
|
/**
|
|
331
260
|
* Button component properties.
|
|
332
261
|
*/
|
|
333
262
|
export interface ButtonComponentProps extends BaseComponentProps {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
263
|
+
child?: string;
|
|
264
|
+
primary?: boolean;
|
|
265
|
+
action?: Action;
|
|
337
266
|
}
|
|
338
|
-
|
|
339
267
|
/**
|
|
340
268
|
* CheckBox component properties.
|
|
341
269
|
*/
|
|
342
270
|
export interface CheckBoxComponentProps extends BaseComponentProps {
|
|
343
|
-
|
|
344
|
-
|
|
271
|
+
label?: ValueSource;
|
|
272
|
+
value?: ValueSource;
|
|
345
273
|
}
|
|
346
|
-
|
|
347
274
|
/**
|
|
348
275
|
* TextField component properties.
|
|
349
276
|
*/
|
|
350
277
|
export interface TextFieldComponentProps extends BaseComponentProps {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
278
|
+
label?: ValueSource;
|
|
279
|
+
text?: ValueSource;
|
|
280
|
+
textFieldType?: 'date' | 'longText' | 'number' | 'shortText' | 'obscured';
|
|
281
|
+
validationRegexp?: string;
|
|
355
282
|
}
|
|
356
|
-
|
|
357
283
|
/**
|
|
358
284
|
* DateTimeInput component properties.
|
|
359
285
|
*/
|
|
360
286
|
export interface DateTimeInputComponentProps extends BaseComponentProps {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
287
|
+
value?: ValueSource;
|
|
288
|
+
enableDate?: boolean;
|
|
289
|
+
enableTime?: boolean;
|
|
364
290
|
}
|
|
365
|
-
|
|
366
291
|
/**
|
|
367
292
|
* MultipleChoice option definition.
|
|
368
293
|
*/
|
|
369
294
|
export interface MultipleChoiceOption {
|
|
370
|
-
|
|
371
|
-
|
|
295
|
+
label?: ValueSource;
|
|
296
|
+
value: string;
|
|
372
297
|
}
|
|
373
|
-
|
|
374
298
|
/**
|
|
375
299
|
* MultipleChoice component properties.
|
|
376
300
|
*/
|
|
377
301
|
export interface MultipleChoiceComponentProps extends BaseComponentProps {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
302
|
+
selections?: ValueSource;
|
|
303
|
+
options?: MultipleChoiceOption[];
|
|
304
|
+
maxAllowedSelections?: number;
|
|
381
305
|
}
|
|
382
|
-
|
|
383
306
|
/**
|
|
384
307
|
* Slider component properties.
|
|
385
308
|
*/
|
|
386
309
|
export interface SliderComponentProps extends BaseComponentProps {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
310
|
+
value?: ValueSource;
|
|
311
|
+
minValue?: number;
|
|
312
|
+
maxValue?: number;
|
|
390
313
|
}
|
|
391
|
-
|
|
392
|
-
// ============ Renderer Props ============
|
|
393
|
-
|
|
394
314
|
/**
|
|
395
315
|
* Decision button for the fixed bottom area.
|
|
396
316
|
*/
|
|
397
317
|
export interface DecisionButton {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
318
|
+
name: string;
|
|
319
|
+
label: string;
|
|
320
|
+
action: string;
|
|
321
|
+
variant?: 'primary' | 'secondary' | 'destructive';
|
|
322
|
+
icon?: string;
|
|
403
323
|
}
|
|
404
|
-
|
|
405
324
|
/**
|
|
406
325
|
* Confirmed info item for display.
|
|
407
326
|
*/
|
|
408
327
|
export interface ConfirmedInfoItem {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
328
|
+
label: string;
|
|
329
|
+
value: string;
|
|
330
|
+
highlight?: boolean;
|
|
331
|
+
isFullWidth?: boolean;
|
|
413
332
|
}
|
|
414
|
-
|
|
415
333
|
/**
|
|
416
334
|
* Confirmed info section configuration.
|
|
417
335
|
*/
|
|
418
336
|
export interface ConfirmedInfo {
|
|
419
|
-
|
|
420
|
-
|
|
337
|
+
title?: string;
|
|
338
|
+
items: ConfirmedInfoItem[];
|
|
421
339
|
}
|
|
422
|
-
|
|
423
340
|
/**
|
|
424
341
|
* Form section warning configuration.
|
|
425
342
|
*/
|
|
426
343
|
export interface FormSectionWarning {
|
|
427
|
-
|
|
428
|
-
|
|
344
|
+
title: string;
|
|
345
|
+
message: string;
|
|
429
346
|
}
|
|
430
|
-
|
|
431
347
|
/**
|
|
432
348
|
* Completed action information.
|
|
433
349
|
*/
|
|
434
350
|
export interface CompletedAction {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
351
|
+
action: string;
|
|
352
|
+
label: string;
|
|
353
|
+
completedAt?: string;
|
|
354
|
+
completedBy?: string;
|
|
355
|
+
formData?: Record<string, unknown>;
|
|
440
356
|
}
|
|
441
|
-
|
|
442
357
|
/**
|
|
443
358
|
* Progress information.
|
|
444
359
|
*/
|
|
445
360
|
export interface Progress {
|
|
446
|
-
|
|
447
|
-
|
|
361
|
+
current: number;
|
|
362
|
+
total: number;
|
|
448
363
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ValueSource, DataModel, DataEntry, DataModelValue } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves a ValueSource to its actual value.
|
|
4
|
+
*
|
|
5
|
+
* @param source - The value source (literal or path reference)
|
|
6
|
+
* @param dataModel - The data model for path lookups
|
|
7
|
+
* @param defaultValue - Default value if source is undefined or path not found
|
|
8
|
+
* @returns The resolved value
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Literal values
|
|
12
|
+
* resolveValue({ literalString: "Hello" }, {}); // "Hello"
|
|
13
|
+
* resolveValue({ literalNumber: 42 }, {}); // 42
|
|
14
|
+
*
|
|
15
|
+
* // Path references
|
|
16
|
+
* const model = { user: { name: "John" } };
|
|
17
|
+
* resolveValue({ path: "/user/name" }, model); // "John"
|
|
18
|
+
* resolveValue({ path: "/user/age" }, model, 0); // 0 (default)
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveValue<T = unknown>(source: ValueSource | undefined, dataModel: DataModel, defaultValue?: T): T;
|
|
21
|
+
/**
|
|
22
|
+
* Checks if a value source is a path reference.
|
|
23
|
+
*
|
|
24
|
+
* @param source - The value source to check
|
|
25
|
+
* @returns True if the source is a path reference
|
|
26
|
+
*/
|
|
27
|
+
export declare function isPathReference(source: ValueSource | undefined): source is {
|
|
28
|
+
path: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Gets the path from a value source, or undefined if it's not a path reference.
|
|
32
|
+
*
|
|
33
|
+
* @param source - The value source
|
|
34
|
+
* @returns The path string or undefined
|
|
35
|
+
*/
|
|
36
|
+
export declare function getPath(source: ValueSource | undefined): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Converts a DataEntry array to a plain object.
|
|
39
|
+
* This is used for processing dataModelUpdate message contents.
|
|
40
|
+
*
|
|
41
|
+
* @param contents - Array of data entries from the server
|
|
42
|
+
* @returns A plain object with the converted values
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* contentsToObject([
|
|
46
|
+
* { key: "name", valueString: "John" },
|
|
47
|
+
* { key: "age", valueNumber: 30 },
|
|
48
|
+
* { key: "active", valueBoolean: true },
|
|
49
|
+
* { key: "profile", valueMap: [
|
|
50
|
+
* { key: "email", valueString: "john@example.com" }
|
|
51
|
+
* ]}
|
|
52
|
+
* ]);
|
|
53
|
+
* // Returns: { name: "John", age: 30, active: true, profile: { email: "john@example.com" } }
|
|
54
|
+
*/
|
|
55
|
+
export declare function contentsToObject(contents: DataEntry[]): Record<string, DataModelValue>;
|
|
56
|
+
/**
|
|
57
|
+
* Creates a literal string value source.
|
|
58
|
+
*
|
|
59
|
+
* @param value - The string value
|
|
60
|
+
* @returns A ValueSource with literalString
|
|
61
|
+
*/
|
|
62
|
+
export declare function literalString(value: string): ValueSource;
|
|
63
|
+
/**
|
|
64
|
+
* Creates a literal number value source.
|
|
65
|
+
*
|
|
66
|
+
* @param value - The number value
|
|
67
|
+
* @returns A ValueSource with literalNumber
|
|
68
|
+
*/
|
|
69
|
+
export declare function literalNumber(value: number): ValueSource;
|
|
70
|
+
/**
|
|
71
|
+
* Creates a literal boolean value source.
|
|
72
|
+
*
|
|
73
|
+
* @param value - The boolean value
|
|
74
|
+
* @returns A ValueSource with literalBoolean
|
|
75
|
+
*/
|
|
76
|
+
export declare function literalBoolean(value: boolean): ValueSource;
|
|
77
|
+
/**
|
|
78
|
+
* Creates a path reference value source.
|
|
79
|
+
*
|
|
80
|
+
* @param path - The data model path
|
|
81
|
+
* @returns A ValueSource with path
|
|
82
|
+
*/
|
|
83
|
+
export declare function pathRef(path: string): ValueSource;
|
|
84
|
+
/**
|
|
85
|
+
* Resolves action context items to a plain object.
|
|
86
|
+
* This is used when dispatching actions to resolve all context values.
|
|
87
|
+
*
|
|
88
|
+
* @param context - Array of action context items
|
|
89
|
+
* @param dataModel - The data model for path lookups
|
|
90
|
+
* @returns A plain object with resolved context values
|
|
91
|
+
*/
|
|
92
|
+
export declare function resolveActionContext(context: Array<{
|
|
93
|
+
key: string;
|
|
94
|
+
value: ValueSource;
|
|
95
|
+
}> | undefined, dataModel: DataModel): Record<string, unknown>;
|