webadwaita 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import './styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "../_rsd/runtime.js";
3
3
  import * as React from 'react';
4
- import { css, html } from 'react-strict-dom';
4
+ import { css, html } from '../_rsd/index.js';
5
5
  import { spacing } from '../tokens.css';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import './styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "../_rsd/runtime.js";
3
3
  import * as React from 'react';
4
- import { css, html } from 'react-strict-dom';
4
+ import { css, html } from '../_rsd/index.js';
5
5
  import { palette, radius, spacing, typography, motion } from '../tokens.css';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import './styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "../_rsd/runtime.js";
3
3
  import * as React from 'react';
4
- import { css, html } from 'react-strict-dom';
4
+ import { css, html } from '../_rsd/index.js';
5
5
  import { palette, radius, spacing, typography } from '../tokens.css';
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import './styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "../_rsd/runtime.js";
3
3
  import * as React from 'react';
4
- import { css, html } from 'react-strict-dom';
4
+ import { css, html } from '../_rsd/index.js';
5
5
  import { palette, radius, motion, typography, spacing } from '../tokens.css';
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import './styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "../_rsd/runtime.js";
3
3
  import * as React from 'react';
4
- import { css, html } from 'react-strict-dom';
4
+ import { css, html } from '../_rsd/index.js';
5
5
  import { palette, radius, spacing, typography, motion } from '../tokens.css';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import './styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "../_rsd/runtime.js";
3
3
  import * as React from 'react';
4
- import { css, html } from 'react-strict-dom';
4
+ import { css, html } from '../_rsd/index.js';
5
5
  import { palette, spacing, typography } from '../tokens.css';
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import './styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
3
- import { css, html } from 'react-strict-dom';
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "../_rsd/runtime.js";
3
+ import { css, html } from '../_rsd/index.js';
4
4
  import { palette, motion } from '../tokens.css';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  /**
@@ -0,0 +1,484 @@
1
+ /**
2
+ * @license react-strict-dom
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ import { jsx } from 'react/jsx-runtime';
12
+ import * as stylex from '@stylexjs/stylex';
13
+ export { stylex as css };
14
+ const loggedMessages = {};
15
+ function errorMsg(msg) {
16
+ if (process.env.NODE_ENV !== 'test' && loggedMessages[msg]) {
17
+ return;
18
+ }
19
+ loggedMessages[msg] = true;
20
+ console.error(`[error] React Strict DOM: ${msg}`);
21
+ }
22
+ const strictAttributeSet = new Set(['alt', 'aria-activedescendant', 'aria-atomic', 'aria-autocomplete', 'aria-busy', 'aria-checked', 'aria-colcount', 'aria-colindex', 'aria-colindextext', 'aria-colspan', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-errormessage', 'aria-expanded', 'aria-flowto', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-level', 'aria-live', 'aria-modal', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed', 'aria-readonly', 'aria-required', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowindextext', 'aria-rowspan', 'aria-selected', 'aria-setsize', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext', 'autoCapitalize', 'autoComplete', 'autoFocus', 'checked', 'children', 'crossOrigin', 'decoding', 'defaultChecked', 'defaultValue', 'dir', 'disabled', 'download', 'draggable', 'elementTiming', 'enterKeyHint', 'fetchPriority', 'for', 'height', 'hidden', 'href', 'id', 'inert', 'inputMode', 'label', 'lang', 'loading', 'max', 'maxLength', 'min', 'minLength', 'multiple', 'name', 'onAuxClick', 'onBeforeInput', 'onBlur', 'onChange', 'onClick', 'onContextMenu', 'onCopy', 'onCut', 'onError', 'onFocus', 'onFocusIn', 'onFocusOut', 'onFullscreenChange', 'onFullscreenError', 'onGotPointerCapture', 'onInput', 'onInvalid', 'onKeyDown', 'onKeyUp', 'onLoad', 'onLostPointerCapture', 'onPaste', 'onPointerCancel', 'onPointerDown', 'onPointerEnter', 'onPointerLeave', 'onPointerMove', 'onPointerOut', 'onPointerOver', 'onPointerUp', 'onScroll', 'onSelect', 'onSelectionChange', 'onWheel', 'placeholder', 'readOnly', 'referrerPolicy', 'rel', 'required', 'role', 'rows', 'selected', 'spellCheck', 'src', 'srcSet', 'step', 'style', 'tabIndex', 'target', 'type', 'value', 'width', 'suppressHydrationWarning', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart']);
23
+ function isPropAllowed(key) {
24
+ return strictAttributeSet.has(key) || key.indexOf('data-') > -1;
25
+ }
26
+ var styleq$1 = {};
27
+ Object.defineProperty(styleq$1, "__esModule", {
28
+ value: true
29
+ });
30
+ var styleq_2 = styleq$1.styleq = void 0;
31
+ var cache = new WeakMap();
32
+ var compiledKey = '$$css';
33
+ function createStyleq(options) {
34
+ var disableCache;
35
+ var disableMix;
36
+ var transform;
37
+ if (options != null) {
38
+ disableCache = options.disableCache === true;
39
+ disableMix = options.disableMix === true;
40
+ transform = options.transform;
41
+ }
42
+ return function styleq() {
43
+ var definedProperties = [];
44
+ var className = '';
45
+ var inlineStyle = null;
46
+ var debugString = '';
47
+ var nextCache = disableCache ? null : cache;
48
+ var styles = new Array(arguments.length);
49
+ for (var i = 0; i < arguments.length; i++) {
50
+ styles[i] = arguments[i];
51
+ }
52
+ while (styles.length > 0) {
53
+ var possibleStyle = styles.pop();
54
+ if (possibleStyle == null || possibleStyle === false) {
55
+ continue;
56
+ }
57
+ if (Array.isArray(possibleStyle)) {
58
+ for (var _i = 0; _i < possibleStyle.length; _i++) {
59
+ styles.push(possibleStyle[_i]);
60
+ }
61
+ continue;
62
+ }
63
+ var style = transform != null ? transform(possibleStyle) : possibleStyle;
64
+ if (style.$$css != null) {
65
+ var classNameChunk = '';
66
+ if (nextCache != null && nextCache.has(style)) {
67
+ var cacheEntry = nextCache.get(style);
68
+ if (cacheEntry != null) {
69
+ classNameChunk = cacheEntry[0];
70
+ debugString = cacheEntry[2];
71
+ definedProperties.push.apply(definedProperties, cacheEntry[1]);
72
+ nextCache = cacheEntry[3];
73
+ }
74
+ } else {
75
+ var definedPropertiesChunk = [];
76
+ for (var prop in style) {
77
+ var value = style[prop];
78
+ if (prop === compiledKey) {
79
+ var compiledKeyValue = style[prop];
80
+ if (compiledKeyValue !== true) {
81
+ debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;
82
+ }
83
+ continue;
84
+ }
85
+ if (typeof value === 'string' || value === null) {
86
+ if (!definedProperties.includes(prop)) {
87
+ definedProperties.push(prop);
88
+ if (nextCache != null) {
89
+ definedPropertiesChunk.push(prop);
90
+ }
91
+ if (typeof value === 'string') {
92
+ classNameChunk += classNameChunk ? ' ' + value : value;
93
+ }
94
+ }
95
+ } else {
96
+ console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
97
+ }
98
+ }
99
+ if (nextCache != null) {
100
+ var weakMap = new WeakMap();
101
+ nextCache.set(style, [classNameChunk, definedPropertiesChunk, debugString, weakMap]);
102
+ nextCache = weakMap;
103
+ }
104
+ }
105
+ if (classNameChunk) {
106
+ className = className ? classNameChunk + ' ' + className : classNameChunk;
107
+ }
108
+ } else {
109
+ if (disableMix) {
110
+ if (inlineStyle == null) {
111
+ inlineStyle = {};
112
+ }
113
+ inlineStyle = Object.assign({}, style, inlineStyle);
114
+ } else {
115
+ var subStyle = null;
116
+ for (var _prop in style) {
117
+ var _value = style[_prop];
118
+ if (_value !== undefined) {
119
+ if (!definedProperties.includes(_prop)) {
120
+ if (_value != null) {
121
+ if (inlineStyle == null) {
122
+ inlineStyle = {};
123
+ }
124
+ if (subStyle == null) {
125
+ subStyle = {};
126
+ }
127
+ subStyle[_prop] = _value;
128
+ }
129
+ definedProperties.push(_prop);
130
+ nextCache = null;
131
+ }
132
+ }
133
+ }
134
+ if (subStyle != null) {
135
+ inlineStyle = Object.assign(subStyle, inlineStyle);
136
+ }
137
+ }
138
+ }
139
+ }
140
+ var styleProps = [className, inlineStyle, debugString];
141
+ return styleProps;
142
+ };
143
+ }
144
+ var styleq = styleq_2 = styleq$1.styleq = createStyleq();
145
+ styleq.factory = createStyleq;
146
+ const optimizedStyleq = styleq_2.factory({
147
+ disableMix: true
148
+ });
149
+ function merge(...styles) {
150
+ const [className, style, dataStyleSrc] = optimizedStyleq(styles);
151
+ const result = {};
152
+ if (className != null && className !== '') {
153
+ result.className = className;
154
+ }
155
+ if (style != null) {
156
+ result.style = style;
157
+ }
158
+ if (dataStyleSrc != null && dataStyleSrc !== '') {
159
+ const chunks = dataStyleSrc.split(';');
160
+ const pathsMap = {};
161
+ for (const chunk of chunks) {
162
+ const trimmed = chunk.trim();
163
+ const [path, line] = trimmed.split(':');
164
+ if (line != null) {
165
+ pathsMap[path] = pathsMap[path] != null ? `${pathsMap[path]},${line}` : line;
166
+ }
167
+ }
168
+ result['data-style-src'] = Object.keys(pathsMap).map(path => `${path}:${pathsMap[path]}`).join('; ');
169
+ }
170
+ return result;
171
+ }
172
+ function validateStrictProps(props) {
173
+ Object.keys(props).forEach(key => {
174
+ const isValid = isPropAllowed(key);
175
+ if (!isValid) {
176
+ errorMsg(`invalid prop "${key}"`);
177
+ delete props[key];
178
+ }
179
+ });
180
+ }
181
+ function createStrictDOMComponent(TagName, defaultStyle) {
182
+ const debugStyle = {
183
+ $$css: true,
184
+ 'debug::name': `html-${TagName}`
185
+ };
186
+ function Component({
187
+ ref,
188
+ ...props
189
+ }) {
190
+ const {
191
+ for: htmlFor,
192
+ style,
193
+ ...restProps
194
+ } = props;
195
+ const hostProps = restProps;
196
+ validateStrictProps(hostProps);
197
+ if (htmlFor != null) {
198
+ hostProps.htmlFor = htmlFor;
199
+ }
200
+ if (props.role != null) {
201
+ hostProps.role = props.role === 'none' ? 'presentation' : props.role;
202
+ }
203
+ if (TagName === 'button') {
204
+ hostProps.type = hostProps.type ? hostProps.type : 'button';
205
+ } else if (TagName === 'input' || TagName === 'textarea') {
206
+ hostProps.dir = hostProps.dir ? hostProps.dir : 'auto';
207
+ }
208
+ const hostStyleProps = merge([debugStyle, defaultStyle, style]);
209
+ const element = jsx(TagName, {
210
+ ...hostProps,
211
+ ...hostStyleProps,
212
+ ref: ref
213
+ });
214
+ return element;
215
+ }
216
+ Component.displayName = `html.${TagName}`;
217
+ return Component;
218
+ }
219
+ const styles = {
220
+ block: {
221
+ kogj98: "x1ghz6dp",
222
+ kmVPX3: "x1717udv",
223
+ $$css: true
224
+ },
225
+ inline: {
226
+ kogj98: "x1ghz6dp",
227
+ kmVPX3: "x1717udv",
228
+ kybGjl: "x1hl2dhg",
229
+ k9WMMc: "x16tdsg8",
230
+ kD5eJx: "x1vvkbs",
231
+ $$css: true
232
+ },
233
+ inlineblock: {
234
+ ksu8eU: "x1y0btm7",
235
+ kogj98: "x1ghz6dp",
236
+ kmVPX3: "x1717udv",
237
+ $$css: true
238
+ },
239
+ button: {
240
+ kMzoRj: "xmkeg23",
241
+ $$css: true
242
+ },
243
+ codePre: {
244
+ kMv6JI: "x1lxnp44",
245
+ kGuDYH: "xrv4cvt",
246
+ kVQacm: "xysyzu8",
247
+ $$css: true
248
+ },
249
+ heading: {
250
+ kGuDYH: "xngnso2",
251
+ kD5eJx: "x1vvkbs",
252
+ $$css: true
253
+ },
254
+ hr: {
255
+ kWkggS: "x42x0ya",
256
+ ksu8eU: "xng3xce",
257
+ kMzoRj: "xc342km",
258
+ kB7OPa: "x9f619",
259
+ kZKoxP: "xjm9jq1",
260
+ $$css: true
261
+ },
262
+ img: {
263
+ kOBAk4: "xuw900x",
264
+ kZKoxP: "xt7dq6l",
265
+ ks0D6T: "x193iq5w",
266
+ $$css: true
267
+ },
268
+ input: {
269
+ kMzoRj: "xmkeg23",
270
+ ksu8eU: "x1y0btm7",
271
+ $$css: true
272
+ },
273
+ list: {
274
+ kB88ic: "xe8uvvx",
275
+ $$css: true
276
+ },
277
+ strong: {
278
+ k63SB2: "x117nqv4",
279
+ $$css: true
280
+ },
281
+ textarea: {
282
+ kMzoRj: "xmkeg23",
283
+ ksu8eU: "x1y0btm7",
284
+ kHenm0: "x288g5",
285
+ $$css: true
286
+ }
287
+ };
288
+ const a$1 = styles.inline;
289
+ const article$1 = styles.block;
290
+ const aside$1 = styles.block;
291
+ const b$1 = styles.inline;
292
+ const bdi$1 = styles.inline;
293
+ const bdo$1 = styles.inline;
294
+ const blockquote$1 = styles.block;
295
+ const br$1 = null;
296
+ const button$1 = [styles.inlineblock, styles.button];
297
+ const code$1 = [styles.inline, styles.codePre];
298
+ const del$1 = null;
299
+ const div$1 = styles.block;
300
+ const em$1 = styles.inline;
301
+ const fieldset$1 = styles.block;
302
+ const footer$1 = styles.block;
303
+ const form$1 = styles.block;
304
+ const heading = [styles.block, styles.heading];
305
+ const header$1 = styles.block;
306
+ const hr$1 = [styles.block, styles.hr];
307
+ const i$1 = styles.inline;
308
+ const img$1 = styles.img;
309
+ const input$1 = [styles.inlineblock, styles.input];
310
+ const ins$1 = null;
311
+ const kbd$1 = null;
312
+ const label$1 = styles.inline;
313
+ const li$1 = styles.block;
314
+ const main$1 = styles.block;
315
+ const mark$1 = styles.inline;
316
+ const nav$1 = styles.block;
317
+ const ol$1 = [styles.list, styles.block];
318
+ const optgroup$1 = null;
319
+ const option$1 = null;
320
+ const p$1 = styles.block;
321
+ const pre$1 = [styles.block, styles.codePre];
322
+ const s$1 = null;
323
+ const section$1 = styles.block;
324
+ const select$1 = styles.inlineblock;
325
+ const span$1 = styles.inline;
326
+ const strong$1 = [styles.inline, styles.strong];
327
+ const sub$1 = styles.inline;
328
+ const sup$1 = styles.inline;
329
+ const textarea$1 = [styles.inlineblock, styles.textarea];
330
+ const u$1 = null;
331
+ const ul$1 = [styles.list, styles.block];
332
+ const defaultStyles = {
333
+ a: a$1,
334
+ article: article$1,
335
+ aside: aside$1,
336
+ b: b$1,
337
+ bdi: bdi$1,
338
+ bdo: bdo$1,
339
+ blockquote: blockquote$1,
340
+ br: br$1,
341
+ button: button$1,
342
+ code: code$1,
343
+ del: del$1,
344
+ div: div$1,
345
+ em: em$1,
346
+ fieldset: fieldset$1,
347
+ footer: footer$1,
348
+ form: form$1,
349
+ h1: heading,
350
+ h2: heading,
351
+ h3: heading,
352
+ h4: heading,
353
+ h5: heading,
354
+ h6: heading,
355
+ header: header$1,
356
+ hr: hr$1,
357
+ i: i$1,
358
+ img: img$1,
359
+ input: input$1,
360
+ ins: ins$1,
361
+ kbd: kbd$1,
362
+ label: label$1,
363
+ li: li$1,
364
+ main: main$1,
365
+ mark: mark$1,
366
+ nav: nav$1,
367
+ ol: ol$1,
368
+ optgroup: optgroup$1,
369
+ option: option$1,
370
+ p: p$1,
371
+ pre: pre$1,
372
+ s: s$1,
373
+ section: section$1,
374
+ select: select$1,
375
+ span: span$1,
376
+ strong: strong$1,
377
+ sub: sub$1,
378
+ sup: sup$1,
379
+ textarea: textarea$1,
380
+ u: u$1,
381
+ ul: ul$1
382
+ };
383
+ const a = createStrictDOMComponent('a', defaultStyles.a);
384
+ const article = createStrictDOMComponent('article', defaultStyles.article);
385
+ const aside = createStrictDOMComponent('aside', defaultStyles.aside);
386
+ const b = createStrictDOMComponent('b', defaultStyles.b);
387
+ const bdi = createStrictDOMComponent('bdi', defaultStyles.bdi);
388
+ const bdo = createStrictDOMComponent('bdo', defaultStyles.bdo);
389
+ const blockquote = createStrictDOMComponent('blockquote', defaultStyles.blockquote);
390
+ const br = createStrictDOMComponent('br', defaultStyles.br);
391
+ const button = createStrictDOMComponent('button', defaultStyles.button);
392
+ const code = createStrictDOMComponent('code', defaultStyles.code);
393
+ const del = createStrictDOMComponent('del', defaultStyles.del);
394
+ const div = createStrictDOMComponent('div', defaultStyles.div);
395
+ const em = createStrictDOMComponent('em', defaultStyles.em);
396
+ const fieldset = createStrictDOMComponent('fieldset', defaultStyles.fieldset);
397
+ const footer = createStrictDOMComponent('footer', defaultStyles.footer);
398
+ const form = createStrictDOMComponent('form', defaultStyles.form);
399
+ const h1 = createStrictDOMComponent('h1', defaultStyles.h1);
400
+ const h2 = createStrictDOMComponent('h2', defaultStyles.h2);
401
+ const h3 = createStrictDOMComponent('h3', defaultStyles.h3);
402
+ const h4 = createStrictDOMComponent('h4', defaultStyles.h4);
403
+ const h5 = createStrictDOMComponent('h5', defaultStyles.h5);
404
+ const h6 = createStrictDOMComponent('h6', defaultStyles.h6);
405
+ const header = createStrictDOMComponent('header', defaultStyles.header);
406
+ const hr = createStrictDOMComponent('hr', defaultStyles.hr);
407
+ const i = createStrictDOMComponent('i', defaultStyles.i);
408
+ const img = createStrictDOMComponent('img', defaultStyles.img);
409
+ const input = createStrictDOMComponent('input', defaultStyles.input);
410
+ const ins = createStrictDOMComponent('ins', defaultStyles.ins);
411
+ const kbd = createStrictDOMComponent('kbd', defaultStyles.kbd);
412
+ const label = createStrictDOMComponent('label', defaultStyles.label);
413
+ const li = createStrictDOMComponent('li', defaultStyles.li);
414
+ const main = createStrictDOMComponent('main', defaultStyles.main);
415
+ const mark = createStrictDOMComponent('mark', defaultStyles.mark);
416
+ const nav = createStrictDOMComponent('nav', defaultStyles.nav);
417
+ const ol = createStrictDOMComponent('ol', defaultStyles.ol);
418
+ const optgroup = createStrictDOMComponent('optgroup', defaultStyles.optgroup);
419
+ const option = createStrictDOMComponent('option', defaultStyles.option);
420
+ const p = createStrictDOMComponent('p', defaultStyles.p);
421
+ const pre = createStrictDOMComponent('pre', defaultStyles.pre);
422
+ const s = createStrictDOMComponent('s', defaultStyles.s);
423
+ const section = createStrictDOMComponent('section', defaultStyles.section);
424
+ const select = createStrictDOMComponent('select', defaultStyles.select);
425
+ const span = createStrictDOMComponent('span', defaultStyles.span);
426
+ const strong = createStrictDOMComponent('strong', defaultStyles.strong);
427
+ const sub = createStrictDOMComponent('sub', defaultStyles.sub);
428
+ const sup = createStrictDOMComponent('sup', defaultStyles.sup);
429
+ const textarea = createStrictDOMComponent('textarea', defaultStyles.textarea);
430
+ const u = createStrictDOMComponent('u', defaultStyles.u);
431
+ const ul = createStrictDOMComponent('ul', defaultStyles.ul);
432
+ var html = /*#__PURE__*/Object.freeze({
433
+ __proto__: null,
434
+ a: a,
435
+ article: article,
436
+ aside: aside,
437
+ b: b,
438
+ bdi: bdi,
439
+ bdo: bdo,
440
+ blockquote: blockquote,
441
+ br: br,
442
+ button: button,
443
+ code: code,
444
+ del: del,
445
+ div: div,
446
+ em: em,
447
+ fieldset: fieldset,
448
+ footer: footer,
449
+ form: form,
450
+ h1: h1,
451
+ h2: h2,
452
+ h3: h3,
453
+ h4: h4,
454
+ h5: h5,
455
+ h6: h6,
456
+ header: header,
457
+ hr: hr,
458
+ i: i,
459
+ img: img,
460
+ input: input,
461
+ ins: ins,
462
+ kbd: kbd,
463
+ label: label,
464
+ li: li,
465
+ main: main,
466
+ mark: mark,
467
+ nav: nav,
468
+ ol: ol,
469
+ optgroup: optgroup,
470
+ option: option,
471
+ p: p,
472
+ pre: pre,
473
+ s: s,
474
+ section: section,
475
+ select: select,
476
+ span: span,
477
+ strong: strong,
478
+ sub: sub,
479
+ sup: sup,
480
+ textarea: textarea,
481
+ u: u,
482
+ ul: ul
483
+ });
484
+ export { html };
@@ -0,0 +1,322 @@
1
+ /**
2
+ * @license react-strict-dom
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ import * as stylex from '@stylexjs/stylex';
12
+ var styleq$1 = {};
13
+ Object.defineProperty(styleq$1, "__esModule", {
14
+ value: true
15
+ });
16
+ var styleq_2 = styleq$1.styleq = void 0;
17
+ var cache = new WeakMap();
18
+ var compiledKey = '$$css';
19
+ function createStyleq(options) {
20
+ var disableCache;
21
+ var disableMix;
22
+ var transform;
23
+ if (options != null) {
24
+ disableCache = options.disableCache === true;
25
+ disableMix = options.disableMix === true;
26
+ transform = options.transform;
27
+ }
28
+ return function styleq() {
29
+ var definedProperties = [];
30
+ var className = '';
31
+ var inlineStyle = null;
32
+ var debugString = '';
33
+ var nextCache = disableCache ? null : cache;
34
+ var styles = new Array(arguments.length);
35
+ for (var i = 0; i < arguments.length; i++) {
36
+ styles[i] = arguments[i];
37
+ }
38
+ while (styles.length > 0) {
39
+ var possibleStyle = styles.pop();
40
+ if (possibleStyle == null || possibleStyle === false) {
41
+ continue;
42
+ }
43
+ if (Array.isArray(possibleStyle)) {
44
+ for (var _i = 0; _i < possibleStyle.length; _i++) {
45
+ styles.push(possibleStyle[_i]);
46
+ }
47
+ continue;
48
+ }
49
+ var style = transform != null ? transform(possibleStyle) : possibleStyle;
50
+ if (style.$$css != null) {
51
+ var classNameChunk = '';
52
+ if (nextCache != null && nextCache.has(style)) {
53
+ var cacheEntry = nextCache.get(style);
54
+ if (cacheEntry != null) {
55
+ classNameChunk = cacheEntry[0];
56
+ debugString = cacheEntry[2];
57
+ definedProperties.push.apply(definedProperties, cacheEntry[1]);
58
+ nextCache = cacheEntry[3];
59
+ }
60
+ } else {
61
+ var definedPropertiesChunk = [];
62
+ for (var prop in style) {
63
+ var value = style[prop];
64
+ if (prop === compiledKey) {
65
+ var compiledKeyValue = style[prop];
66
+ if (compiledKeyValue !== true) {
67
+ debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;
68
+ }
69
+ continue;
70
+ }
71
+ if (typeof value === 'string' || value === null) {
72
+ if (!definedProperties.includes(prop)) {
73
+ definedProperties.push(prop);
74
+ if (nextCache != null) {
75
+ definedPropertiesChunk.push(prop);
76
+ }
77
+ if (typeof value === 'string') {
78
+ classNameChunk += classNameChunk ? ' ' + value : value;
79
+ }
80
+ }
81
+ } else {
82
+ console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
83
+ }
84
+ }
85
+ if (nextCache != null) {
86
+ var weakMap = new WeakMap();
87
+ nextCache.set(style, [classNameChunk, definedPropertiesChunk, debugString, weakMap]);
88
+ nextCache = weakMap;
89
+ }
90
+ }
91
+ if (classNameChunk) {
92
+ className = className ? classNameChunk + ' ' + className : classNameChunk;
93
+ }
94
+ } else {
95
+ if (disableMix) {
96
+ if (inlineStyle == null) {
97
+ inlineStyle = {};
98
+ }
99
+ inlineStyle = Object.assign({}, style, inlineStyle);
100
+ } else {
101
+ var subStyle = null;
102
+ for (var _prop in style) {
103
+ var _value = style[_prop];
104
+ if (_value !== undefined) {
105
+ if (!definedProperties.includes(_prop)) {
106
+ if (_value != null) {
107
+ if (inlineStyle == null) {
108
+ inlineStyle = {};
109
+ }
110
+ if (subStyle == null) {
111
+ subStyle = {};
112
+ }
113
+ subStyle[_prop] = _value;
114
+ }
115
+ definedProperties.push(_prop);
116
+ nextCache = null;
117
+ }
118
+ }
119
+ }
120
+ if (subStyle != null) {
121
+ inlineStyle = Object.assign(subStyle, inlineStyle);
122
+ }
123
+ }
124
+ }
125
+ }
126
+ var styleProps = [className, inlineStyle, debugString];
127
+ return styleProps;
128
+ };
129
+ }
130
+ var styleq = styleq_2 = styleq$1.styleq = createStyleq();
131
+ styleq.factory = createStyleq;
132
+ const optimizedStyleq = styleq_2.factory({
133
+ disableMix: true
134
+ });
135
+ function merge(...styles) {
136
+ const [className, style, dataStyleSrc] = optimizedStyleq(styles);
137
+ const result = {};
138
+ if (className != null && className !== '') {
139
+ result.className = className;
140
+ }
141
+ if (style != null) {
142
+ result.style = style;
143
+ }
144
+ if (dataStyleSrc != null && dataStyleSrc !== '') {
145
+ const chunks = dataStyleSrc.split(';');
146
+ const pathsMap = {};
147
+ for (const chunk of chunks) {
148
+ const trimmed = chunk.trim();
149
+ const [path, line] = trimmed.split(':');
150
+ if (line != null) {
151
+ pathsMap[path] = pathsMap[path] != null ? `${pathsMap[path]},${line}` : line;
152
+ }
153
+ }
154
+ result['data-style-src'] = Object.keys(pathsMap).map(path => `${path}:${pathsMap[path]}`).join('; ');
155
+ }
156
+ return result;
157
+ }
158
+ const styles = {
159
+ block: {
160
+ kogj98: "x1ghz6dp",
161
+ kmVPX3: "x1717udv",
162
+ $$css: true
163
+ },
164
+ inline: {
165
+ kogj98: "x1ghz6dp",
166
+ kmVPX3: "x1717udv",
167
+ kybGjl: "x1hl2dhg",
168
+ k9WMMc: "x16tdsg8",
169
+ kD5eJx: "x1vvkbs",
170
+ $$css: true
171
+ },
172
+ inlineblock: {
173
+ ksu8eU: "x1y0btm7",
174
+ kogj98: "x1ghz6dp",
175
+ kmVPX3: "x1717udv",
176
+ $$css: true
177
+ },
178
+ button: {
179
+ kMzoRj: "xmkeg23",
180
+ $$css: true
181
+ },
182
+ codePre: {
183
+ kMv6JI: "x1lxnp44",
184
+ kGuDYH: "xrv4cvt",
185
+ kVQacm: "xysyzu8",
186
+ $$css: true
187
+ },
188
+ heading: {
189
+ kGuDYH: "xngnso2",
190
+ kD5eJx: "x1vvkbs",
191
+ $$css: true
192
+ },
193
+ hr: {
194
+ kWkggS: "x42x0ya",
195
+ ksu8eU: "xng3xce",
196
+ kMzoRj: "xc342km",
197
+ kB7OPa: "x9f619",
198
+ kZKoxP: "xjm9jq1",
199
+ $$css: true
200
+ },
201
+ img: {
202
+ kOBAk4: "xuw900x",
203
+ kZKoxP: "xt7dq6l",
204
+ ks0D6T: "x193iq5w",
205
+ $$css: true
206
+ },
207
+ input: {
208
+ kMzoRj: "xmkeg23",
209
+ ksu8eU: "x1y0btm7",
210
+ $$css: true
211
+ },
212
+ list: {
213
+ kB88ic: "xe8uvvx",
214
+ $$css: true
215
+ },
216
+ strong: {
217
+ k63SB2: "x117nqv4",
218
+ $$css: true
219
+ },
220
+ textarea: {
221
+ kMzoRj: "xmkeg23",
222
+ ksu8eU: "x1y0btm7",
223
+ kHenm0: "x288g5",
224
+ $$css: true
225
+ }
226
+ };
227
+ const a = styles.inline;
228
+ const article = styles.block;
229
+ const aside = styles.block;
230
+ const b = styles.inline;
231
+ const bdi = styles.inline;
232
+ const bdo = styles.inline;
233
+ const blockquote = styles.block;
234
+ const br = null;
235
+ const button = [styles.inlineblock, styles.button];
236
+ const code = [styles.inline, styles.codePre];
237
+ const del = null;
238
+ const div = styles.block;
239
+ const em = styles.inline;
240
+ const fieldset = styles.block;
241
+ const footer = styles.block;
242
+ const form = styles.block;
243
+ const heading = [styles.block, styles.heading];
244
+ const header = styles.block;
245
+ const hr = [styles.block, styles.hr];
246
+ const i = styles.inline;
247
+ const img = styles.img;
248
+ const input = [styles.inlineblock, styles.input];
249
+ const ins = null;
250
+ const kbd = null;
251
+ const label = styles.inline;
252
+ const li = styles.block;
253
+ const main = styles.block;
254
+ const mark = styles.inline;
255
+ const nav = styles.block;
256
+ const ol = [styles.list, styles.block];
257
+ const optgroup = null;
258
+ const option = null;
259
+ const p = styles.block;
260
+ const pre = [styles.block, styles.codePre];
261
+ const s = null;
262
+ const section = styles.block;
263
+ const select = styles.inlineblock;
264
+ const span = styles.inline;
265
+ const strong = [styles.inline, styles.strong];
266
+ const sub = styles.inline;
267
+ const sup = styles.inline;
268
+ const textarea = [styles.inlineblock, styles.textarea];
269
+ const u = null;
270
+ const ul = [styles.list, styles.block];
271
+ const defaultStyles = {
272
+ a: a,
273
+ article: article,
274
+ aside: aside,
275
+ b: b,
276
+ bdi: bdi,
277
+ bdo: bdo,
278
+ blockquote: blockquote,
279
+ br: br,
280
+ button: button,
281
+ code: code,
282
+ del: del,
283
+ div: div,
284
+ em: em,
285
+ fieldset: fieldset,
286
+ footer: footer,
287
+ form: form,
288
+ h1: heading,
289
+ h2: heading,
290
+ h3: heading,
291
+ h4: heading,
292
+ h5: heading,
293
+ h6: heading,
294
+ header: header,
295
+ hr: hr,
296
+ i: i,
297
+ img: img,
298
+ input: input,
299
+ ins: ins,
300
+ kbd: kbd,
301
+ label: label,
302
+ li: li,
303
+ main: main,
304
+ mark: mark,
305
+ nav: nav,
306
+ ol: ol,
307
+ optgroup: optgroup,
308
+ option: option,
309
+ p: p,
310
+ pre: pre,
311
+ s: s,
312
+ section: section,
313
+ select: select,
314
+ span: span,
315
+ strong: strong,
316
+ sub: sub,
317
+ sup: sup,
318
+ textarea: textarea,
319
+ u: u,
320
+ ul: ul
321
+ };
322
+ export { defaultStyles, merge };
@@ -1,6 +1,6 @@
1
1
  import './_tokens/styles.css';
2
- import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "react-strict-dom/runtime";
3
- import { css } from 'react-strict-dom';
2
+ import { defaultStyles as _rsdDefaultStyles, merge as _rsdMerge } from "./_rsd/runtime.js";
3
+ import { css } from './_rsd/index.js';
4
4
 
5
5
  /**
6
6
  * Adwaita-inspired design tokens, exposed via `css.defineConsts` so they can
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webadwaita",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Cross-platform Adwaita-styled UI components built on react-strict-dom.",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -49,6 +49,7 @@
49
49
  "@babel/preset-env": "^7.29.5",
50
50
  "@babel/preset-react": "^7.28.5",
51
51
  "@babel/preset-typescript": "^7.28.5",
52
+ "@stylexjs/babel-plugin": "^0.18.3",
52
53
  "@types/react": "^19.2.5",
53
54
  "@types/react-dom": "^19.2.3",
54
55
  "postcss": "^8.5.14",