@awc-ui/react 1.0.1 → 1.2.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.
@@ -8,9 +8,9 @@
8
8
  /* eslint-disable */
9
9
 
10
10
  import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
11
- import { createComponent, type HydrateModule, type SerializeShadowRootOptions } from '@stencil/react-output-target/ssr';
11
+ import { createComponent, type HydrateModule, type SerializeShadowRootOptions } from './ssr-runtime.js';
12
12
 
13
- import { type MdAccordionCustomEvent, type MdAccordionDragDetail, type MdAccordionItemCustomEvent, type MdAppBarCustomEvent, type MdAreaChartCustomEvent, type MdAutocompleteCustomEvent, type MdAvatarCustomEvent, type MdBarChartCustomEvent, type MdBottomSheetCustomEvent, type MdBreadcrumbItemCustomEvent, type MdBreadcrumbSelectDetail, type MdBreadcrumbsCustomEvent, type MdBreadcrumbsExpandDetail, type MdButtonChangeDetail, type MdButtonClickDetail, type MdButtonCustomEvent, type MdButtonGroupChangeDetail, type MdButtonGroupCustomEvent, type MdCardCustomEvent, type MdCardDragDetail, type MdChartAxisClickDetail, type MdChartClickDetail, type MdChartHoverDetail, type MdChartSeries, type MdChartXYSeries, type MdCheckboxCustomEvent, type MdChipCustomEvent, type MdColorPickerCustomEvent, type MdDatePickerChangeDetail, type MdDatePickerCustomEvent, type MdDatePickerMenuOpenDetail, type MdDatePickerMenuSelectDetail, type MdDatePickerModeChangeDetail, type MdDatePickerSelectedDetail, type MdDatePickerViewChangeDetail, type MdDialogCustomEvent, type MdFabCustomEvent, type MdFabMenuCustomEvent, type MdFabMenuItemCustomEvent, type MdIconButtonCustomEvent, type MdLineChartCustomEvent, type MdListCustomEvent, type MdListItemCustomEvent, type MdListItemExpandDetail, type MdListSelectDetail, type MdMenuCustomEvent, type MdMenuItemCustomEvent, type MdMultiSelectCustomEvent, type MdNavigationBarCustomEvent, type MdNavigationRailCustomEvent, type MdNavigationRailTabCustomEvent, type MdNavigationTabCustomEvent, type MdNumberFieldChangeDetail, type MdNumberFieldCustomEvent, type MdOrganizationChartCustomEvent, type MdOtpFieldCompleteDetail, type MdOtpFieldCustomEvent, type MdOtpFieldInvalidDetail, type MdOtpFieldValidityDetail, type MdPieChartCustomEvent, type MdPieDatum, type MdProgressIndicatorCustomEvent, type MdRadioCustomEvent, type MdRatingCustomEvent, type MdSearchCustomEvent, type MdSearchLeadingIconClickDetail, type MdSearchTrailingIconClickDetail, type MdSegmentedButtonCustomEvent, type MdSegmentedButtonSetCustomEvent, type MdSelectCustomEvent, type MdSelectOptionCustomEvent, type MdSideSheetCustomEvent, type MdSliderCustomEvent, type MdSliderDragDetail, type MdSliderThumbDetail, type MdSliderValueDetail, type MdSnackbarCustomEvent, type MdSparklineCustomEvent, type MdSplitButtonCustomEvent, type MdStepCustomEvent, type MdStepperCustomEvent, type MdSubMenuItemCustomEvent, type MdSwitchCustomEvent, type MdTabCustomEvent, type MdTableCustomEvent, type MdTablePaginationCustomEvent, type MdTableRowCustomEvent, type MdTableSelectionState, type MdTableSortLabelCustomEvent, type MdTableSortState, type MdTabsCustomEvent, type MdTextFieldCustomEvent, type MdTimePickerChangeDetail, type MdTimePickerCustomEvent, type MdTimePickerModeChangeDetail, type MdTooltipCustomEvent, type MdTransferListCustomEvent, type OrgChartSelectionChangeDetail, type OrgChartToggleDetail } from "@awc-ui/core";
13
+ import { type MdAccordionCustomEvent, type MdAccordionDragDetail, type MdAccordionItemCustomEvent, type MdAppBarCustomEvent, type MdAreaChartCustomEvent, type MdAutocompleteCustomEvent, type MdAvatarCustomEvent, type MdBarChartCustomEvent, type MdBottomSheetCustomEvent, type MdBreadcrumbItemCustomEvent, type MdBreadcrumbSelectDetail, type MdBreadcrumbsCustomEvent, type MdBreadcrumbsExpandDetail, type MdButtonChangeDetail, type MdButtonClickDetail, type MdButtonCustomEvent, type MdButtonGroupChangeDetail, type MdButtonGroupCustomEvent, type MdCardCustomEvent, type MdCardDragDetail, type MdChartAxisClickDetail, type MdChartClickDetail, type MdChartHoverDetail, type MdChartSeriesData, type MdChartXYSeries, type MdCheckboxCustomEvent, type MdChipCustomEvent, type MdColorPickerCustomEvent, type MdDatePickerChangeDetail, type MdDatePickerCustomEvent, type MdDatePickerMenuOpenDetail, type MdDatePickerMenuSelectDetail, type MdDatePickerModeChangeDetail, type MdDatePickerSelectedDetail, type MdDatePickerViewChangeDetail, type MdDialogCustomEvent, type MdFabCustomEvent, type MdFabMenuCustomEvent, type MdFabMenuItemCustomEvent, type MdIconButtonCustomEvent, type MdLineChartCustomEvent, type MdListCustomEvent, type MdListItemCustomEvent, type MdListItemExpandDetail, type MdListSelectDetail, type MdMenuCustomEvent, type MdMenuItemCustomEvent, type MdMultiSelectCustomEvent, type MdNavigationBarCustomEvent, type MdNavigationRailCustomEvent, type MdNavigationRailTabCustomEvent, type MdNavigationTabCustomEvent, type MdNumberFieldChangeDetail, type MdNumberFieldCustomEvent, type MdOrganizationChartCustomEvent, type MdOtpFieldCompleteDetail, type MdOtpFieldCustomEvent, type MdOtpFieldInvalidDetail, type MdOtpFieldValidityDetail, type MdPieChartCustomEvent, type MdPieDatum, type MdProgressIndicatorCustomEvent, type MdRadioCustomEvent, type MdRatingCustomEvent, type MdSearchCustomEvent, type MdSearchLeadingIconClickDetail, type MdSearchTrailingIconClickDetail, type MdSegmentedButtonCustomEvent, type MdSegmentedButtonSetCustomEvent, type MdSelectCustomEvent, type MdSelectOptionCustomEvent, type MdSideSheetCustomEvent, type MdSliderCustomEvent, type MdSliderDragDetail, type MdSliderThumbDetail, type MdSliderValueDetail, type MdSnackbarCustomEvent, type MdSparklineCustomEvent, type MdSplitButtonCustomEvent, type MdStepCustomEvent, type MdStepperCustomEvent, type MdSubMenuItemCustomEvent, type MdSwitchCustomEvent, type MdTabCustomEvent, type MdTableCustomEvent, type MdTablePaginationCustomEvent, type MdTableRowCustomEvent, type MdTableSelectionState, type MdTableSortLabelCustomEvent, type MdTableSortState, type MdTabsCustomEvent, type MdTextFieldCustomEvent, type MdTimePickerChangeDetail, type MdTimePickerCustomEvent, type MdTimePickerModeChangeDetail, type MdTooltipCustomEvent, type MdTransferListCustomEvent, type OrgChartSelectionChangeDetail, type OrgChartToggleDetail } from "@awc-ui/core";
14
14
  import type { Components } from "@awc-ui/core/dist/components";
15
15
  import { MdAccordionItem as MdAccordionItemElement } from "@awc-ui/core/dist/components/md-accordion-item.js";
16
16
  import { MdAccordion as MdAccordionElement } from "@awc-ui/core/dist/components/md-accordion.js";
@@ -26,6 +26,7 @@ import { MdBreadcrumbs as MdBreadcrumbsElement } from "@awc-ui/core/dist/compone
26
26
  import { MdButtonGroup as MdButtonGroupElement } from "@awc-ui/core/dist/components/md-button-group.js";
27
27
  import { MdButton as MdButtonElement } from "@awc-ui/core/dist/components/md-button.js";
28
28
  import { MdCard as MdCardElement } from "@awc-ui/core/dist/components/md-card.js";
29
+ import { MdChartSeries as MdChartSeriesElement } from "@awc-ui/core/dist/components/md-chart-series.js";
29
30
  import { MdCheckbox as MdCheckboxElement } from "@awc-ui/core/dist/components/md-checkbox.js";
30
31
  import { MdChip as MdChipElement } from "@awc-ui/core/dist/components/md-chip.js";
31
32
  import { MdColorPicker as MdColorPickerElement } from "@awc-ui/core/dist/components/md-color-picker.js";
@@ -183,9 +184,9 @@ export const MdAppBar: StencilReactComponent<MdAppBarElement, MdAppBarEvents, Co
183
184
  });
184
185
 
185
186
  export type MdAreaChartEvents = {
186
- onMdMarkerClick: EventName<MdAreaChartCustomEvent<MdChartClickDetail<MdChartSeries>>>,
187
- onMdLineClick: EventName<MdAreaChartCustomEvent<MdChartClickDetail<MdChartSeries>>>,
188
- onMdAreaClick: EventName<MdAreaChartCustomEvent<MdChartClickDetail<MdChartSeries>>>,
187
+ onMdMarkerClick: EventName<MdAreaChartCustomEvent<MdChartClickDetail<MdChartSeriesData>>>,
188
+ onMdLineClick: EventName<MdAreaChartCustomEvent<MdChartClickDetail<MdChartSeriesData>>>,
189
+ onMdAreaClick: EventName<MdAreaChartCustomEvent<MdChartClickDetail<MdChartSeriesData>>>,
189
190
  onMdAxisClick: EventName<MdAreaChartCustomEvent<MdChartAxisClickDetail>>,
190
191
  onMdLegendClick: EventName<MdAreaChartCustomEvent<{ seriesIndex: number; seriesId?: string; selected: boolean }>>,
191
192
  onMdHover: EventName<MdAreaChartCustomEvent<MdChartHoverDetail>>,
@@ -334,7 +335,7 @@ export const MdBadge: StencilReactComponent<MdBadgeElement, MdBadgeEvents, Compo
334
335
  });
335
336
 
336
337
  export type MdBarChartEvents = {
337
- onMdBarClick: EventName<MdBarChartCustomEvent<MdChartClickDetail<MdChartSeries>>>,
338
+ onMdBarClick: EventName<MdBarChartCustomEvent<MdChartClickDetail<MdChartSeriesData>>>,
338
339
  onMdLegendClick: EventName<MdBarChartCustomEvent<{ seriesIndex: number; seriesId?: string; selected: boolean }>>,
339
340
  onMdHover: EventName<MdBarChartCustomEvent<MdChartHoverDetail>>,
340
341
  onMdReady: EventName<MdBarChartCustomEvent<void>>,
@@ -530,6 +531,41 @@ export const MdCard: StencilReactComponent<MdCardElement, MdCardEvents, Componen
530
531
  serializeShadowRoot
531
532
  });
532
533
 
534
+ export type MdChartSeriesEvents = NonNullable<unknown>;
535
+
536
+ export const MdChartSeries: StencilReactComponent<MdChartSeriesElement, MdChartSeriesEvents, Components.MdChartSeries> = /*@__PURE__*/ createComponent<MdChartSeriesElement, MdChartSeriesEvents, Components.MdChartSeries>({
537
+ tagName: 'md-chart-series',
538
+ properties: {
539
+ label: 'label',
540
+ data: 'data',
541
+ stroke: 'stroke',
542
+ fill: 'fill',
543
+ range: 'range',
544
+ color: 'color',
545
+ stack: 'stack',
546
+ curve: 'curve',
547
+ dash: 'dash',
548
+ seriesHidden: 'series-hidden',
549
+ connectNulls: 'connect-nulls',
550
+ showMarks: 'show-marks',
551
+ symbol: 'symbol',
552
+ pointSymbols: 'point-symbols',
553
+ pointColors: 'point-colors',
554
+ pointWidths: 'point-widths',
555
+ overlay: 'overlay',
556
+ widthRatio: 'width-ratio',
557
+ seriesId: 'series-id',
558
+ yAxisIndex: 'y-axis-index',
559
+ dashAfter: 'dash-after',
560
+ hollow: 'hollow',
561
+ lineWidth: 'line-width',
562
+ markSize: 'mark-size'
563
+ },
564
+ hydrateModule: typeof window === 'undefined' ? (import('@awc-ui/core/hydrate') as Promise<HydrateModule>) : undefined,
565
+ clientModule: clientComponents.MdChartSeries as StencilReactComponent<MdChartSeriesElement, MdChartSeriesEvents, Components.MdChartSeries>,
566
+ serializeShadowRoot
567
+ });
568
+
533
569
  export type MdCheckboxEvents = {
534
570
  onMdChange: EventName<MdCheckboxCustomEvent<{ checked: boolean; indeterminate: boolean }>>,
535
571
  onMdValidityChange: EventName<MdCheckboxCustomEvent<{ valid: boolean; validationMessage: string; flags: Record<string, boolean>; }>>
package/src/components.ts CHANGED
@@ -21,6 +21,7 @@ export * from './components/MdBreadcrumbs.js';
21
21
  export * from './components/MdButton.js';
22
22
  export * from './components/MdButtonGroup.js';
23
23
  export * from './components/MdCard.js';
24
+ export * from './components/MdChartSeries.js';
24
25
  export * from './components/MdCheckbox.js';
25
26
  export * from './components/MdChip.js';
26
27
  export * from './components/MdColorPicker.js';
@@ -0,0 +1,528 @@
1
+ /**
2
+ * SSR runtime vendored from @stencil/react-output-target 1.6.2 (MIT).
3
+ * Copyright (c) 2019-present Drifty Co. See THIRD_PARTY_LICENSES.md.
4
+ *
5
+ * Kept local so the serializer fix also ships to published-package consumers.
6
+ * The upstream child resolver and client wrapper are preserved. Local changes:
7
+ * escape attributes, apply declared Core props before server rendering, and
8
+ * preserve the initial values supported by Core's browser attribute readers.
9
+ * Regeneration must not overwrite this file.
10
+ */
11
+ import l, { Fragment as N } from "react";
12
+ import { createComponent as C } from "@stencil/react-output-target/runtime";
13
+
14
+ const escapeAttribute = (value: unknown) => String(value).replace(/[&"'<>]/g, char => ({
15
+ '&': '&amp;', '"': '&quot;', "'": '&#39;', '<': '&lt;', '>': '&gt;',
16
+ }[char]));
17
+ // These Core components accept an array or its JSON attribute form.
18
+ const jsonArrayAttributes: Record<string, string | undefined> = {
19
+ "md-autocomplete": "options",
20
+ "md-multi-select": "options",
21
+ "md-organization-chart": "nodes",
22
+ "md-select": "options",
23
+ "md-transfer-list": "items",
24
+ };
25
+
26
+ // Nonvisual chart descriptors must retain their data while a parent wrapper
27
+ // resolves and re-renders its children. The Core resolver reads these JSON forms.
28
+ const chartSeriesJsonAttributes: Record<string, string | undefined> = {
29
+ data: 'data', range: 'range', pointSymbols: 'point-symbols',
30
+ pointColors: 'point-colors', pointWidths: 'point-widths',
31
+ };
32
+
33
+ function getSsrArrayAttribute(tag: string, attribute: string, value: unknown[]) {
34
+ if (jsonArrayAttributes[tag] === attribute) return attribute;
35
+ if (attribute === "value" && (tag === "md-autocomplete" || tag === "md-multi-select") &&
36
+ value.every(item => typeof item === "string")) {
37
+ return "data-awc-initial-values";
38
+ }
39
+ }
40
+
41
+ var U = {
42
+ animationIterationCount: 1,
43
+ aspectRatio: 1,
44
+ borderImageOutset: 1,
45
+ borderImageSlice: 1,
46
+ borderImageWidth: 1,
47
+ boxFlex: 1,
48
+ boxFlexGroup: 1,
49
+ boxOrdinalGroup: 1,
50
+ columnCount: 1,
51
+ columns: 1,
52
+ flex: 1,
53
+ flexGrow: 1,
54
+ flexPositive: 1,
55
+ flexShrink: 1,
56
+ flexNegative: 1,
57
+ flexOrder: 1,
58
+ gridRow: 1,
59
+ gridRowEnd: 1,
60
+ gridRowSpan: 1,
61
+ gridRowStart: 1,
62
+ gridColumn: 1,
63
+ gridColumnEnd: 1,
64
+ gridColumnSpan: 1,
65
+ gridColumnStart: 1,
66
+ msGridRow: 1,
67
+ msGridRowSpan: 1,
68
+ msGridColumn: 1,
69
+ msGridColumnSpan: 1,
70
+ fontWeight: 1,
71
+ lineHeight: 1,
72
+ opacity: 1,
73
+ order: 1,
74
+ orphans: 1,
75
+ scale: 1,
76
+ tabSize: 1,
77
+ widows: 1,
78
+ zIndex: 1,
79
+ zoom: 1,
80
+ WebkitLineClamp: 1,
81
+ // SVG-related properties
82
+ fillOpacity: 1,
83
+ floodOpacity: 1,
84
+ stopOpacity: 1,
85
+ strokeDasharray: 1,
86
+ strokeDashoffset: 1,
87
+ strokeMiterlimit: 1,
88
+ strokeOpacity: 1,
89
+ strokeWidth: 1
90
+ }, v = "px", F = (e) => typeof e == "number" || typeof e == "string";
91
+ function W(e) {
92
+ return e.startsWith("--") ? e : e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
93
+ }
94
+ function D(e, t, n = v) {
95
+ if (typeof t != "string" && typeof t != "number")
96
+ throw new Error(
97
+ "Invalid input: value of 'cssProperties' must be string or number."
98
+ );
99
+ const r = e.startsWith("--") || U[e] === 1;
100
+ if (typeof t == "string" || t === 0 || r)
101
+ return `${t}`;
102
+ const i = (typeof n == "string" ? n : n[e]) || v;
103
+ return `${t}${i}`;
104
+ }
105
+ function q(e, t) {
106
+ if (typeof e != "object" || e === null)
107
+ throw new TypeError(
108
+ `[stringifyStyleDeclaration]: Expected 'styleDeclaration' to be a non-null object, but received ${e} (type:${typeof e}).`
109
+ );
110
+ const n = t != null && t.important ? "!important" : "";
111
+ return Object.entries(e).filter(([r, i]) => F(i)).map(
112
+ ([r, i]) => `${W(r)}:${D(
113
+ r,
114
+ i,
115
+ t == null ? void 0 : t.unit
116
+ )}${n};`
117
+ ).join("");
118
+ }
119
+ function G(e, t = !1) {
120
+ if (typeof e != "object" || e === null)
121
+ throw new TypeError(
122
+ `[stringifyCSSProperties]: Expected 'cssProperties' to be a non-null object, but received ${e} (type:${typeof e}).`
123
+ );
124
+ return q(e, typeof t == "boolean" ? {
125
+ important: t
126
+ } : t);
127
+ }
128
+ const E = {
129
+ acceptCharset: "accept-charset",
130
+ accessKey: "accesskey",
131
+ allowFullScreen: "allowfullscreen",
132
+ autoCapitalize: "autocapitalize",
133
+ autoComplete: "autocomplete",
134
+ autoCorrect: "autocorrect",
135
+ autoFocus: "autofocus",
136
+ autoPlay: "autoplay",
137
+ autoSave: "autosave",
138
+ cellPadding: "cellpadding",
139
+ cellSpacing: "cellspacing",
140
+ charSet: "charset",
141
+ className: "class",
142
+ classID: "classid",
143
+ colSpan: "colspan",
144
+ contentEditable: "contenteditable",
145
+ contextMenu: "contextmenu",
146
+ controlsList: "controlslist",
147
+ crossOrigin: "crossorigin",
148
+ dangerouslySetInnerHTML: "dangerouslysetinnerhtml",
149
+ dateTime: "datetime",
150
+ defaultChecked: "defaultchecked",
151
+ defaultValue: "defaultvalue",
152
+ disablePictureInPicture: "disablepictureinpicture",
153
+ disableRemotePlayback: "disableremoteplayback",
154
+ encType: "enctype",
155
+ enterKeyHint: "enterkeyhint",
156
+ fetchPriority: "fetchpriority",
157
+ htmlFor: "for",
158
+ formMethod: "formmethod",
159
+ formAction: "formaction",
160
+ formEncType: "formenctype",
161
+ formNoValidate: "formnovalidate",
162
+ formTarget: "formtarget",
163
+ frameBorder: "frameborder",
164
+ hrefLang: "hreflang",
165
+ httpEquiv: "http-equiv",
166
+ imageSizes: "imagesizes",
167
+ imageSrcSet: "imagesrcset",
168
+ inputMode: "inputmode",
169
+ itemID: "itemid",
170
+ itemProp: "itemprop",
171
+ itemRef: "itemref",
172
+ itemScope: "itemscope",
173
+ itemType: "itemtype",
174
+ keyParams: "keyparams",
175
+ keyType: "keytype",
176
+ marginWidth: "marginwidth",
177
+ marginHeight: "marginheight",
178
+ maxLength: "maxlength",
179
+ mediaGroup: "mediagroup",
180
+ noModule: "nomodule",
181
+ noValidate: "novalidate",
182
+ playsInline: "playsinline",
183
+ radioGroup: "radiogroup",
184
+ readOnly: "readonly",
185
+ referrerPolicy: "referrerpolicy",
186
+ rowSpan: "rowspan",
187
+ spellCheck: "spellcheck",
188
+ srcDoc: "srcdoc",
189
+ srcLang: "srclang",
190
+ srcSet: "srcset",
191
+ tabIndex: "tabindex",
192
+ useMap: "usemap",
193
+ accentHeight: "accent-height",
194
+ alignmentBaseline: "alignment-baseline",
195
+ arabicForm: "arabic-form",
196
+ attributeName: "attributename",
197
+ attributeType: "attributetype",
198
+ autoReverse: "autoreverse",
199
+ baseFrequency: "basefrequency",
200
+ baselineShift: "baseline-shift",
201
+ baseProfile: "baseprofile",
202
+ calcMode: "calcmode",
203
+ capHeight: "cap-height",
204
+ clipPath: "clip-path",
205
+ clipPathUnits: "clippathunits",
206
+ clipRule: "clip-rule",
207
+ colorInterpolation: "color-interpolation",
208
+ colorInterpolationFilters: "color-interpolation-filters",
209
+ colorProfile: "color-profile",
210
+ colorRendering: "color-rendering",
211
+ contentScriptType: "contentscripttype",
212
+ contentStyleType: "contentstyletype",
213
+ diffuseConstant: "diffuseconstant",
214
+ dominantBaseline: "dominant-baseline",
215
+ enableBackground: "enable-background",
216
+ externalResourcesRequired: "externalresourcesrequired",
217
+ fillOpacity: "fill-opacity",
218
+ fillRule: "fill-rule",
219
+ filterRes: "filterres",
220
+ filterUnits: "filterunits",
221
+ floodOpacity: "flood-opacity",
222
+ floodColor: "flood-color",
223
+ fontFamily: "font-family",
224
+ fontSize: "font-size",
225
+ fontSizeAdjust: "font-size-adjust",
226
+ fontStretch: "font-stretch",
227
+ fontStyle: "font-style",
228
+ fontVariant: "font-variant",
229
+ fontWeight: "font-weight",
230
+ glyphName: "glyph-name",
231
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
232
+ glyphOrientationVertical: "glyph-orientation-vertical",
233
+ gradientTransform: "gradienttransform",
234
+ gradientUnits: "gradientunits",
235
+ horizAdvX: "horiz-adv-x",
236
+ horizOriginX: "horiz-origin-x",
237
+ imageRendering: "image-rendering",
238
+ kernelMatrix: "kernelmatrix",
239
+ kernelUnitLength: "kernelunitlength",
240
+ keyPoints: "keypoints",
241
+ keySplines: "keysplines",
242
+ keyTimes: "keytimes",
243
+ lengthAdjust: "lengthadjust",
244
+ letterSpacing: "letter-spacing",
245
+ lightingColor: "lighting-color",
246
+ limitingConeAngle: "limitingconeangle",
247
+ markerEnd: "marker-end",
248
+ markerHeight: "markerheight",
249
+ markerMid: "marker-mid",
250
+ markerStart: "marker-start",
251
+ markerUnits: "markerunits",
252
+ markerWidth: "markerwidth",
253
+ maskContentUnits: "maskcontentunits",
254
+ maskUnits: "maskunits",
255
+ numOctaves: "numoctaves",
256
+ overlinePosition: "overline-position",
257
+ overlineThickness: "overline-thickness",
258
+ paintOrder: "paint-order",
259
+ panose1: "panose-1",
260
+ pathLength: "pathlength",
261
+ patternContentUnits: "patterncontentunits",
262
+ patternTransform: "patterntransform",
263
+ patternUnits: "patternunits",
264
+ pointerEvents: "pointer-events",
265
+ pointsAtX: "pointsatx",
266
+ pointsAtY: "pointsaty",
267
+ pointsAtZ: "pointsatz",
268
+ preserveAlpha: "preservealpha",
269
+ preserveAspectRatio: "preserveaspectratio",
270
+ primitiveUnits: "primitiveunits",
271
+ refX: "refx",
272
+ refY: "refy",
273
+ renderingIntent: "rendering-intent",
274
+ repeatCount: "repeatcount",
275
+ repeatDur: "repeatdur",
276
+ requiredExtensions: "requiredextensions",
277
+ requiredFeatures: "requiredfeatures",
278
+ shapeRendering: "shape-rendering",
279
+ slot: "slot",
280
+ specularConstant: "specularconstant",
281
+ specularExponent: "specularexponent",
282
+ spreadMethod: "spreadmethod",
283
+ startOffset: "startoffset",
284
+ stdDeviation: "stddeviation",
285
+ stitchTiles: "stitchtiles",
286
+ stopColor: "stop-color",
287
+ stopOpacity: "stop-opacity",
288
+ strikethroughPosition: "strikethrough-position",
289
+ strikethroughThickness: "strikethrough-thickness",
290
+ strokeDasharray: "stroke-dasharray",
291
+ strokeDashoffset: "stroke-dashoffset",
292
+ strokeLinecap: "stroke-linecap",
293
+ strokeLinejoin: "stroke-linejoin",
294
+ strokeMiterlimit: "stroke-miterlimit",
295
+ strokeWidth: "stroke-width",
296
+ strokeOpacity: "stroke-opacity",
297
+ suppressContentEditableWarning: "suppresscontenteditablewarning",
298
+ suppressHydrationWarning: "suppresshydrationwarning",
299
+ surfaceScale: "surfacescale",
300
+ systemLanguage: "systemlanguage",
301
+ tableValues: "tablevalues",
302
+ targetX: "targetx",
303
+ targetY: "targety",
304
+ textAnchor: "text-anchor",
305
+ textDecoration: "text-decoration",
306
+ textLength: "textlength",
307
+ textRendering: "text-rendering",
308
+ transformOrigin: "transform-origin",
309
+ underlinePosition: "underline-position",
310
+ underlineThickness: "underline-thickness",
311
+ unicodeBidi: "unicode-bidi",
312
+ unicodeRange: "unicode-range",
313
+ unitsPerEm: "units-per-em",
314
+ vectorEffect: "vector-effect",
315
+ vertAdvY: "vert-adv-y",
316
+ vertOriginX: "vert-origin-x",
317
+ vertOriginY: "vert-origin-y",
318
+ wordSpacing: "word-spacing",
319
+ writingMode: "writing-mode",
320
+ xChannelSelector: "xchannelselector",
321
+ xHeight: "x-height",
322
+ xlinkActuate: "xlink:actuate",
323
+ xlinkArcrole: "xlink:arcrole",
324
+ xlinkHref: "xlink:href",
325
+ xlinkRole: "xlink:role",
326
+ xlinkShow: "xlink:show",
327
+ xlinkTitle: "xlink:title",
328
+ xlinkType: "xlink:type",
329
+ xmlBase: "xml:base",
330
+ xmlLang: "xml:lang",
331
+ xmlnsXlink: "xmlns:xlink",
332
+ yChannelSelector: "ychannelselector",
333
+ zoomAndPan: "zoomandpan"
334
+ }, V = "[react-output-target]", u = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean", h = (e) => e == null, R = (e) => Array.isArray(e), B = (e) => !!e && /^\s*class\s+/.test(e.toString()), X = (e) => !!e && typeof e == "object" && "_payload" in e, Y = (e) => !!e && typeof e == "object" && "$$typeof" in e && ("render" in e || "type" in e && "compare" in e), K = (e) => async ({ children: t, ...n }: any = {}) => {
335
+ if (!("process" in globalThis) || typeof window < "u")
336
+ throw new Error("`createComponentForServerSideRendering` can only be run on the server");
337
+ let r = "";
338
+ const i = {};
339
+ for (const [a, o] of Object.entries(n)) {
340
+ // Component properties must reach Stencil unchanged, including explicit false,
341
+ // null, numbers, objects and functions. Attributes alone can lose their type.
342
+ if (a === "ref" || a === "key" || /^on/i.test(a)) continue;
343
+ const componentProperty = Object.prototype.hasOwnProperty.call(e.properties, a);
344
+ if (componentProperty) i[a] = o;
345
+ if (o == null) continue;
346
+ const seriesAttribute = e.tagName === 'md-chart-series' && chartSeriesJsonAttributes[a];
347
+ if (seriesAttribute && typeof o === 'object') {
348
+ i[a] = o;
349
+ r += ` ${seriesAttribute}="${escapeAttribute(JSON.stringify(o))}"`;
350
+ continue;
351
+ }
352
+ const c = e.properties[a] || E[a] || a;
353
+ if (!/^[^\s"'<>/=]+$/.test(c)) continue;
354
+ const arrayAttribute = Array.isArray(o) ? getSsrArrayAttribute(e.tagName, c, o) : undefined;
355
+ if (arrayAttribute) {
356
+ i[a] = o;
357
+ r += ` ${arrayAttribute}="${escapeAttribute(JSON.stringify(o))}"`;
358
+ } else if (a === "style" && typeof o === "object") {
359
+ r += ` ${c}="${escapeAttribute(G(o))}"`;
360
+ } else if (u(o)) {
361
+ // A native disabled attribute disables form-associated custom elements
362
+ // by presence. Keep the false property above for Stencil's initial render.
363
+ // Other Stencil boolean props, ARIA and data attributes can use "false".
364
+ if (o === false && (c === "disabled" || (!componentProperty && !/^(aria-|data-)/.test(c)))) continue;
365
+ r += ` ${c}="${escapeAttribute(o)}"`;
366
+ } else if (!componentProperty) {
367
+ i[a] = o;
368
+ }
369
+ }
370
+ let s = "";
371
+ const p = e.transformTag ? e.transformTag(e.tagName) : e.tagName, x = `<${p}${r} suppressHydrationWarning="true">`;
372
+ try {
373
+ const a = await k(t), { renderToString: o } = await import("react-dom/server");
374
+ s = o(a).replace(/\n\s+/g, "");
375
+ } catch (a) {
376
+ if (process.env.STENCIL_SSR_DEBUG) {
377
+ const o = a instanceof Error ? a : new Error("Unknown error");
378
+ console.warn(
379
+ `${V} Failed to serialize light DOM for ${x.slice(0, -1)} />: ${o.message} - this may impact the hydration of the component`
380
+ );
381
+ }
382
+ }
383
+ let hostStyle: string | undefined;
384
+ const P = `${x}${s}</${p}>`, { html: g, styles: b } = await e.renderToString(P, {
385
+ fullDocument: !1,
386
+ serializeShadowRoot: e.serializeShadowRoot ?? "declarative-shadow-dom",
387
+ prettyHtml: !0,
388
+ // Preserve final host styles through React's serializer, including when
389
+ // paired with a Core renderer predating the quoted-CSS serialization fix.
390
+ afterHydrate: (document) => {
391
+ const host = document.querySelector(p);
392
+ if (host?.hasAttribute('style')) {
393
+ hostStyle = host.getAttribute('style');
394
+ host.removeAttribute('style');
395
+ }
396
+ },
397
+ ...Object.keys(i).length > 0 && {
398
+ beforeHydrate: (a) => {
399
+ const o = a.querySelector(p);
400
+ if (o)
401
+ for (const [c, m] of Object.entries(i))
402
+ o[c] = m;
403
+ }
404
+ }
405
+ });
406
+ if (!g)
407
+ throw new Error("No HTML returned from renderToString");
408
+ const d = g.split(`
409
+ `), $ = "<!--r.1-->", w = d[1].includes('shadowrootmode="open"'), O = d[1].includes("shadowrootdelegatesfocus");
410
+ let T;
411
+ w && (T = d.slice(2, d.lastIndexOf(" </template>")).join(`
412
+ `).trim());
413
+ const { default: M, attributesToProps } = await import("html-react-parser");
414
+ const preservedStyle = hostStyle === undefined ? {} : attributesToProps({ style: hostStyle });
415
+ const L = M, H = () => L(g, {
416
+ transform(a, o) {
417
+ if ("name" in o && (o.name === p || o.name === e.tagName)) {
418
+ const c = { ...(a as l.ReactElement<any>).props, ...preservedStyle }, m = `${p}`;
419
+ if (!w) {
420
+ const { children: Z, ...I } = c || {}, j = d.slice(1, -1).join(`
421
+ `).trim().replace(new RegExp("(?<=>)\\s+(?=<)", "g"), "").replace(/\n\s+/g, ""), _ = b.length > 0 && b.map((f, A) => /* @__PURE__ */ l.createElement(
422
+ "style",
423
+ {
424
+ href: `stencil-${f.id || e.tagName}`,
425
+ key: f.id || A,
426
+ id: f.id,
427
+ precedence: "stencil",
428
+ suppressHydrationWarning: !0,
429
+ dangerouslySetInnerHTML: { __html: f.content || "" }
430
+ }
431
+ ));
432
+ return /* @__PURE__ */ l.createElement(N, null, _, /* @__PURE__ */ l.createElement(m, { ...I, suppressHydrationWarning: !0, dangerouslySetInnerHTML: { __html: j } }));
433
+ }
434
+ return /* @__PURE__ */ l.createElement(m, { ...c, suppressHydrationWarning: !0 }, /* @__PURE__ */ l.createElement(
435
+ "template",
436
+ {
437
+ shadowrootmode: "open",
438
+ ...O ? { shadowrootdelegatesfocus: "" } : {},
439
+ suppressHydrationWarning: !0,
440
+ dangerouslySetInnerHTML: { __html: $ + T }
441
+ }
442
+ ), t);
443
+ }
444
+ }
445
+ });
446
+ return /* @__PURE__ */ l.createElement(H, null);
447
+ };
448
+ async function k(e) {
449
+ return u(e) || h(e) ? e : (R(e) || (e = [e]), Promise.all(
450
+ Array.from(e).map(async (t) => {
451
+ if (u(t) || h(t))
452
+ return t;
453
+ if (R(t))
454
+ return k(t);
455
+ if (!l.isValidElement(t))
456
+ return t;
457
+ const { type: n, props: r } = t as l.ReactElement<any>, i = await S(n, r);
458
+ return l.isValidElement(i) ? i : {
459
+ ...t,
460
+ props: {
461
+ ...r,
462
+ children: await k(r.children)
463
+ },
464
+ type: i
465
+ };
466
+ })
467
+ ));
468
+ }
469
+ const S = async (e, t) => {
470
+ let n = null;
471
+ if (typeof e == "string")
472
+ return e;
473
+ if (B(e)) {
474
+ const r = new e(t, void 0);
475
+ n = r.render ? r.render() : r;
476
+ } else if (X(e)) {
477
+ const r = e._payload;
478
+ let i;
479
+ if (typeof e._init == "function" && r._result === void 0) {
480
+ const s = await e._init(r);
481
+ i = (s == null ? void 0 : s.default) ?? s;
482
+ } else {
483
+ const { default: s } = r._status === -1 ? await r._result() : r._result;
484
+ i = s;
485
+ }
486
+ n = await S(i, t);
487
+ } else {
488
+ if (Y(e))
489
+ return e;
490
+ typeof e != "object" && (n = await e(t));
491
+ }
492
+ // Keep the descriptor's serialized props when a parent resolves its children.
493
+ // Rebuilding this tag from the original React props drops arrays/maps and
494
+ // dashed aliases before the parent's hydrate pass reads the series.
495
+ if (l.isValidElement(n) && n.type === 'md-chart-series') return n;
496
+ return !h(n) && !u(n) && l.isValidElement(n) && (n = await S(n.type, t)), n;
497
+ };
498
+ let y = null;
499
+ const ee = (e) => {
500
+ if (typeof window < "u") {
501
+ if (e.clientModule)
502
+ return e.clientModule;
503
+ if (C)
504
+ return (C as any)({
505
+ tagName: e.tagName,
506
+ properties: e.properties
507
+ });
508
+ }
509
+ return async (t) => {
510
+ if (!e.hydrateModule)
511
+ throw new Error(
512
+ "`hydrateModule` is required when rendering a Stencil component on the server. This indicates a misconfiguration of the Stencil React output target."
513
+ );
514
+ let n = !1;
515
+ y || (y = await e.hydrateModule, n = !0);
516
+ const r = y;
517
+ if (e.getTagTransformer && n) {
518
+ const i = e.getTagTransformer();
519
+ i && r.setTagTransformer(i);
520
+ }
521
+ return e.transformTag = r.transformTag, K({
522
+ renderToString: r.renderToString,
523
+ ...e
524
+ })(t);
525
+ };
526
+ };
527
+ export const createComponent: typeof import('@stencil/react-output-target/ssr').createComponent = ee;
528
+ export type { HydrateModule, SerializeShadowRootOptions } from '@stencil/react-output-target/ssr';