| 1 |
var __create = Object.create; |
| 2 |
var __defProp = Object.defineProperty; |
| 3 |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
| 4 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
| 5 |
var __getProtoOf = Object.getPrototypeOf; |
| 6 |
var __hasOwnProp = Object.prototype.hasOwnProperty; |
| 7 |
var __commonJS = (cb, mod) => function __require() { |
| 8 |
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; |
| 9 |
}; |
| 10 |
var __copyProps = (to, from, except, desc) => { |
| 11 |
if (from && typeof from === "object" || typeof from === "function") { |
| 12 |
for (let key of __getOwnPropNames(from)) |
| 13 |
if (!__hasOwnProp.call(to, key) && key !== except) |
| 14 |
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); |
| 15 |
} |
| 16 |
return to; |
| 17 |
}; |
| 18 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( |
| 19 |
// If the importer is in node compatibility mode or this is not an ESM |
| 20 |
// file that has been converted to a CommonJS file using a Babel- |
| 21 |
// compatible transform (i.e. "__esModule" has not been set), then set |
| 22 |
// "default" to the CommonJS "module.exports" for node compatibility. |
| 23 |
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, |
| 24 |
mod |
| 25 |
)); |
| 26 |
|
| 27 |
// package-external:@wordpress/core-data |
| 28 |
var require_core_data = __commonJS({ |
| 29 |
"package-external:@wordpress/core-data"(exports, module) { |
| 30 |
module.exports = window.wp.coreData; |
| 31 |
} |
| 32 |
}); |
| 33 |
|
| 34 |
// package-external:@wordpress/data |
| 35 |
var require_data = __commonJS({ |
| 36 |
"package-external:@wordpress/data"(exports, module) { |
| 37 |
module.exports = window.wp.data; |
| 38 |
} |
| 39 |
}); |
| 40 |
|
| 41 |
// package-external:@wordpress/i18n |
| 42 |
var require_i18n = __commonJS({ |
| 43 |
"package-external:@wordpress/i18n"(exports, module) { |
| 44 |
module.exports = window.wp.i18n; |
| 45 |
} |
| 46 |
}); |
| 47 |
|
| 48 |
// package-external:@wordpress/element |
| 49 |
var require_element = __commonJS({ |
| 50 |
"package-external:@wordpress/element"(exports, module) { |
| 51 |
module.exports = window.wp.element; |
| 52 |
} |
| 53 |
}); |
| 54 |
|
| 55 |
// package-external:@wordpress/primitives |
| 56 |
var require_primitives = __commonJS({ |
| 57 |
"package-external:@wordpress/primitives"(exports, module) { |
| 58 |
module.exports = window.wp.primitives; |
| 59 |
} |
| 60 |
}); |
| 61 |
|
| 62 |
// vendor-external:react/jsx-runtime |
| 63 |
var require_jsx_runtime = __commonJS({ |
| 64 |
"vendor-external:react/jsx-runtime"(exports, module) { |
| 65 |
module.exports = window.ReactJSXRuntime; |
| 66 |
} |
| 67 |
}); |
| 68 |
|
| 69 |
// vendor-external:react |
| 70 |
var require_react = __commonJS({ |
| 71 |
"vendor-external:react"(exports, module) { |
| 72 |
module.exports = window.React; |
| 73 |
} |
| 74 |
}); |
| 75 |
|
| 76 |
// widgets/welcome/render.tsx |
| 77 |
var import_core_data = __toESM(require_core_data()); |
| 78 |
var import_data = __toESM(require_data()); |
| 79 |
var import_i18n3 = __toESM(require_i18n()); |
| 80 |
|
| 81 |
// packages/icons/build-module/library/layout.mjs |
| 82 |
var import_primitives = __toESM(require_primitives(), 1); |
| 83 |
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); |
| 84 |
var layout_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) }); |
| 85 |
|
| 86 |
// packages/icons/build-module/library/pencil.mjs |
| 87 |
var import_primitives2 = __toESM(require_primitives(), 1); |
| 88 |
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); |
| 89 |
var pencil_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) }); |
| 90 |
|
| 91 |
// packages/icons/build-module/library/styles.mjs |
| 92 |
var import_primitives3 = __toESM(require_primitives(), 1); |
| 93 |
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); |
| 94 |
var styles_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { fillRule: "evenodd", clipRule: "evenodd", d: "M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z" }) }); |
| 95 |
|
| 96 |
// node_modules/clsx/dist/clsx.mjs |
| 97 |
function r(e) { |
| 98 |
var t, f, n = ""; |
| 99 |
if ("string" == typeof e || "number" == typeof e) n += e; |
| 100 |
else if ("object" == typeof e) if (Array.isArray(e)) { |
| 101 |
var o = e.length; |
| 102 |
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); |
| 103 |
} else for (f in e) e[f] && (n && (n += " "), n += f); |
| 104 |
return n; |
| 105 |
} |
| 106 |
function clsx() { |
| 107 |
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); |
| 108 |
return n; |
| 109 |
} |
| 110 |
var clsx_default = clsx; |
| 111 |
|
| 112 |
// node_modules/@base-ui/utils/useRefWithInit.mjs |
| 113 |
var React = __toESM(require_react(), 1); |
| 114 |
var UNINITIALIZED = {}; |
| 115 |
function useRefWithInit(init, initArg) { |
| 116 |
const ref = React.useRef(UNINITIALIZED); |
| 117 |
if (ref.current === UNINITIALIZED) { |
| 118 |
ref.current = init(initArg); |
| 119 |
} |
| 120 |
return ref; |
| 121 |
} |
| 122 |
|
| 123 |
// node_modules/@base-ui/utils/warn.mjs |
| 124 |
var set; |
| 125 |
if (true) { |
| 126 |
set = /* @__PURE__ */ new Set(); |
| 127 |
} |
| 128 |
function warn(...messages) { |
| 129 |
if (true) { |
| 130 |
const messageKey = messages.join(" "); |
| 131 |
if (!set.has(messageKey)) { |
| 132 |
set.add(messageKey); |
| 133 |
console.warn(`Base UI: ${messageKey}`); |
| 134 |
} |
| 135 |
} |
| 136 |
} |
| 137 |
|
| 138 |
// node_modules/@base-ui/react/internals/useRenderElement.mjs |
| 139 |
var React4 = __toESM(require_react(), 1); |
| 140 |
|
| 141 |
// node_modules/@base-ui/utils/useMergedRefs.mjs |
| 142 |
function useMergedRefs(a, b, c, d) { |
| 143 |
const forkRef = useRefWithInit(createForkRef).current; |
| 144 |
if (didChange(forkRef, a, b, c, d)) { |
| 145 |
update(forkRef, [a, b, c, d]); |
| 146 |
} |
| 147 |
return forkRef.callback; |
| 148 |
} |
| 149 |
function useMergedRefsN(refs) { |
| 150 |
const forkRef = useRefWithInit(createForkRef).current; |
| 151 |
if (didChangeN(forkRef, refs)) { |
| 152 |
update(forkRef, refs); |
| 153 |
} |
| 154 |
return forkRef.callback; |
| 155 |
} |
| 156 |
function createForkRef() { |
| 157 |
return { |
| 158 |
callback: null, |
| 159 |
cleanup: null, |
| 160 |
refs: [] |
| 161 |
}; |
| 162 |
} |
| 163 |
function didChange(forkRef, a, b, c, d) { |
| 164 |
return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d; |
| 165 |
} |
| 166 |
function didChangeN(forkRef, newRefs) { |
| 167 |
return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]); |
| 168 |
} |
| 169 |
function update(forkRef, refs) { |
| 170 |
forkRef.refs = refs; |
| 171 |
if (refs.every((ref) => ref == null)) { |
| 172 |
forkRef.callback = null; |
| 173 |
return; |
| 174 |
} |
| 175 |
forkRef.callback = (instance) => { |
| 176 |
if (forkRef.cleanup) { |
| 177 |
forkRef.cleanup(); |
| 178 |
forkRef.cleanup = null; |
| 179 |
} |
| 180 |
if (instance != null) { |
| 181 |
const cleanupCallbacks = Array(refs.length).fill(null); |
| 182 |
for (let i = 0; i < refs.length; i += 1) { |
| 183 |
const ref = refs[i]; |
| 184 |
if (ref == null) { |
| 185 |
continue; |
| 186 |
} |
| 187 |
switch (typeof ref) { |
| 188 |
case "function": { |
| 189 |
const refCleanup = ref(instance); |
| 190 |
if (typeof refCleanup === "function") { |
| 191 |
cleanupCallbacks[i] = refCleanup; |
| 192 |
} |
| 193 |
break; |
| 194 |
} |
| 195 |
case "object": { |
| 196 |
ref.current = instance; |
| 197 |
break; |
| 198 |
} |
| 199 |
default: |
| 200 |
} |
| 201 |
} |
| 202 |
forkRef.cleanup = () => { |
| 203 |
for (let i = 0; i < refs.length; i += 1) { |
| 204 |
const ref = refs[i]; |
| 205 |
if (ref == null) { |
| 206 |
continue; |
| 207 |
} |
| 208 |
switch (typeof ref) { |
| 209 |
case "function": { |
| 210 |
const cleanupCallback = cleanupCallbacks[i]; |
| 211 |
if (typeof cleanupCallback === "function") { |
| 212 |
cleanupCallback(); |
| 213 |
} else { |
| 214 |
ref(null); |
| 215 |
} |
| 216 |
break; |
| 217 |
} |
| 218 |
case "object": { |
| 219 |
ref.current = null; |
| 220 |
break; |
| 221 |
} |
| 222 |
default: |
| 223 |
} |
| 224 |
} |
| 225 |
}; |
| 226 |
} |
| 227 |
}; |
| 228 |
} |
| 229 |
|
| 230 |
// node_modules/@base-ui/utils/getReactElementRef.mjs |
| 231 |
var React3 = __toESM(require_react(), 1); |
| 232 |
|
| 233 |
// node_modules/@base-ui/utils/reactVersion.mjs |
| 234 |
var React2 = __toESM(require_react(), 1); |
| 235 |
var majorVersion = parseInt(React2.version, 10); |
| 236 |
function isReactVersionAtLeast(reactVersionToCheck) { |
| 237 |
return majorVersion >= reactVersionToCheck; |
| 238 |
} |
| 239 |
|
| 240 |
// node_modules/@base-ui/utils/getReactElementRef.mjs |
| 241 |
function getReactElementRef(element) { |
| 242 |
if (!/* @__PURE__ */ React3.isValidElement(element)) { |
| 243 |
return null; |
| 244 |
} |
| 245 |
const reactElement = element; |
| 246 |
const propsWithRef = reactElement.props; |
| 247 |
return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; |
| 248 |
} |
| 249 |
|
| 250 |
// node_modules/@base-ui/utils/mergeObjects.mjs |
| 251 |
function mergeObjects(a, b) { |
| 252 |
if (a && !b) { |
| 253 |
return a; |
| 254 |
} |
| 255 |
if (!a && b) { |
| 256 |
return b; |
| 257 |
} |
| 258 |
if (a || b) { |
| 259 |
return { |
| 260 |
...a, |
| 261 |
...b |
| 262 |
}; |
| 263 |
} |
| 264 |
return void 0; |
| 265 |
} |
| 266 |
|
| 267 |
// node_modules/@base-ui/utils/empty.mjs |
| 268 |
var EMPTY_ARRAY = Object.freeze([]); |
| 269 |
var EMPTY_OBJECT = Object.freeze({}); |
| 270 |
|
| 271 |
// node_modules/@base-ui/react/internals/getStateAttributesProps.mjs |
| 272 |
function getStateAttributesProps(state, customMapping) { |
| 273 |
const props = {}; |
| 274 |
for (const key in state) { |
| 275 |
const value = state[key]; |
| 276 |
if (customMapping?.hasOwnProperty(key)) { |
| 277 |
const customProps = customMapping[key](value); |
| 278 |
if (customProps != null) { |
| 279 |
Object.assign(props, customProps); |
| 280 |
} |
| 281 |
continue; |
| 282 |
} |
| 283 |
if (value === true) { |
| 284 |
props[`data-${key.toLowerCase()}`] = ""; |
| 285 |
} else if (value) { |
| 286 |
props[`data-${key.toLowerCase()}`] = value.toString(); |
| 287 |
} |
| 288 |
} |
| 289 |
return props; |
| 290 |
} |
| 291 |
|
| 292 |
// node_modules/@base-ui/react/utils/resolveClassName.mjs |
| 293 |
function resolveClassName(className, state) { |
| 294 |
return typeof className === "function" ? className(state) : className; |
| 295 |
} |
| 296 |
|
| 297 |
// node_modules/@base-ui/react/utils/resolveStyle.mjs |
| 298 |
function resolveStyle(style, state) { |
| 299 |
return typeof style === "function" ? style(state) : style; |
| 300 |
} |
| 301 |
|
| 302 |
// node_modules/@base-ui/react/merge-props/mergeProps.mjs |
| 303 |
var EMPTY_PROPS = {}; |
| 304 |
function mergeProps(a, b, c, d, e) { |
| 305 |
if (!c && !d && !e && !a) { |
| 306 |
return createInitialMergedProps(b); |
| 307 |
} |
| 308 |
let merged = createInitialMergedProps(a); |
| 309 |
if (b) { |
| 310 |
merged = mergeInto(merged, b); |
| 311 |
} |
| 312 |
if (c) { |
| 313 |
merged = mergeInto(merged, c); |
| 314 |
} |
| 315 |
if (d) { |
| 316 |
merged = mergeInto(merged, d); |
| 317 |
} |
| 318 |
if (e) { |
| 319 |
merged = mergeInto(merged, e); |
| 320 |
} |
| 321 |
return merged; |
| 322 |
} |
| 323 |
function mergePropsN(props) { |
| 324 |
if (props.length === 0) { |
| 325 |
return EMPTY_PROPS; |
| 326 |
} |
| 327 |
if (props.length === 1) { |
| 328 |
return createInitialMergedProps(props[0]); |
| 329 |
} |
| 330 |
let merged = createInitialMergedProps(props[0]); |
| 331 |
for (let i = 1; i < props.length; i += 1) { |
| 332 |
merged = mergeInto(merged, props[i]); |
| 333 |
} |
| 334 |
return merged; |
| 335 |
} |
| 336 |
function createInitialMergedProps(inputProps) { |
| 337 |
if (isPropsGetter(inputProps)) { |
| 338 |
return { |
| 339 |
...resolvePropsGetter(inputProps, EMPTY_PROPS) |
| 340 |
}; |
| 341 |
} |
| 342 |
return copyInitialProps(inputProps); |
| 343 |
} |
| 344 |
function mergeInto(merged, inputProps) { |
| 345 |
if (isPropsGetter(inputProps)) { |
| 346 |
return resolvePropsGetter(inputProps, merged); |
| 347 |
} |
| 348 |
return mutablyMergeInto(merged, inputProps); |
| 349 |
} |
| 350 |
function copyInitialProps(inputProps) { |
| 351 |
const copiedProps = { |
| 352 |
...inputProps |
| 353 |
}; |
| 354 |
for (const propName in copiedProps) { |
| 355 |
const propValue = copiedProps[propName]; |
| 356 |
if (isEventHandler(propName, propValue)) { |
| 357 |
copiedProps[propName] = wrapEventHandler(propValue); |
| 358 |
} |
| 359 |
} |
| 360 |
return copiedProps; |
| 361 |
} |
| 362 |
function mutablyMergeInto(mergedProps, externalProps) { |
| 363 |
if (!externalProps) { |
| 364 |
return mergedProps; |
| 365 |
} |
| 366 |
for (const propName in externalProps) { |
| 367 |
const externalPropValue = externalProps[propName]; |
| 368 |
switch (propName) { |
| 369 |
case "style": { |
| 370 |
mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); |
| 371 |
break; |
| 372 |
} |
| 373 |
case "className": { |
| 374 |
mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); |
| 375 |
break; |
| 376 |
} |
| 377 |
default: { |
| 378 |
if (isEventHandler(propName, externalPropValue)) { |
| 379 |
mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); |
| 380 |
} else { |
| 381 |
mergedProps[propName] = externalPropValue; |
| 382 |
} |
| 383 |
} |
| 384 |
} |
| 385 |
} |
| 386 |
return mergedProps; |
| 387 |
} |
| 388 |
function isEventHandler(key, value) { |
| 389 |
const code0 = key.charCodeAt(0); |
| 390 |
const code1 = key.charCodeAt(1); |
| 391 |
const code2 = key.charCodeAt(2); |
| 392 |
return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); |
| 393 |
} |
| 394 |
function isPropsGetter(inputProps) { |
| 395 |
return typeof inputProps === "function"; |
| 396 |
} |
| 397 |
function resolvePropsGetter(inputProps, previousProps) { |
| 398 |
if (isPropsGetter(inputProps)) { |
| 399 |
return inputProps(previousProps); |
| 400 |
} |
| 401 |
return inputProps ?? EMPTY_PROPS; |
| 402 |
} |
| 403 |
function mergeEventHandlers(ourHandler, theirHandler) { |
| 404 |
if (!theirHandler) { |
| 405 |
return ourHandler; |
| 406 |
} |
| 407 |
if (!ourHandler) { |
| 408 |
return wrapEventHandler(theirHandler); |
| 409 |
} |
| 410 |
return (...args) => { |
| 411 |
const event = args[0]; |
| 412 |
if (isSyntheticEvent(event)) { |
| 413 |
const baseUIEvent = event; |
| 414 |
makeEventPreventable(baseUIEvent); |
| 415 |
const result2 = theirHandler(...args); |
| 416 |
if (!baseUIEvent.baseUIHandlerPrevented) { |
| 417 |
ourHandler?.(...args); |
| 418 |
} |
| 419 |
return result2; |
| 420 |
} |
| 421 |
const result = theirHandler(...args); |
| 422 |
ourHandler?.(...args); |
| 423 |
return result; |
| 424 |
}; |
| 425 |
} |
| 426 |
function wrapEventHandler(handler) { |
| 427 |
if (!handler) { |
| 428 |
return handler; |
| 429 |
} |
| 430 |
return (...args) => { |
| 431 |
const event = args[0]; |
| 432 |
if (isSyntheticEvent(event)) { |
| 433 |
makeEventPreventable(event); |
| 434 |
} |
| 435 |
return handler(...args); |
| 436 |
}; |
| 437 |
} |
| 438 |
function makeEventPreventable(event) { |
| 439 |
event.preventBaseUIHandler = () => { |
| 440 |
event.baseUIHandlerPrevented = true; |
| 441 |
}; |
| 442 |
return event; |
| 443 |
} |
| 444 |
function mergeClassNames(ourClassName, theirClassName) { |
| 445 |
if (theirClassName) { |
| 446 |
if (ourClassName) { |
| 447 |
return theirClassName + " " + ourClassName; |
| 448 |
} |
| 449 |
return theirClassName; |
| 450 |
} |
| 451 |
return ourClassName; |
| 452 |
} |
| 453 |
function isSyntheticEvent(event) { |
| 454 |
return event != null && typeof event === "object" && "nativeEvent" in event; |
| 455 |
} |
| 456 |
|
| 457 |
// node_modules/@base-ui/react/internals/useRenderElement.mjs |
| 458 |
var import_react = __toESM(require_react(), 1); |
| 459 |
function useRenderElement(element, componentProps, params = {}) { |
| 460 |
const renderProp = componentProps.render; |
| 461 |
const outProps = useRenderElementProps(componentProps, params); |
| 462 |
if (params.enabled === false) { |
| 463 |
return null; |
| 464 |
} |
| 465 |
const state = params.state ?? EMPTY_OBJECT; |
| 466 |
return evaluateRenderProp(element, renderProp, outProps, state); |
| 467 |
} |
| 468 |
function useRenderElementProps(componentProps, params = {}) { |
| 469 |
const { |
| 470 |
className: classNameProp, |
| 471 |
style: styleProp, |
| 472 |
render: renderProp |
| 473 |
} = componentProps; |
| 474 |
const { |
| 475 |
state = EMPTY_OBJECT, |
| 476 |
ref, |
| 477 |
props, |
| 478 |
stateAttributesMapping, |
| 479 |
enabled = true |
| 480 |
} = params; |
| 481 |
const className = enabled ? resolveClassName(classNameProp, state) : void 0; |
| 482 |
const style = enabled ? resolveStyle(styleProp, state) : void 0; |
| 483 |
const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT; |
| 484 |
const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0; |
| 485 |
const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT; |
| 486 |
if (typeof document !== "undefined") { |
| 487 |
if (!enabled) { |
| 488 |
useMergedRefs(null, null); |
| 489 |
} else if (Array.isArray(ref)) { |
| 490 |
outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); |
| 491 |
} else { |
| 492 |
outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); |
| 493 |
} |
| 494 |
} |
| 495 |
if (!enabled) { |
| 496 |
return EMPTY_OBJECT; |
| 497 |
} |
| 498 |
if (className !== void 0) { |
| 499 |
outProps.className = mergeClassNames(outProps.className, className); |
| 500 |
} |
| 501 |
if (style !== void 0) { |
| 502 |
outProps.style = mergeObjects(outProps.style, style); |
| 503 |
} |
| 504 |
return outProps; |
| 505 |
} |
| 506 |
function resolveRenderFunctionProps(props) { |
| 507 |
if (Array.isArray(props)) { |
| 508 |
return mergePropsN(props); |
| 509 |
} |
| 510 |
return mergeProps(void 0, props); |
| 511 |
} |
| 512 |
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); |
| 513 |
var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/; |
| 514 |
var LOWERCASE_CHARACTER_PATTERN = /[a-z]/; |
| 515 |
function evaluateRenderProp(element, render, props, state) { |
| 516 |
if (render) { |
| 517 |
if (typeof render === "function") { |
| 518 |
if (true) { |
| 519 |
warnIfRenderPropLooksLikeComponent(render); |
| 520 |
} |
| 521 |
return render(props, state); |
| 522 |
} |
| 523 |
const mergedProps = mergeProps(props, render.props); |
| 524 |
mergedProps.ref = props.ref; |
| 525 |
let newElement = render; |
| 526 |
if (newElement?.$$typeof === REACT_LAZY_TYPE) { |
| 527 |
const children = React4.Children.toArray(render); |
| 528 |
newElement = children[0]; |
| 529 |
} |
| 530 |
if (true) { |
| 531 |
if (!/* @__PURE__ */ React4.isValidElement(newElement)) { |
| 532 |
throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n")); |
| 533 |
} |
| 534 |
} |
| 535 |
return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps); |
| 536 |
} |
| 537 |
if (element) { |
| 538 |
if (typeof element === "string") { |
| 539 |
return renderTag(element, props); |
| 540 |
} |
| 541 |
} |
| 542 |
throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8)); |
| 543 |
} |
| 544 |
function warnIfRenderPropLooksLikeComponent(renderFn) { |
| 545 |
const functionName = renderFn.name; |
| 546 |
if (functionName.length === 0) { |
| 547 |
return; |
| 548 |
} |
| 549 |
if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) { |
| 550 |
return; |
| 551 |
} |
| 552 |
if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) { |
| 553 |
return; |
| 554 |
} |
| 555 |
warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop"); |
| 556 |
} |
| 557 |
function renderTag(Tag, props) { |
| 558 |
if (Tag === "button") { |
| 559 |
return /* @__PURE__ */ (0, import_react.createElement)("button", { |
| 560 |
type: "button", |
| 561 |
...props, |
| 562 |
key: props.key |
| 563 |
}); |
| 564 |
} |
| 565 |
if (Tag === "img") { |
| 566 |
return /* @__PURE__ */ (0, import_react.createElement)("img", { |
| 567 |
alt: "", |
| 568 |
...props, |
| 569 |
key: props.key |
| 570 |
}); |
| 571 |
} |
| 572 |
return /* @__PURE__ */ React4.createElement(Tag, props); |
| 573 |
} |
| 574 |
|
| 575 |
// node_modules/@base-ui/react/use-render/useRender.mjs |
| 576 |
function useRender(params) { |
| 577 |
return useRenderElement(params.defaultTagName ?? "div", params, params); |
| 578 |
} |
| 579 |
|
| 580 |
// packages/ui/build-module/text/text.mjs |
| 581 |
var import_element = __toESM(require_element(), 1); |
| 582 |
var STYLE_HASH_ATTRIBUTE = "data-wp-hash"; |
| 583 |
function getRuntime() { |
| 584 |
const globalScope = globalThis; |
| 585 |
if (globalScope.__wpStyleRuntime) { |
| 586 |
return globalScope.__wpStyleRuntime; |
| 587 |
} |
| 588 |
globalScope.__wpStyleRuntime = { |
| 589 |
documents: /* @__PURE__ */ new Map(), |
| 590 |
styles: /* @__PURE__ */ new Map(), |
| 591 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 592 |
}; |
| 593 |
if (typeof document !== "undefined") { |
| 594 |
registerDocument(document); |
| 595 |
} |
| 596 |
return globalScope.__wpStyleRuntime; |
| 597 |
} |
| 598 |
function documentContainsStyleHash(targetDocument, hash) { |
| 599 |
if (!targetDocument.head) { |
| 600 |
return false; |
| 601 |
} |
| 602 |
for (const style of targetDocument.head.querySelectorAll( |
| 603 |
`style[${STYLE_HASH_ATTRIBUTE}]` |
| 604 |
)) { |
| 605 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) { |
| 606 |
return true; |
| 607 |
} |
| 608 |
} |
| 609 |
return false; |
| 610 |
} |
| 611 |
function injectStyle(targetDocument, hash, css) { |
| 612 |
if (!targetDocument.head) { |
| 613 |
return; |
| 614 |
} |
| 615 |
const runtime = getRuntime(); |
| 616 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 617 |
if (!injectedStyles) { |
| 618 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 619 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 620 |
} |
| 621 |
if (injectedStyles.has(hash)) { |
| 622 |
return; |
| 623 |
} |
| 624 |
if (documentContainsStyleHash(targetDocument, hash)) { |
| 625 |
injectedStyles.add(hash); |
| 626 |
return; |
| 627 |
} |
| 628 |
const style = targetDocument.createElement("style"); |
| 629 |
style.setAttribute(STYLE_HASH_ATTRIBUTE, hash); |
| 630 |
style.appendChild(targetDocument.createTextNode(css)); |
| 631 |
targetDocument.head.appendChild(style); |
| 632 |
injectedStyles.add(hash); |
| 633 |
} |
| 634 |
function registerDocument(targetDocument) { |
| 635 |
const runtime = getRuntime(); |
| 636 |
runtime.documents.set( |
| 637 |
targetDocument, |
| 638 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 639 |
); |
| 640 |
for (const [hash, css] of runtime.styles) { |
| 641 |
injectStyle(targetDocument, hash, css); |
| 642 |
} |
| 643 |
return () => { |
| 644 |
const count = runtime.documents.get(targetDocument); |
| 645 |
if (count === void 0) { |
| 646 |
return; |
| 647 |
} |
| 648 |
if (count <= 1) { |
| 649 |
runtime.documents.delete(targetDocument); |
| 650 |
return; |
| 651 |
} |
| 652 |
runtime.documents.set(targetDocument, count - 1); |
| 653 |
}; |
| 654 |
} |
| 655 |
function registerStyle(hash, css) { |
| 656 |
const runtime = getRuntime(); |
| 657 |
runtime.styles.set(hash, css); |
| 658 |
for (const targetDocument of runtime.documents.keys()) { |
| 659 |
injectStyle(targetDocument, hash, css); |
| 660 |
} |
| 661 |
} |
| 662 |
if (typeof process === "undefined" || true) { |
| 663 |
registerStyle("a495f9d138", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}'); |
| 664 |
} |
| 665 |
var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" }; |
| 666 |
if (typeof process === "undefined" || true) { |
| 667 |
registerStyle("af6d9984a6", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}"); |
| 668 |
} |
| 669 |
var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" }; |
| 670 |
var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) { |
| 671 |
const element = useRender({ |
| 672 |
render, |
| 673 |
defaultTagName: "span", |
| 674 |
ref, |
| 675 |
props: mergeProps(props, { |
| 676 |
className: clsx_default( |
| 677 |
style_default.text, |
| 678 |
global_css_defense_default.heading, |
| 679 |
global_css_defense_default.p, |
| 680 |
style_default[variant], |
| 681 |
className |
| 682 |
) |
| 683 |
}) |
| 684 |
}); |
| 685 |
return element; |
| 686 |
}); |
| 687 |
|
| 688 |
// packages/ui/build-module/icon/icon.mjs |
| 689 |
var import_element2 = __toESM(require_element(), 1); |
| 690 |
var import_primitives4 = __toESM(require_primitives(), 1); |
| 691 |
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); |
| 692 |
var Icon = (0, import_element2.forwardRef)(function Icon2({ icon, size = 24, ...restProps }, ref) { |
| 693 |
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)( |
| 694 |
import_primitives4.SVG, |
| 695 |
{ |
| 696 |
ref, |
| 697 |
...icon.props, |
| 698 |
...restProps, |
| 699 |
width: size, |
| 700 |
height: size |
| 701 |
} |
| 702 |
); |
| 703 |
}); |
| 704 |
|
| 705 |
// packages/ui/build-module/stack/stack.mjs |
| 706 |
var import_element3 = __toESM(require_element(), 1); |
| 707 |
var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash"; |
| 708 |
function getRuntime2() { |
| 709 |
const globalScope = globalThis; |
| 710 |
if (globalScope.__wpStyleRuntime) { |
| 711 |
return globalScope.__wpStyleRuntime; |
| 712 |
} |
| 713 |
globalScope.__wpStyleRuntime = { |
| 714 |
documents: /* @__PURE__ */ new Map(), |
| 715 |
styles: /* @__PURE__ */ new Map(), |
| 716 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 717 |
}; |
| 718 |
if (typeof document !== "undefined") { |
| 719 |
registerDocument2(document); |
| 720 |
} |
| 721 |
return globalScope.__wpStyleRuntime; |
| 722 |
} |
| 723 |
function documentContainsStyleHash2(targetDocument, hash) { |
| 724 |
if (!targetDocument.head) { |
| 725 |
return false; |
| 726 |
} |
| 727 |
for (const style of targetDocument.head.querySelectorAll( |
| 728 |
`style[${STYLE_HASH_ATTRIBUTE2}]` |
| 729 |
)) { |
| 730 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) { |
| 731 |
return true; |
| 732 |
} |
| 733 |
} |
| 734 |
return false; |
| 735 |
} |
| 736 |
function injectStyle2(targetDocument, hash, css) { |
| 737 |
if (!targetDocument.head) { |
| 738 |
return; |
| 739 |
} |
| 740 |
const runtime = getRuntime2(); |
| 741 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 742 |
if (!injectedStyles) { |
| 743 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 744 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 745 |
} |
| 746 |
if (injectedStyles.has(hash)) { |
| 747 |
return; |
| 748 |
} |
| 749 |
if (documentContainsStyleHash2(targetDocument, hash)) { |
| 750 |
injectedStyles.add(hash); |
| 751 |
return; |
| 752 |
} |
| 753 |
const style = targetDocument.createElement("style"); |
| 754 |
style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash); |
| 755 |
style.appendChild(targetDocument.createTextNode(css)); |
| 756 |
targetDocument.head.appendChild(style); |
| 757 |
injectedStyles.add(hash); |
| 758 |
} |
| 759 |
function registerDocument2(targetDocument) { |
| 760 |
const runtime = getRuntime2(); |
| 761 |
runtime.documents.set( |
| 762 |
targetDocument, |
| 763 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 764 |
); |
| 765 |
for (const [hash, css] of runtime.styles) { |
| 766 |
injectStyle2(targetDocument, hash, css); |
| 767 |
} |
| 768 |
return () => { |
| 769 |
const count = runtime.documents.get(targetDocument); |
| 770 |
if (count === void 0) { |
| 771 |
return; |
| 772 |
} |
| 773 |
if (count <= 1) { |
| 774 |
runtime.documents.delete(targetDocument); |
| 775 |
return; |
| 776 |
} |
| 777 |
runtime.documents.set(targetDocument, count - 1); |
| 778 |
}; |
| 779 |
} |
| 780 |
function registerStyle2(hash, css) { |
| 781 |
const runtime = getRuntime2(); |
| 782 |
runtime.styles.set(hash, css); |
| 783 |
for (const targetDocument of runtime.documents.keys()) { |
| 784 |
injectStyle2(targetDocument, hash, css); |
| 785 |
} |
| 786 |
} |
| 787 |
if (typeof process === "undefined" || true) { |
| 788 |
registerStyle2("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}"); |
| 789 |
} |
| 790 |
var style_default2 = { "stack": "_19ce0419607e1896__stack" }; |
| 791 |
var gapTokens = { |
| 792 |
xs: "var(--wpds-dimension-gap-xs, 4px)", |
| 793 |
sm: "var(--wpds-dimension-gap-sm, 8px)", |
| 794 |
md: "var(--wpds-dimension-gap-md, 12px)", |
| 795 |
lg: "var(--wpds-dimension-gap-lg, 16px)", |
| 796 |
xl: "var(--wpds-dimension-gap-xl, 24px)", |
| 797 |
"2xl": "var(--wpds-dimension-gap-2xl, 32px)", |
| 798 |
"3xl": "var(--wpds-dimension-gap-3xl, 40px)" |
| 799 |
}; |
| 800 |
var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) { |
| 801 |
const style = { |
| 802 |
gap: gap && gapTokens[gap], |
| 803 |
alignItems: align, |
| 804 |
justifyContent: justify, |
| 805 |
flexDirection: direction, |
| 806 |
flexWrap: wrap |
| 807 |
}; |
| 808 |
const element = useRender({ |
| 809 |
render, |
| 810 |
ref, |
| 811 |
props: mergeProps(props, { style, className: style_default2.stack }) |
| 812 |
}); |
| 813 |
return element; |
| 814 |
}); |
| 815 |
|
| 816 |
// packages/ui/build-module/link/link.mjs |
| 817 |
var import_element4 = __toESM(require_element(), 1); |
| 818 |
var import_i18n = __toESM(require_i18n(), 1); |
| 819 |
var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); |
| 820 |
var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash"; |
| 821 |
function getRuntime3() { |
| 822 |
const globalScope = globalThis; |
| 823 |
if (globalScope.__wpStyleRuntime) { |
| 824 |
return globalScope.__wpStyleRuntime; |
| 825 |
} |
| 826 |
globalScope.__wpStyleRuntime = { |
| 827 |
documents: /* @__PURE__ */ new Map(), |
| 828 |
styles: /* @__PURE__ */ new Map(), |
| 829 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 830 |
}; |
| 831 |
if (typeof document !== "undefined") { |
| 832 |
registerDocument3(document); |
| 833 |
} |
| 834 |
return globalScope.__wpStyleRuntime; |
| 835 |
} |
| 836 |
function documentContainsStyleHash3(targetDocument, hash) { |
| 837 |
if (!targetDocument.head) { |
| 838 |
return false; |
| 839 |
} |
| 840 |
for (const style of targetDocument.head.querySelectorAll( |
| 841 |
`style[${STYLE_HASH_ATTRIBUTE3}]` |
| 842 |
)) { |
| 843 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) { |
| 844 |
return true; |
| 845 |
} |
| 846 |
} |
| 847 |
return false; |
| 848 |
} |
| 849 |
function injectStyle3(targetDocument, hash, css) { |
| 850 |
if (!targetDocument.head) { |
| 851 |
return; |
| 852 |
} |
| 853 |
const runtime = getRuntime3(); |
| 854 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 855 |
if (!injectedStyles) { |
| 856 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 857 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 858 |
} |
| 859 |
if (injectedStyles.has(hash)) { |
| 860 |
return; |
| 861 |
} |
| 862 |
if (documentContainsStyleHash3(targetDocument, hash)) { |
| 863 |
injectedStyles.add(hash); |
| 864 |
return; |
| 865 |
} |
| 866 |
const style = targetDocument.createElement("style"); |
| 867 |
style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash); |
| 868 |
style.appendChild(targetDocument.createTextNode(css)); |
| 869 |
targetDocument.head.appendChild(style); |
| 870 |
injectedStyles.add(hash); |
| 871 |
} |
| 872 |
function registerDocument3(targetDocument) { |
| 873 |
const runtime = getRuntime3(); |
| 874 |
runtime.documents.set( |
| 875 |
targetDocument, |
| 876 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 877 |
); |
| 878 |
for (const [hash, css] of runtime.styles) { |
| 879 |
injectStyle3(targetDocument, hash, css); |
| 880 |
} |
| 881 |
return () => { |
| 882 |
const count = runtime.documents.get(targetDocument); |
| 883 |
if (count === void 0) { |
| 884 |
return; |
| 885 |
} |
| 886 |
if (count <= 1) { |
| 887 |
runtime.documents.delete(targetDocument); |
| 888 |
return; |
| 889 |
} |
| 890 |
runtime.documents.set(targetDocument, count - 1); |
| 891 |
}; |
| 892 |
} |
| 893 |
function registerStyle3(hash, css) { |
| 894 |
const runtime = getRuntime3(); |
| 895 |
runtime.styles.set(hash, css); |
| 896 |
for (const targetDocument of runtime.documents.keys()) { |
| 897 |
injectStyle3(targetDocument, hash, css); |
| 898 |
} |
| 899 |
} |
| 900 |
if (typeof process === "undefined" || true) { |
| 901 |
registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); |
| 902 |
} |
| 903 |
var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; |
| 904 |
if (typeof process === "undefined" || true) { |
| 905 |
registerStyle3("5f8e7aa0bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}"); |
| 906 |
} |
| 907 |
var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" }; |
| 908 |
if (typeof process === "undefined" || true) { |
| 909 |
registerStyle3("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}'); |
| 910 |
} |
| 911 |
var style_default3 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" }; |
| 912 |
if (typeof process === "undefined" || true) { |
| 913 |
registerStyle3("af6d9984a6", "._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}"); |
| 914 |
} |
| 915 |
var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" }; |
| 916 |
var Link = (0, import_element4.forwardRef)(function Link2({ |
| 917 |
children, |
| 918 |
variant = "default", |
| 919 |
tone = "brand", |
| 920 |
openInNewTab = false, |
| 921 |
render, |
| 922 |
className, |
| 923 |
...props |
| 924 |
}, ref) { |
| 925 |
const element = useRender({ |
| 926 |
render, |
| 927 |
defaultTagName: "a", |
| 928 |
ref, |
| 929 |
props: mergeProps(props, { |
| 930 |
className: clsx_default( |
| 931 |
global_css_defense_default2.a, |
| 932 |
resets_default["box-sizing"], |
| 933 |
focus_default["outset-ring--focus-except-active"], |
| 934 |
variant !== "unstyled" && style_default3.link, |
| 935 |
variant !== "unstyled" && style_default3[`is-${tone}`], |
| 936 |
variant === "unstyled" && style_default3["is-unstyled"], |
| 937 |
className |
| 938 |
), |
| 939 |
target: openInNewTab ? "_blank" : void 0, |
| 940 |
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [ |
| 941 |
children, |
| 942 |
openInNewTab && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)( |
| 943 |
"span", |
| 944 |
{ |
| 945 |
className: style_default3["link-icon"], |
| 946 |
role: "img", |
| 947 |
"aria-label": ( |
| 948 |
/* translators: accessibility text appended to link text */ |
| 949 |
(0, import_i18n.__)("(opens in a new tab)") |
| 950 |
) |
| 951 |
} |
| 952 |
) |
| 953 |
] }) |
| 954 |
}) |
| 955 |
}); |
| 956 |
return element; |
| 957 |
}); |
| 958 |
|
| 959 |
// widgets/welcome/components/banner/banner.tsx |
| 960 |
var import_i18n2 = __toESM(require_i18n()); |
| 961 |
|
| 962 |
// widgets/welcome/components/header-background/header-background.tsx |
| 963 |
var import_element5 = __toESM(require_element()); |
| 964 |
var import_primitives5 = __toESM(require_primitives()); |
| 965 |
|
| 966 |
// packages/style-runtime/src/index.ts |
| 967 |
var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash"; |
| 968 |
function getRuntime4() { |
| 969 |
const globalScope = globalThis; |
| 970 |
if (globalScope.__wpStyleRuntime) { |
| 971 |
return globalScope.__wpStyleRuntime; |
| 972 |
} |
| 973 |
globalScope.__wpStyleRuntime = { |
| 974 |
documents: /* @__PURE__ */ new Map(), |
| 975 |
styles: /* @__PURE__ */ new Map(), |
| 976 |
injectedStyles: /* @__PURE__ */ new WeakMap() |
| 977 |
}; |
| 978 |
if (typeof document !== "undefined") { |
| 979 |
registerDocument4(document); |
| 980 |
} |
| 981 |
return globalScope.__wpStyleRuntime; |
| 982 |
} |
| 983 |
function documentContainsStyleHash4(targetDocument, hash) { |
| 984 |
if (!targetDocument.head) { |
| 985 |
return false; |
| 986 |
} |
| 987 |
for (const style of targetDocument.head.querySelectorAll( |
| 988 |
`style[${STYLE_HASH_ATTRIBUTE4}]` |
| 989 |
)) { |
| 990 |
if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) { |
| 991 |
return true; |
| 992 |
} |
| 993 |
} |
| 994 |
return false; |
| 995 |
} |
| 996 |
function injectStyle4(targetDocument, hash, css) { |
| 997 |
if (!targetDocument.head) { |
| 998 |
return; |
| 999 |
} |
| 1000 |
const runtime = getRuntime4(); |
| 1001 |
let injectedStyles = runtime.injectedStyles.get(targetDocument); |
| 1002 |
if (!injectedStyles) { |
| 1003 |
injectedStyles = /* @__PURE__ */ new Set(); |
| 1004 |
runtime.injectedStyles.set(targetDocument, injectedStyles); |
| 1005 |
} |
| 1006 |
if (injectedStyles.has(hash)) { |
| 1007 |
return; |
| 1008 |
} |
| 1009 |
if (documentContainsStyleHash4(targetDocument, hash)) { |
| 1010 |
injectedStyles.add(hash); |
| 1011 |
return; |
| 1012 |
} |
| 1013 |
const style = targetDocument.createElement("style"); |
| 1014 |
style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash); |
| 1015 |
style.appendChild(targetDocument.createTextNode(css)); |
| 1016 |
targetDocument.head.appendChild(style); |
| 1017 |
injectedStyles.add(hash); |
| 1018 |
} |
| 1019 |
function registerDocument4(targetDocument) { |
| 1020 |
const runtime = getRuntime4(); |
| 1021 |
runtime.documents.set( |
| 1022 |
targetDocument, |
| 1023 |
(runtime.documents.get(targetDocument) ?? 0) + 1 |
| 1024 |
); |
| 1025 |
for (const [hash, css] of runtime.styles) { |
| 1026 |
injectStyle4(targetDocument, hash, css); |
| 1027 |
} |
| 1028 |
return () => { |
| 1029 |
const count = runtime.documents.get(targetDocument); |
| 1030 |
if (count === void 0) { |
| 1031 |
return; |
| 1032 |
} |
| 1033 |
if (count <= 1) { |
| 1034 |
runtime.documents.delete(targetDocument); |
| 1035 |
return; |
| 1036 |
} |
| 1037 |
runtime.documents.set(targetDocument, count - 1); |
| 1038 |
}; |
| 1039 |
} |
| 1040 |
function registerStyle4(hash, css) { |
| 1041 |
const runtime = getRuntime4(); |
| 1042 |
runtime.styles.set(hash, css); |
| 1043 |
for (const targetDocument of runtime.documents.keys()) { |
| 1044 |
injectStyle4(targetDocument, hash, css); |
| 1045 |
} |
| 1046 |
} |
| 1047 |
|
| 1048 |
// widgets/welcome/components/header-background/header-background.module.css |
| 1049 |
if (typeof process === "undefined" || true) { |
| 1050 |
registerStyle4("7554282f0a", "._2dc6908d13f9b567__root{block-size:100%;inline-size:100%;inset:0;pointer-events:none;position:absolute;z-index:0}.ce013c8671de98ad__glint{transform:translateX(-360px)}@media not (prefers-reduced-motion){.ce013c8671de98ad__glint{animation:eaaa6cd949ed5785__welcomeVersionGlint 10s var(--wpds-motion-easing-expressive,cubic-bezier(.25,0,0,1)) 3s 3}}@keyframes eaaa6cd949ed5785__welcomeVersionGlint{0%{transform:translateX(-360px)}50%{transform:translateX(1040px)}to{transform:translateX(1040px)}}"); |
| 1051 |
} |
| 1052 |
var header_background_default = { "root": "_2dc6908d13f9b567__root", "glint": "ce013c8671de98ad__glint", "welcomeVersionGlint": "eaaa6cd949ed5785__welcomeVersionGlint" }; |
| 1053 |
|
| 1054 |
// widgets/welcome/components/header-background/header-background.tsx |
| 1055 |
var import_jsx_runtime6 = __toESM(require_jsx_runtime()); |
| 1056 |
var GLYPH_HEIGHT = 200; |
| 1057 |
var GLYPHS = { |
| 1058 |
"0": { |
| 1059 |
advance: 150, |
| 1060 |
strokes: [{ d: "M76 30 a48 82 0 1 0 0 164 a48 82 0 1 0 0 -164 Z" }] |
| 1061 |
}, |
| 1062 |
"1": { advance: 110, strokes: [{ d: "M30 56 L74 22 L74 202" }] }, |
| 1063 |
"2": { |
| 1064 |
advance: 150, |
| 1065 |
strokes: [ |
| 1066 |
{ d: "M34 66 A44 40 0 1 1 120 70 C120 112 38 152 30 196 L124 196" } |
| 1067 |
] |
| 1068 |
}, |
| 1069 |
"3": { |
| 1070 |
advance: 150, |
| 1071 |
strokes: [{ d: "M34 54 A42 36 0 1 1 80 102 A50 48 0 1 1 30 174" }] |
| 1072 |
}, |
| 1073 |
"4": { advance: 150, strokes: [{ d: "M106 196 V40 L28 138 H128" }] }, |
| 1074 |
"5": { |
| 1075 |
advance: 150, |
| 1076 |
strokes: [{ d: "M114 40 H58 L57 104 H74 A46 48 0 1 1 50 186" }] |
| 1077 |
}, |
| 1078 |
"6": { |
| 1079 |
advance: 150, |
| 1080 |
strokes: [ |
| 1081 |
{ |
| 1082 |
d: "M28 143 a46 46 0 1 0 92 0 a46 46 0 1 0 -92 0", |
| 1083 |
vec: [-39, 156, 78, 39], |
| 1084 |
stops: "ring" |
| 1085 |
}, |
| 1086 |
{ d: "M117 34 L42 110", vec: [97, -18, -56, 135] } |
| 1087 |
] |
| 1088 |
}, |
| 1089 |
"7": { advance: 150, strokes: [{ d: "M30 24 H128 L64 202" }] }, |
| 1090 |
"8": { |
| 1091 |
advance: 150, |
| 1092 |
strokes: [ |
| 1093 |
{ |
| 1094 |
d: "M76 26 a38 38 0 1 0 0 76 a38 38 0 1 0 0 -76", |
| 1095 |
vec: [120, 16, 30, 200] |
| 1096 |
}, |
| 1097 |
{ |
| 1098 |
d: "M76 106 a46 46 0 1 0 0 92 a46 46 0 1 0 0 -92", |
| 1099 |
vec: [120, 16, 30, 200] |
| 1100 |
} |
| 1101 |
] |
| 1102 |
}, |
| 1103 |
"9": { |
| 1104 |
advance: 150, |
| 1105 |
strokes: [ |
| 1106 |
{ |
| 1107 |
d: "M30 82 a46 46 0 1 0 92 0 a46 46 0 1 0 -92 0", |
| 1108 |
vec: [190, 69, 73, 186], |
| 1109 |
stops: "ring" |
| 1110 |
}, |
| 1111 |
{ d: "M33 190 L109 115", vec: [54, 243, 207, 90] } |
| 1112 |
] |
| 1113 |
}, |
| 1114 |
".": { advance: 80, circles: [{ cx: 40, cy: 178, r: 26 }] } |
| 1115 |
}; |
| 1116 |
var VIEW_WIDTH = 1e3; |
| 1117 |
var VIEW_HEIGHT = 300; |
| 1118 |
var RIGHT_MARGIN = 40; |
| 1119 |
var GLYPH_GAP = 2; |
| 1120 |
var GLYPH_TOP = (VIEW_HEIGHT - GLYPH_HEIGHT) / 2; |
| 1121 |
var STOP_SETS = { |
| 1122 |
// Ring of the 6/9: light at the bottom, near-black where the stem lands. |
| 1123 |
ring: [ |
| 1124 |
["var(--banner-accent-warm)", 0], |
| 1125 |
["var(--banner-accent-brand)", 0.665], |
| 1126 |
["var(--banner-accent-dark)", 1] |
| 1127 |
], |
| 1128 |
// Stems and plain digits: near-black to light along the stroke. |
| 1129 |
linear: [ |
| 1130 |
["var(--banner-accent-dark)", 0], |
| 1131 |
["var(--banner-accent-brand)", 0.5], |
| 1132 |
["var(--banner-accent-warm)", 1] |
| 1133 |
] |
| 1134 |
}; |
| 1135 |
function HeaderBackground({ version: version2 }) { |
| 1136 |
const idBase = (0, import_element5.useId)(); |
| 1137 |
const maskId = `${idBase}-glint-mask`; |
| 1138 |
const glintId = `${idBase}-glint`; |
| 1139 |
const placed = []; |
| 1140 |
let cursor = VIEW_WIDTH - RIGHT_MARGIN; |
| 1141 |
const chars = Array.from(version2); |
| 1142 |
for (let i = chars.length - 1; i >= 0; i--) { |
| 1143 |
const char = chars[i]; |
| 1144 |
if (!char) { |
| 1145 |
continue; |
| 1146 |
} |
| 1147 |
const glyph = GLYPHS[char]; |
| 1148 |
if (!glyph) { |
| 1149 |
continue; |
| 1150 |
} |
| 1151 |
const x = cursor - glyph.advance; |
| 1152 |
placed.unshift({ key: `${i}-${char}`, x, char, glyph }); |
| 1153 |
cursor = x - GLYPH_GAP; |
| 1154 |
} |
| 1155 |
const strokeId = (glyphIndex, strokeIndex) => `${idBase}-${glyphIndex}-${strokeIndex}`; |
| 1156 |
const renderGlyphs = (forMask) => placed.map(({ key, x, char, glyph }, glyphIndex) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)( |
| 1157 |
import_primitives5.G, |
| 1158 |
{ |
| 1159 |
"data-glyph": char, |
| 1160 |
transform: `translate(${x} ${GLYPH_TOP})`, |
| 1161 |
children: [ |
| 1162 |
glyph.strokes?.map((stroke, strokeIndex) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1163 |
import_primitives5.Path, |
| 1164 |
{ |
| 1165 |
d: stroke.d, |
| 1166 |
stroke: forMask ? "white" : `url(#${strokeId( |
| 1167 |
glyphIndex, |
| 1168 |
strokeIndex |
| 1169 |
)})` |
| 1170 |
}, |
| 1171 |
strokeIndex |
| 1172 |
)), |
| 1173 |
glyph.circles?.map((circle, circleIndex) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1174 |
import_primitives5.Circle, |
| 1175 |
{ |
| 1176 |
cx: circle.cx, |
| 1177 |
cy: circle.cy, |
| 1178 |
r: circle.r, |
| 1179 |
fill: forMask ? "white" : "var(--banner-accent-brand)" |
| 1180 |
}, |
| 1181 |
circleIndex |
| 1182 |
)) |
| 1183 |
] |
| 1184 |
}, |
| 1185 |
key |
| 1186 |
)); |
| 1187 |
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)( |
| 1188 |
import_primitives5.SVG, |
| 1189 |
{ |
| 1190 |
className: header_background_default.root, |
| 1191 |
preserveAspectRatio: "xMaxYMid slice", |
| 1192 |
fill: "none", |
| 1193 |
viewBox: `0 0 ${VIEW_WIDTH} ${VIEW_HEIGHT}`, |
| 1194 |
xmlns: "http://www.w3.org/2000/svg", |
| 1195 |
children: [ |
| 1196 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1197 |
import_primitives5.G, |
| 1198 |
{ |
| 1199 |
fill: "none", |
| 1200 |
strokeLinecap: "round", |
| 1201 |
strokeLinejoin: "round", |
| 1202 |
strokeWidth: "44", |
| 1203 |
children: renderGlyphs(false) |
| 1204 |
} |
| 1205 |
), |
| 1206 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives5.G, { mask: `url(#${maskId})`, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1207 |
import_primitives5.Rect, |
| 1208 |
{ |
| 1209 |
className: header_background_default.glint, |
| 1210 |
x: "0", |
| 1211 |
y: "0", |
| 1212 |
width: "300", |
| 1213 |
height: VIEW_HEIGHT, |
| 1214 |
fill: `url(#${glintId})` |
| 1215 |
} |
| 1216 |
) }), |
| 1217 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_primitives5.Defs, { children: [ |
| 1218 |
placed.flatMap( |
| 1219 |
({ glyph }, glyphIndex) => (glyph.strokes ?? []).map((stroke, strokeIndex) => { |
| 1220 |
const [x1, y1, x2, y2] = stroke.vec ?? [ |
| 1221 |
glyph.advance * 0.8, |
| 1222 |
6, |
| 1223 |
glyph.advance * 0.15, |
| 1224 |
196 |
| 1225 |
]; |
| 1226 |
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1227 |
import_primitives5.LinearGradient, |
| 1228 |
{ |
| 1229 |
id: strokeId(glyphIndex, strokeIndex), |
| 1230 |
gradientUnits: "userSpaceOnUse", |
| 1231 |
x1, |
| 1232 |
y1, |
| 1233 |
x2, |
| 1234 |
y2, |
| 1235 |
children: STOP_SETS[stroke.stops ?? "linear"].map( |
| 1236 |
([color, offset]) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1237 |
import_primitives5.Stop, |
| 1238 |
{ |
| 1239 |
offset, |
| 1240 |
stopColor: color |
| 1241 |
}, |
| 1242 |
offset |
| 1243 |
) |
| 1244 |
) |
| 1245 |
}, |
| 1246 |
`${glyphIndex}-${strokeIndex}` |
| 1247 |
); |
| 1248 |
}) |
| 1249 |
), |
| 1250 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_primitives5.LinearGradient, { id: glintId, x1: "0", y1: "0", x2: "1", y2: "0.55", children: [ |
| 1251 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1252 |
import_primitives5.Stop, |
| 1253 |
{ |
| 1254 |
offset: "0", |
| 1255 |
stopColor: "var(--banner-glint)", |
| 1256 |
stopOpacity: "0" |
| 1257 |
} |
| 1258 |
), |
| 1259 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1260 |
import_primitives5.Stop, |
| 1261 |
{ |
| 1262 |
offset: "0.4", |
| 1263 |
stopColor: "var(--banner-glint)", |
| 1264 |
stopOpacity: "0" |
| 1265 |
} |
| 1266 |
), |
| 1267 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1268 |
import_primitives5.Stop, |
| 1269 |
{ |
| 1270 |
offset: "0.5", |
| 1271 |
stopColor: "var(--banner-glint)", |
| 1272 |
stopOpacity: "0.65" |
| 1273 |
} |
| 1274 |
), |
| 1275 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1276 |
import_primitives5.Stop, |
| 1277 |
{ |
| 1278 |
offset: "0.6", |
| 1279 |
stopColor: "var(--banner-glint)", |
| 1280 |
stopOpacity: "0" |
| 1281 |
} |
| 1282 |
), |
| 1283 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1284 |
import_primitives5.Stop, |
| 1285 |
{ |
| 1286 |
offset: "1", |
| 1287 |
stopColor: "var(--banner-glint)", |
| 1288 |
stopOpacity: "0" |
| 1289 |
} |
| 1290 |
) |
| 1291 |
] }), |
| 1292 |
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1293 |
"mask", |
| 1294 |
{ |
| 1295 |
id: maskId, |
| 1296 |
maskUnits: "userSpaceOnUse", |
| 1297 |
x: "0", |
| 1298 |
y: "0", |
| 1299 |
width: VIEW_WIDTH, |
| 1300 |
height: VIEW_HEIGHT, |
| 1301 |
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( |
| 1302 |
import_primitives5.G, |
| 1303 |
{ |
| 1304 |
fill: "none", |
| 1305 |
strokeLinecap: "round", |
| 1306 |
strokeLinejoin: "round", |
| 1307 |
strokeWidth: "44", |
| 1308 |
children: renderGlyphs(true) |
| 1309 |
} |
| 1310 |
) |
| 1311 |
} |
| 1312 |
) |
| 1313 |
] }) |
| 1314 |
] |
| 1315 |
} |
| 1316 |
); |
| 1317 |
} |
| 1318 |
|
| 1319 |
// widgets/welcome/components/banner/banner.module.css |
| 1320 |
if (typeof process === "undefined" || true) { |
| 1321 |
registerStyle4("14307d48af", ".b895e30353489bf2__banner{--banner-bg:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--banner-fg:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--banner-accent-brand:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--banner-accent-warm:color-mix(in srgb,var(--wpds-color-stroke-surface-warning,#e1bc7c) 60%,var(--wpds-color-background-surface-neutral-strong,#fff));--banner-accent-dark:var(--wpds-color-foreground-content-neutral,#1e1e1e);--banner-glint:color-mix(in srgb,var(--banner-fg) 80%,var(--banner-accent-warm));background-color:var(--banner-bg);background-image:linear-gradient(108deg,var(--banner-bg) 0,var(--banner-bg) 26%,var(--banner-accent-brand) 66%,var(--banner-accent-warm) 100%);color:var(--banner-fg);min-height:clamp(180px,20cqi,320px);overflow:hidden;padding:var(--wpds-dimension-padding-3xl,32px);position:relative}._4e4405b6dd233bb1__bannerContent{position:relative;z-index:1}._97b3d6d6e1182c1e__bannerLink{color:inherit;text-decoration:underline;text-underline-offset:.2em}@container (max-width: 420px){.b895e30353489bf2__banner{padding:var(--wpds-dimension-padding-lg,16px)}}"); |
| 1322 |
} |
| 1323 |
var banner_default = { "banner": "b895e30353489bf2__banner", "bannerContent": "_4e4405b6dd233bb1__bannerContent", "bannerLink": "_97b3d6d6e1182c1e__bannerLink" }; |
| 1324 |
|
| 1325 |
// widgets/welcome/components/banner/banner.tsx |
| 1326 |
var import_jsx_runtime7 = __toESM(require_jsx_runtime()); |
| 1327 |
var DISPLAY_VERSION = "7.1"; |
| 1328 |
function Banner() { |
| 1329 |
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Stack, { className: banner_default.banner, direction: "column", justify: "center", children: [ |
| 1330 |
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(HeaderBackground, { version: DISPLAY_VERSION }), |
| 1331 |
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)( |
| 1332 |
Stack, |
| 1333 |
{ |
| 1334 |
className: banner_default.bannerContent, |
| 1335 |
gap: "sm", |
| 1336 |
direction: "column", |
| 1337 |
children: [ |
| 1338 |
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { variant: "heading-2xl", children: (0, import_i18n2.__)("Welcome to WordPress!") }), |
| 1339 |
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { variant: "heading-lg", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( |
| 1340 |
Link, |
| 1341 |
{ |
| 1342 |
className: banner_default.bannerLink, |
| 1343 |
href: "/wp-admin/about.php", |
| 1344 |
variant: "unstyled", |
| 1345 |
children: (0, import_i18n2.sprintf)( |
| 1346 |
/* translators: %s: Current WordPress version. */ |
| 1347 |
(0, import_i18n2.__)("Learn more about the %s version."), |
| 1348 |
DISPLAY_VERSION |
| 1349 |
) |
| 1350 |
} |
| 1351 |
) }) |
| 1352 |
] |
| 1353 |
} |
| 1354 |
) |
| 1355 |
] }); |
| 1356 |
} |
| 1357 |
|
| 1358 |
// widgets/welcome/components/feature-highlight/feature-highlight.module.css |
| 1359 |
if (typeof process === "undefined" || true) { |
| 1360 |
registerStyle4("2540adfbf6", ".ec4cdaa2ef617aad__iconBox{background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);block-size:calc(var(--wpds-dimension-padding-2xl, 24px)*2);border-radius:var(--wpds-border-radius-md,4px);color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);flex-shrink:0;inline-size:calc(var(--wpds-dimension-padding-2xl, 24px)*2)}"); |
| 1361 |
} |
| 1362 |
var feature_highlight_default = { "iconBox": "ec4cdaa2ef617aad__iconBox" }; |
| 1363 |
|
| 1364 |
// widgets/welcome/components/feature-highlight/feature-highlight.tsx |
| 1365 |
var import_jsx_runtime8 = __toESM(require_jsx_runtime()); |
| 1366 |
function FeatureHighlight({ |
| 1367 |
icon, |
| 1368 |
title, |
| 1369 |
description, |
| 1370 |
ctaUrl, |
| 1371 |
ctaLabel |
| 1372 |
}) { |
| 1373 |
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Stack, { direction: "row", gap: "lg", align: "start", children: [ |
| 1374 |
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)( |
| 1375 |
Stack, |
| 1376 |
{ |
| 1377 |
className: feature_highlight_default.iconBox, |
| 1378 |
direction: "column", |
| 1379 |
align: "center", |
| 1380 |
justify: "center", |
| 1381 |
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { icon }) |
| 1382 |
} |
| 1383 |
), |
| 1384 |
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Stack, { direction: "column", gap: "sm", children: [ |
| 1385 |
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { variant: "heading-md", render: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", {}), children: title }), |
| 1386 |
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { render: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", {}), children: description }), |
| 1387 |
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Link, { href: ctaUrl, children: ctaLabel }) |
| 1388 |
] }) |
| 1389 |
] }); |
| 1390 |
} |
| 1391 |
|
| 1392 |
// widgets/welcome/style.module.css |
| 1393 |
if (typeof process === "undefined" || true) { |
| 1394 |
registerStyle4("65df814a93", "._2f6622b092c712f3__root{container-type:inline-size;min-height:100%}.d2e844d428fd4410__columns{align-items:center;display:grid;flex:1;gap:var(--wpds-dimension-gap-2xl,32px);grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin:0 var(--wpds-dimension-padding-2xl,24px) var(--wpds-dimension-padding-2xl,24px);padding:0 var(--wpds-dimension-padding-2xl,24px) var(--wpds-dimension-padding-2xl,24px)}@container (max-width: 420px){.d2e844d428fd4410__columns{margin:0;padding:var(--wpds-dimension-padding-lg,16px)}}"); |
| 1395 |
} |
| 1396 |
var style_default4 = { "root": "_2f6622b092c712f3__root", "columns": "d2e844d428fd4410__columns" }; |
| 1397 |
|
| 1398 |
// widgets/welcome/render.tsx |
| 1399 |
var import_jsx_runtime9 = __toESM(require_jsx_runtime()); |
| 1400 |
function WelcomeBanner() { |
| 1401 |
const isClassicTheme = (0, import_data.useSelect)( |
| 1402 |
(select) => select(import_core_data.store).getCurrentTheme()?.is_block_theme === false, |
| 1403 |
[] |
| 1404 |
); |
| 1405 |
const customizeFeature = isClassicTheme ? { |
| 1406 |
icon: layout_default, |
| 1407 |
title: (0, import_i18n3.__)("Start customizing"), |
| 1408 |
description: (0, import_i18n3.__)( |
| 1409 |
"Configure your site\u2019s logo, header, menus, and more in the Customizer." |
| 1410 |
), |
| 1411 |
ctaUrl: "/wp-admin/customize.php", |
| 1412 |
ctaLabel: (0, import_i18n3.__)("Open the Customizer") |
| 1413 |
} : { |
| 1414 |
icon: layout_default, |
| 1415 |
title: (0, import_i18n3.__)("Customize your entire site with block themes"), |
| 1416 |
description: (0, import_i18n3.__)( |
| 1417 |
"Design everything on your site \u2014 from the header down to the footer, all using blocks and patterns." |
| 1418 |
), |
| 1419 |
ctaUrl: "/wp-admin/site-editor.php", |
| 1420 |
ctaLabel: (0, import_i18n3.__)("Open site editor") |
| 1421 |
}; |
| 1422 |
const stylesFeature = isClassicTheme ? { |
| 1423 |
icon: styles_default, |
| 1424 |
title: (0, import_i18n3.__)("Discover a new way to build your site"), |
| 1425 |
description: (0, import_i18n3.__)( |
| 1426 |
"There is a new kind of WordPress theme, called a block theme, that lets you build the site you\u2019ve always wanted \u2014 with blocks and styles." |
| 1427 |
), |
| 1428 |
ctaUrl: "https://wordpress.org/documentation/article/block-themes/", |
| 1429 |
ctaLabel: (0, import_i18n3.__)("Learn about block themes") |
| 1430 |
} : { |
| 1431 |
icon: styles_default, |
| 1432 |
title: (0, import_i18n3.__)("Switch up your site\u2019s look & feel with Styles"), |
| 1433 |
description: (0, import_i18n3.__)( |
| 1434 |
"Tweak your site, or give it a whole new look! Get creative \u2014 how about a new color palette or font?" |
| 1435 |
), |
| 1436 |
ctaUrl: "/wp-admin/site-editor.php?p=%2Fstyles", |
| 1437 |
ctaLabel: (0, import_i18n3.__)("Edit styles") |
| 1438 |
}; |
| 1439 |
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Stack, { className: style_default4.root, direction: "column", gap: "lg", children: [ |
| 1440 |
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Banner, {}), |
| 1441 |
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Stack, { className: style_default4.columns, children: [ |
| 1442 |
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)( |
| 1443 |
FeatureHighlight, |
| 1444 |
{ |
| 1445 |
icon: pencil_default, |
| 1446 |
title: (0, import_i18n3.__)( |
| 1447 |
"Author rich content with blocks and patterns" |
| 1448 |
), |
| 1449 |
description: (0, import_i18n3.__)( |
| 1450 |
"Patterns are pre-configured block layouts. Use them to get inspired or create new pages in a flash." |
| 1451 |
), |
| 1452 |
ctaUrl: "/wp-admin/post-new.php?post_type=page", |
| 1453 |
ctaLabel: (0, import_i18n3.__)("Add a new page") |
| 1454 |
} |
| 1455 |
), |
| 1456 |
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FeatureHighlight, { ...customizeFeature }), |
| 1457 |
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FeatureHighlight, { ...stylesFeature }) |
| 1458 |
] }) |
| 1459 |
] }); |
| 1460 |
} |
| 1461 |
export { |
| 1462 |
WelcomeBanner as default |
| 1463 |
}; |
| 1464 |
|