@absoluteui/core 0.13.2 → 0.13.3

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.
@@ -18,6 +18,10 @@ export interface CommonConfig {
18
18
  density: Density;
19
19
  direction: Direction;
20
20
  animation: AnimationMode;
21
+ /**
22
+ * Theme name. Not checked here, because custom themes may register after configuration: the theme runtime
23
+ * checks it when applying (THEME_UNKNOWN); `hasTheme(name)` from @absoluteui/theme checks it beforehand.
24
+ */
21
25
  theme: string;
22
26
  disambiguation: Disambiguation;
23
27
  diagnostics: DiagnosticsMode;
@@ -85,6 +89,13 @@ export declare function describeComponentConfig(name: string): {
85
89
  readonly optionNames: readonly string[];
86
90
  readonly inheritedOptionNames: readonly string[];
87
91
  } | undefined;
92
+ /**
93
+ * Names of configured component sections (global or theme layer) that no imported component has
94
+ * registered (GitHub issue #8). Components register when their module is imported, so a section can be
95
+ * set before its component loads; call this once your components are imported (for example in a test or
96
+ * in development) to catch misspelled names such as `dataTabel`.
97
+ */
98
+ export declare function unregisteredComponentConfig(): readonly string[];
88
99
  /** Resolved common configuration. */
89
100
  export declare function getCommonConfig(): Readonly<CommonConfig>;
90
101
  export interface ComponentConfigHandle<R> {
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
- import{configurationError as d,setDiagnosticsMode as k}from"../errors.js";import{isLocale as E,isRecord as g,isTimeZone as j,isNonEmptyString as S,nullable as L,oneOf as y}from"./validators.js";const _=e=>g(e)&&typeof e.getOffsetMs=="function"&&typeof e.isValidTimeZone=="function",f={locale:{default:"en-US",expected:"BCP 47 locale tag",validate:E},timezone:{default:"UTC",expected:"IANA timezone identifier",validate:j},density:{default:"comfortable",expected:'"compact" | "comfortable" | "spacious"',validate:y(["compact","comfortable","spacious"])},direction:{default:"ltr",expected:'"ltr" | "rtl"',validate:y(["ltr","rtl"])},animation:{default:"subtle",expected:'"none" | "subtle"',validate:y(["none","subtle"])},theme:{default:"absolute-default",expected:"non-empty theme name",validate:S},disambiguation:{default:"compatible",expected:'"compatible" | "earlier" | "later" | "reject"',validate:y(["compatible","earlier","later","reject"])},diagnostics:{default:"production",expected:'"production" | "development"',validate:y(["production","development"])},timeZoneEngine:{default:null,expected:"TimeZoneEngine object or null",validate:L(_)}},b=()=>({common:{},components:{}}),N=Symbol.for("absoluteui.core.instance");{const e=globalThis;e[N]&&T(d("CORE_DUPLICATE_INSTANCE","Multiple copies of @absoluteui/core are loaded; configuration will not be shared.",{remediation:"Deduplicate @absoluteui/* packages so every package resolves the same core instance."})),e[N]=!0}let l=b(),p=b();const v=new Map,x=new Set,I=new Set;function C(e,o,r,a){const t={};for(const[m,c]of Object.entries(e)){const i=o[m],n=`${r}.${m}`;if(i===void 0)throw d("CFG_UNKNOWN_OPTION","Unknown configuration option.",{property:n,...a===void 0?{}:{component:a},remediation:"Check the option name against the component documentation."});if(c!==void 0){if(!i.validate(c))throw d("CFG_INVALID_VALUE","Invalid configuration value.",{property:n,expected:i.expected,...a===void 0?{}:{component:a},remediation:"Provide a value matching the expected contract."});t[m]=c}}return t}function O(e){const o={...e.schema};for(const r of e.inherits)o[r]=f[r];return o}function R(e,o){if(!g(e))throw d("CFG_INVALID_ROOT","Configuration must be an object.",{property:o,expected:"object"});const r=Object.keys(e);if(r.includes("common")||r.includes("components")){const t=r.find(n=>n!=="common"&&n!=="components");if(t!==void 0)throw d("CFG_MIXED_MODES",'Flat common options cannot be mixed with "common"/"components".',{property:`${o}.${t}`,remediation:'Move common options under "common".'});const m=e.common??{},c=e.components??{};if(!g(m))throw d("CFG_INVALID_VALUE","Invalid configuration value.",{property:`${o}.common`,expected:"object"});if(!g(c))throw d("CFG_INVALID_VALUE","Invalid configuration value.",{property:`${o}.components`,expected:"object"});const i={common:C(m,f,`${o}.common`),components:{}};for(const[n,s]of Object.entries(c)){if(!g(s))throw d("CFG_INVALID_VALUE","Invalid configuration value.",{property:`${o}.components.${n}`,expected:"object"});const u=v.get(n);i.components[n]=u?C(s,O(u),`${o}.components.${n}`,n):{...s}}return i}return{common:C(e,f,o),components:{}}}function A(){x.clear();for(const e of[...I])try{e()}catch(o){T(o)}}function T(e){const o=globalThis.reportError;o?o(e):queueMicrotask(()=>{throw e})}function G(e){const o=R(e,"config");l=o,k(o.common.diagnostics??f.diagnostics.default),A()}function P(e){p=R(e,"theme"),A()}function $(){l=b(),p=b(),k("production"),A()}function D(e){return I.add(e),()=>I.delete(e)}function U(e){const o=R(e,"config");return{common:o.common,components:o.components}}function V(e){const o=v.get(e);if(o)return{optionNames:Object.freeze(Object.keys(O(o))),inheritedOptionNames:Object.freeze([...o.inherits])}}function F(){const e={};for(const o of Object.keys(f))e[o]=w(o,f[o].default,[p.common,l.common]);return Object.freeze(e)}function w(e,o,r){let a=o;for(const t of r)e in t&&(a=t[e]);return a}function Z(e,o,r=[]){if(v.has(e))throw d("CFG_DUPLICATE_COMPONENT","Component configuration registered twice.",{component:e,property:e});const a={schema:o,inherits:r};v.set(e,a);const t=O(a),m=()=>{if(!x.has(e)){for(const[c,i]of[["theme",p],["config",l]]){const n=i.components[e];n&&(i.components[e]=C(n,t,`${c}.components.${e}`,e))}x.add(e)}};return{name:e,optionNames:Object.freeze(Object.keys(t)),inheritedOptionNames:Object.freeze([...r]),resolve(c={}){m();const i=C(c,t,e,e),n={};for(const s of Object.keys(t)){const h=r.includes(s)?[p.common,p.components[e]??{},l.common,l.components[e]??{},i]:[p.components[e]??{},l.components[e]??{},i];n[s]=w(s,t[s]?.default,h)}return Object.freeze(n)},assertUpdatable(c,i){for(const[n,s]of Object.entries(t)){if(s.mutability!=="init-only")continue;const u=c[n],h=i[n];if(n in i&&!Object.is(u,h))throw d("CFG_INIT_ONLY","Option cannot change after initialization.",{component:e,property:`${e}.${n}`,remediation:"Recreate the component instance to change this option."})}},subscribe:D}}export{f as commonSchema,G as configureAbsoluteUI,Z as defineComponentConfig,V as describeComponentConfig,F as getCommonConfig,U as normalizeConfig,D as onConfigChange,$ as resetAbsoluteUIConfig,P as setThemeConfigDefaults};
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
+ import{configurationError as l,getDiagnosticsMode as T,setDiagnosticsMode as R}from"../errors.js";import{isLocale as E,isRecord as y,isTimeZone as S,isNonEmptyString as L,nullable as D,oneOf as C}from"./validators.js";const M=e=>y(e)&&typeof e.getOffsetMs=="function"&&typeof e.isValidTimeZone=="function",g={locale:{default:"en-US",expected:"BCP 47 locale tag",validate:E},timezone:{default:"UTC",expected:"IANA timezone identifier",validate:S},density:{default:"comfortable",expected:'"compact" | "comfortable" | "spacious"',validate:C(["compact","comfortable","spacious"])},direction:{default:"ltr",expected:'"ltr" | "rtl"',validate:C(["ltr","rtl"])},animation:{default:"subtle",expected:'"none" | "subtle"',validate:C(["none","subtle"])},theme:{default:"absolute-default",expected:"non-empty theme name",validate:L},disambiguation:{default:"compatible",expected:'"compatible" | "earlier" | "later" | "reject"',validate:C(["compatible","earlier","later","reject"])},diagnostics:{default:"production",expected:'"production" | "development"',validate:C(["production","development"])},timeZoneEngine:{default:null,expected:"TimeZoneEngine object or null",validate:D(M)}},v=()=>({common:{},components:{}}),A=Symbol.for("absoluteui.core.instance");{const e=globalThis;e[A]&&j(l("CORE_DUPLICATE_INSTANCE","Multiple copies of @absoluteui/core are loaded; configuration will not be shared.",{remediation:"Deduplicate @absoluteui/* packages so every package resolves the same core instance."})),e[A]=!0}let m=v(),f=v();const b=new Map,x=new Set,O=new Set;function _(e,o){if(Math.abs(e.length-o.length)>2)return 3;let n=Array.from({length:o.length+1},(r,t)=>t);for(let r=1;r<=e.length;r++){const t=[r];for(let c=1;c<=o.length;c++)t[c]=Math.min((n[c]??0)+1,(t[c-1]??0)+1,(n[c-1]??0)+(e[r-1]===o[c-1]?0:1));n=t}return Math.min(3,n[o.length]??3)}function $(e,o){const n=/^[A-Za-z][A-Za-z]{0,39}$/.test(e)?o.find(r=>_(e.toLowerCase(),r.toLowerCase())<=2):void 0;return{shown:n===void 0?"<unknown option>":e,near:n}}function h(e,o,n,r){const t={};for(const[c,s]of Object.entries(e)){const a=Object.hasOwn(o,c)?o[c]:void 0;if(a===void 0){const d=Object.keys(o),{shown:p,near:u}=$(c,d);throw l("CFG_UNKNOWN_OPTION","Unknown configuration option.",{property:`${n}.${p}`,expected:`one of: ${d.slice(0,40).join(", ")}${d.length>40?", ...":""}`,...r===void 0?{}:{component:r},remediation:u===void 0?"Check the option name against the component documentation.":`Did you mean '${u}'?`})}const i=`${n}.${c}`;if(s!==void 0){if(!a.validate(s))throw l("CFG_INVALID_VALUE","Invalid configuration value.",{property:i,expected:a.expected,...r===void 0?{}:{component:r},remediation:"Provide a value matching the expected contract."});t[c]=s}}return t}function w(e){const o={...e.schema};for(const n of e.inherits)o[n]=g[n];return o}function I(e,o){if(!y(e))throw l("CFG_INVALID_ROOT","Configuration must be an object.",{property:o,expected:"object"});const n=Object.keys(e);if(n.includes("common")||n.includes("components")){const t=n.find(i=>i!=="common"&&i!=="components");if(t!==void 0)throw l("CFG_MIXED_MODES",'Flat common options cannot be mixed with "common"/"components".',{property:`${o}.${t}`,remediation:'Move common options under "common".'});const c=e.common??{},s=e.components??{};if(!y(c))throw l("CFG_INVALID_VALUE","Invalid configuration value.",{property:`${o}.common`,expected:"object"});if(!y(s))throw l("CFG_INVALID_VALUE","Invalid configuration value.",{property:`${o}.components`,expected:"object"});const a={common:h(c,g,`${o}.common`),components:{}};for(const[i,d]of Object.entries(s)){if(!y(d))throw l("CFG_INVALID_VALUE","Invalid configuration value.",{property:`${o}.components.${i}`,expected:"object"});const p=b.get(i);a.components[i]=p?h(d,w(p),`${o}.components.${i}`,i):{...d}}return a}return{common:h(e,g,o),components:{}}}function k(){x.clear();for(const e of[...O])try{e()}catch(o){j(o)}}function j(e){const o=globalThis.reportError;o?o(e):queueMicrotask(()=>{throw e})}function U(e){const o=I(e,"config");m=o,R(o.common.diagnostics??g.diagnostics.default),k()}function Z(e){f=I(e,"theme"),k()}function V(){m=v(),f=v(),R("production"),k()}function z(e){return O.add(e),()=>O.delete(e)}function F(e){const o=I(e,"config");return{common:o.common,components:o.components}}function K(e){const o=b.get(e);if(o)return{optionNames:Object.freeze(Object.keys(w(o))),inheritedOptionNames:Object.freeze([...o.inherits])}}function Y(){const e=new Set([...Object.keys(m.components),...Object.keys(f.components)]);return Object.freeze([...e].filter(o=>!b.has(o)).sort())}function H(){const e={};for(const o of Object.keys(g))e[o]=N(o,g[o].default,[f.common,m.common]);return Object.freeze(e)}function N(e,o,n){let r=o;for(const t of n)e in t&&(r=t[e]);return r}function q(e,o,n=[]){if(b.has(e))throw l("CFG_DUPLICATE_COMPONENT","Component configuration registered twice.",{component:e,property:e});const r={schema:o,inherits:n};b.set(e,r);const t=w(r),c=()=>{if(!x.has(e)){for(const[s,a]of[["theme",f],["config",m]]){const i=a.components[e];i&&(a.components[e]=h(i,t,`${s}.components.${e}`,e))}x.add(e)}};if(T()==="development")try{c()}catch(s){globalThis.reportError?.(s)}return{name:e,optionNames:Object.freeze(Object.keys(t)),inheritedOptionNames:Object.freeze([...n]),resolve(s={}){c();const a=h(s,t,e,e),i={};for(const d of Object.keys(t)){const u=n.includes(d)?[f.common,f.components[e]??{},m.common,m.components[e]??{},a]:[f.components[e]??{},m.components[e]??{},a];i[d]=N(d,t[d]?.default,u)}return Object.freeze(i)},assertUpdatable(s,a){for(const[i,d]of Object.entries(t)){if(d.mutability!=="init-only")continue;const p=s[i],u=a[i];if(i in a&&!Object.is(p,u))throw l("CFG_INIT_ONLY","Option cannot change after initialization.",{component:e,property:`${e}.${i}`,remediation:"Recreate the component instance to change this option."})}},subscribe:z}}export{g as commonSchema,U as configureAbsoluteUI,q as defineComponentConfig,K as describeComponentConfig,H as getCommonConfig,F as normalizeConfig,z as onConfigChange,V as resetAbsoluteUIConfig,Z as setThemeConfigDefaults,Y as unregisteredComponentConfig};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  const o=n=>typeof n=="boolean",u=n=>typeof n=="string",i=n=>typeof n=="string"&&n.trim().length>0;function s(n){return r=>n.includes(r)}function a(n,r){return e=>typeof e=="number"&&Number.isInteger(e)&&e>=n&&e<=r}function l(n,r){return e=>typeof e=="number"&&Number.isFinite(e)&&e>=n&&e<=r}function g(n){return r=>r===null||n(r)}const c=n=>{if(typeof n!="string"||n.length===0)return!1;try{return Intl.getCanonicalLocales(n).length===1}catch{return!1}},t=new Map,b=n=>{if(typeof n!="string"||n.length===0||n.length>64)return!1;const r=t.get(n);if(r!==void 0)return r;let e;try{new Intl.DateTimeFormat("en-US",{timeZone:n}),e=!0}catch{e=!1}return t.set(n,e),e};function m(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}export{a as integerInRange,o as isBoolean,c as isLocale,i as isNonEmptyString,m as isRecord,u as isString,b as isTimeZone,g as nullable,l as numberInRange,s as oneOf};
package/dist/dom.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  let i=0;function r(s="aui"){return i+=1,`${s}-${i.toString(36)}`}function d(s,e,t,n={}){const o=n.bubbles??!0;return s.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:o,composed:o,cancelable:n.cancelable??!1}))}class v{#t=[];#e=!1;add(e){if(this.#e){e();return}this.#t.push(e)}listen(e,t,n,o){e.addEventListener(t,n,o),this.add(()=>{e.removeEventListener(t,n,o)})}get disposed(){return this.#e}dispose(){if(this.#e)return;this.#e=!0;const e=this.#t.reverse();this.#t=[];for(const t of e)t()}}export{v as DisposableGroup,r as createId,d as emit};
package/dist/errors.d.ts CHANGED
@@ -23,6 +23,12 @@ export declare class AbsoluteUIError extends Error {
23
23
  readonly details: ErrorDetails;
24
24
  constructor(category: ErrorCategory, code: string, summary: string, details?: ErrorDetails);
25
25
  }
26
+ /**
27
+ * @internal Used by the component factories. Checks the arguments of a factory such as `TextInput.create(host, options)` (GitHub issue #16),
28
+ * so `null`, `undefined`, or a non-element host throw a classifiable AbsoluteUIError instead of a native
29
+ * TypeError. Elements from other documents and frames pass (checked by node type, not `instanceof`).
30
+ */
31
+ export declare function assertFactoryArguments(component: string, hostName: string, host: unknown, options: unknown, optionsRequired: boolean): void;
26
32
  export declare function configurationError(code: string, summary: string, details?: ErrorDetails): AbsoluteUIError;
27
33
  export declare function validationError(code: string, summary: string, details?: ErrorDetails): AbsoluteUIError;
28
34
  export declare function runtimeError(code: string, summary: string, details?: ErrorDetails): AbsoluteUIError;
package/dist/errors.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
- let n="production";function d(e){n=e}function p(){return n}class i extends Error{name="AbsoluteUIError";category;code;details;constructor(o,r,t,s={}){super(a(r,t,s)),this.category=o,this.code=r,this.details=Object.freeze({...s})}}function a(e,o,r){const t=[`[AbsoluteUI ${e}] ${o}`];return r.property!==void 0&&t.push(`Property: ${r.property}.`),r.expected!==void 0&&t.push(`Expected: ${r.expected}.`),n==="development"&&(r.component!==void 0&&t.push(`Component: ${r.component}.`),r.remediation!==void 0&&t.push(`Fix: ${r.remediation}`)),t.join(" ")}function u(e,o,r){return new i("configuration",e,o,r)}function c(e,o,r){return new i("validation",e,o,r)}function g(e,o,r){return new i("runtime",e,o,r)}export{i as AbsoluteUIError,u as configurationError,p as getDiagnosticsMode,g as runtimeError,d as setDiagnosticsMode,c as validationError};
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
+ let i="production";function d(e){i=e}function p(){return i}class s extends Error{name="AbsoluteUIError";category;code;details;constructor(t,r,o,n={}){super(c(r,o,n)),this.category=t,this.code=r,this.details=Object.freeze({...n});for(const a of["name","category","code","details"])Object.defineProperty(this,a,{value:this[a],writable:!1,enumerable:!0,configurable:!1})}}function c(e,t,r){const o=[`[AbsoluteUI ${e}] ${t}`];return r.property!==void 0&&o.push(`Property: ${r.property}.`),r.expected!==void 0&&o.push(`Expected: ${r.expected}.`),i==="development"&&(r.component!==void 0&&o.push(`Component: ${r.component}.`),r.remediation!==void 0&&o.push(`Fix: ${r.remediation}`)),o.join(" ")}function g(e,t,r,o,n){if(typeof r!="object"||r===null||r.nodeType!==1)throw u("ARG_INVALID_HOST","Invalid factory argument.",{component:e,property:t,expected:"an Element"});if(!(o===void 0&&!n)&&(typeof o!="object"||o===null||Array.isArray(o)))throw u("ARG_INVALID_OPTIONS","Invalid factory argument.",{component:e,property:"options",expected:n?"an options object":"an options object or undefined"})}function u(e,t,r){return new s("configuration",e,t,r)}function f(e,t,r){return new s("validation",e,t,r)}function l(e,t,r){return new s("runtime",e,t,r)}export{s as AbsoluteUIError,g as assertFactoryArguments,u as configurationError,p as getDiagnosticsMode,l as runtimeError,d as setDiagnosticsMode,f as validationError};
package/dist/i18n/i18n.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{getWeekInfo as d}from"@absoluteui/helpers/date";import{getCommonConfig as o}from"../config/config.js";import{configurationError as p}from"../errors.js";import{fieldsToEpoch as c}from"../timezone/engine.js";const l=new Map;function N(t,e,n){let r=l.get(t);r||(r=new Map,l.set(t,r));const i=Intl.getCanonicalLocales(e)[0]??e;r.set(i,Object.freeze({...r.get(i)??{},...n}))}function T(t){const e=[],n=(Intl.getCanonicalLocales(t)[0]??t).split("-");for(;n.length;)e.push(n.join("-")),n.pop();return e.includes("en")||e.push("en"),e}function O(t,e,n={},r=o().locale){const i=l.get(t);let a;for(const m of T(r))if(a=i?.get(m)?.[e],a!==void 0)break;if(a===void 0)throw p("I18N_MISSING_MESSAGE","Missing localized message.",{component:t,property:`${t}.${e}`});return a.replace(/\{(\w+)\}/g,(m,u)=>{const g=n[u];return g===void 0?m:String(g)})}const y=new Set(["ar","arc","ckb","dv","fa","he","iw","ks","ku","ps","sd","syr","ug","ur","yi"]);function w(t){const e=new Intl.Locale(t),n=e.maximize().script;return n&&["Arab","Hebr","Thaa","Syrc","Nkoo","Adlm","Rohg"].includes(n)||y.has(e.language)?"rtl":"ltr"}function x(){return o().direction}function $(t=o().locale){return d(t).firstDay}const f=new Map;function s(t,e){let n=f.get(t);return n||(n=e(),f.set(t,n)),n}function D(t,e={},n=o().locale){return s(`n|${n}|${JSON.stringify(e)}`,()=>new Intl.NumberFormat(n,e)).format(t)}function C(t,e,n={},r=o().locale){return D(t,{...n,style:"currency",currency:e},r)}function F(t,e={dateStyle:"medium"},n=o().locale){const r=c(t.year,t.month,t.day,12);return s(`d|${n}|UTC|${JSON.stringify(e)}`,()=>new Intl.DateTimeFormat(n,{...e,timeZone:"UTC"})).format(r)}function M(t,e={timeStyle:"short"},n=o().locale){const r=c(1970,1,1,t.hour,t.minute,t.second,t.millisecond);return s(`d|${n}|UTC|${JSON.stringify(e)}`,()=>new Intl.DateTimeFormat(n,{...e,timeZone:"UTC"})).format(r)}function P(t,e={dateStyle:"medium",timeStyle:"short"},n=o().locale){const{date:r,time:i}=t,a=c(r.year,r.month,r.day,i.hour,i.minute,i.second,i.millisecond);return s(`d|${n}|UTC|${JSON.stringify(e)}`,()=>new Intl.DateTimeFormat(n,{...e,timeZone:"UTC"})).format(a)}function Z(t,e={dateStyle:"medium",timeStyle:"long"},n,r=o().locale){const i=n??(t.kind==="ZonedDateTime"?t.timeZone:o().timezone);return s(`d|${r}|${i}|${JSON.stringify(e)}`,()=>new Intl.DateTimeFormat(r,{...e,timeZone:i})).format(t.epochMilliseconds)}function L(t,e="long",n=Date.now(),r=o().locale){return s(`tz|${r}|${t}|${e}`,()=>new Intl.DateTimeFormat(r,{timeZone:t,timeZoneName:e})).formatToParts(n).find(a=>a.type==="timeZoneName")?.value??t}export{C as formatCurrency,Z as formatInstant,D as formatNumber,F as formatPlainDate,P as formatPlainDateTime,M as formatPlainTime,L as formatTimeZoneName,x as getDirection,$ as getFirstDayOfWeek,w as getLocaleDirection,O as getMessage,T as localeFallbacks,N as registerMessages};
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { AbsoluteUIError, configurationError, validationError, runtimeError, getDiagnosticsMode } from './errors.js';
1
+ export { AbsoluteUIError, assertFactoryArguments, configurationError, validationError, runtimeError, getDiagnosticsMode } from './errors.js';
2
2
  export type { ErrorCategory, ErrorDetails, DiagnosticsMode } from './errors.js';
3
- export { configureAbsoluteUI, resetAbsoluteUIConfig, setThemeConfigDefaults, onConfigChange, getCommonConfig, defineComponentConfig, commonSchema, normalizeConfig, describeComponentConfig, } from './config/config.js';
3
+ export { configureAbsoluteUI, resetAbsoluteUIConfig, setThemeConfigDefaults, onConfigChange, getCommonConfig, defineComponentConfig, commonSchema, normalizeConfig, describeComponentConfig, unregisteredComponentConfig, } from './config/config.js';
4
4
  export type { CommonConfig, ComponentConfigMap, ComponentConfigInput, ComponentConfigHandle, ConfigSchema, OptionSpec, Mutability, GlobalConfigInput, StructuredConfigInput, Density, Direction, AnimationMode, Disambiguation, NormalizedConfig, } from './config/config.js';
5
5
  export * as validators from './config/validators.js';
6
6
  export type { Guard } from './config/validators.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
- import{AbsoluteUIError as r,configurationError as t,validationError as n,runtimeError as i,getDiagnosticsMode as a}from"./errors.js";import{configureAbsoluteUI as s,resetAbsoluteUIConfig as c,setThemeConfigDefaults as f,onConfigChange as p,getCommonConfig as u,defineComponentConfig as l,commonSchema as g,normalizeConfig as d,describeComponentConfig as x}from"./config/config.js";import*as C from"./config/validators.js";import{intlTimeZoneEngine as R,fieldsToEpoch as D}from"./timezone/engine.js";export*from"./timezone/types.js";import{getTimeZoneEngine as z,getPossibleInstants as E,getLocalTimeStatus as I,toInstant as j,toPlainDateTime as S,zonedDateTime as M,formatOffset as O,now as P}from"./timezone/convert.js";import{recurrenceRule as h,parseRecurrenceRule as k,recurrenceRuleToString as v,isRecurrenceRule as A}from"./recurrence/rule.js";import{expandRecurrence as U}from"./recurrence/expand.js";import{describeRecurrence as F}from"./recurrence/describe.js";import{registerMessages as L,getMessage as W,localeFallbacks as q,getLocaleDirection as w,getDirection as B,getFirstDayOfWeek as J,formatNumber as K,formatCurrency as Q,formatPlainDate as V,formatPlainTime as X,formatPlainDateTime as Y,formatInstant as _,formatTimeZoneName as $}from"./i18n/i18n.js";import{sanitizeHtml as oe,sanitizeHtmlToString as re,setSanitizedHtml as te,defaultSanitizePolicy as ne}from"./sanitize/sanitize.js";import{createId as ae,emit as me,DisposableGroup as se}from"./dom.js";import{onNodeRelease as fe,releaseNode as pe,releaseNodes as ue}from"./render.js";export{r as AbsoluteUIError,se as DisposableGroup,g as commonSchema,t as configurationError,s as configureAbsoluteUI,ae as createId,ne as defaultSanitizePolicy,l as defineComponentConfig,x as describeComponentConfig,F as describeRecurrence,me as emit,U as expandRecurrence,D as fieldsToEpoch,Q as formatCurrency,_ as formatInstant,K as formatNumber,O as formatOffset,V as formatPlainDate,Y as formatPlainDateTime,X as formatPlainTime,$ as formatTimeZoneName,u as getCommonConfig,a as getDiagnosticsMode,B as getDirection,J as getFirstDayOfWeek,I as getLocalTimeStatus,w as getLocaleDirection,W as getMessage,E as getPossibleInstants,z as getTimeZoneEngine,R as intlTimeZoneEngine,A as isRecurrenceRule,q as localeFallbacks,d as normalizeConfig,P as now,p as onConfigChange,fe as onNodeRelease,k as parseRecurrenceRule,h as recurrenceRule,v as recurrenceRuleToString,L as registerMessages,pe as releaseNode,ue as releaseNodes,c as resetAbsoluteUIConfig,i as runtimeError,oe as sanitizeHtml,re as sanitizeHtmlToString,te as setSanitizedHtml,f as setThemeConfigDefaults,j as toInstant,S as toPlainDateTime,n as validationError,C as validators,M as zonedDateTime};
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
+ import{AbsoluteUIError as r,assertFactoryArguments as t,configurationError as n,validationError as i,runtimeError as a,getDiagnosticsMode as s}from"./errors.js";import{configureAbsoluteUI as c,resetAbsoluteUIConfig as f,setThemeConfigDefaults as p,onConfigChange as u,getCommonConfig as g,defineComponentConfig as l,commonSchema as d,normalizeConfig as C,describeComponentConfig as x,unregisteredComponentConfig as y}from"./config/config.js";import*as R from"./config/validators.js";import{intlTimeZoneEngine as b,fieldsToEpoch as T}from"./timezone/engine.js";export*from"./timezone/types.js";import{getTimeZoneEngine as I,getPossibleInstants as j,getLocalTimeStatus as S,toInstant as M,toPlainDateTime as O,zonedDateTime as P,formatOffset as N,now as h}from"./timezone/convert.js";import{recurrenceRule as k,parseRecurrenceRule as v,recurrenceRuleToString as F,isRecurrenceRule as H}from"./recurrence/rule.js";import{expandRecurrence as Z}from"./recurrence/expand.js";import{describeRecurrence as L}from"./recurrence/describe.js";import{registerMessages as q,getMessage as w,localeFallbacks as B,getLocaleDirection as J,getDirection as K,getFirstDayOfWeek as Q,formatNumber as V,formatCurrency as X,formatPlainDate as Y,formatPlainTime as _,formatPlainDateTime as $,formatInstant as ee,formatTimeZoneName as oe}from"./i18n/i18n.js";import{sanitizeHtml as te,sanitizeHtmlToString as ne,setSanitizedHtml as ie,defaultSanitizePolicy as ae}from"./sanitize/sanitize.js";import{createId as me,emit as ce,DisposableGroup as fe}from"./dom.js";import{onNodeRelease as ue,releaseNode as ge,releaseNodes as le}from"./render.js";export{r as AbsoluteUIError,fe as DisposableGroup,t as assertFactoryArguments,d as commonSchema,n as configurationError,c as configureAbsoluteUI,me as createId,ae as defaultSanitizePolicy,l as defineComponentConfig,x as describeComponentConfig,L as describeRecurrence,ce as emit,Z as expandRecurrence,T as fieldsToEpoch,X as formatCurrency,ee as formatInstant,V as formatNumber,N as formatOffset,Y as formatPlainDate,$ as formatPlainDateTime,_ as formatPlainTime,oe as formatTimeZoneName,g as getCommonConfig,s as getDiagnosticsMode,K as getDirection,Q as getFirstDayOfWeek,S as getLocalTimeStatus,J as getLocaleDirection,w as getMessage,j as getPossibleInstants,I as getTimeZoneEngine,b as intlTimeZoneEngine,H as isRecurrenceRule,B as localeFallbacks,C as normalizeConfig,h as now,u as onConfigChange,ue as onNodeRelease,v as parseRecurrenceRule,k as recurrenceRule,F as recurrenceRuleToString,q as registerMessages,ge as releaseNode,le as releaseNodes,f as resetAbsoluteUIConfig,a as runtimeError,te as sanitizeHtml,ne as sanitizeHtmlToString,ie as setSanitizedHtml,p as setThemeConfigDefaults,M as toInstant,O as toPlainDateTime,y as unregisteredComponentConfig,i as validationError,R as validators,P as zonedDateTime};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{getCommonConfig as k}from"../config/config.js";import{getMessage as m,registerMessages as M,formatNumber as r,formatPlainDate as h,formatPlainDateTime as p,formatInstant as w}from"../i18n/i18n.js";import{dayOfWeek as P,plainDate as d}from"../timezone/types.js";M("recurrence","en",{daily:"Every day",dailyN:"Every {n} days",weekly:"Every week",weeklyN:"Every {n} weeks",monthly:"Every month",monthlyN:"Every {n} months",yearly:"Every year",yearlyN:"Every {n} years",onDays:"{base} on {days}",onMonthDays:"{base} on day {days}",inMonths:"{base} in {months}",onDate:"{base} on {date}",weekdays:"Every weekday",nth1:"first",nth2:"second",nth3:"third",nth4:"fourth",nth5:"fifth",nthLast:"last",nthLast2:"second to last",nthOther:"number {n}",nthOtherLast:"number {n} from the end",nthDay:"the {nth} {day}",lastDay:"the last day",dayFromEnd:"day {n} from the end",setPos:"the {positions} of them",times:"{text}, {count} times",once:"{text}, once",until:"{text}, until {date}"});const f=(e,s)=>h(d(2024,1,e),{weekday:"long"},s),v=(e,s)=>h(d(2024,e,1),{month:"long"},s);function c(e,s){return new Intl.ListFormat(s,{type:"conjunction",style:"long"}).format(e)}function b(e,s){const t=e>0&&e<=5?`nth${String(e)}`:e===-1?"nthLast":e===-2?"nthLast2":null;return t?m("recurrence",t,{},s):m("recurrence",e>0?"nthOther":"nthOtherLast",{n:r(Math.abs(e),{},s)},s)}function E(e,s){const t=f(e.weekday,s);return e.nth===void 0?t:m("recurrence","nthDay",{nth:b(e.nth,s),day:t},s)}function N(e,s={}){const t=s.locale??k().locale,y=(a,o={})=>m("recurrence",a,o,t),i=s.start?s.start.kind==="PlainDate"?s.start:s.start.date:null,l=e.interval,g=r(l,{},t);let n=l===1?y(e.frequency):y(`${e.frequency}N`,{n:g});const D=e.byDay.every(a=>a.nth===void 0),u=e.byDay.map(a=>a.weekday).sort((a,o)=>a-o);if((e.frequency==="weekly"||e.frequency==="daily")&&l===1&&D&&u.join()==="1,2,3,4,5"&&e.bySetPos.length===0&&e.byMonth.length===0)n=y("weekdays");else if(e.frequency==="yearly"&&e.byMonth.length===1&&e.byMonthDay.length===1&&e.byDay.length===0&&(e.byMonthDay[0]??0)>0)n=y("onDate",{base:n,date:h(d(2024,e.byMonth[0]??1,e.byMonthDay[0]??1),{month:"long",day:"numeric"},t)});else{if(e.byDay.length>0)n=y("onDays",{base:n,days:c(e.byDay.map(a=>E(a,t)),t)});else if(e.byMonthDay.length>0){const a=e.byMonthDay.map(o=>o>0?r(o,{},t):o===-1?y("lastDay"):y("dayFromEnd",{n:r(-o,{},t)}));n=e.byMonthDay.every(o=>o>0)?y("onMonthDays",{base:n,days:c(a,t)}):y("onDays",{base:n,days:c(a,t)})}else i&&(e.frequency==="weekly"?n=y("onDays",{base:n,days:f(P(i),t)}):e.frequency==="monthly"?n=y("onMonthDays",{base:n,days:r(i.day,{},t)}):e.frequency==="yearly"&&e.byMonth.length===0&&(n=y("onDate",{base:n,date:h(d(2024,i.month,i.day),{month:"long",day:"numeric"},t)})));e.byMonth.length>0&&(n=y("inMonths",{base:n,months:c(e.byMonth.map(a=>v(a,t)),t)})),e.bySetPos.length>0&&(n=`${n} (${y("setPos",{positions:c(e.bySetPos.map(a=>b(a,t)),t)})})`)}if(e.count!==null)n=e.count===1?y("once",{text:n}):y("times",{text:n,count:r(e.count,{},t)});else if(e.until!==null){const a=e.until,o=a.kind==="PlainDate"?h(a,{dateStyle:"medium"},t):a.kind==="PlainDateTime"?p(a,{dateStyle:"medium",timeStyle:"short"},t):w(a,{dateStyle:"medium",timeStyle:"short"},s.timeZone,t);n=y("until",{text:n,date:o})}return n}export{N as describeRecurrence};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{getCommonConfig as G}from"../config/config.js";import{validationError as tn}from"../errors.js";import{toInstant as U,toPlainDateTime as H}from"../timezone/convert.js";import{fieldsToEpoch as J}from"../timezone/engine.js";import{daysInMonth as S,plainDate as rn,plainDateTime as j}from"../timezone/types.js";import{dateKey as y}from"./rule.js";const L=864e5,an=5e4,p=(e,t,o)=>Math.floor(J(e,t,o)/L),I=e=>(e%7+7+3)%7+1;function R(e){const t=new Date(e*L);return[t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate()]}function x(e,t){throw tn("RECURRENCE_EXPAND","Invalid recurrence expansion input.",{property:`expandRecurrence.${e}`,expected:t})}function on(e,t){if(t.length===0)return e;const o=new Set;for(const a of t){const r=a>0?e[a-1]:e[e.length+a];r!==void 0&&o.add(r)}return[...o].sort((a,r)=>a-r)}function cn(e,t,o){const a=[];for(let r=e+(o-I(e)+7)%7;r<=t;r+=7)a.push(r);return a}function E(e,t,o){const a=new Set;for(const r of e.byDay){const c=cn(t,o,r.weekday);if(r.nth===void 0)for(const s of c)a.add(s);else{const s=r.nth>0?c[r.nth-1]:c[c.length+r.nth];s!==void 0&&a.add(s)}}return a}function A(e,t,o){const a=S(t,o),r=[];for(const c of e.byMonthDay){const s=c>0?c:a+c+1;s>=1&&s<=a&&r.push(p(t,o,s))}return r}function Q(e,t,o,a){const r=p(t,o,1),c=r+S(t,o)-1;if(e.byMonthDay.length>0){const s=A(e,t,o);if(e.byDay.length===0)return s;const P=E(e,r,c);return s.filter(f=>P.has(f))}return e.byDay.length>0?[...E(e,r,c)]:a<=S(t,o)?[r+a-1]:[]}function sn(e,t,o,a){if(e.byMonth.length>0)return e.byMonth.flatMap(s=>Q(e,t,s,a));const r=p(t,1,1),c=p(t,12,31);if(e.byMonthDay.length>0){const s=[];for(let f=1;f<=12;f++)s.push(...A(e,t,f));if(e.byDay.length===0)return s;const P=E(e,r,c);return s.filter(f=>P.has(f))}return e.byDay.length>0?[...E(e,r,c)]:a<=S(t,o)?[p(t,o,a)]:[]}function un(e,t){const[o,a,r]=R(t),c=e.interval,s=new Set(e.byMonth),P=d=>s.size===0||s.has(R(d)[1]),f=d=>on([...new Set(d)].sort((m,u)=>m-u),e.bySetPos);switch(e.frequency){case"daily":{const d=new Set(e.byDay.map(m=>m.weekday));return{periodStart:m=>t+m*c,candidates:m=>{const u=t+m*c;if(!P(u))return[];if(d.size>0&&!d.has(I(u)))return[];if(e.byMonthDay.length>0){const[l,h]=R(u);if(!A(e,l,h).includes(u))return[]}return[u]},skipTo:m=>Math.max(0,Math.floor((m-t)/c)-1)}}case"weekly":{const d=t-(I(t)-e.weekStart+7)%7,m=e.byDay.length>0?e.byDay.map(u=>u.weekday):[I(t)];return{periodStart:u=>d+7*u*c,candidates:u=>{const l=d+7*u*c,h=[];for(let D=0;D<7;D++)m.includes(I(l+D))&&P(l+D)&&h.push(l+D);return f(h)},skipTo:u=>Math.max(0,Math.floor((u-d)/(7*c))-1)}}case"monthly":{const d=o*12+(a-1),m=u=>{const l=d+u*c;return[Math.floor(l/12),l%12+1]};return{periodStart:u=>{const[l,h]=m(u);return p(l,h,1)},candidates:u=>{const[l,h]=m(u);return s.size>0&&!s.has(h)?[]:f(Q(e,l,h,r))},skipTo:u=>{const[l,h]=R(u);return Math.max(0,Math.floor((l*12+(h-1)-d)/c)-1)}}}case"yearly":return{periodStart:d=>p(o+d*c,1,1),candidates:d=>f(sn(e,o+d*c,a,r)),skipTo:d=>Math.max(0,Math.floor((R(d)[0]-o)/c)-1)}}}const C=e=>typeof e=="object"&&e!==null?e.kind:void 0;function pn(e,t,o={}){C(e)!=="RecurrenceRule"&&x("rule","RecurrenceRule");const a=C(t)==="PlainDate";!a&&C(t)!=="PlainDateTime"&&x("start","PlainDate | PlainDateTime");const r=o.limit??1e3;(!Number.isInteger(r)||r<1||r>1e5)&&x("limit","integer from 1 to 100000");const c=a?"PlainDate":"Instant";for(const n of["from","to"]){const i=o[n];i!==void 0&&C(i)!==c&&x(n,a?"PlainDate (all-day series)":"Instant (timed series)")}const s=o.timeZone??G().timezone,P=o.disambiguation??G().disambiguation,f=a?t:t.date,d=a?null:t.time,m=p(f.year,f.month,f.day),u=n=>{const[i,k,en]=R(n);return rn(i,k,en)},l=n=>{const i=u(n);if(!d)return Object.freeze({start:i,instant:null});const k=j(i,d);return Object.freeze({start:k,instant:U(k,s,P)})},h=n=>{if(a)return l(n.kind==="PlainDate"?p(n.year,n.month,n.day):p(n.date.year,n.date.month,n.date.day));const i=n.kind==="PlainDate"?j(n,d??void 0):n;return Object.freeze({start:i,instant:U(i,s,P)})},D=o.from,M=o.to,N=n=>{if(n.kind==="PlainDate")return p(n.year,n.month,n.day);const i=H(n,s).date;return p(i.year,i.month,i.day)},K=M===void 0?1/0:N(M)+1,W=n=>D===void 0?!0:n.instant?n.instant.epochMilliseconds>=D.epochMilliseconds:y(n.start)>=y(D),q=n=>M===void 0?!0:n.instant?n.instant.epochMilliseconds<M.epochMilliseconds:y(n.start)<y(M),b=e.until;let z=1/0;if(b){const n=b.kind==="PlainDate"?b:b.kind==="PlainDateTime"?b.date:H(b,s).date;z=p(n.year,n.month,n.day)+(b.kind==="Instant"?1:0)}const F=n=>{if(!b)return!0;if(b.kind==="Instant"){if(n.instant)return n.instant.epochMilliseconds<=b.epochMilliseconds;const k=n.start;return U(j(k),s,P).epochMilliseconds<=b.epochMilliseconds}const i=n.start.kind==="PlainDate"?n.start:n.start.date;return b.kind==="PlainDate"?y(i)<=y(b):n.start.kind==="PlainDate"?y(i)<=y(b.date):y(n.start)<=y(b)},V=new Set(e.exclusions.filter(n=>n.kind==="PlainDate").map(y)),X=new Set(e.exclusions.filter(n=>n.kind==="PlainDateTime").map(y)),Y=n=>{const i=n.start.kind==="PlainDate"?n.start:n.start.date;return V.has(y(i))?!0:n.start.kind==="PlainDate"?[...X].some(k=>k.startsWith(y(i))):X.has(y(n.start))},g=[],Z=n=>{W(n)&&q(n)&&!Y(n)&&g.push(n)};let T=1;const B=l(m);F(B)?Z(B):T=1/0;const v=un(e,m);let w=!(e.count!==null)&&D!==void 0?v.skipTo(N(D)-1):0;const nn=w+an,$=e.count??1/0;n:for(;w<nn&&T<$&&g.length<r;w++){const n=v.periodStart(w);if(n>K||n>z)break;for(const i of v.candidates(w)){if(i<=m)continue;if(i>K||i>z+1)break n;const k=l(i);if(!F(k)||(T++,Z(k),T>=$||g.length>=r))break n}}for(const n of e.inclusions){const i=h(n);W(i)&&q(i)&&!Y(i)&&g.push(i)}const O=n=>n.instant?n.instant.epochMilliseconds:J(n.start.year,n.start.month,n.start.day),_=new Map;for(const n of g)_.has(O(n))||_.set(O(n),n);return[..._.values()].sort((n,i)=>O(n)-O(i)).slice(0,r)}export{pn as expandRecurrence};
@@ -1,3 +1,3 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{validationError as q}from"../errors.js";import{instant as x,plainDate as E,plainDateTime as C,plainTime as L}from"../timezone/types.js";const S=["daily","weekly","monthly","yearly"],k=["MO","TU","WE","TH","FR","SA","SU"];function i(e,n){throw q("RECURRENCE_INVALID","Invalid recurrence rule.",{property:`recurrence.${e}`,expected:n})}const h=e=>typeof e=="number"&&Number.isInteger(e),T=e=>typeof e=="object"&&e!==null?e.kind:void 0,A=e=>T(e)==="PlainDate"||T(e)==="PlainDateTime";function w(e,n,t,r){if(e===void 0)return[];(!Array.isArray(e)||!e.every(o=>h(o)&&t(o)))&&i(n,r);const s=o=>o>0?o:1e3+o;return[...new Set(e)].sort((o,c)=>s(o)-s(c))}function W(e){(typeof e!="object"||e===null)&&i("init","RecurrenceRuleInit"),S.includes(e.frequency)||i("frequency",'"daily" | "weekly" | "monthly" | "yearly"');const n=e.interval??1;(!h(n)||n<1||n>1e4)&&i("interval","integer from 1 to 10000");const t=e.count??null;t!==null&&(!h(t)||t<1||t>1e5)&&i("count","integer from 1 to 100000, or null");const r=e.until??null;r!==null&&!(A(r)||T(r)==="Instant")&&i("until","PlainDate | PlainDateTime | Instant | null"),t!==null&&r!==null&&i("until","not combined with count (RFC 5545)");const s=e.byDay??[];Array.isArray(s)||i("byDay","RecurrenceWeekday[]");const o=new Set,c=[];for(const a of s){(typeof a!="object"||a===null)&&i("byDay","RecurrenceWeekday[]");const{weekday:d,nth:f}=a;(!h(d)||d<1||d>7)&&i("byDay.weekday","integer from 1 (Monday) to 7 (Sunday)"),f!==void 0&&(!h(f)||f===0||f<-53||f>53)&&i("byDay.nth","integer from 1 to 53 or -1 to -53"),f!==void 0&&e.frequency!=="monthly"&&e.frequency!=="yearly"&&i("byDay.nth","only with monthly or yearly frequency (RFC 5545)"),f!==void 0&&e.frequency==="monthly"&&Math.abs(f)>5&&i("byDay.nth","integer from 1 to 5 or -1 to -5 for monthly frequency");const g=`${String(f??0)}|${String(d)}`;o.has(g)||(o.add(g),c.push(Object.freeze(f===void 0?{weekday:d}:{weekday:d,nth:f})))}c.sort((a,d)=>(a.nth??0)-(d.nth??0)||a.weekday-d.weekday);const b=w(e.byMonthDay,"byMonthDay",a=>a!==0&&a>=-31&&a<=31,"integers from 1 to 31 or -1 to -31");b.length>0&&e.frequency==="weekly"&&i("byMonthDay","not with weekly frequency (RFC 5545)");const u=w(e.byMonth,"byMonth",a=>a>=1&&a<=12,"integers from 1 to 12"),D=w(e.bySetPos,"bySetPos",a=>a!==0&&a>=-366&&a<=366,"integers from 1 to 366 or -366 to -1");D.length>0&&c.length===0&&b.length===0&&u.length===0&&i("bySetPos","only with byDay, byMonthDay, or byMonth (RFC 5545)");const y=e.weekStart??1;(!h(y)||y<1||y>7)&&i("weekStart","integer from 1 (Monday) to 7 (Sunday)");const R=(a,d)=>{if(a===void 0)return[];(!Array.isArray(a)||!a.every(A))&&i(d,"(PlainDate | PlainDateTime)[]");const f=a;return new Set(f.map(m=>m.kind)).size>1&&i(d,"all PlainDate or all PlainDateTime"),[...new Map(f.map(m=>[p(m),m])).values()].sort((m,N)=>p(m)<p(N)?-1:1)},P=R(e.exclusions,"exclusions"),O=R(e.inclusions,"inclusions");return Object.freeze({kind:"RecurrenceRule",frequency:e.frequency,interval:n,count:t,until:r,byDay:Object.freeze(c),byMonthDay:Object.freeze(b),byMonth:Object.freeze(u),bySetPos:Object.freeze(D),weekStart:y,exclusions:Object.freeze(P),inclusions:Object.freeze(O)})}const l=(e,n=2)=>String(e).padStart(n,"0");function p(e){return e.kind==="PlainDate"?`${l(e.year,4)}${l(e.month)}${l(e.day)}`:`${l(e.date.year,4)}${l(e.date.month)}${l(e.date.day)}T${l(e.time.hour)}${l(e.time.minute)}${l(e.time.second)}`}function Y(e){if(e.kind==="Instant"){const n=new Date(e.epochMilliseconds);return`${l(n.getUTCFullYear(),4)}${l(n.getUTCMonth()+1)}${l(n.getUTCDate())}T${l(n.getUTCHours())}${l(n.getUTCMinutes())}${l(n.getUTCSeconds())}Z`}return p(e)}function M(e,n){const t=n[0]?.kind==="PlainDate";return`${e}${t?";VALUE=DATE":""}:${n.map(p).join(",")}`}function H(e){const n=[`FREQ=${e.frequency.toUpperCase()}`];e.interval!==1&&n.push(`INTERVAL=${String(e.interval)}`),e.count!==null&&n.push(`COUNT=${String(e.count)}`),e.until!==null&&n.push(`UNTIL=${Y(e.until)}`),e.byMonth.length&&n.push(`BYMONTH=${e.byMonth.join(",")}`),e.byMonthDay.length&&n.push(`BYMONTHDAY=${e.byMonthDay.join(",")}`),e.byDay.length&&n.push(`BYDAY=${e.byDay.map(r=>`${r.nth===void 0?"":String(r.nth)}${k[r.weekday-1]??""}`).join(",")}`),e.bySetPos.length&&n.push(`BYSETPOS=${e.bySetPos.join(",")}`),e.weekStart!==1&&n.push(`WKST=${k[e.weekStart-1]??"MO"}`);const t=[`RRULE:${n.join(";")}`];return e.exclusions.length&&t.push(M("EXDATE",e.exclusions)),e.inclusions.length&&t.push(M("RDATE",e.inclusions)),t.join(`
3
3
  `)}const j=/^(\d{4})(\d{2})(\d{2})$/,F=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z?)$/;function $(e,n){try{const t=j.exec(e);if(t)return E(Number(t[1]),Number(t[2]),Number(t[3]));const r=F.exec(e);if(!r)return null;const s=E(Number(r[1]),Number(r[2]),Number(r[3])),o=L(Number(r[4]),Number(r[5]),Number(r[6]));return r[7]==="Z"?n?x(Date.UTC(s.year,s.month-1,s.day,o.hour,o.minute,o.second)):null:C(s,o)}catch{return null}}const U=e=>/^[+-]?\d{1,6}$/.test(e)?Number(e):null;function I(e,n){const t=new Set;for(const r of e.split(";")){const s=r.indexOf("=");if(s<=0)return!1;const o=r.slice(0,s).toUpperCase(),c=r.slice(s+1).toUpperCase();if(t.has(o)||c==="")return!1;t.add(o);const b=c.split(",");switch(o){case"FREQ":{const u=c.toLowerCase();if(!S.includes(u))return!1;n.frequency=u;break}case"INTERVAL":case"COUNT":{const u=U(c);if(u===null)return!1;o==="INTERVAL"?n.interval=u:n.count=u;break}case"UNTIL":{const u=$(c,!0);if(!u)return!1;n.until=u;break}case"BYDAY":{const u=[];for(const D of b){const y=/^([+-]?\d{1,2})?(MO|TU|WE|TH|FR|SA|SU)$/.exec(D);if(!y)return!1;const R=k.indexOf(y[2])+1;u.push(y[1]===void 0?{weekday:R}:{weekday:R,nth:Number(y[1])})}n.byDay=u;break}case"BYMONTHDAY":case"BYMONTH":case"BYSETPOS":{const u=b.map(U);if(u.some(y=>y===null))return!1;const D=u;o==="BYMONTHDAY"?n.byMonthDay=D:o==="BYMONTH"?n.byMonth=D:n.bySetPos=D;break}case"WKST":{const u=k.indexOf(c);if(u<0)return!1;n.weekStart=u+1;break}default:return!1}}return n.frequency!==void 0}function V(e,n){const t=e.toUpperCase();if(t!==""&&t!==";VALUE=DATE"&&t!==";VALUE=DATE-TIME")return null;const r=[];for(const s of n.split(",")){const o=$(s.trim(),!1);if(!o||o.kind==="Instant"||t===";VALUE=DATE"&&o.kind!=="PlainDate"||t===";VALUE=DATE-TIME"&&o.kind!=="PlainDateTime")return null;r.push(o)}return r}function _(e){if(typeof e!="string")return null;const n=e.split(/\r?\n/).map(c=>c.trim()).filter(c=>c!=="");if(n.length===0)return null;const t={};let r=!1;const s=[],o=[];for(const c of n){const b=/^(RRULE|EXDATE|RDATE)((?:;[^:]*)?):(.+)$/i.exec(c);if(!b){if(n.length===1&&!r&&I(c,t)){r=!0;continue}return null}const u=(b[1]??"").toUpperCase(),D=b[2]??"",y=b[3]??"";if(u==="RRULE"){if(r||D!==""||!I(y,t))return null;r=!0}else{const R=V(D,y);if(!R)return null;(u==="EXDATE"?s:o).push(...R)}}if(!r||t.frequency===void 0)return null;try{return W({...t,exclusions:s,inclusions:o})}catch{return null}}function X(e){return T(e)==="RecurrenceRule"}export{p as dateKey,X as isRecurrenceRule,_ as parseRecurrenceRule,W as recurrenceRule,H as recurrenceRuleToString};
package/dist/render.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  const o=new WeakMap;function i(e,r){return o.set(e,r),e}function s(e){if(e==null||typeof e=="string")return;const r=o.get(e);if(r){o.delete(e);try{r()}catch(t){const n=globalThis.reportError;n?n(t):queueMicrotask(()=>{throw t})}}}function d(e){for(const r of e)s(r)}export{i as onNodeRelease,s as releaseNode,d as releaseNodes};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{validationError as f}from"../errors.js";const h="http://www.w3.org/1999/xhtml",l=Object.freeze({elements:Object.freeze({p:[],br:[],hr:[],strong:[],b:[],em:[],i:[],u:[],s:[],sub:[],sup:[],mark:[],small:[],span:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],ul:[],ol:[],li:[],blockquote:["cite"],pre:[],code:[],a:["href","title"]}),globalAttributes:Object.freeze(["lang","dir"]),urlSchemes:Object.freeze(["http","https","mailto"]),allowRelativeUrls:!0,maxLength:1e6}),b=new Set(["script","style","template","iframe","frame","frameset","object","embed","applet","base","link","meta","noscript","noembed","noframes","param","svg","math","xmp","plaintext","listing"]),y=new Set(["title","textarea","select","option","form","button","input","img","video","audio","source","track","canvas","picture","dialog","portal","head"]),T=new Set(["style","srcdoc","formaction","action","xmlns","is"]),S=new Set(["href","src","cite","poster","background","longdesc","usemap","data"]),L=256;let c;function w(e){if(c===void 0){const t=globalThis.trustedTypes;c=t?t.createPolicy("absoluteui",{createHTML:n=>n}):null}return c?c.createHTML(e):e}function P(e){return{elements:e?.elements??l.elements,globalAttributes:e?.globalAttributes??l.globalAttributes,urlSchemes:(e?.urlSchemes??l.urlSchemes).map(t=>t.toLowerCase()),allowRelativeUrls:e?.allowRelativeUrls??l.allowRelativeUrls,maxLength:e?.maxLength??l.maxLength}}function R(e,t,n){const r=e.replace(/[\t\n\r]/g,"").replace(/^[\u0000- ]+|[\u0000- ]+$/g,""),i=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(r)?.[1];if(i===void 0){if(!n)return!1;try{return new URL(r,"https://absoluteui.invalid/").protocol==="https:"}catch{return!1}}if(!t.includes(i.toLowerCase()))return!1;try{return t.includes(new URL(r).protocol.slice(0,-1).toLowerCase())}catch{return!1}}function x(e,t,n,r){for(const i of Array.from(e.attributes)){const o=i.name.toLowerCase();i.namespaceURI===null&&(o.startsWith("on")||T.has(o)||!n.includes(o)&&!r.globalAttributes.includes(o)||S.has(o)&&!R(i.value,r.urlSchemes,r.allowRelativeUrls)||o==="dir"&&!["ltr","rtl","auto"].includes(i.value.toLowerCase())||t.setAttribute(o,i.value))}t.localName==="a"&&t.hasAttribute("target")&&t.setAttribute("rel","noopener noreferrer")}function d(e,t,n,r,i){if(!(i>L))for(const o of Array.from(e.childNodes)){if(o.nodeType===Node.TEXT_NODE){t.appendChild(n.createTextNode(o.nodeValue??""));continue}if(o.nodeType!==Node.ELEMENT_NODE)continue;const a=o,s=a.localName.toLowerCase();if(a.namespaceURI!==h||b.has(s))continue;const m=Object.hasOwn(r.elements,s)?r.elements[s]:void 0;if(m){const u=n.createElement(s);x(a,u,m,r),t.appendChild(u),d(a,u,n,r,i+1)}else y.has(s)||d(a,t,n,r,i+1)}}function p(e,t,n=document){const r=P(t);if(typeof e!="string")throw f("SAN_INVALID_INPUT","Sanitizer input must be a string.",{property:"html",expected:"string"});if(e.length>r.maxLength)throw f("SAN_INPUT_TOO_LARGE","Sanitizer input exceeds the maximum length.",{property:"html",expected:`at most ${r.maxLength} characters`});const i=g(e,r,n),o=n.createElement("div");return o.appendChild(i),g(o.innerHTML,r,n)}function g(e,t,n){const r=new DOMParser().parseFromString(w(`<body>${e}`),"text/html"),i=n.createDocumentFragment();return d(r.body,i,n,t,0),i}function v(e,t){const n=document.createElement("div");return n.appendChild(p(e,t)),n.innerHTML}function z(e,t,n){e.replaceChildren(p(t,n,e.ownerDocument))}export{l as defaultSanitizePolicy,p as sanitizeHtml,v as sanitizeHtmlToString,z as setSanitizedHtml};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{getCommonConfig as f}from"../config/config.js";import{configurationError as D,validationError as g}from"../errors.js";import{fieldsToEpoch as M,intlTimeZoneEngine as E}from"./engine.js";import{instant as l,plainDate as Z,plainDateTime as x,plainTime as I}from"./types.js";const m=864e5;function c(){return f().timeZoneEngine??E}function T(n,e){if(!n.isValidTimeZone(e))throw D("TZ_INVALID_ZONE","Unsupported timezone identifier.",{property:"timeZone",expected:"IANA timezone identifier"})}function p(n){const{date:e,time:t}=n;return M(e.year,e.month,e.day,t.hour,t.minute,t.second,t.millisecond)}function d(n,e,t=c()){T(t,e);const o=p(n),i=new Set([t.getOffsetMs(o-m,e),t.getOffsetMs(o+m,e)]),s=new Set;for(const a of i){const r=o-a;t.getOffsetMs(r,e)===a&&s.add(r)}return[...s].sort((a,r)=>a-r).map(l)}function C(n,e,t){const o=d(n,e,t).length;return o===1?"exact":o>1?"ambiguous":"nonexistent"}function U(n,e,t=f().disambiguation,o=c()){const i=d(n,e,o),[s,a]=i;if(s&&!a)return s;if(s&&a){if(t==="reject")throw g("TZ_AMBIGUOUS_TIME","The local time is ambiguous in the selected timezone.",{property:"value",remediation:"Choose an explicit disambiguation or a different time."});return t==="later"?a:s}if(t==="reject")throw g("TZ_NONEXISTENT_TIME","The local time does not exist in the selected timezone.",{property:"value",remediation:"Choose a time outside the daylight-saving gap."});const r=p(n),u=o.getOffsetMs(r-m,e),h=o.getOffsetMs(r+m,e);return l(t==="earlier"?r-h:r-u)}function _(n,e,t=c()){const o=e??(n.kind==="ZonedDateTime"?n.timeZone:f().timezone);T(t,o);const i=new Date(n.epochMilliseconds+t.getOffsetMs(n.epochMilliseconds,o));return x(Z(i.getUTCFullYear(),i.getUTCMonth()+1,i.getUTCDate()),I(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()))}function w(n,e,t=c()){return T(t,e),Object.freeze({kind:"ZonedDateTime",epochMilliseconds:n.epochMilliseconds,timeZone:e})}function z(n,e,t=c()){const o=Math.round(t.getOffsetMs(n.epochMilliseconds,e)/6e4),i=o<0?"-":"+",s=Math.abs(o);return`${i}${String(Math.floor(s/60)).padStart(2,"0")}:${String(s%60).padStart(2,"0")}`}function P(){return l(Date.now())}export{z as formatOffset,C as getLocalTimeStatus,d as getPossibleInstants,c as getTimeZoneEngine,P as now,U as toInstant,_ as toPlainDateTime,w as zonedDateTime};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{isValidTimeZone as f,offsetAt as l}from"@absoluteui/helpers/timezone";function T(e,n,o,t=0,r=0,s=0,m=0){const i=new Date(0);return i.setUTCFullYear(e,n-1,o),i.setUTCHours(t,r,s,m),i.getTime()}const g={getOffsetMs:(e,n)=>l(e,n),isValidTimeZone:e=>f(e)};export{T as fieldsToEpoch,g as intlTimeZoneEngine};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/core v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/core v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{addDays as P,addMonths as T,daysInMonth as D,isLeapYear as x,isoWeekday as g}from"@absoluteui/helpers/date";import{isHelperError as $}from"@absoluteui/helpers/error";import{validationError as c}from"../errors.js";function Z(n){return x(n)}function M(n,e){return D(n,e)}function y(n){try{return n()}catch(e){throw $(e)?c("DT_OUT_OF_RANGE","Date/time field out of range.",{property:"date",expected:`year within +/-${String(d)}`}):e}}const d=275759;function i(n,e,r,t){if(!Number.isInteger(n)||n<e||n>r)throw c("DT_OUT_OF_RANGE","Date/time field out of range.",{property:t,expected:`integer ${e}..${r}`})}function Y(n,e,r){return i(n,-d,d,"year"),i(e,1,12,"month"),i(r,1,M(n,e),"day"),Object.freeze({kind:"PlainDate",year:n,month:e,day:r})}function h(n,e=0,r=0,t=0){return i(n,0,23,"hour"),i(e,0,59,"minute"),i(r,0,59,"second"),i(t,0,999,"millisecond"),Object.freeze({kind:"PlainTime",hour:n,minute:e,second:r,millisecond:t})}function q(n,e=h(0)){return Object.freeze({kind:"PlainDateTime",date:n,time:e})}function _(n){if(!Number.isFinite(n)||Math.abs(n)>864e13)throw c("DT_OUT_OF_RANGE","Instant out of range.",{property:"epochMilliseconds",expected:"finite number within +/-8.64e15"});return Object.freeze({kind:"Instant",epochMilliseconds:n})}function N(n){if(!Number.isFinite(n))throw c("DT_OUT_OF_RANGE","Duration out of range.",{property:"milliseconds",expected:"finite number"});return Object.freeze({kind:"Duration",milliseconds:n})}function E(n,e){const r=n.year*1e4+n.month*100+n.day,t=e.year*1e4+e.month*100+e.day;return r<t?-1:r>t?1:0}function G(n,e){return n===null||e===null?n===e:E(n,e)===0}function W(n){return g(n)}function C(n,e){return y(()=>P(n,Math.trunc(e)))}function L(n,e){return y(()=>T(n,Math.trunc(e)))}const o=(n,e=2)=>String(Math.abs(n)).padStart(e,"0");function b(n){return n>=0&&n<=9999?o(n,4):`${n<0?"-":"+"}${o(n,6)}`}function X(n){return`${b(n.year)}-${o(n.month)}-${o(n.day)}`}function B(n){const e=`${o(n.hour)}:${o(n.minute)}:${o(n.second)}`;return n.millisecond?`${e}.${o(n.millisecond,3)}`:e}const I=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,O=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/;function S(n){const e=I.exec(n);if(!e)return null;const r=Number(e[1]);if(e[1]==="-000000")return null;try{return Y(r,Number(e[2]),Number(e[3]))}catch{return null}}function R(n){const e=O.exec(n);if(!e)return null;try{return h(Number(e[1]),Number(e[2]),Number(e[3]??0),Number((e[4]??"0").padEnd(3,"0")))}catch{return null}}const k=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;function J(n){const e=k.exec(n);if(!e)return null;const r=S(`${e[1]??""}-${e[2]??""}-${e[3]??""}`),t=R(`${e[4]??""}:${e[5]??""}:${e[6]??"00"}${e[7]?`.${e[7]}`:""}`);if(!r||!t)return null;const a=e[8]??"Z";let u=0;if(a!=="Z"){const s=a.startsWith("-")?-1:1,[f,p]=a.slice(1).split(":").map(Number);if(f===void 0||p===void 0||f>23||p>59)return null;u=s*(f*36e5+p*6e4)}const l=new Date(0);return l.setUTCFullYear(r.year,r.month-1,r.day),l.setUTCHours(t.hour,t.minute,t.second,t.millisecond),_(l.getTime()-u)}function K(n){return new Date(n.epochMilliseconds).toISOString()}function Q(n,e){return i(n,-d,d,"year"),i(e,1,12,"month"),Object.freeze({kind:"PlainYearMonth",year:n,month:e})}function A(n,e){return i(n,-d,d,"year"),i(e,1,4,"quarter"),Object.freeze({kind:"PlainYearQuarter",year:n,quarter:e})}function V(n,e){const r=n.year*12+n.month,t=e.year*12+e.month;return r<t?-1:r>t?1:0}function v(n,e){const r=n.year*4+n.quarter,t=e.year*4+e.quarter;return r<t?-1:r>t?1:0}function nn(n){return`${b(n.year)}-${o(n.month)}`}function en(n){return`${b(n.year)}-Q${String(n.quarter)}`}const w=/^([+-]\d{6}|\d{4})-(\d{2})$/,U=/^([+-]\d{6}|\d{4})-Q([1-4])$/;function rn(n){const e=w.exec(n);if(!e||e[1]==="-000000")return null;try{return Q(Number(e[1]),Number(e[2]))}catch{return null}}function tn(n){const e=U.exec(n);if(!e||e[1]==="-000000")return null;try{return A(Number(e[1]),Number(e[2]))}catch{return null}}const m=36e5,z=/^(-)?P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)(?:[.,](\d{1,3}))?S)?)?$/;function an(n){const e=Math.round(n.milliseconds);let r=Math.abs(e);const t=Math.floor(r/m);r-=t*m;const a=Math.floor(r/6e4);r-=a*6e4;const u=Math.floor(r/1e3),l=r-u*1e3;let s="";return t&&(s+=`${String(t)}H`),a&&(s+=`${String(a)}M`),(u||l||s==="")&&(s+=`${String(u)}${l?`.${o(l,3).replace(/0+$/,"")}`:""}S`),`${e<0?"-":""}PT${s}`}function on(n){const e=z.exec(n);if(!e||n.endsWith("T")||!/\d/.test(n))return null;const r=u=>Number(e[u]??0),t=Number((e[6]??"0").padEnd(3,"0")),a=r(2)*24*m+r(3)*m+r(4)*6e4+r(5)*1e3+t;return Number.isSafeInteger(a)?N(e[1]&&a!==0?-a:a):null}export{C as addDays,L as addMonths,E as comparePlainDate,V as comparePlainYearMonth,v as comparePlainYearQuarter,W as dayOfWeek,M as daysInMonth,N as duration,an as durationToString,_ as instant,K as instantToString,Z as isLeapYear,on as parseDuration,J as parseInstant,S as parsePlainDate,R as parsePlainTime,rn as parsePlainYearMonth,tn as parsePlainYearQuarter,Y as plainDate,q as plainDateTime,X as plainDateToString,G as plainDatesEqual,h as plainTime,B as plainTimeToString,Q as plainYearMonth,nn as plainYearMonthToString,A as plainYearQuarter,en as plainYearQuarterToString};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absoluteui/core",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "AbsoluteUI core: configuration, diagnostics, i18n, timezone, and sanitization engines.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -32,6 +32,6 @@
32
32
  "./package.json": "./package.json"
33
33
  },
34
34
  "dependencies": {
35
- "@absoluteui/helpers": "0.13.2"
35
+ "@absoluteui/helpers": "0.13.3"
36
36
  }
37
37
  }