@peektravel/app-utilities 0.7.3 → 0.8.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/README.md +17 -0
- package/dist/index.cjs +199 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -1
- package/dist/index.d.ts +118 -1
- package/dist/index.js +199 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/index.cjs +11 -0
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +16 -1
- package/dist/ui/index.d.ts +16 -1
- package/dist/ui/index.js +10 -1
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/odyssey.css +30 -0
- package/docs/ui.md +27 -0
- package/llms.txt +22 -2
- package/package.json +1 -1
package/dist/ui/index.d.cts
CHANGED
|
@@ -125,6 +125,21 @@ declare function classes(...parts: Array<string | false | null | undefined>): st
|
|
|
125
125
|
* (and against running in a non-DOM environment such as a Node import).
|
|
126
126
|
*/
|
|
127
127
|
declare function define(tag: string, ctor: CustomElementConstructor): void;
|
|
128
|
+
/** A snapshot of the `<ody-*>` tags registered so far, in registration order. */
|
|
129
|
+
declare function registeredTags(): readonly string[];
|
|
130
|
+
/**
|
|
131
|
+
* Resolve once every `<ody-*>` element imported so far has upgraded, giving an
|
|
132
|
+
* app a single readiness signal to gate its first render on — so it never paints
|
|
133
|
+
* an un-upgraded element as its raw text content (the FOUC the `:not(:defined)`
|
|
134
|
+
* guard in `odyssey.css` also covers). Because importing
|
|
135
|
+
* `@peektravel/app-utilities/ui` registers synchronously, this is typically
|
|
136
|
+
* already resolved by the time a consumer can await it; it earns its keep when
|
|
137
|
+
* registration is loaded lazily/async.
|
|
138
|
+
*
|
|
139
|
+
* Note: a *failed* dynamic import of the registration chunk rejects at the
|
|
140
|
+
* `import()` call site, not here — this reflects only elements that did register.
|
|
141
|
+
*/
|
|
142
|
+
declare function whenOdysseyReady(): Promise<void>;
|
|
128
143
|
|
|
129
144
|
type OdyIconSize = 'extra-small' | 'mid-small' | 'small' | 'base' | 'medium' | 'large' | 'free';
|
|
130
145
|
/**
|
|
@@ -1709,4 +1724,4 @@ declare function removePortal(node: Node): void;
|
|
|
1709
1724
|
*/
|
|
1710
1725
|
declare function position(anchor: Element, floating: Element, placement?: OdyPlacement, gap?: number): OdyPosition;
|
|
1711
1726
|
|
|
1712
|
-
export { OdyAccordion, OdyAlert, type OdyAlertVariant, OdyAppPageContainer, OdyBrandIcon, type OdyBrandIconSize, OdyBreadcrumb, OdyBreadcrumbItem, OdyButton, type OdyButtonAppearance, type OdyButtonSize, type OdyButtonVariant, OdyCard, OdyCheckInStatus, type OdyCheckInStatusValue, OdyCheckbox, OdyCheckboxGroup, type OdyCheckboxGroupSize, type OdyCheckboxOption, type OdyCheckboxSize, OdyCollapsible, OdyCollapsibleCollapsed, OdyCollapsibleContent, OdyCollapsibleSection, OdyCopyButton, type OdyDateDisallowed, OdyDatePicker, type OdyDatePreset, OdyDivider, type OdyDividerSpacing, OdyDropdownMulti, OdyDropdownSingle, OdyElement, OdyEmptyState, type OdyEmptyStateVariant, OdyHorizontalDivider, OdyIcon, type OdyIconData, type OdyIconSize, OdyInlineInput, type OdyInlineInputSize, OdyInlineList, OdyInlineListItem, type OdyInlineListSeparator, OdyInput, type OdyInputSize, type OdyInputState, OdyListItem, OdyLoadingBar, OdyLoadingSpinner, OdyMessage, OdyModal, type OdyModalSize, OdyMoneyInput, type OdyMoneyInputSize, OdyOption, OdyPageContainer, OdyPanel, OdyPercentageInput, type OdyPercentageInputSize, type OdyPlacement, OdyPopover, type OdyPosition, OdyProductIndicator, type OdyProductIndicatorSize, OdyRadioButtonGroup, type OdyRadioButtonGroupSize, type OdyRadioOption, OdySearchInput, type OdySearchInputSize, OdySectionColumnItem, OdySectionColumns, type OdySectionGap, OdySectionRowItem, OdySectionRows, type OdySectionVerticalAlign, OdySelectBase, type OdySelectOption, type OdySortDirection$1 as OdySortDirection, type OdySpinnerSize, OdySplitButton, OdyStat, OdyStatDetail, OdyStatSummary, OdyStatSummaryDetail, type OdyStatTone, OdyStatusDot, type OdyStatusDotColor, type OdyTabDef, OdyTable, type OdyTableAlign, type OdyTableColumn, OdyTableHeader, type OdyTableRow, type OdyTableRowClickDetail, type OdyTableSelectionChangeDetail, type OdyTableSortChangeDetail, type OdySortDirection as OdyTableSortDirection, OdyTabs, type OdyTabsPosition, type OdyTabsSize, OdyTag, type OdyTagColor, type OdyTagSize, type OdyTagVariant, type OdyTermKey, type OdyTerms, OdyToastHost, type OdyToastOptions, type OdyToastVariant, OdyToggleButton, type OdyToggleButtonSize, type OdyToggleOption, OdyTooltip, OdyTwoColumn, OdyTwoColumnMain, OdyTwoColumnSecondary, OdyTwoColumnSecondaryHeader, brandIconNames, brandIconSvg, classes, define, escapeHtml, hasBrandIcon, hasIcon, iconNames, iconSvg, parseOptions, portal, position, registerIcon, registerTranslation, removePortal, renderIconSvg, toast };
|
|
1727
|
+
export { OdyAccordion, OdyAlert, type OdyAlertVariant, OdyAppPageContainer, OdyBrandIcon, type OdyBrandIconSize, OdyBreadcrumb, OdyBreadcrumbItem, OdyButton, type OdyButtonAppearance, type OdyButtonSize, type OdyButtonVariant, OdyCard, OdyCheckInStatus, type OdyCheckInStatusValue, OdyCheckbox, OdyCheckboxGroup, type OdyCheckboxGroupSize, type OdyCheckboxOption, type OdyCheckboxSize, OdyCollapsible, OdyCollapsibleCollapsed, OdyCollapsibleContent, OdyCollapsibleSection, OdyCopyButton, type OdyDateDisallowed, OdyDatePicker, type OdyDatePreset, OdyDivider, type OdyDividerSpacing, OdyDropdownMulti, OdyDropdownSingle, OdyElement, OdyEmptyState, type OdyEmptyStateVariant, OdyHorizontalDivider, OdyIcon, type OdyIconData, type OdyIconSize, OdyInlineInput, type OdyInlineInputSize, OdyInlineList, OdyInlineListItem, type OdyInlineListSeparator, OdyInput, type OdyInputSize, type OdyInputState, OdyListItem, OdyLoadingBar, OdyLoadingSpinner, OdyMessage, OdyModal, type OdyModalSize, OdyMoneyInput, type OdyMoneyInputSize, OdyOption, OdyPageContainer, OdyPanel, OdyPercentageInput, type OdyPercentageInputSize, type OdyPlacement, OdyPopover, type OdyPosition, OdyProductIndicator, type OdyProductIndicatorSize, OdyRadioButtonGroup, type OdyRadioButtonGroupSize, type OdyRadioOption, OdySearchInput, type OdySearchInputSize, OdySectionColumnItem, OdySectionColumns, type OdySectionGap, OdySectionRowItem, OdySectionRows, type OdySectionVerticalAlign, OdySelectBase, type OdySelectOption, type OdySortDirection$1 as OdySortDirection, type OdySpinnerSize, OdySplitButton, OdyStat, OdyStatDetail, OdyStatSummary, OdyStatSummaryDetail, type OdyStatTone, OdyStatusDot, type OdyStatusDotColor, type OdyTabDef, OdyTable, type OdyTableAlign, type OdyTableColumn, OdyTableHeader, type OdyTableRow, type OdyTableRowClickDetail, type OdyTableSelectionChangeDetail, type OdyTableSortChangeDetail, type OdySortDirection as OdyTableSortDirection, OdyTabs, type OdyTabsPosition, type OdyTabsSize, OdyTag, type OdyTagColor, type OdyTagSize, type OdyTagVariant, type OdyTermKey, type OdyTerms, OdyToastHost, type OdyToastOptions, type OdyToastVariant, OdyToggleButton, type OdyToggleButtonSize, type OdyToggleOption, OdyTooltip, OdyTwoColumn, OdyTwoColumnMain, OdyTwoColumnSecondary, OdyTwoColumnSecondaryHeader, brandIconNames, brandIconSvg, classes, define, escapeHtml, hasBrandIcon, hasIcon, iconNames, iconSvg, parseOptions, portal, position, registerIcon, registerTranslation, registeredTags, removePortal, renderIconSvg, toast, whenOdysseyReady };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -125,6 +125,21 @@ declare function classes(...parts: Array<string | false | null | undefined>): st
|
|
|
125
125
|
* (and against running in a non-DOM environment such as a Node import).
|
|
126
126
|
*/
|
|
127
127
|
declare function define(tag: string, ctor: CustomElementConstructor): void;
|
|
128
|
+
/** A snapshot of the `<ody-*>` tags registered so far, in registration order. */
|
|
129
|
+
declare function registeredTags(): readonly string[];
|
|
130
|
+
/**
|
|
131
|
+
* Resolve once every `<ody-*>` element imported so far has upgraded, giving an
|
|
132
|
+
* app a single readiness signal to gate its first render on — so it never paints
|
|
133
|
+
* an un-upgraded element as its raw text content (the FOUC the `:not(:defined)`
|
|
134
|
+
* guard in `odyssey.css` also covers). Because importing
|
|
135
|
+
* `@peektravel/app-utilities/ui` registers synchronously, this is typically
|
|
136
|
+
* already resolved by the time a consumer can await it; it earns its keep when
|
|
137
|
+
* registration is loaded lazily/async.
|
|
138
|
+
*
|
|
139
|
+
* Note: a *failed* dynamic import of the registration chunk rejects at the
|
|
140
|
+
* `import()` call site, not here — this reflects only elements that did register.
|
|
141
|
+
*/
|
|
142
|
+
declare function whenOdysseyReady(): Promise<void>;
|
|
128
143
|
|
|
129
144
|
type OdyIconSize = 'extra-small' | 'mid-small' | 'small' | 'base' | 'medium' | 'large' | 'free';
|
|
130
145
|
/**
|
|
@@ -1709,4 +1724,4 @@ declare function removePortal(node: Node): void;
|
|
|
1709
1724
|
*/
|
|
1710
1725
|
declare function position(anchor: Element, floating: Element, placement?: OdyPlacement, gap?: number): OdyPosition;
|
|
1711
1726
|
|
|
1712
|
-
export { OdyAccordion, OdyAlert, type OdyAlertVariant, OdyAppPageContainer, OdyBrandIcon, type OdyBrandIconSize, OdyBreadcrumb, OdyBreadcrumbItem, OdyButton, type OdyButtonAppearance, type OdyButtonSize, type OdyButtonVariant, OdyCard, OdyCheckInStatus, type OdyCheckInStatusValue, OdyCheckbox, OdyCheckboxGroup, type OdyCheckboxGroupSize, type OdyCheckboxOption, type OdyCheckboxSize, OdyCollapsible, OdyCollapsibleCollapsed, OdyCollapsibleContent, OdyCollapsibleSection, OdyCopyButton, type OdyDateDisallowed, OdyDatePicker, type OdyDatePreset, OdyDivider, type OdyDividerSpacing, OdyDropdownMulti, OdyDropdownSingle, OdyElement, OdyEmptyState, type OdyEmptyStateVariant, OdyHorizontalDivider, OdyIcon, type OdyIconData, type OdyIconSize, OdyInlineInput, type OdyInlineInputSize, OdyInlineList, OdyInlineListItem, type OdyInlineListSeparator, OdyInput, type OdyInputSize, type OdyInputState, OdyListItem, OdyLoadingBar, OdyLoadingSpinner, OdyMessage, OdyModal, type OdyModalSize, OdyMoneyInput, type OdyMoneyInputSize, OdyOption, OdyPageContainer, OdyPanel, OdyPercentageInput, type OdyPercentageInputSize, type OdyPlacement, OdyPopover, type OdyPosition, OdyProductIndicator, type OdyProductIndicatorSize, OdyRadioButtonGroup, type OdyRadioButtonGroupSize, type OdyRadioOption, OdySearchInput, type OdySearchInputSize, OdySectionColumnItem, OdySectionColumns, type OdySectionGap, OdySectionRowItem, OdySectionRows, type OdySectionVerticalAlign, OdySelectBase, type OdySelectOption, type OdySortDirection$1 as OdySortDirection, type OdySpinnerSize, OdySplitButton, OdyStat, OdyStatDetail, OdyStatSummary, OdyStatSummaryDetail, type OdyStatTone, OdyStatusDot, type OdyStatusDotColor, type OdyTabDef, OdyTable, type OdyTableAlign, type OdyTableColumn, OdyTableHeader, type OdyTableRow, type OdyTableRowClickDetail, type OdyTableSelectionChangeDetail, type OdyTableSortChangeDetail, type OdySortDirection as OdyTableSortDirection, OdyTabs, type OdyTabsPosition, type OdyTabsSize, OdyTag, type OdyTagColor, type OdyTagSize, type OdyTagVariant, type OdyTermKey, type OdyTerms, OdyToastHost, type OdyToastOptions, type OdyToastVariant, OdyToggleButton, type OdyToggleButtonSize, type OdyToggleOption, OdyTooltip, OdyTwoColumn, OdyTwoColumnMain, OdyTwoColumnSecondary, OdyTwoColumnSecondaryHeader, brandIconNames, brandIconSvg, classes, define, escapeHtml, hasBrandIcon, hasIcon, iconNames, iconSvg, parseOptions, portal, position, registerIcon, registerTranslation, removePortal, renderIconSvg, toast };
|
|
1727
|
+
export { OdyAccordion, OdyAlert, type OdyAlertVariant, OdyAppPageContainer, OdyBrandIcon, type OdyBrandIconSize, OdyBreadcrumb, OdyBreadcrumbItem, OdyButton, type OdyButtonAppearance, type OdyButtonSize, type OdyButtonVariant, OdyCard, OdyCheckInStatus, type OdyCheckInStatusValue, OdyCheckbox, OdyCheckboxGroup, type OdyCheckboxGroupSize, type OdyCheckboxOption, type OdyCheckboxSize, OdyCollapsible, OdyCollapsibleCollapsed, OdyCollapsibleContent, OdyCollapsibleSection, OdyCopyButton, type OdyDateDisallowed, OdyDatePicker, type OdyDatePreset, OdyDivider, type OdyDividerSpacing, OdyDropdownMulti, OdyDropdownSingle, OdyElement, OdyEmptyState, type OdyEmptyStateVariant, OdyHorizontalDivider, OdyIcon, type OdyIconData, type OdyIconSize, OdyInlineInput, type OdyInlineInputSize, OdyInlineList, OdyInlineListItem, type OdyInlineListSeparator, OdyInput, type OdyInputSize, type OdyInputState, OdyListItem, OdyLoadingBar, OdyLoadingSpinner, OdyMessage, OdyModal, type OdyModalSize, OdyMoneyInput, type OdyMoneyInputSize, OdyOption, OdyPageContainer, OdyPanel, OdyPercentageInput, type OdyPercentageInputSize, type OdyPlacement, OdyPopover, type OdyPosition, OdyProductIndicator, type OdyProductIndicatorSize, OdyRadioButtonGroup, type OdyRadioButtonGroupSize, type OdyRadioOption, OdySearchInput, type OdySearchInputSize, OdySectionColumnItem, OdySectionColumns, type OdySectionGap, OdySectionRowItem, OdySectionRows, type OdySectionVerticalAlign, OdySelectBase, type OdySelectOption, type OdySortDirection$1 as OdySortDirection, type OdySpinnerSize, OdySplitButton, OdyStat, OdyStatDetail, OdyStatSummary, OdyStatSummaryDetail, type OdyStatTone, OdyStatusDot, type OdyStatusDotColor, type OdyTabDef, OdyTable, type OdyTableAlign, type OdyTableColumn, OdyTableHeader, type OdyTableRow, type OdyTableRowClickDetail, type OdyTableSelectionChangeDetail, type OdyTableSortChangeDetail, type OdySortDirection as OdyTableSortDirection, OdyTabs, type OdyTabsPosition, type OdyTabsSize, OdyTag, type OdyTagColor, type OdyTagSize, type OdyTagVariant, type OdyTermKey, type OdyTerms, OdyToastHost, type OdyToastOptions, type OdyToastVariant, OdyToggleButton, type OdyToggleButtonSize, type OdyToggleOption, OdyTooltip, OdyTwoColumn, OdyTwoColumnMain, OdyTwoColumnSecondary, OdyTwoColumnSecondaryHeader, brandIconNames, brandIconSvg, classes, define, escapeHtml, hasBrandIcon, hasIcon, iconNames, iconSvg, parseOptions, portal, position, registerIcon, registerTranslation, registeredTags, removePortal, renderIconSvg, toast, whenOdysseyReady };
|
package/dist/ui/index.js
CHANGED
|
@@ -289,11 +289,20 @@ function addReactSafeSetters(ctor) {
|
|
|
289
289
|
proto = Object.getPrototypeOf(proto);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
+
var registered = [];
|
|
292
293
|
function define(tag, ctor) {
|
|
293
294
|
if (typeof customElements === "undefined") return;
|
|
294
295
|
if (customElements.get(tag)) return;
|
|
295
296
|
addReactSafeSetters(ctor);
|
|
296
297
|
customElements.define(tag, ctor);
|
|
298
|
+
registered.push(tag);
|
|
299
|
+
}
|
|
300
|
+
function registeredTags() {
|
|
301
|
+
return registered.slice();
|
|
302
|
+
}
|
|
303
|
+
function whenOdysseyReady() {
|
|
304
|
+
if (typeof customElements === "undefined") return Promise.resolve();
|
|
305
|
+
return Promise.all(registered.map((tag) => customElements.whenDefined(tag))).then(() => void 0);
|
|
297
306
|
}
|
|
298
307
|
|
|
299
308
|
// src/ui/icons-data.ts
|
|
@@ -4378,6 +4387,6 @@ var OdyBrandIcon = class extends OdyElement {
|
|
|
4378
4387
|
};
|
|
4379
4388
|
define("ody-brand-icon", OdyBrandIcon);
|
|
4380
4389
|
|
|
4381
|
-
export { OdyAccordion, OdyAlert, OdyAppPageContainer, OdyBrandIcon, OdyBreadcrumb, OdyBreadcrumbItem, OdyButton, OdyCard, OdyCheckInStatus, OdyCheckbox, OdyCheckboxGroup, OdyCollapsible, OdyCollapsibleCollapsed, OdyCollapsibleContent, OdyCollapsibleSection, OdyCopyButton, OdyDatePicker, OdyDivider, OdyDropdownMulti, OdyDropdownSingle, OdyElement, OdyEmptyState, OdyHorizontalDivider, OdyIcon, OdyInlineInput, OdyInlineList, OdyInlineListItem, OdyInput, OdyListItem, OdyLoadingBar, OdyLoadingSpinner, OdyMessage, OdyModal, OdyMoneyInput, OdyOption, OdyPageContainer, OdyPanel, OdyPercentageInput, OdyPopover, OdyProductIndicator, OdyRadioButtonGroup, OdySearchInput, OdySectionColumnItem, OdySectionColumns, OdySectionRowItem, OdySectionRows, OdySelectBase, OdySplitButton, OdyStat, OdyStatDetail, OdyStatSummary, OdyStatSummaryDetail, OdyStatusDot, OdyTable, OdyTableHeader, OdyTabs, OdyTag, OdyToastHost, OdyToggleButton, OdyTooltip, OdyTwoColumn, OdyTwoColumnMain, OdyTwoColumnSecondary, OdyTwoColumnSecondaryHeader, brandIconNames, brandIconSvg, classes, define, escapeHtml, hasBrandIcon, hasIcon, iconNames, iconSvg, parseOptions3 as parseOptions, portal, position, registerIcon, registerTranslation, removePortal, renderIconSvg, toast };
|
|
4390
|
+
export { OdyAccordion, OdyAlert, OdyAppPageContainer, OdyBrandIcon, OdyBreadcrumb, OdyBreadcrumbItem, OdyButton, OdyCard, OdyCheckInStatus, OdyCheckbox, OdyCheckboxGroup, OdyCollapsible, OdyCollapsibleCollapsed, OdyCollapsibleContent, OdyCollapsibleSection, OdyCopyButton, OdyDatePicker, OdyDivider, OdyDropdownMulti, OdyDropdownSingle, OdyElement, OdyEmptyState, OdyHorizontalDivider, OdyIcon, OdyInlineInput, OdyInlineList, OdyInlineListItem, OdyInput, OdyListItem, OdyLoadingBar, OdyLoadingSpinner, OdyMessage, OdyModal, OdyMoneyInput, OdyOption, OdyPageContainer, OdyPanel, OdyPercentageInput, OdyPopover, OdyProductIndicator, OdyRadioButtonGroup, OdySearchInput, OdySectionColumnItem, OdySectionColumns, OdySectionRowItem, OdySectionRows, OdySelectBase, OdySplitButton, OdyStat, OdyStatDetail, OdyStatSummary, OdyStatSummaryDetail, OdyStatusDot, OdyTable, OdyTableHeader, OdyTabs, OdyTag, OdyToastHost, OdyToggleButton, OdyTooltip, OdyTwoColumn, OdyTwoColumnMain, OdyTwoColumnSecondary, OdyTwoColumnSecondaryHeader, brandIconNames, brandIconSvg, classes, define, escapeHtml, hasBrandIcon, hasIcon, iconNames, iconSvg, parseOptions3 as parseOptions, portal, position, registerIcon, registerTranslation, registeredTags, removePortal, renderIconSvg, toast, whenOdysseyReady };
|
|
4382
4391
|
//# sourceMappingURL=index.js.map
|
|
4383
4392
|
//# sourceMappingURL=index.js.map
|