@tempots/beatui 1.7.4 → 1.9.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.
- package/dist/{ar-Wr6gMs-M.cjs → ar-CEzAem0F.cjs} +1 -1
- package/dist/{ar-fdUqbCvM.js → ar-CQieaqsq.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/auth-divider-B8yr-E_b.cjs +1 -0
- package/dist/{auth-divider-D9KnNeyF.js → auth-divider-Byh5BWLc.js} +91 -88
- package/dist/beatui.css +1 -0
- package/dist/beatui.tailwind.css +1 -0
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +27 -26
- package/dist/card-BkA7Wvbh.cjs +1 -0
- package/dist/card-DX1DwGbL.js +62 -0
- package/dist/{colors-C2sgnzFH.js → colors-CyMhfbJi.js} +64 -58
- package/dist/{colors-DPCHjRMj.cjs → colors-IXZF9U-s.cjs} +1 -1
- package/dist/control-hqEuMzyI.js +343 -0
- package/dist/control-muup9GF1.cjs +1 -0
- package/dist/custom-validation-BA9iJWl_.cjs +1 -0
- package/dist/custom-validation-BOBoUwHY.js +181 -0
- package/dist/{de-C5-k5Eov.js → de-CBIwvkAH.js} +1 -1
- package/dist/{de-DZqdSEta.cjs → de-DdfxrlT3.cjs} +1 -1
- package/dist/deep-merge-8fwp1z4X.js +1346 -0
- package/dist/deep-merge-VDGE_HQD.cjs +1 -0
- package/dist/duration-input-DmsljXl3.cjs +1 -0
- package/dist/{duration-input-D4V_PHIg.js → duration-input-ZQlcqdXU.js} +32 -31
- package/dist/{editor-toolbar-group-FpOHrmtx.js → editor-toolbar-group-BNTBMJCe.js} +2 -2
- package/dist/{editor-toolbar-group-C_ft_T8D.cjs → editor-toolbar-group-DiMzqYgz.cjs} +1 -1
- package/dist/{es-h6jmoF4X.js → es--9HaEj2D.js} +1 -1
- package/dist/{es-CJgYfRap.cjs → es-DSdljxFJ.cjs} +1 -1
- package/dist/{fa-BuxK837l.js → fa-1Z-akcW7.js} +1 -1
- package/dist/{fa-BQ5PzwNY.cjs → fa-BolmeWRT.cjs} +1 -1
- package/dist/flyout-CuKFh_T7.js +151 -0
- package/dist/flyout-DC_tKaTG.cjs +1 -0
- package/dist/{fr-Bv3TG44U.cjs → fr-CODgUuoZ.cjs} +1 -1
- package/dist/{fr-BwILQ9G2.js → fr-DhHM9rou.js} +1 -1
- package/dist/{he-yC9Sc7JD.js → he-CBamXbGJ.js} +1 -1
- package/dist/{he-5LbvgMCC.cjs → he-Juw-dr28.cjs} +1 -1
- package/dist/{hi-Da7rcCpP.js → hi-DvvcX-Ra.js} +1 -1
- package/dist/{hi-YWhWcG_L.cjs → hi-R749jeg-.cjs} +1 -1
- package/dist/{index-CvU9E9wd.js → index-BfQaT5Jy.js} +104 -104
- package/dist/{index-XogEKwdt.cjs → index-Dv7nPuwA.cjs} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +6713 -9831
- package/dist/{input-container-CyOgiiQD.cjs → input-container-BaWQLWB6.cjs} +1 -1
- package/dist/{input-container-8JFB11xN.js → input-container-DCS5oJ4S.js} +4 -4
- package/dist/{it-BxOIJE45.cjs → it-DT5oRZDH.cjs} +1 -1
- package/dist/{it-Yeklau78.js → it-aV6i8Qxz.js} +1 -1
- package/dist/{ja-Dxj9Q5Yd.js → ja-CuLhGnJX.js} +1 -1
- package/dist/{ja-CNhjK06P.cjs → ja-CwKaCYLB.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +83 -79
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +2 -2
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +74 -72
- package/dist/{ko-DgkqcXTs.cjs → ko-Bucro9ID.cjs} +1 -1
- package/dist/{ko-gn_MsegK.js → ko-D-66BsEX.js} +1 -1
- package/dist/lexical/index.cjs.js +1 -1
- package/dist/lexical/index.es.js +5 -5
- package/dist/menu-BFLFKceF.cjs +1 -0
- package/dist/menu-BO6zqyfq.js +220 -0
- package/dist/modal-6Mq3vS5r.js +309 -0
- package/dist/modal-d77-TMc4.cjs +1 -0
- package/dist/{nl-vHNFtXXb.js → nl-CAny6wvm.js} +1 -1
- package/dist/{nl-Dy9lmbBO.cjs → nl-D7vHpehb.cjs} +1 -1
- package/dist/notice-BNGx86Yg.js +110 -0
- package/dist/notice-iF6zBMq9.cjs +1 -0
- package/dist/{oneof-branch-detection-Q_jxvJIA.js → oneof-branch-detection-Bm17RhC2.js} +27 -26
- package/dist/oneof-branch-detection-DZ4MrfBp.cjs +1 -0
- package/dist/openui/index.cjs.js +9 -0
- package/dist/openui/index.es.js +2174 -0
- package/dist/password-input-Bipt7Wsu.cjs +1 -0
- package/dist/password-input-mkRmrEPq.js +105 -0
- package/dist/{pl-BtYbtsmG.cjs → pl-CSiXoOKT.cjs} +1 -1
- package/dist/{pl-C0UdHla0.js → pl-rmZLgQ_V.js} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +4 -4
- package/dist/{pt-CtNmqQ1X.cjs → pt-CJT-iq4y.cjs} +1 -1
- package/dist/{pt-DGKtfN0d.js → pt-DHnajqAi.js} +1 -1
- package/dist/{ru-CpXYLt-v.js → ru-C_E8OZNE.js} +1 -1
- package/dist/{ru-BaL_NPRU.cjs → ru-G3sr_ctV.cjs} +1 -1
- package/dist/slider-input-SLguFA0d.cjs +1 -0
- package/dist/slider-input-VYAMm7pE.js +285 -0
- package/dist/stepper-24p16Zsv.cjs +1 -0
- package/dist/stepper-TlzbfYWa.js +3222 -0
- package/dist/tailwind/preset.cjs.js +1 -1
- package/dist/tailwind/preset.es.js +38 -40
- package/dist/tailwind/vite-plugin.cjs.js +14 -12
- package/dist/tailwind/vite-plugin.es.js +317 -246
- package/dist/text-area-BdemKQ_w.cjs +1 -0
- package/dist/text-area-Br83-_PQ.js +431 -0
- package/dist/{text-input-NJypZSnE.js → text-input-ByuxdX8w.js} +5 -5
- package/dist/{text-input-DS5zlXb2.cjs → text-input-MjlUC_9u.cjs} +1 -1
- package/dist/{toolbar-BF2L6WKC.js → toolbar-CEBTTjHh.js} +1 -1
- package/dist/{toolbar-BBwfe8U9.cjs → toolbar-DWawYFFX.cjs} +1 -1
- package/dist/{tr-DwOd87oB.cjs → tr-DcxLHHTC.cjs} +1 -1
- package/dist/{tr-DIFZDFW_.js → tr-bVXwloKC.js} +1 -1
- package/dist/{translations-EwEmHe3v.cjs → translations-D3xqZUTA.cjs} +1 -1
- package/dist/{translations-BCMP-h52.js → translations-DU9wTV1y.js} +20 -19
- package/dist/{translations-5cXBrENb.js → translations-RT_UN8ny.js} +1 -1
- package/dist/{translations-BqWc0ZHz.cjs → translations-qljG2Chq.cjs} +1 -1
- package/dist/types/components/navigation/stepper.d.ts +4 -4
- package/dist/types/openui/index.d.ts +28 -0
- package/dist/types/openui/library/define-component.d.ts +15 -0
- package/dist/types/openui/library/library.d.ts +7 -0
- package/dist/types/openui/library/prompt-generator.d.ts +5 -0
- package/dist/types/openui/library/types.d.ts +33 -0
- package/dist/types/openui/parser/parser.d.ts +8 -0
- package/dist/types/openui/parser/streaming-parser.d.ts +14 -0
- package/dist/types/openui/parser/tokenizer.d.ts +9 -0
- package/dist/types/openui/parser/types.d.ts +46 -0
- package/dist/types/openui/registry/button.d.ts +148 -0
- package/dist/types/openui/registry/data.d.ts +177 -0
- package/dist/types/openui/registry/form.d.ts +65 -0
- package/dist/types/openui/registry/format.d.ts +67 -0
- package/dist/types/openui/registry/index.d.ts +9 -0
- package/dist/types/openui/registry/layout.d.ts +45 -0
- package/dist/types/openui/registry/navigation.d.ts +149 -0
- package/dist/types/openui/registry/overlay.d.ts +56 -0
- package/dist/types/openui/registry/typography.d.ts +17 -0
- package/dist/types/openui/renderer/action-context.d.ts +24 -0
- package/dist/types/openui/renderer/node-resolver.d.ts +9 -0
- package/dist/types/openui/renderer/openui-renderer.d.ts +32 -0
- package/dist/types/openui/renderer/skeleton.d.ts +2 -0
- package/dist/types/openui/streaming/from-fetch.d.ts +7 -0
- package/dist/types/openui/streaming/from-sse.d.ts +7 -0
- package/dist/types/openui/streaming/from-websocket.d.ts +10 -0
- package/dist/types/openui/streaming/types.d.ts +5 -0
- package/dist/types/tailwind/preset.d.ts +25 -4
- package/dist/types/tailwind/vite-plugin.d.ts +17 -5
- package/dist/types/tokens/colors.d.ts +87 -9
- package/dist/types/tokens/index.d.ts +7 -6
- package/dist/{ur-DBst-TXc.js → ur-Dls2qb4V.js} +1 -1
- package/dist/{ur-D9nLchps.cjs → ur-IRQoHh1E.cjs} +1 -1
- package/dist/use-form-BZ8vDYOv.cjs +2 -0
- package/dist/use-form-DsCzINfm.js +750 -0
- package/dist/utils-D3-NApSw.cjs +1 -0
- package/dist/utils-Nbh7yQ73.js +105 -0
- package/dist/{vi-Dg1aiMr5.cjs → vi-Bi9SvVCP.cjs} +1 -1
- package/dist/{vi-DQOJp32U.js → vi-C3mTzj50.js} +1 -1
- package/dist/widget-customization-BV6XB2v_.cjs +1 -0
- package/dist/widget-customization-Bso45ONQ.js +1198 -0
- package/dist/{zh-DPK4HXl2.js → zh-B4JRJBt2.js} +1 -1
- package/dist/{zh-tbwSTbmn.cjs → zh-BMU5rYu1.cjs} +1 -1
- package/package.json +31 -20
- package/dist/auth-divider-CjcrgXmq.cjs +0 -1
- package/dist/custom-validation-7por5nJN.js +0 -488
- package/dist/custom-validation-CLscGHY4.cjs +0 -1
- package/dist/deep-merge-D90SW1Ci.cjs +0 -1
- package/dist/deep-merge-DT2H9AGq.js +0 -1765
- package/dist/duration-input-4AQnQpyo.cjs +0 -1
- package/dist/menu-B60Q9j3-.cjs +0 -1
- package/dist/menu-BkqFGcXg.js +0 -366
- package/dist/notice-CQGJyZ8o.js +0 -211
- package/dist/notice-p2IqXS5-.cjs +0 -1
- package/dist/oneof-branch-detection-xDDDdYRk.cjs +0 -1
- package/dist/use-form-8NnZ-KHk.js +0 -1090
- package/dist/use-form-Dcra7GeE.cjs +0 -2
- package/dist/utils-DmEuG3Np.cjs +0 -1
- package/dist/utils-vUtP6iPG.js +0 -165
- package/dist/widget-customization-BIBva3f-.js +0 -1458
- package/dist/widget-customization-pqmtsraC.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("@tempots/dom"),k=require("@tempots/ui"),S=require("./colors-DPCHjRMj.cjs");function y(e,{units:t=["B","KB","MB","GB","TB"],decimalPlaces:o=0,locale:n}={}){if(e===0||e===0n)return new Intl.NumberFormat(n,{style:"unit",unit:"byte",unitDisplay:"short",maximumFractionDigits:0}).format(0).replace("byte",t[0]);let a,r;if(typeof e=="bigint"){let s=e<0n?-e:e;for(a=0;s>=1024n&&a<t.length-1;)s=s/1024n,a++;r=Number(e)/Math.pow(1024,a)}else a=Math.floor(Math.log(Math.abs(e))/Math.log(1024)),a=Math.min(a,t.length-1),r=e/Math.pow(1024,a);return new Intl.NumberFormat(n,{style:"unit",unit:"byte",unitDisplay:"short",minimumFractionDigits:a===0?0:o,maximumFractionDigits:a===0?0:o}).format(r).replace("byte",t[a])}const M={loadingExtended:"Loading, please wait",loadingShort:"Loading...",locale:"Locale",iconDescription:"Icon",loadingIcon:"Loading icon",failedToLoadIcon:"Failed to load icon",editLabel:"Edit",selectOne:"Select one",selectNone:"None",selectMany:"Select many",noResults:"No results",passwordPlaceholderText:"Secret Password",togglePasswordVisibility:"Toggle password visibility",toggleMenu:"Toggle menu",toggleAside:"Toggle aside",mainNavigation:"Main navigation",sidebar:"Sidebar",closeDrawer:"Close drawer",closeModal:"Close modal",confirm:"Confirm",cancel:"Cancel",addLabel:"Add",removeItem:"Remove item",currentLocale:"English",ar:"Arabic",de:"German",en:"English",es:"Spanish",fr:"French",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nl:"Dutch",pl:"Polish",pt:"Portuguese",ru:"Russian",tr:"Turkish",vi:"Vietnamese",zh:"Chinese",he:"Hebrew",fa:"Persian",ur:"Urdu",emailPlaceholderText:"Enter your email",incrementValue:"Increment value",decrementValue:"Decrement value",dropZoneInstructions:e=>e?"Click to choose or drag files here, or press Enter or Space to open file selector":"Drag files here",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remove file",clearAllFiles:"Clear all files",clearValue:"Reset",dateRangeStart:"Start",dateRangeEnd:"End",dateRangeNoLimit:"No limit",dateRangeSelectDate:"Select date",unknownType:"Unknown type",filesInputInstructions:(e,t,o)=>{let n=e==null||e>1?"Click to choose or drag files here":"Click to choose or drag a file here";if(e||t){const a=[];if(e!=null&&e>1&&a.push(`up to ${e} files`),t&&o){const r=y(t,{units:o});a.push(`max ${r} each`)}a.length>0&&(n+=` (${a.join(", ")})`)}return n},paginationLabel:"Pagination",paginationRange:(e,t,o,n)=>n>o?`Rows ${e} to ${t} of ${o} of ${n}`:`Rows ${e} to ${t} of ${o}`,firstPage:"First page",previousPage:"Previous page",nextPage:"Next page",lastPage:"Last page",breadcrumbs:"Breadcrumbs",commandPalette:"Command palette",typeACommand:"Type a command...",noResultsFound:"No results found",noMatchingCommands:"No matching commands",appearanceSystem:"System",appearanceLight:"Light",appearanceDark:"Dark",ok:"OK",changeTypeConfirmation:"Changing type will clear the current value. Continue?",notifications:"Notifications",markAllAsRead:"Mark all as read",noNotifications:"No notifications",schemaConflictsDetected:"Schema Conflicts Detected",schemaViolationsDetected:"Schema Violations Detected",properties:"Properties",uploading:"Uploading...",dropFilesOrBrowse:"Drop files here or click to browse",acceptedTypes:e=>`Accepted types: ${e}`,enterUrlPrompt:"Enter URL:",exceeded:"(exceeded)",pdfPreview:"PDF Preview",lexical:{fontFamily:"Font Family",fontSize:"Font Size",lineHeight:"Line Height",fontColor:"Font Color",highlightColor:"Highlight Color",backgroundColor:"Background Color",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Code",clearFormatting:"Clear Formatting",normal:"Normal",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",checkList:"Check List",indent:"Indent",outdent:"Outdent",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",insertTable:"Insert Table",link:"Link",undo:"Undo",redo:"Redo",cut:"Cut",copy:"Copy",paste:"Paste",defaultOption:"Default",slashCommands:"Slash commands",noCommandsFound:"No commands found",changeBlockType:"Change block type",blockTypes:"Block types",enterUrl:"Enter URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Sort ascending",sortDescending:"Sort descending",clearSort:"Clear sort",filterPlaceholder:"Filter...",clearFilter:"Clear filter",selectAll:"Select all",deselectAll:"Deselect all",selectedCount:e=>`${e} selected`,resetAll:"Reset all",noResults:"No results found",loading:"Loading...",filterPanelAddCondition:"Add condition",filterPanelApply:"Apply",filterPanelClear:"Clear filters",filterPanelAnd:"AND",filterPanelOr:"OR",filterPanelContains:"Contains",filterPanelNotContains:"Does not contain",filterPanelEquals:"Equals",filterPanelNotEquals:"Does not equal",filterPanelStartsWith:"Starts with",filterPanelEndsWith:"Ends with",filterPanelIsNull:"Is empty",filterPanelIsNotNull:"Is not empty",filterPanelGt:"Greater than",filterPanelGte:"Greater or equal",filterPanelLt:"Less than",filterPanelLte:"Less or equal",filterPanelBetween:"Between",filterPanelValuePlaceholder:"Value...",sortMultiHint:"Hold Shift to sort multiple columns",columnVisibility:"Columns",showAllColumns:"Show all",menuSortAsc:"Sort Ascending",menuSortDesc:"Sort Descending",menuClearSort:"Clear Sort",menuHideColumn:"Hide Column",menuChooseColumns:"Choose Columns",menuResetColumns:"Reset Columns",menuFilter:"Filter",rowCount:(e,t)=>`Rows: ${e} Total Rows: ${t}`,filterTagsPlaceholder:"Select values...",groupCount:e=>`${e} items`,collapseGroup:"Collapse group",expandGroup:"Expand group",describeFilter:{textContains:(e,t)=>`${e} contains "${t}"`,textNotContains:(e,t)=>`${e} does not contain "${t}"`,textEquals:(e,t)=>`${e} equals "${t}"`,textNotEquals:(e,t)=>`${e} does not equal "${t}"`,textStartsWith:(e,t)=>`${e} starts with "${t}"`,textEndsWith:(e,t)=>`${e} ends with "${t}"`,compareEq:(e,t)=>`${e} = ${t}`,compareNeq:(e,t)=>`${e} ≠ ${t}`,compareGt:(e,t)=>`${e} > ${t}`,compareGte:(e,t)=>`${e} ≥ ${t}`,compareLt:(e,t)=>`${e} < ${t}`,compareLte:(e,t)=>`${e} ≤ ${t}`,rangeBetween:(e,t,o)=>`${e} between ${t} and ${o}`,rangeGte:(e,t)=>`${e} ≥ ${t}`,rangeLte:(e,t)=>`${e} ≤ ${t}`,setIn:(e,t)=>`${e} in [${t}]`,setNotIn:(e,t)=>`${e} not in [${t}]`,booleanIs:(e,t)=>`${e} is ${t}`,isNull:e=>`${e} is empty`,isNotNull:e=>`${e} is not empty`,compositeAnd:e=>e.join(" AND "),compositeOr:e=>e.join(" OR ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Inline code",link:"Insert link",removeLink:"Remove link",heading:e=>`Heading ${e}`,bulletList:"Bullet list",orderedList:"Ordered list",blockquote:"Blockquote",codeBlock:"Code block",horizontalRule:"Horizontal rule",linkUrlPlaceholder:"https://example.com"},carousel:{label:"Carousel",previousSlide:"Previous slide",nextSlide:"Next slide",slideNavigation:"Slide navigation",slideOfTotal:(e,t)=>`Slide ${e} of ${t}`,goToSlide:e=>`Go to slide ${e}`},datePicker:{label:"Date picker",previousYear:"Previous year",previousMonth:"Previous month",selectMonth:"Select month",selectYear:"Select year",nextMonth:"Next month",nextYear:"Next year",previousYears:e=>`Previous ${e} years`,nextYears:e=>`Next ${e} years`,dateRangePickerLabel:"Date range picker",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Su","Mo","Tu","We","Th","Fr","Sa"]},timePicker:{label:"Time picker",hoursLabel:"HH",minutesLabel:"MM",secondsLabel:"SS",selectHours:"Select hours",selectMinutes:"Select minutes",selectSeconds:"Select seconds",selectPeriod:"Select AM/PM",nowLabel:"Now"},timeSelectTime:"Select time",dateTimeSelectDateTime:"Select date and time",colorPicker:{hue:"Hue",saturation:"Saturation",lightness:"Lightness",alpha:"Alpha",red:"Red",green:"Green",blue:"Blue",hex:"Hex",whiteness:"Whiteness",blackness:"Blackness",chroma:"Chroma"},spotlight:{placeholder:"Search...",noResults:"No results found",recentItems:"Recent",close:"Close"},virtualList:{listLabel:"Scrollable list"},stepper:{step:"Step",stepOfTotal:(e,t)=>`Step ${e} of ${t}`,completed:"Completed",next:"Next",previous:"Previous",complete:"Complete"},sortableList:{dragHandle:"Drag to reorder"},transferList:{available:"Available",selected:"Selected",moveRight:"Move to selected",moveLeft:"Move to available",moveAllRight:"Move all to selected",moveAllLeft:"Move all to available",searchAvailable:"Search available items…",searchSelected:"Search selected items…"},copyButton:{copied:"Copied!",copyToClipboard:"Copy to clipboard"},numberStepper:{increment:"Increment",decrement:"Decrement",value:"Value"},statCard:{trendUp:"Trending up",trendDown:"Trending down",trendFlat:"No change"},otpInputLabel:"One-time password input",otpDigitLabel:(e,t)=>`Digit ${e} of ${t}`,scrollableGridView:"Scrollable grid view",onboardingTour:{label:"Guided tour",stepIndicator:(e,t)=>`Step ${e} of ${t}`,skip:"Skip",previous:"Previous",next:"Next",finish:"Finish"},searchPlaceholder:"Search",pdfPageViewer:{loading:"Loading PDF...",loadFailed:"Failed to load PDF",invalidPdf:"Invalid PDF file",pageOutOfRange:(e,t)=>`Page ${e} is out of range (1-${t})`,renderFailed:"Failed to render PDF page"}},m=M,f="en",A=new Set(["ar","he","fa","ur","ps","sd","ku","dv","yi","ji","iw","in"]);function b(e){if(!e)return"ltr";const t=e.split(/[-_]/)[0].toLowerCase();return A.has(t)?"rtl":"ltr"}function $(e,t){return e==="auto"?b(t):e}function T(e){return`b-${e}`}function F(e){return b(e)==="rtl"}function q(e){return e==="ltr"?"rtl":"ltr"}const w={ltr:{"inline-start":"left","inline-end":"right","block-start":"top","block-end":"bottom"},rtl:{"inline-start":"right","inline-end":"left","block-start":"top","block-end":"bottom"}};function O(e,t){return w[t][e]}const L={mark:l.makeProviderMark("Locale"),create:e=>{const t=l.localStorageProp({defaultValue:navigator.language??"en-US",key:"beatui-locale"}),o=l.localStorageProp({defaultValue:"auto",key:"beatui-direction-preference"}),n=l.computedOf(t,o)((r,i)=>$(i,r));return{value:{locale:t,setLocale:r=>t.set(r),direction:n,directionPreference:o,setDirectionPreference:r=>o.set(r)},dispose:()=>{t.dispose(),o.dispose(),n.dispose()}}}},{variants:V,special:E,overrides:v}=S.backgroundConfig;function d(e,t){switch(e){case"white":return"var(--color-white)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return S.getColorVar(e,t)}}function x(e,t){const o=E[e];if(!o)return;if(t==="light")return o;const n=v[e];return n?n[t]:o}function G(e,t,o){const n=v[e];if(n){const r=n[o];if(r)return{backgroundColor:r.backgroundColor,textColor:r.color}}if(t==="solid"){const r=x(e,o);if(r)return{backgroundColor:r.backgroundColor,textColor:r.color}}const a=V[t][o];return{backgroundColor:d(e,a.bgShade),textColor:a.textColor}}const H={light:{shade:700,textColor:"var(--color-white)"},dark:{shade:500,textColor:"var(--text-inverted-dark)"}},U={light:{shade:200,textColor:"var(--text-normal-light)"},dark:{shade:700,textColor:"var(--text-normal-dark)"}},j={light:{shade:400,textColor:"var(--text-normal-light)"},dark:{shade:600,textColor:"var(--text-normal-dark)"}};function W(e,t,o){const n=v[e];if(n){const r=n[o];if(r)return{backgroundColor:r.backgroundColor,textColor:r.color}}if(t==="solid"){const r=x(e,o);if(r)return{backgroundColor:r.backgroundColor,textColor:r.color};const i=H[o];return{backgroundColor:d(e,i.shade),textColor:i.textColor}}const a=t==="light"?U[o]:j[o];return{backgroundColor:d(e,a.shade),textColor:a.textColor}}function _(e,t){const o=t==="light"?500:600;switch(e){case"white":return t==="light"?"var(--text-inverse-light)":"var(--text-inverted-dark)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return d(e,o)}}function z(e,t){return e==="white"?"var(--color-white)":e==="black"?"var(--color-black)":e==="transparent"?"inherit":d(e,t==="light"?800:200)}function P(e,t,o){return t==="soft"?d(e,o==="light"?300:700):d(e,o==="light"?500:600)}const J="bui-icons",g=new Map,C=(()=>{try{return typeof indexedDB<"u"&&indexedDB!==null}catch{return!1}})();function Y(){return C?new Promise((e,t)=>{const o=indexedDB.open(J,1);o.onupgradeneeded=function(n){const a=n.target.result;a.objectStoreNames.contains("icons")||a.createObjectStore("icons")},o.onsuccess=function(){e(o.result)},o.onerror=function(){t(o.error)}}):Promise.reject(new Error("IndexedDB not available"))}const p=C?Y():null;async function I(e,t){try{if(p){const o=await p;return new Promise((n,a)=>{const r=o.transaction("icons","readwrite");r.objectStore("icons").put(t,e),r.oncomplete=()=>n(),r.onerror=a})}else g.set(e,t)}catch{g.set(e,t)}}async function D(e){try{if(p){const t=await p;return new Promise((o,n)=>{const i=t.transaction("icons","readonly").objectStore("icons").get(e);i.onsuccess=function(){o(i.result)},i.onerror=n})}else return g.get(e)||null}catch{return g.get(e)||null}}async function K(e){const t=`https://api.iconify.design/${e}.svg`;return fetch(t).then(o=>{if(o.status===200)return o.text();throw new Error(`Failed to load icon: ${e}`)})}async function Q(e){const t=e.replace(":","/"),o=await D(t);if(o)return o;const n=await K(t);return await I(t,n),n}function Z(e){return["bc-icon",`bc-icon--${e}`].join(" ")}function X(e,t="solid"){if(!e)return"";const o=P(e,t,"light"),n=P(e,t,"dark");return`--icon-color: ${o}; --icon-color-dark: ${n}`}function ee({icon:e,size:t="md",color:o,title:n,accessibility:a="auto",tone:r="solid"},...i){const u=l.computedOf(a,n)((s,c)=>s==="decorative"?!1:s==="informative"?!0:c!=null&&c!=="");return l.Use(B,s=>l.html.span(l.attr.class(l.computedOf(t,o)(c=>Z(c??"md"))),l.attr.style(l.computedOf(o,r)((c,h)=>X(c??void 0,h??"solid"))),l.When(u,()=>l.Fragment(l.attr.role("img"),l.aria.label(l.coalesce(n,s.$.iconDescription))),()=>l.aria.hidden(!0)),k.WhenInViewport({once:!0},()=>k.Query({request:e,load:({request:c})=>Q(c),convertError:String,success:({value:c})=>l.html.span(l.style.width("100%"),l.style.height("100%"),l.attr.innerHTML(c)),pending:()=>l.html.span(l.attr.class("animate-spin"),l.When(u,()=>l.Fragment(l.attr.role("img"),l.aria.label(s.$.loadingIcon)),()=>l.aria.hidden(!0)),"↻"),failure:({error:c})=>l.html.span(l.attr.title(c),l.attr.class("text-red-500"),l.When(u,()=>l.Fragment(l.attr.role("img"),l.aria.label(s.$.failedToLoadIcon)),()=>l.aria.hidden(!0)),"🚫")})),...i))}function te(e){const t=e.split("-"),o=[e];return t.length>1&&o.push(t[0]),o}function N({locale:e,defaultLocale:t="en-US",defaultMessages:o,localeLoader:n}){const a=l.prop(t),r=l.prop(o),i=e.on(async u=>{if(u===a.value)return;a.set(u);const s=te(u);for(const c of s)try{const h=await n(c);if(typeof h.default=="object"&&Object.keys(h).length===1){console.error("It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function.");return}if(u===a.value){r.set(h);return}}catch{continue}console.warn(`No locale found for "${e.value}", using fallback`),u===a.value&&r.set(o)});return{dispose:()=>{i(),a.dispose(),r.dispose()},t:r}}function R({defaultLocale:e,defaultMessages:t,localeLoader:o,providerName:n="I18nProvider"}){return{mark:l.makeProviderMark(n),create:(a,r)=>{const{value:{locale:i}}=r.getProvider(L.mark),{t:u,dispose:s}=N({locale:i,defaultMessages:t,defaultLocale:e,localeLoader:o});return{value:u,dispose:s}}}}const oe=Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-Wr6gMs-M.cjs")).then(e=>e.default),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-DZqdSEta.cjs")).then(e=>e.default),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-CJgYfRap.cjs")).then(e=>e.default),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-BQ5PzwNY.cjs")).then(e=>e.default),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-Bv3TG44U.cjs")).then(e=>e.default),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-5LbvgMCC.cjs")).then(e=>e.default),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-YWhWcG_L.cjs")).then(e=>e.default),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-BxOIJE45.cjs")).then(e=>e.default),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-CNhjK06P.cjs")).then(e=>e.default),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-DgkqcXTs.cjs")).then(e=>e.default),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-Dy9lmbBO.cjs")).then(e=>e.default),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-BtYbtsmG.cjs")).then(e=>e.default),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-CtNmqQ1X.cjs")).then(e=>e.default),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-BaL_NPRU.cjs")).then(e=>e.default),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-DwOd87oB.cjs")).then(e=>e.default),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-D9nLchps.cjs")).then(e=>e.default),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-Dg1aiMr5.cjs")).then(e=>e.default),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-tbwSTbmn.cjs")).then(e=>e.default)}),B=R({defaultLocale:f,defaultMessages:m,localeLoader:async e=>{if(e===f)return m;const t=oe[`./locales/${e}.ts`];return t?await t():m},providerName:"BeatUII18n"});exports.BeatUII18n=B;exports.Icon=ee;exports.LOGICAL_PROPERTY_MAP=w;exports.Locale=L;exports.backgroundValue=G;exports.borderColorValue=_;exports.defaultLocale=f;exports.defaultMessages=m;exports.formatFileSize=y;exports.getDirectionClassName=T;exports.getDirectionFromLocale=b;exports.getIconLocally=D;exports.getOppositeDirection=q;exports.getPhysicalProperty=O;exports.hoverBackgroundValue=W;exports.isIndexedDBAvailable=C;exports.isRTLLocale=F;exports.makeI18nProvider=R;exports.makeMessages=N;exports.resolveDirection=$;exports.storeIconLocally=I;exports.textColorValue=z;
|
|
1
|
+
"use strict";const l=require("@tempots/dom"),k=require("@tempots/ui"),S=require("./colors-IXZF9U-s.cjs");function y(e,{units:t=["B","KB","MB","GB","TB"],decimalPlaces:o=0,locale:n}={}){if(e===0||e===0n)return new Intl.NumberFormat(n,{style:"unit",unit:"byte",unitDisplay:"short",maximumFractionDigits:0}).format(0).replace("byte",t[0]);let a,r;if(typeof e=="bigint"){let s=e<0n?-e:e;for(a=0;s>=1024n&&a<t.length-1;)s=s/1024n,a++;r=Number(e)/Math.pow(1024,a)}else a=Math.floor(Math.log(Math.abs(e))/Math.log(1024)),a=Math.min(a,t.length-1),r=e/Math.pow(1024,a);return new Intl.NumberFormat(n,{style:"unit",unit:"byte",unitDisplay:"short",minimumFractionDigits:a===0?0:o,maximumFractionDigits:a===0?0:o}).format(r).replace("byte",t[a])}const M={loadingExtended:"Loading, please wait",loadingShort:"Loading...",locale:"Locale",iconDescription:"Icon",loadingIcon:"Loading icon",failedToLoadIcon:"Failed to load icon",editLabel:"Edit",selectOne:"Select one",selectNone:"None",selectMany:"Select many",noResults:"No results",passwordPlaceholderText:"Secret Password",togglePasswordVisibility:"Toggle password visibility",toggleMenu:"Toggle menu",toggleAside:"Toggle aside",mainNavigation:"Main navigation",sidebar:"Sidebar",closeDrawer:"Close drawer",closeModal:"Close modal",confirm:"Confirm",cancel:"Cancel",addLabel:"Add",removeItem:"Remove item",currentLocale:"English",ar:"Arabic",de:"German",en:"English",es:"Spanish",fr:"French",hi:"Hindi",it:"Italian",ja:"Japanese",ko:"Korean",nl:"Dutch",pl:"Polish",pt:"Portuguese",ru:"Russian",tr:"Turkish",vi:"Vietnamese",zh:"Chinese",he:"Hebrew",fa:"Persian",ur:"Urdu",emailPlaceholderText:"Enter your email",incrementValue:"Increment value",decrementValue:"Decrement value",dropZoneInstructions:e=>e?"Click to choose or drag files here, or press Enter or Space to open file selector":"Drag files here",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Remove file",clearAllFiles:"Clear all files",clearValue:"Reset",dateRangeStart:"Start",dateRangeEnd:"End",dateRangeNoLimit:"No limit",dateRangeSelectDate:"Select date",unknownType:"Unknown type",filesInputInstructions:(e,t,o)=>{let n=e==null||e>1?"Click to choose or drag files here":"Click to choose or drag a file here";if(e||t){const a=[];if(e!=null&&e>1&&a.push(`up to ${e} files`),t&&o){const r=y(t,{units:o});a.push(`max ${r} each`)}a.length>0&&(n+=` (${a.join(", ")})`)}return n},paginationLabel:"Pagination",paginationRange:(e,t,o,n)=>n>o?`Rows ${e} to ${t} of ${o} of ${n}`:`Rows ${e} to ${t} of ${o}`,firstPage:"First page",previousPage:"Previous page",nextPage:"Next page",lastPage:"Last page",breadcrumbs:"Breadcrumbs",commandPalette:"Command palette",typeACommand:"Type a command...",noResultsFound:"No results found",noMatchingCommands:"No matching commands",appearanceSystem:"System",appearanceLight:"Light",appearanceDark:"Dark",ok:"OK",changeTypeConfirmation:"Changing type will clear the current value. Continue?",notifications:"Notifications",markAllAsRead:"Mark all as read",noNotifications:"No notifications",schemaConflictsDetected:"Schema Conflicts Detected",schemaViolationsDetected:"Schema Violations Detected",properties:"Properties",uploading:"Uploading...",dropFilesOrBrowse:"Drop files here or click to browse",acceptedTypes:e=>`Accepted types: ${e}`,enterUrlPrompt:"Enter URL:",exceeded:"(exceeded)",pdfPreview:"PDF Preview",lexical:{fontFamily:"Font Family",fontSize:"Font Size",lineHeight:"Line Height",fontColor:"Font Color",highlightColor:"Highlight Color",backgroundColor:"Background Color",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Code",clearFormatting:"Clear Formatting",normal:"Normal",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",checkList:"Check List",indent:"Indent",outdent:"Outdent",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",insertTable:"Insert Table",link:"Link",undo:"Undo",redo:"Redo",cut:"Cut",copy:"Copy",paste:"Paste",defaultOption:"Default",slashCommands:"Slash commands",noCommandsFound:"No commands found",changeBlockType:"Change block type",blockTypes:"Block types",enterUrl:"Enter URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Sort ascending",sortDescending:"Sort descending",clearSort:"Clear sort",filterPlaceholder:"Filter...",clearFilter:"Clear filter",selectAll:"Select all",deselectAll:"Deselect all",selectedCount:e=>`${e} selected`,resetAll:"Reset all",noResults:"No results found",loading:"Loading...",filterPanelAddCondition:"Add condition",filterPanelApply:"Apply",filterPanelClear:"Clear filters",filterPanelAnd:"AND",filterPanelOr:"OR",filterPanelContains:"Contains",filterPanelNotContains:"Does not contain",filterPanelEquals:"Equals",filterPanelNotEquals:"Does not equal",filterPanelStartsWith:"Starts with",filterPanelEndsWith:"Ends with",filterPanelIsNull:"Is empty",filterPanelIsNotNull:"Is not empty",filterPanelGt:"Greater than",filterPanelGte:"Greater or equal",filterPanelLt:"Less than",filterPanelLte:"Less or equal",filterPanelBetween:"Between",filterPanelValuePlaceholder:"Value...",sortMultiHint:"Hold Shift to sort multiple columns",columnVisibility:"Columns",showAllColumns:"Show all",menuSortAsc:"Sort Ascending",menuSortDesc:"Sort Descending",menuClearSort:"Clear Sort",menuHideColumn:"Hide Column",menuChooseColumns:"Choose Columns",menuResetColumns:"Reset Columns",menuFilter:"Filter",rowCount:(e,t)=>`Rows: ${e} Total Rows: ${t}`,filterTagsPlaceholder:"Select values...",groupCount:e=>`${e} items`,collapseGroup:"Collapse group",expandGroup:"Expand group",describeFilter:{textContains:(e,t)=>`${e} contains "${t}"`,textNotContains:(e,t)=>`${e} does not contain "${t}"`,textEquals:(e,t)=>`${e} equals "${t}"`,textNotEquals:(e,t)=>`${e} does not equal "${t}"`,textStartsWith:(e,t)=>`${e} starts with "${t}"`,textEndsWith:(e,t)=>`${e} ends with "${t}"`,compareEq:(e,t)=>`${e} = ${t}`,compareNeq:(e,t)=>`${e} ≠ ${t}`,compareGt:(e,t)=>`${e} > ${t}`,compareGte:(e,t)=>`${e} ≥ ${t}`,compareLt:(e,t)=>`${e} < ${t}`,compareLte:(e,t)=>`${e} ≤ ${t}`,rangeBetween:(e,t,o)=>`${e} between ${t} and ${o}`,rangeGte:(e,t)=>`${e} ≥ ${t}`,rangeLte:(e,t)=>`${e} ≤ ${t}`,setIn:(e,t)=>`${e} in [${t}]`,setNotIn:(e,t)=>`${e} not in [${t}]`,booleanIs:(e,t)=>`${e} is ${t}`,isNull:e=>`${e} is empty`,isNotNull:e=>`${e} is not empty`,compositeAnd:e=>e.join(" AND "),compositeOr:e=>e.join(" OR ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Inline code",link:"Insert link",removeLink:"Remove link",heading:e=>`Heading ${e}`,bulletList:"Bullet list",orderedList:"Ordered list",blockquote:"Blockquote",codeBlock:"Code block",horizontalRule:"Horizontal rule",linkUrlPlaceholder:"https://example.com"},carousel:{label:"Carousel",previousSlide:"Previous slide",nextSlide:"Next slide",slideNavigation:"Slide navigation",slideOfTotal:(e,t)=>`Slide ${e} of ${t}`,goToSlide:e=>`Go to slide ${e}`},datePicker:{label:"Date picker",previousYear:"Previous year",previousMonth:"Previous month",selectMonth:"Select month",selectYear:"Select year",nextMonth:"Next month",nextYear:"Next year",previousYears:e=>`Previous ${e} years`,nextYears:e=>`Next ${e} years`,dateRangePickerLabel:"Date range picker",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Su","Mo","Tu","We","Th","Fr","Sa"]},timePicker:{label:"Time picker",hoursLabel:"HH",minutesLabel:"MM",secondsLabel:"SS",selectHours:"Select hours",selectMinutes:"Select minutes",selectSeconds:"Select seconds",selectPeriod:"Select AM/PM",nowLabel:"Now"},timeSelectTime:"Select time",dateTimeSelectDateTime:"Select date and time",colorPicker:{hue:"Hue",saturation:"Saturation",lightness:"Lightness",alpha:"Alpha",red:"Red",green:"Green",blue:"Blue",hex:"Hex",whiteness:"Whiteness",blackness:"Blackness",chroma:"Chroma"},spotlight:{placeholder:"Search...",noResults:"No results found",recentItems:"Recent",close:"Close"},virtualList:{listLabel:"Scrollable list"},stepper:{step:"Step",stepOfTotal:(e,t)=>`Step ${e} of ${t}`,completed:"Completed",next:"Next",previous:"Previous",complete:"Complete"},sortableList:{dragHandle:"Drag to reorder"},transferList:{available:"Available",selected:"Selected",moveRight:"Move to selected",moveLeft:"Move to available",moveAllRight:"Move all to selected",moveAllLeft:"Move all to available",searchAvailable:"Search available items…",searchSelected:"Search selected items…"},copyButton:{copied:"Copied!",copyToClipboard:"Copy to clipboard"},numberStepper:{increment:"Increment",decrement:"Decrement",value:"Value"},statCard:{trendUp:"Trending up",trendDown:"Trending down",trendFlat:"No change"},otpInputLabel:"One-time password input",otpDigitLabel:(e,t)=>`Digit ${e} of ${t}`,scrollableGridView:"Scrollable grid view",onboardingTour:{label:"Guided tour",stepIndicator:(e,t)=>`Step ${e} of ${t}`,skip:"Skip",previous:"Previous",next:"Next",finish:"Finish"},searchPlaceholder:"Search",pdfPageViewer:{loading:"Loading PDF...",loadFailed:"Failed to load PDF",invalidPdf:"Invalid PDF file",pageOutOfRange:(e,t)=>`Page ${e} is out of range (1-${t})`,renderFailed:"Failed to render PDF page"}},m=M,f="en",A=new Set(["ar","he","fa","ur","ps","sd","ku","dv","yi","ji","iw","in"]);function b(e){if(!e)return"ltr";const t=e.split(/[-_]/)[0].toLowerCase();return A.has(t)?"rtl":"ltr"}function $(e,t){return e==="auto"?b(t):e}function T(e){return`b-${e}`}function F(e){return b(e)==="rtl"}function q(e){return e==="ltr"?"rtl":"ltr"}const w={ltr:{"inline-start":"left","inline-end":"right","block-start":"top","block-end":"bottom"},rtl:{"inline-start":"right","inline-end":"left","block-start":"top","block-end":"bottom"}};function O(e,t){return w[t][e]}const L={mark:l.makeProviderMark("Locale"),create:e=>{const t=l.localStorageProp({defaultValue:navigator.language??"en-US",key:"beatui-locale"}),o=l.localStorageProp({defaultValue:"auto",key:"beatui-direction-preference"}),n=l.computedOf(t,o)((r,i)=>$(i,r));return{value:{locale:t,setLocale:r=>t.set(r),direction:n,directionPreference:o,setDirectionPreference:r=>o.set(r)},dispose:()=>{t.dispose(),o.dispose(),n.dispose()}}}},{variants:V,special:E,overrides:v}=S.backgroundConfig;function d(e,t){switch(e){case"white":return"var(--color-white)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return S.getColorVar(e,t)}}function x(e,t){const o=E[e];if(!o)return;if(t==="light")return o;const n=v[e];return n?n[t]:o}function G(e,t,o){const n=v[e];if(n){const r=n[o];if(r)return{backgroundColor:r.backgroundColor,textColor:r.color}}if(t==="solid"){const r=x(e,o);if(r)return{backgroundColor:r.backgroundColor,textColor:r.color}}const a=V[t][o];return{backgroundColor:d(e,a.bgShade),textColor:a.textColor}}const H={light:{shade:700,textColor:"var(--color-white)"},dark:{shade:500,textColor:"var(--text-inverted-dark)"}},U={light:{shade:200,textColor:"var(--text-normal-light)"},dark:{shade:700,textColor:"var(--text-normal-dark)"}},j={light:{shade:400,textColor:"var(--text-normal-light)"},dark:{shade:600,textColor:"var(--text-normal-dark)"}};function W(e,t,o){const n=v[e];if(n){const r=n[o];if(r)return{backgroundColor:r.backgroundColor,textColor:r.color}}if(t==="solid"){const r=x(e,o);if(r)return{backgroundColor:r.backgroundColor,textColor:r.color};const i=H[o];return{backgroundColor:d(e,i.shade),textColor:i.textColor}}const a=t==="light"?U[o]:j[o];return{backgroundColor:d(e,a.shade),textColor:a.textColor}}function _(e,t){const o=t==="light"?500:600;switch(e){case"white":return t==="light"?"var(--text-inverse-light)":"var(--text-inverted-dark)";case"black":return"var(--color-black)";case"transparent":return"transparent";default:return d(e,o)}}function z(e,t){return e==="white"?"var(--color-white)":e==="black"?"var(--color-black)":e==="transparent"?"inherit":d(e,t==="light"?800:200)}function P(e,t,o){return t==="soft"?d(e,o==="light"?300:700):d(e,o==="light"?500:600)}const J="bui-icons",p=new Map,C=(()=>{try{return typeof indexedDB<"u"&&indexedDB!==null}catch{return!1}})();function Y(){return C?new Promise((e,t)=>{const o=indexedDB.open(J,1);o.onupgradeneeded=function(n){const a=n.target.result;a.objectStoreNames.contains("icons")||a.createObjectStore("icons")},o.onsuccess=function(){e(o.result)},o.onerror=function(){t(o.error)}}):Promise.reject(new Error("IndexedDB not available"))}const g=C?Y():null;async function I(e,t){try{if(g){const o=await g;return new Promise((n,a)=>{const r=o.transaction("icons","readwrite");r.objectStore("icons").put(t,e),r.oncomplete=()=>n(),r.onerror=a})}else p.set(e,t)}catch{p.set(e,t)}}async function D(e){try{if(g){const t=await g;return new Promise((o,n)=>{const i=t.transaction("icons","readonly").objectStore("icons").get(e);i.onsuccess=function(){o(i.result)},i.onerror=n})}else return p.get(e)||null}catch{return p.get(e)||null}}async function K(e){const t=`https://api.iconify.design/${e}.svg`;return fetch(t).then(o=>{if(o.status===200)return o.text();throw new Error(`Failed to load icon: ${e}`)})}async function Q(e){const t=e.replace(":","/"),o=await D(t);if(o)return o;const n=await K(t);return await I(t,n),n}function Z(e){return["bc-icon",`bc-icon--${e}`].join(" ")}function X(e,t="solid"){if(!e)return"";const o=P(e,t,"light"),n=P(e,t,"dark");return`--icon-color: ${o}; --icon-color-dark: ${n}`}function ee({icon:e,size:t="md",color:o,title:n,accessibility:a="auto",tone:r="solid"},...i){const u=l.computedOf(a,n)((s,c)=>s==="decorative"?!1:s==="informative"?!0:c!=null&&c!=="");return l.Use(B,s=>l.html.span(l.attr.class(l.computedOf(t,o)(c=>Z(c??"md"))),l.attr.style(l.computedOf(o,r)((c,h)=>X(c??void 0,h??"solid"))),l.When(u,()=>l.Fragment(l.attr.role("img"),l.aria.label(l.coalesce(n,s.$.iconDescription))),()=>l.aria.hidden(!0)),k.WhenInViewport({once:!0},()=>k.Query({request:e,load:({request:c})=>Q(c),convertError:String,keepOnReload:!0,success:({value:c})=>l.html.span(l.style.width("100%"),l.style.height("100%"),l.attr.innerHTML(c)),pending:()=>l.html.span(l.attr.class("animate-spin"),l.When(u,()=>l.Fragment(l.attr.role("img"),l.aria.label(s.$.loadingIcon)),()=>l.aria.hidden(!0)),"↻"),failure:({error:c})=>l.html.span(l.attr.title(c),l.attr.class("text-red-500"),l.When(u,()=>l.Fragment(l.attr.role("img"),l.aria.label(s.$.failedToLoadIcon)),()=>l.aria.hidden(!0)),"🚫")})),...i))}function te(e){const t=e.split("-"),o=[e];return t.length>1&&o.push(t[0]),o}function N({locale:e,defaultLocale:t="en-US",defaultMessages:o,localeLoader:n}){const a=l.prop(t),r=l.prop(o),i=e.on(async u=>{if(u===a.value)return;a.set(u);const s=te(u);for(const c of s)try{const h=await n(c);if(typeof h.default=="object"&&Object.keys(h).length===1){console.error("It appears that you are trying to load a translation module without referencing the default export. Please use `(await import(...)).default` in your loader function.");return}if(u===a.value){r.set(h);return}}catch{continue}console.warn(`No locale found for "${e.value}", using fallback`),u===a.value&&r.set(o)});return{dispose:()=>{i(),a.dispose(),r.dispose()},t:r}}function R({defaultLocale:e,defaultMessages:t,localeLoader:o,providerName:n="I18nProvider"}){return{mark:l.makeProviderMark(n),create:(a,r)=>{const{value:{locale:i}}=r.getProvider(L.mark),{t:u,dispose:s}=N({locale:i,defaultMessages:t,defaultLocale:e,localeLoader:o});return{value:u,dispose:s}}}}const oe=Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-CEzAem0F.cjs")).then(e=>e.default),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-DdfxrlT3.cjs")).then(e=>e.default),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-DSdljxFJ.cjs")).then(e=>e.default),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-BolmeWRT.cjs")).then(e=>e.default),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-CODgUuoZ.cjs")).then(e=>e.default),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-Juw-dr28.cjs")).then(e=>e.default),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-R749jeg-.cjs")).then(e=>e.default),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-DT5oRZDH.cjs")).then(e=>e.default),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-CwKaCYLB.cjs")).then(e=>e.default),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-Bucro9ID.cjs")).then(e=>e.default),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-D7vHpehb.cjs")).then(e=>e.default),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-CSiXoOKT.cjs")).then(e=>e.default),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-CJT-iq4y.cjs")).then(e=>e.default),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-G3sr_ctV.cjs")).then(e=>e.default),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-DcxLHHTC.cjs")).then(e=>e.default),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-IRQoHh1E.cjs")).then(e=>e.default),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-Bi9SvVCP.cjs")).then(e=>e.default),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-BMU5rYu1.cjs")).then(e=>e.default)}),B=R({defaultLocale:f,defaultMessages:m,localeLoader:async e=>{if(e===f)return m;const t=oe[`./locales/${e}.ts`];return t?await t():m},providerName:"BeatUII18n"});exports.BeatUII18n=B;exports.Icon=ee;exports.LOGICAL_PROPERTY_MAP=w;exports.Locale=L;exports.backgroundValue=G;exports.borderColorValue=_;exports.defaultLocale=f;exports.defaultMessages=m;exports.formatFileSize=y;exports.getDirectionClassName=T;exports.getDirectionFromLocale=b;exports.getIconLocally=D;exports.getOppositeDirection=q;exports.getPhysicalProperty=O;exports.hoverBackgroundValue=W;exports.isIndexedDBAvailable=C;exports.isRTLLocale=F;exports.makeI18nProvider=R;exports.makeMessages=N;exports.resolveDirection=$;exports.storeIconLocally=I;exports.textColorValue=z;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { localStorageProp as y, computedOf as m, makeProviderMark as x, Use as R, html as f, attr as u, When as v, Fragment as C, aria as p, coalesce as B, style as P, prop as $ } from "@tempots/dom";
|
|
2
2
|
import { WhenInViewport as A, Query as M } from "@tempots/ui";
|
|
3
|
-
import { b as T, g as F } from "./colors-
|
|
3
|
+
import { b as T, g as F } from "./colors-CyMhfbJi.js";
|
|
4
4
|
function O(e, {
|
|
5
5
|
units: t = ["B", "KB", "MB", "GB", "TB"],
|
|
6
6
|
decimalPlaces: o = 0,
|
|
@@ -745,6 +745,7 @@ function ve({
|
|
|
745
745
|
request: e,
|
|
746
746
|
load: ({ request: s }) => X(s),
|
|
747
747
|
convertError: String,
|
|
748
|
+
keepOnReload: !0,
|
|
748
749
|
success: ({ value: s }) => f.span(
|
|
749
750
|
P.width("100%"),
|
|
750
751
|
P.height("100%"),
|
|
@@ -846,24 +847,24 @@ function re({
|
|
|
846
847
|
};
|
|
847
848
|
}
|
|
848
849
|
const ae = /* @__PURE__ */ Object.assign({
|
|
849
|
-
"./locales/ar.ts": () => import("./ar-
|
|
850
|
-
"./locales/de.ts": () => import("./de-
|
|
851
|
-
"./locales/es.ts": () => import("./es
|
|
852
|
-
"./locales/fa.ts": () => import("./fa-
|
|
853
|
-
"./locales/fr.ts": () => import("./fr-
|
|
854
|
-
"./locales/he.ts": () => import("./he-
|
|
855
|
-
"./locales/hi.ts": () => import("./hi-
|
|
856
|
-
"./locales/it.ts": () => import("./it-
|
|
857
|
-
"./locales/ja.ts": () => import("./ja-
|
|
858
|
-
"./locales/ko.ts": () => import("./ko-
|
|
859
|
-
"./locales/nl.ts": () => import("./nl-
|
|
860
|
-
"./locales/pl.ts": () => import("./pl-
|
|
861
|
-
"./locales/pt.ts": () => import("./pt-
|
|
862
|
-
"./locales/ru.ts": () => import("./ru-
|
|
863
|
-
"./locales/tr.ts": () => import("./tr-
|
|
864
|
-
"./locales/ur.ts": () => import("./ur-
|
|
865
|
-
"./locales/vi.ts": () => import("./vi-
|
|
866
|
-
"./locales/zh.ts": () => import("./zh-
|
|
850
|
+
"./locales/ar.ts": () => import("./ar-CQieaqsq.js").then((e) => e.default),
|
|
851
|
+
"./locales/de.ts": () => import("./de-CBIwvkAH.js").then((e) => e.default),
|
|
852
|
+
"./locales/es.ts": () => import("./es--9HaEj2D.js").then((e) => e.default),
|
|
853
|
+
"./locales/fa.ts": () => import("./fa-1Z-akcW7.js").then((e) => e.default),
|
|
854
|
+
"./locales/fr.ts": () => import("./fr-DhHM9rou.js").then((e) => e.default),
|
|
855
|
+
"./locales/he.ts": () => import("./he-CBamXbGJ.js").then((e) => e.default),
|
|
856
|
+
"./locales/hi.ts": () => import("./hi-DvvcX-Ra.js").then((e) => e.default),
|
|
857
|
+
"./locales/it.ts": () => import("./it-aV6i8Qxz.js").then((e) => e.default),
|
|
858
|
+
"./locales/ja.ts": () => import("./ja-CuLhGnJX.js").then((e) => e.default),
|
|
859
|
+
"./locales/ko.ts": () => import("./ko-D-66BsEX.js").then((e) => e.default),
|
|
860
|
+
"./locales/nl.ts": () => import("./nl-CAny6wvm.js").then((e) => e.default),
|
|
861
|
+
"./locales/pl.ts": () => import("./pl-rmZLgQ_V.js").then((e) => e.default),
|
|
862
|
+
"./locales/pt.ts": () => import("./pt-DHnajqAi.js").then((e) => e.default),
|
|
863
|
+
"./locales/ru.ts": () => import("./ru-C_E8OZNE.js").then((e) => e.default),
|
|
864
|
+
"./locales/tr.ts": () => import("./tr-bVXwloKC.js").then((e) => e.default),
|
|
865
|
+
"./locales/ur.ts": () => import("./ur-Dls2qb4V.js").then((e) => e.default),
|
|
866
|
+
"./locales/vi.ts": () => import("./vi-C3mTzj50.js").then((e) => e.default),
|
|
867
|
+
"./locales/zh.ts": () => import("./zh-B4JRJBt2.js").then((e) => e.default)
|
|
867
868
|
}), le = re({
|
|
868
869
|
defaultLocale: w,
|
|
869
870
|
defaultMessages: k,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./translations-
|
|
1
|
+
"use strict";const o=require("./translations-D3xqZUTA.cjs"),n={signInTitle:"Sign In",signInButton:"Sign In",emailLabel:"Email",passwordLabel:"Password",rememberMeLabel:"Remember me",forgotPasswordLink:"Forgot password?",noAccountLink:"Don't have an account? Sign up",signUpTitle:"Sign Up",signUpButton:"Sign Up",nameLabel:"Name",confirmPasswordLabel:"Confirm Password",acceptTermsLabel:"I accept the terms and conditions",hasAccountLink:"Already have an account? Sign in",resetPasswordTitle:"Reset Password",resetPasswordButton:"Reset Password",resetPasswordDescription:"Enter your email to reset your password.",backToSignInLink:"Back to sign in",continueWithProvider:e=>`Continue with ${e}`,passwordStrengthWeak:"Weak",passwordStrengthFair:"Fair",passwordStrengthGood:"Good",passwordStrengthStrong:"Strong",orDivider:"or",error:"An error occurred",required:"Required",authenticationTitle:"Authentication",passwordMinLength:e=>`Password must be at least ${e} characters`,passwordRequireUppercase:"Password must contain at least one uppercase letter",passwordRequireLowercase:"Password must contain at least one lowercase letter",passwordRequireNumber:"Password must contain at least one number",passwordRequireSpecialChar:"Password must contain at least one special character",emailRequired:"Email is required",invalidEmail:"Please enter a valid email address",passwordRequired:"Password is required",nameRequired:"Name is required",confirmPasswordRequired:"Please confirm your password",acceptTermsRequired:"You must accept the terms and conditions",passwordsDoNotMatch:"Passwords don't match",invalidPassword:"Invalid password",invalidEmailAddress:"Invalid email"},s=n,t="en",i=Object.assign({"./locales/ar.ts":()=>Promise.resolve().then(()=>require("./ar-kZBzg02I.cjs")).then(e=>e.default),"./locales/de.ts":()=>Promise.resolve().then(()=>require("./de-B03SM9eF.cjs")).then(e=>e.default),"./locales/es.ts":()=>Promise.resolve().then(()=>require("./es-BRa0hV-7.cjs")).then(e=>e.default),"./locales/fa.ts":()=>Promise.resolve().then(()=>require("./fa-BxCSKn9j.cjs")).then(e=>e.default),"./locales/fr.ts":()=>Promise.resolve().then(()=>require("./fr-Dq6RAY9s.cjs")).then(e=>e.default),"./locales/he.ts":()=>Promise.resolve().then(()=>require("./he-BBX1h9uD.cjs")).then(e=>e.default),"./locales/hi.ts":()=>Promise.resolve().then(()=>require("./hi-Cd0YQZTU.cjs")).then(e=>e.default),"./locales/it.ts":()=>Promise.resolve().then(()=>require("./it-ByIEk5Cq.cjs")).then(e=>e.default),"./locales/ja.ts":()=>Promise.resolve().then(()=>require("./ja-DV6Fpp18.cjs")).then(e=>e.default),"./locales/ko.ts":()=>Promise.resolve().then(()=>require("./ko-DR1f0as8.cjs")).then(e=>e.default),"./locales/nl.ts":()=>Promise.resolve().then(()=>require("./nl-CQF0N7Mc.cjs")).then(e=>e.default),"./locales/pl.ts":()=>Promise.resolve().then(()=>require("./pl-y_w3DWF3.cjs")).then(e=>e.default),"./locales/pt.ts":()=>Promise.resolve().then(()=>require("./pt-DqaZWmbG.cjs")).then(e=>e.default),"./locales/ru.ts":()=>Promise.resolve().then(()=>require("./ru-CISMzCHR.cjs")).then(e=>e.default),"./locales/tr.ts":()=>Promise.resolve().then(()=>require("./tr-mWu2E__o.cjs")).then(e=>e.default),"./locales/ur.ts":()=>Promise.resolve().then(()=>require("./ur-B6yB2JQ7.cjs")).then(e=>e.default),"./locales/vi.ts":()=>Promise.resolve().then(()=>require("./vi-DneuUbkq.cjs")).then(e=>e.default),"./locales/zh.ts":()=>Promise.resolve().then(()=>require("./zh-DFHuW_5g.cjs")).then(e=>e.default)}),a=o.makeI18nProvider({defaultLocale:t,defaultMessages:s,localeLoader:async e=>{if(e===t)return s;const r=i[`./locales/${e}.ts`];return r?await r():s},providerName:"AuthI18n"}),l=Object.freeze(Object.defineProperty({__proto__:null,AuthI18n:a},Symbol.toStringTag,{value:"Module"}));exports.AuthI18n=a;exports.defaultMessages=s;exports.translations=l;
|
|
@@ -8,13 +8,13 @@ export type StepState = 'completed' | 'active' | 'pending' | 'error';
|
|
|
8
8
|
*/
|
|
9
9
|
export interface StepDefinition {
|
|
10
10
|
/** Display label for the step indicator. */
|
|
11
|
-
label:
|
|
11
|
+
label: TNode;
|
|
12
12
|
/** Optional description shown below the label. */
|
|
13
|
-
description?:
|
|
13
|
+
description?: TNode;
|
|
14
14
|
/** Optional Iconify icon shown in the step circle. */
|
|
15
15
|
icon?: string;
|
|
16
16
|
/** Content rendered when this step is active. */
|
|
17
|
-
content?: () => TNode;
|
|
17
|
+
content?: (controller: StepperController) => TNode;
|
|
18
18
|
/**
|
|
19
19
|
* Async validation before advancing past this step.
|
|
20
20
|
* Return `true` to allow, `false` to block.
|
|
@@ -39,7 +39,7 @@ export interface StepperOptions {
|
|
|
39
39
|
color?: Value<ThemeColorName>;
|
|
40
40
|
/** Whether the stepper is disabled. @default false */
|
|
41
41
|
disabled?: Value<boolean>;
|
|
42
|
-
/** Whether to show navigation buttons. @default
|
|
42
|
+
/** Whether to show navigation buttons. @default false */
|
|
43
43
|
showNavigation?: Value<boolean>;
|
|
44
44
|
}
|
|
45
45
|
/** Programmatic controller for the stepper. */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenUI Lang integration for `@tempots/beatui/openui`.
|
|
3
|
+
*
|
|
4
|
+
* Parses OpenUI Lang markup from LLM responses and renders live BeatUI
|
|
5
|
+
* components. Includes a pre-built component library, streaming adapters,
|
|
6
|
+
* and an extensible component registration system.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { beatuiLibrary, OpenUIRenderer, fromFetch } from '@tempots/beatui/openui'
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
export { createParser } from './parser/parser';
|
|
15
|
+
export { createStreamingParser } from './parser/streaming-parser';
|
|
16
|
+
export type { ParseResult, ParseError, ASTNode, Statement, ComponentNameChecker, } from './parser/types';
|
|
17
|
+
export { defineComponent } from './library/define-component';
|
|
18
|
+
export { createLibrary } from './library/library';
|
|
19
|
+
export type { DefinedComponent, Library, ComponentGroup, PromptOptions, } from './library/types';
|
|
20
|
+
export { beatuiLibrary } from './registry';
|
|
21
|
+
export { OpenUIRenderer } from './renderer/openui-renderer';
|
|
22
|
+
export { ActionContextProvider } from './renderer/action-context';
|
|
23
|
+
export type { OpenUIRendererOptions } from './renderer/openui-renderer';
|
|
24
|
+
export type { ActionEvent, ButtonAction, FormSubmitAction, ActionContext, } from './renderer/action-context';
|
|
25
|
+
export { fromSSE } from './streaming/from-sse';
|
|
26
|
+
export { fromFetch } from './streaming/from-fetch';
|
|
27
|
+
export { fromWebSocket } from './streaming/from-websocket';
|
|
28
|
+
export type { StreamOptions } from './streaming/types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { TNode } from '@tempots/dom';
|
|
3
|
+
import type { DefinedComponent } from './types.js';
|
|
4
|
+
export interface DefineComponentConfig<T extends z.ZodObject<any>> {
|
|
5
|
+
name: string;
|
|
6
|
+
props: T;
|
|
7
|
+
description: string;
|
|
8
|
+
renderer: (props: z.infer<T>, children: TNode[]) => TNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Define a component for use in OpenUI Lang.
|
|
12
|
+
*
|
|
13
|
+
* Zod schema key order = positional arg order (this is an explicit contract).
|
|
14
|
+
*/
|
|
15
|
+
export declare function defineComponent<T extends z.ZodObject<any>>(config: DefineComponentConfig<T>): DefinedComponent<T>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DefinedComponent, ComponentGroup, Library } from './types.js';
|
|
2
|
+
export interface CreateLibraryConfig {
|
|
3
|
+
components: DefinedComponent[];
|
|
4
|
+
root?: string;
|
|
5
|
+
groups?: ComponentGroup[];
|
|
6
|
+
}
|
|
7
|
+
export declare function createLibrary(config: CreateLibraryConfig): Library;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DefinedComponent, ComponentGroup, PromptOptions } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generate an LLM system prompt for OpenUI Lang.
|
|
4
|
+
*/
|
|
5
|
+
export declare function generatePrompt(components: ReadonlyMap<string, DefinedComponent>, groups?: ComponentGroup[], options?: PromptOptions): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
import type { TNode } from '@tempots/dom';
|
|
3
|
+
export interface ComponentNameChecker {
|
|
4
|
+
has(name: string): boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface DefinedComponent<T extends z.ZodObject<any> = z.ZodObject<any>> {
|
|
7
|
+
name: string;
|
|
8
|
+
props: T;
|
|
9
|
+
description: string;
|
|
10
|
+
renderer: (props: z.infer<T>, children: TNode[]) => TNode;
|
|
11
|
+
}
|
|
12
|
+
export interface PromptOptions {
|
|
13
|
+
examples?: boolean;
|
|
14
|
+
additionalRules?: string[];
|
|
15
|
+
groups?: ComponentGroup[];
|
|
16
|
+
}
|
|
17
|
+
export interface ComponentGroup {
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
components: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface Library extends ComponentNameChecker {
|
|
23
|
+
readonly components: ReadonlyMap<string, DefinedComponent>;
|
|
24
|
+
readonly root: string | undefined;
|
|
25
|
+
get(name: string): DefinedComponent | undefined;
|
|
26
|
+
has(name: string): boolean;
|
|
27
|
+
prompt(options?: PromptOptions): string;
|
|
28
|
+
toJSONSchema(): Record<string, unknown>;
|
|
29
|
+
extend(config: {
|
|
30
|
+
components?: DefinedComponent[];
|
|
31
|
+
root?: string;
|
|
32
|
+
}): Library;
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentNameChecker, ParseResult } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a synchronous parser for OpenUI Lang.
|
|
4
|
+
*
|
|
5
|
+
* Each statement is `identifier = expression`.
|
|
6
|
+
* The `root` statement drives the top-level render target.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createParser(checker?: ComponentNameChecker): (input: string) => ParseResult;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentNameChecker, ParseResult } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a streaming (incremental) parser for OpenUI Lang.
|
|
4
|
+
*
|
|
5
|
+
* Maintains an internal text buffer that grows with each push(chunk) call.
|
|
6
|
+
* On each push, appends the chunk to the buffer and re-parses the full buffer.
|
|
7
|
+
*
|
|
8
|
+
* TODO: This is O(n^2) due to full re-parsing on each push. For v2, implement
|
|
9
|
+
* incremental parsing that only re-processes changed/new lines.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createStreamingParser(checker?: ComponentNameChecker): {
|
|
12
|
+
push(chunk: string): ParseResult;
|
|
13
|
+
getResult(): ParseResult;
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tokenizes OpenUI Lang input into logical lines.
|
|
3
|
+
*
|
|
4
|
+
* Physical lines are joined when expressions have unclosed parens/brackets/braces.
|
|
5
|
+
* String literals are respected — delimiters inside "..." don't count.
|
|
6
|
+
* Handles escaped quotes inside strings.
|
|
7
|
+
* Empty lines are skipped.
|
|
8
|
+
*/
|
|
9
|
+
export declare function tokenizeLines(input: string): string[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ASTNode = {
|
|
2
|
+
type: 'component';
|
|
3
|
+
name: string;
|
|
4
|
+
args: ASTNode[];
|
|
5
|
+
} | {
|
|
6
|
+
type: 'string';
|
|
7
|
+
value: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'number';
|
|
10
|
+
value: number;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'boolean';
|
|
13
|
+
value: boolean;
|
|
14
|
+
} | {
|
|
15
|
+
type: 'null';
|
|
16
|
+
} | {
|
|
17
|
+
type: 'array';
|
|
18
|
+
items: ASTNode[];
|
|
19
|
+
} | {
|
|
20
|
+
type: 'object';
|
|
21
|
+
entries: Record<string, ASTNode>;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'reference';
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
export interface Statement {
|
|
27
|
+
value: ASTNode;
|
|
28
|
+
}
|
|
29
|
+
export interface ParseResult {
|
|
30
|
+
root: ASTNode | null;
|
|
31
|
+
statements: Map<string, Statement>;
|
|
32
|
+
meta: {
|
|
33
|
+
incomplete: boolean;
|
|
34
|
+
unresolved: string[];
|
|
35
|
+
statementCount: number;
|
|
36
|
+
errors: ParseError[];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface ParseError {
|
|
40
|
+
line: number;
|
|
41
|
+
message: string;
|
|
42
|
+
code: 'syntax' | 'unknown-component' | 'validation';
|
|
43
|
+
}
|
|
44
|
+
export interface ComponentNameChecker {
|
|
45
|
+
has(name: string): boolean;
|
|
46
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const buttonComponents: (import("..").DefinedComponent<z.ZodObject<{
|
|
3
|
+
label: z.ZodString;
|
|
4
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
text: "text";
|
|
6
|
+
default: "default";
|
|
7
|
+
subtle: "subtle";
|
|
8
|
+
light: "light";
|
|
9
|
+
filled: "filled";
|
|
10
|
+
outline: "outline";
|
|
11
|
+
dashed: "dashed";
|
|
12
|
+
}>>;
|
|
13
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
sm: "sm";
|
|
15
|
+
md: "md";
|
|
16
|
+
lg: "lg";
|
|
17
|
+
xl: "xl";
|
|
18
|
+
xs: "xs";
|
|
19
|
+
}>>;
|
|
20
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
base: "base";
|
|
22
|
+
primary: "primary";
|
|
23
|
+
secondary: "secondary";
|
|
24
|
+
success: "success";
|
|
25
|
+
warning: "warning";
|
|
26
|
+
danger: "danger";
|
|
27
|
+
info: "info";
|
|
28
|
+
neutral: "neutral";
|
|
29
|
+
}>>;
|
|
30
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
actionType: z.ZodOptional<z.ZodString>;
|
|
32
|
+
actionParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
33
|
+
}, z.core.$strip>> | import("..").DefinedComponent<z.ZodObject<{
|
|
34
|
+
label: z.ZodString;
|
|
35
|
+
pressed: z.ZodBoolean;
|
|
36
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
text: "text";
|
|
38
|
+
default: "default";
|
|
39
|
+
subtle: "subtle";
|
|
40
|
+
light: "light";
|
|
41
|
+
filled: "filled";
|
|
42
|
+
outline: "outline";
|
|
43
|
+
dashed: "dashed";
|
|
44
|
+
}>>;
|
|
45
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
sm: "sm";
|
|
47
|
+
md: "md";
|
|
48
|
+
lg: "lg";
|
|
49
|
+
xl: "xl";
|
|
50
|
+
xs: "xs";
|
|
51
|
+
}>>;
|
|
52
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
base: "base";
|
|
54
|
+
primary: "primary";
|
|
55
|
+
secondary: "secondary";
|
|
56
|
+
success: "success";
|
|
57
|
+
warning: "warning";
|
|
58
|
+
danger: "danger";
|
|
59
|
+
info: "info";
|
|
60
|
+
neutral: "neutral";
|
|
61
|
+
}>>;
|
|
62
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
}, z.core.$strip>> | import("..").DefinedComponent<z.ZodObject<{
|
|
64
|
+
text: z.ZodString;
|
|
65
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
text: "text";
|
|
67
|
+
default: "default";
|
|
68
|
+
subtle: "subtle";
|
|
69
|
+
light: "light";
|
|
70
|
+
filled: "filled";
|
|
71
|
+
outline: "outline";
|
|
72
|
+
dashed: "dashed";
|
|
73
|
+
}>>;
|
|
74
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
sm: "sm";
|
|
76
|
+
md: "md";
|
|
77
|
+
lg: "lg";
|
|
78
|
+
xl: "xl";
|
|
79
|
+
xs: "xs";
|
|
80
|
+
}>>;
|
|
81
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
base: "base";
|
|
83
|
+
primary: "primary";
|
|
84
|
+
secondary: "secondary";
|
|
85
|
+
success: "success";
|
|
86
|
+
warning: "warning";
|
|
87
|
+
danger: "danger";
|
|
88
|
+
info: "info";
|
|
89
|
+
neutral: "neutral";
|
|
90
|
+
}>>;
|
|
91
|
+
}, z.core.$strip>> | import("..").DefinedComponent<z.ZodObject<{
|
|
92
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
sm: "sm";
|
|
94
|
+
md: "md";
|
|
95
|
+
lg: "lg";
|
|
96
|
+
xl: "xl";
|
|
97
|
+
xs: "xs";
|
|
98
|
+
}>>;
|
|
99
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
base: "base";
|
|
101
|
+
primary: "primary";
|
|
102
|
+
secondary: "secondary";
|
|
103
|
+
success: "success";
|
|
104
|
+
warning: "warning";
|
|
105
|
+
danger: "danger";
|
|
106
|
+
info: "info";
|
|
107
|
+
neutral: "neutral";
|
|
108
|
+
}>>;
|
|
109
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strip>> | import("..").DefinedComponent<z.ZodObject<{
|
|
111
|
+
items: z.ZodArray<z.ZodObject<{
|
|
112
|
+
key: z.ZodString;
|
|
113
|
+
label: z.ZodString;
|
|
114
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
selectedKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
text: "text";
|
|
120
|
+
default: "default";
|
|
121
|
+
subtle: "subtle";
|
|
122
|
+
light: "light";
|
|
123
|
+
filled: "filled";
|
|
124
|
+
outline: "outline";
|
|
125
|
+
dashed: "dashed";
|
|
126
|
+
}>>;
|
|
127
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
128
|
+
sm: "sm";
|
|
129
|
+
md: "md";
|
|
130
|
+
lg: "lg";
|
|
131
|
+
xl: "xl";
|
|
132
|
+
xs: "xs";
|
|
133
|
+
}>>;
|
|
134
|
+
color: z.ZodOptional<z.ZodEnum<{
|
|
135
|
+
base: "base";
|
|
136
|
+
primary: "primary";
|
|
137
|
+
secondary: "secondary";
|
|
138
|
+
success: "success";
|
|
139
|
+
warning: "warning";
|
|
140
|
+
danger: "danger";
|
|
141
|
+
info: "info";
|
|
142
|
+
neutral: "neutral";
|
|
143
|
+
}>>;
|
|
144
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
horizontal: "horizontal";
|
|
146
|
+
vertical: "vertical";
|
|
147
|
+
}>>;
|
|
148
|
+
}, z.core.$strip>>)[];
|