@qwik.dev/core 2.0.0-beta.6 → 2.0.0-beta.8

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.
Files changed (40) hide show
  1. package/bindings/qwik.darwin-arm64.node +0 -0
  2. package/bindings/qwik.darwin-x64.node +0 -0
  3. package/bindings/qwik.linux-x64-gnu.node +0 -0
  4. package/bindings/qwik.win32-x64-msvc.node +0 -0
  5. package/bindings/qwik_wasm_bg.wasm +0 -0
  6. package/dist/build/package.json +1 -1
  7. package/dist/cli.cjs +17 -17
  8. package/dist/core-internal.d.ts +10 -4
  9. package/dist/core.cjs +48 -15
  10. package/dist/core.cjs.map +1 -1
  11. package/dist/core.min.mjs +1 -1
  12. package/dist/core.mjs +47 -16
  13. package/dist/core.mjs.map +1 -1
  14. package/dist/core.prod.cjs +20 -14
  15. package/dist/core.prod.mjs +23 -14
  16. package/dist/loader/index.cjs +2 -2
  17. package/dist/loader/index.mjs +2 -2
  18. package/dist/loader/package.json +1 -1
  19. package/dist/optimizer.cjs +5 -5
  20. package/dist/optimizer.mjs +5 -5
  21. package/dist/qwikloader.debug.js +0 -13
  22. package/dist/qwikloader.js +1 -1
  23. package/dist/server.cjs +76 -23
  24. package/dist/server.d.ts +1 -0
  25. package/dist/server.mjs +75 -23
  26. package/dist/starters/features/auth/package.json +1 -1
  27. package/dist/starters/features/localize/package.json +3 -3
  28. package/dist/starters/features/localize/src/entry.ssr.tsx +17 -21
  29. package/dist/starters/features/pandacss/package.json +1 -1
  30. package/dist/starters/features/playwright/playwright-report/index.html +943 -903
  31. package/dist/starters/features/postcss/postcss.config.js +1 -1
  32. package/dist/starters/features/tailwind/package.json +2 -2
  33. package/dist/starters/features/tailwind/prettier.config.js +10 -0
  34. package/dist/starters/features/tailwind-v3/package.json +1 -1
  35. package/dist/starters/features/tailwind-v3/prettier.config.js +10 -0
  36. package/dist/testing/index.cjs +81 -29
  37. package/dist/testing/index.mjs +80 -29
  38. package/dist/testing/package.json +1 -1
  39. package/package.json +6 -6
  40. package/dist/starters/features/tailwind/.prettierrc.js +0 -3
@@ -1,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  plugins: {
3
3
  autoprefixer: {},
4
4
  "postcss-preset-env": {
@@ -21,8 +21,8 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "prettier-plugin-tailwindcss": "^0.6.11",
24
- "tailwindcss": "^4.0.0",
25
- "@tailwindcss/vite": "^4.0.0"
24
+ "tailwindcss": "^4.1.4",
25
+ "@tailwindcss/vite": "^4.1.4"
26
26
  },
27
27
  "type": "module"
28
28
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @see https://prettier.io/docs/configuration
3
+ * @type {import("prettier").Config}
4
+ */
5
+
6
+ const config = {
7
+ plugins: ["prettier-plugin-tailwindcss"],
8
+ };
9
+
10
+ export default config;
@@ -15,7 +15,7 @@
15
15
  "devDependencies": {
16
16
  "autoprefixer": "^10.4.19",
17
17
  "postcss": "^8.4.39",
18
- "prettier-plugin-tailwindcss": "^0.5.4",
18
+ "prettier-plugin-tailwindcss": "^0.6.11",
19
19
  "tailwindcss": "^3.4.17"
20
20
  }
21
21
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @see https://prettier.io/docs/configuration
3
+ * @type {import("prettier").Config}
4
+ */
5
+
6
+ const config = {
7
+ plugins: ["prettier-plugin-tailwindcss"],
8
+ };
9
+
10
+ export default config;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/testing 2.0.0-beta.6-dev+c42693f
3
+ * @qwik.dev/core/testing 2.0.0-beta.8-dev+434cd18
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -23309,15 +23309,15 @@ var mapApp_findIndx = (array, key, start) => {
23309
23309
  }
23310
23310
  return bottom << 1 ^ -1;
23311
23311
  };
23312
- var mapArray_set = (array, key, value, start) => {
23312
+ var mapArray_set = (array, key, value, start, allowNullValue = false) => {
23313
23313
  const indx = mapApp_findIndx(array, key, start);
23314
23314
  if (indx >= 0) {
23315
- if (value == null) {
23315
+ if (value == null && !allowNullValue) {
23316
23316
  array.splice(indx, 2);
23317
23317
  } else {
23318
23318
  array[indx + 1] = value;
23319
23319
  }
23320
- } else if (value != null) {
23320
+ } else if (value != null || allowNullValue) {
23321
23321
  array.splice(indx ^ -1, 0, key, value);
23322
23322
  }
23323
23323
  };
@@ -24903,8 +24903,10 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24903
24903
  );
24904
24904
  }
24905
24905
  if (key2 === dangerouslySetInnerHTML) {
24906
- element.innerHTML = value;
24907
- element.setAttribute(QContainerAttr, "html" /* HTML */);
24906
+ if (value) {
24907
+ element.innerHTML = String(value);
24908
+ element.setAttribute(QContainerAttr, "html" /* HTML */);
24909
+ }
24908
24910
  continue;
24909
24911
  }
24910
24912
  if (elementName === "textarea" && key2 === "value") {
@@ -28539,19 +28541,16 @@ var DomContainer = class extends _SharedContainer {
28539
28541
  }
28540
28542
  setContext(host, context, value) {
28541
28543
  let ctx = this.getHostProp(host, QCtxAttr);
28542
- if (!ctx) {
28544
+ if (ctx == null) {
28543
28545
  this.setHostProp(host, QCtxAttr, ctx = []);
28544
28546
  }
28545
- mapArray_set(ctx, context.id, value, 0);
28547
+ mapArray_set(ctx, context.id, value, 0, true);
28546
28548
  }
28547
28549
  resolveContext(host, contextId) {
28548
28550
  while (host) {
28549
28551
  const ctx = this.getHostProp(host, QCtxAttr);
28550
- if (ctx) {
28551
- const value = mapArray_get(ctx, contextId.id, 0);
28552
- if (value) {
28553
- return value;
28554
- }
28552
+ if (ctx != null && mapArray_has(ctx, contextId.id, 0)) {
28553
+ return mapArray_get(ctx, contextId.id, 0);
28555
28554
  }
28556
28555
  host = this.getParentHost(host);
28557
28556
  }
@@ -30313,6 +30312,10 @@ var allowedContent = (state) => {
30313
30312
  case 514 /* PHRASING_INSIDE_INPUT */:
30314
30313
  case 1026 /* PHRASING_CONTAINER */:
30315
30314
  return ["phrasing content", "<a>, <b>, <img>, <input> ... (no <div>, <p> ...)"];
30315
+ case 2050 /* PICTURE */:
30316
+ return ["picture content", "<source>, <img>"];
30317
+ case 4098 /* BUTTON */:
30318
+ return ["button content", "phrasing content except interactive elements"];
30316
30319
  case 1 /* DOCUMENT */:
30317
30320
  return ["document", "<html>"];
30318
30321
  }
@@ -30354,6 +30357,10 @@ function isTagAllowed(state, tag) {
30354
30357
  return isInPhrasing(tag, true);
30355
30358
  case 514 /* PHRASING_INSIDE_INPUT */:
30356
30359
  return isInPhrasing(tag, false);
30360
+ case 2050 /* PICTURE */:
30361
+ return isInPicture(tag);
30362
+ case 4098 /* BUTTON */:
30363
+ return isInButton(tag);
30357
30364
  case 1 /* DOCUMENT */:
30358
30365
  if (tag === "html") {
30359
30366
  return 32 /* HTML */;
@@ -30433,9 +30440,12 @@ function isInAnything(text) {
30433
30440
  case "body":
30434
30441
  return 0 /* NOT_ALLOWED */;
30435
30442
  case "button":
30443
+ return 4098 /* BUTTON */;
30436
30444
  case "input":
30437
30445
  case "textarea":
30438
30446
  return 514 /* PHRASING_INSIDE_INPUT */;
30447
+ case "picture":
30448
+ return 2050 /* PICTURE */;
30439
30449
  default:
30440
30450
  return 10 /* ANYTHING */;
30441
30451
  }
@@ -30479,12 +30489,35 @@ function isInTableColGroup(text) {
30479
30489
  return 0 /* NOT_ALLOWED */;
30480
30490
  }
30481
30491
  }
30492
+ function isInPicture(text) {
30493
+ switch (text) {
30494
+ case "source":
30495
+ return 4 /* EMPTY */;
30496
+ case "img":
30497
+ return 4 /* EMPTY */;
30498
+ default:
30499
+ return 0 /* NOT_ALLOWED */;
30500
+ }
30501
+ }
30502
+ function isInButton(text) {
30503
+ switch (text) {
30504
+ case "button":
30505
+ case "input":
30506
+ case "textarea":
30507
+ case "select":
30508
+ case "a":
30509
+ return 0 /* NOT_ALLOWED */;
30510
+ case "picture":
30511
+ return 2050 /* PICTURE */;
30512
+ default:
30513
+ return isInPhrasing(text, false);
30514
+ }
30515
+ }
30482
30516
  function isInPhrasing(text, allowInput) {
30483
30517
  switch (text) {
30484
30518
  case "svg":
30485
30519
  case "math":
30486
30520
  return 1026 /* PHRASING_CONTAINER */;
30487
- case "button":
30488
30521
  case "input":
30489
30522
  case "textarea":
30490
30523
  return allowInput ? 514 /* PHRASING_INSIDE_INPUT */ : 0 /* NOT_ALLOWED */;
@@ -30496,6 +30529,7 @@ function isInPhrasing(text, allowInput) {
30496
30529
  case "bdi":
30497
30530
  case "bdo":
30498
30531
  case "br":
30532
+ case "button":
30499
30533
  case "canvas":
30500
30534
  case "cite":
30501
30535
  case "code":
@@ -30523,7 +30557,6 @@ function isInPhrasing(text, allowInput) {
30523
30557
  case "object":
30524
30558
  case "option":
30525
30559
  case "output":
30526
- case "picture":
30527
30560
  case "progress":
30528
30561
  case "q":
30529
30562
  case "ruby":
@@ -30546,6 +30579,8 @@ function isInPhrasing(text, allowInput) {
30546
30579
  return allowInput ? 258 /* PHRASING_ANY */ : 514 /* PHRASING_INSIDE_INPUT */;
30547
30580
  case "style":
30548
30581
  return 2 /* TEXT */;
30582
+ case "picture":
30583
+ return 2050 /* PICTURE */;
30549
30584
  default:
30550
30585
  return 0 /* NOT_ALLOWED */;
30551
30586
  }
@@ -32051,7 +32086,11 @@ var preloaderPre = (container, options, nonce) => {
32051
32086
  }
32052
32087
  }
32053
32088
  const optsStr = opts.length ? `,{${opts.join(",")}}` : "";
32054
- container.openElement("link", null, ["rel", "modulepreload", "href", preloaderBundle]);
32089
+ const preloaderLinkAttrs = ["rel", "modulepreload", "href", preloaderBundle];
32090
+ if (nonce) {
32091
+ preloaderLinkAttrs.push("nonce", nonce);
32092
+ }
32093
+ container.openElement("link", null, preloaderLinkAttrs);
32055
32094
  container.closeElement();
32056
32095
  container.openElement("link", null, [
32057
32096
  "rel",
@@ -32075,7 +32114,11 @@ var preloaderPre = (container, options, nonce) => {
32075
32114
  }
32076
32115
  const corePath = simplifyPath(base2, resolvedManifest == null ? void 0 : resolvedManifest.manifest.core);
32077
32116
  if (corePath) {
32078
- container.openElement("link", null, ["rel", "modulepreload", "href", corePath]);
32117
+ const linkAttrs = ["rel", "modulepreload", "href", corePath];
32118
+ if (nonce) {
32119
+ linkAttrs.push("nonce", nonce);
32120
+ }
32121
+ container.openElement("link", null, linkAttrs);
32079
32122
  container.closeElement();
32080
32123
  }
32081
32124
  };
@@ -32282,21 +32325,18 @@ var SSRContainer = class extends import_core6._SharedContainer {
32282
32325
  setContext(host, context, value) {
32283
32326
  const ssrNode = host;
32284
32327
  let ctx = ssrNode.getProp(QCtxAttr);
32285
- if (!ctx) {
32328
+ if (ctx == null) {
32286
32329
  ssrNode.setProp(QCtxAttr, ctx = []);
32287
32330
  }
32288
- mapArray_set(ctx, context.id, value, 0);
32331
+ mapArray_set(ctx, context.id, value, 0, true);
32289
32332
  this.addRoot(ssrNode);
32290
32333
  }
32291
32334
  resolveContext(host, contextId) {
32292
32335
  let ssrNode = host;
32293
32336
  while (ssrNode) {
32294
32337
  const ctx = ssrNode.getProp(QCtxAttr);
32295
- if (ctx) {
32296
- const value = mapArray_get(ctx, contextId.id, 0);
32297
- if (value) {
32298
- return value;
32299
- }
32338
+ if (ctx != null && mapArray_has(ctx, contextId.id, 0)) {
32339
+ return mapArray_get(ctx, contextId.id, 0);
32300
32340
  }
32301
32341
  ssrNode = ssrNode.parentSsrNode;
32302
32342
  }
@@ -32749,15 +32789,25 @@ var SSRContainer = class extends import_core6._SharedContainer {
32749
32789
  return ((_a = this.renderOptions.qwikLoader) == null ? void 0 : _a.include) ?? "auto";
32750
32790
  }
32751
32791
  emitQwikLoaderAtTopIfNeeded() {
32792
+ var _a;
32752
32793
  const includeMode = this.getQwikLoaderIncludeMode();
32753
32794
  const includeLoader = includeMode !== "never";
32754
32795
  if (includeLoader) {
32755
32796
  let qwikLoaderBundle = this.resolvedManifest.manifest.qwikLoader;
32756
32797
  if (qwikLoaderBundle) {
32757
32798
  qwikLoaderBundle = this.$buildBase$ + qwikLoaderBundle;
32758
- this.openElement("link", ["rel", "modulepreload", "href", qwikLoaderBundle]);
32799
+ const linkAttrs = ["rel", "modulepreload", "href", qwikLoaderBundle];
32800
+ const nonce = (_a = this.renderOptions.serverData) == null ? void 0 : _a.nonce;
32801
+ if (nonce) {
32802
+ linkAttrs.push("nonce", nonce);
32803
+ }
32804
+ this.openElement("link", linkAttrs);
32759
32805
  this.closeElement();
32760
- this.openElement("script", ["type", "module", "async", true, "src", qwikLoaderBundle]);
32806
+ const scriptAttrs = ["type", "module", "async", true, "src", qwikLoaderBundle];
32807
+ if (nonce) {
32808
+ scriptAttrs.push("nonce", nonce);
32809
+ }
32810
+ this.openElement("script", scriptAttrs);
32761
32811
  this.closeElement();
32762
32812
  }
32763
32813
  }
@@ -32983,9 +33033,11 @@ var SSRContainer = class extends import_core6._SharedContainer {
32983
33033
  value = this.trackSignalValue(value, lastNode, key, signalData);
32984
33034
  }
32985
33035
  if (key === dangerouslySetInnerHTML) {
32986
- innerHTML = String(value);
32987
- key = QContainerAttr;
32988
- value = "html" /* HTML */;
33036
+ if (value) {
33037
+ innerHTML = String(value);
33038
+ key = QContainerAttr;
33039
+ value = "html" /* HTML */;
33040
+ }
32989
33041
  if (tag === "style") {
32990
33042
  continue;
32991
33043
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/testing 2.0.0-beta.6-dev+c42693f
3
+ * @qwik.dev/core/testing 2.0.0-beta.8-dev+434cd18
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -23290,15 +23290,15 @@ var mapApp_findIndx = (array, key, start) => {
23290
23290
  }
23291
23291
  return bottom << 1 ^ -1;
23292
23292
  };
23293
- var mapArray_set = (array, key, value, start) => {
23293
+ var mapArray_set = (array, key, value, start, allowNullValue = false) => {
23294
23294
  const indx = mapApp_findIndx(array, key, start);
23295
23295
  if (indx >= 0) {
23296
- if (value == null) {
23296
+ if (value == null && !allowNullValue) {
23297
23297
  array.splice(indx, 2);
23298
23298
  } else {
23299
23299
  array[indx + 1] = value;
23300
23300
  }
23301
- } else if (value != null) {
23301
+ } else if (value != null || allowNullValue) {
23302
23302
  array.splice(indx ^ -1, 0, key, value);
23303
23303
  }
23304
23304
  };
@@ -24882,8 +24882,10 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
24882
24882
  );
24883
24883
  }
24884
24884
  if (key2 === dangerouslySetInnerHTML) {
24885
- element.innerHTML = value;
24886
- element.setAttribute(QContainerAttr, "html" /* HTML */);
24885
+ if (value) {
24886
+ element.innerHTML = String(value);
24887
+ element.setAttribute(QContainerAttr, "html" /* HTML */);
24888
+ }
24887
24889
  continue;
24888
24890
  }
24889
24891
  if (elementName === "textarea" && key2 === "value") {
@@ -28512,19 +28514,16 @@ var DomContainer = class extends _SharedContainer {
28512
28514
  }
28513
28515
  setContext(host, context, value) {
28514
28516
  let ctx = this.getHostProp(host, QCtxAttr);
28515
- if (!ctx) {
28517
+ if (ctx == null) {
28516
28518
  this.setHostProp(host, QCtxAttr, ctx = []);
28517
28519
  }
28518
- mapArray_set(ctx, context.id, value, 0);
28520
+ mapArray_set(ctx, context.id, value, 0, true);
28519
28521
  }
28520
28522
  resolveContext(host, contextId) {
28521
28523
  while (host) {
28522
28524
  const ctx = this.getHostProp(host, QCtxAttr);
28523
- if (ctx) {
28524
- const value = mapArray_get(ctx, contextId.id, 0);
28525
- if (value) {
28526
- return value;
28527
- }
28525
+ if (ctx != null && mapArray_has(ctx, contextId.id, 0)) {
28526
+ return mapArray_get(ctx, contextId.id, 0);
28528
28527
  }
28529
28528
  host = this.getParentHost(host);
28530
28529
  }
@@ -30277,6 +30276,10 @@ var allowedContent = (state) => {
30277
30276
  case 514 /* PHRASING_INSIDE_INPUT */:
30278
30277
  case 1026 /* PHRASING_CONTAINER */:
30279
30278
  return ["phrasing content", "<a>, <b>, <img>, <input> ... (no <div>, <p> ...)"];
30279
+ case 2050 /* PICTURE */:
30280
+ return ["picture content", "<source>, <img>"];
30281
+ case 4098 /* BUTTON */:
30282
+ return ["button content", "phrasing content except interactive elements"];
30280
30283
  case 1 /* DOCUMENT */:
30281
30284
  return ["document", "<html>"];
30282
30285
  }
@@ -30318,6 +30321,10 @@ function isTagAllowed(state, tag) {
30318
30321
  return isInPhrasing(tag, true);
30319
30322
  case 514 /* PHRASING_INSIDE_INPUT */:
30320
30323
  return isInPhrasing(tag, false);
30324
+ case 2050 /* PICTURE */:
30325
+ return isInPicture(tag);
30326
+ case 4098 /* BUTTON */:
30327
+ return isInButton(tag);
30321
30328
  case 1 /* DOCUMENT */:
30322
30329
  if (tag === "html") {
30323
30330
  return 32 /* HTML */;
@@ -30397,9 +30404,12 @@ function isInAnything(text) {
30397
30404
  case "body":
30398
30405
  return 0 /* NOT_ALLOWED */;
30399
30406
  case "button":
30407
+ return 4098 /* BUTTON */;
30400
30408
  case "input":
30401
30409
  case "textarea":
30402
30410
  return 514 /* PHRASING_INSIDE_INPUT */;
30411
+ case "picture":
30412
+ return 2050 /* PICTURE */;
30403
30413
  default:
30404
30414
  return 10 /* ANYTHING */;
30405
30415
  }
@@ -30443,12 +30453,35 @@ function isInTableColGroup(text) {
30443
30453
  return 0 /* NOT_ALLOWED */;
30444
30454
  }
30445
30455
  }
30456
+ function isInPicture(text) {
30457
+ switch (text) {
30458
+ case "source":
30459
+ return 4 /* EMPTY */;
30460
+ case "img":
30461
+ return 4 /* EMPTY */;
30462
+ default:
30463
+ return 0 /* NOT_ALLOWED */;
30464
+ }
30465
+ }
30466
+ function isInButton(text) {
30467
+ switch (text) {
30468
+ case "button":
30469
+ case "input":
30470
+ case "textarea":
30471
+ case "select":
30472
+ case "a":
30473
+ return 0 /* NOT_ALLOWED */;
30474
+ case "picture":
30475
+ return 2050 /* PICTURE */;
30476
+ default:
30477
+ return isInPhrasing(text, false);
30478
+ }
30479
+ }
30446
30480
  function isInPhrasing(text, allowInput) {
30447
30481
  switch (text) {
30448
30482
  case "svg":
30449
30483
  case "math":
30450
30484
  return 1026 /* PHRASING_CONTAINER */;
30451
- case "button":
30452
30485
  case "input":
30453
30486
  case "textarea":
30454
30487
  return allowInput ? 514 /* PHRASING_INSIDE_INPUT */ : 0 /* NOT_ALLOWED */;
@@ -30460,6 +30493,7 @@ function isInPhrasing(text, allowInput) {
30460
30493
  case "bdi":
30461
30494
  case "bdo":
30462
30495
  case "br":
30496
+ case "button":
30463
30497
  case "canvas":
30464
30498
  case "cite":
30465
30499
  case "code":
@@ -30487,7 +30521,6 @@ function isInPhrasing(text, allowInput) {
30487
30521
  case "object":
30488
30522
  case "option":
30489
30523
  case "output":
30490
- case "picture":
30491
30524
  case "progress":
30492
30525
  case "q":
30493
30526
  case "ruby":
@@ -30510,6 +30543,8 @@ function isInPhrasing(text, allowInput) {
30510
30543
  return allowInput ? 258 /* PHRASING_ANY */ : 514 /* PHRASING_INSIDE_INPUT */;
30511
30544
  case "style":
30512
30545
  return 2 /* TEXT */;
30546
+ case "picture":
30547
+ return 2050 /* PICTURE */;
30513
30548
  default:
30514
30549
  return 0 /* NOT_ALLOWED */;
30515
30550
  }
@@ -32022,7 +32057,11 @@ var preloaderPre = (container, options, nonce) => {
32022
32057
  }
32023
32058
  }
32024
32059
  const optsStr = opts.length ? `,{${opts.join(",")}}` : "";
32025
- container.openElement("link", null, ["rel", "modulepreload", "href", preloaderBundle]);
32060
+ const preloaderLinkAttrs = ["rel", "modulepreload", "href", preloaderBundle];
32061
+ if (nonce) {
32062
+ preloaderLinkAttrs.push("nonce", nonce);
32063
+ }
32064
+ container.openElement("link", null, preloaderLinkAttrs);
32026
32065
  container.closeElement();
32027
32066
  container.openElement("link", null, [
32028
32067
  "rel",
@@ -32046,7 +32085,11 @@ var preloaderPre = (container, options, nonce) => {
32046
32085
  }
32047
32086
  const corePath = simplifyPath(base2, resolvedManifest?.manifest.core);
32048
32087
  if (corePath) {
32049
- container.openElement("link", null, ["rel", "modulepreload", "href", corePath]);
32088
+ const linkAttrs = ["rel", "modulepreload", "href", corePath];
32089
+ if (nonce) {
32090
+ linkAttrs.push("nonce", nonce);
32091
+ }
32092
+ container.openElement("link", null, linkAttrs);
32050
32093
  container.closeElement();
32051
32094
  }
32052
32095
  };
@@ -32255,21 +32298,18 @@ var SSRContainer = class extends _SharedContainer2 {
32255
32298
  setContext(host, context, value) {
32256
32299
  const ssrNode = host;
32257
32300
  let ctx = ssrNode.getProp(QCtxAttr);
32258
- if (!ctx) {
32301
+ if (ctx == null) {
32259
32302
  ssrNode.setProp(QCtxAttr, ctx = []);
32260
32303
  }
32261
- mapArray_set(ctx, context.id, value, 0);
32304
+ mapArray_set(ctx, context.id, value, 0, true);
32262
32305
  this.addRoot(ssrNode);
32263
32306
  }
32264
32307
  resolveContext(host, contextId) {
32265
32308
  let ssrNode = host;
32266
32309
  while (ssrNode) {
32267
32310
  const ctx = ssrNode.getProp(QCtxAttr);
32268
- if (ctx) {
32269
- const value = mapArray_get(ctx, contextId.id, 0);
32270
- if (value) {
32271
- return value;
32272
- }
32311
+ if (ctx != null && mapArray_has(ctx, contextId.id, 0)) {
32312
+ return mapArray_get(ctx, contextId.id, 0);
32273
32313
  }
32274
32314
  ssrNode = ssrNode.parentSsrNode;
32275
32315
  }
@@ -32721,9 +32761,18 @@ var SSRContainer = class extends _SharedContainer2 {
32721
32761
  let qwikLoaderBundle = this.resolvedManifest.manifest.qwikLoader;
32722
32762
  if (qwikLoaderBundle) {
32723
32763
  qwikLoaderBundle = this.$buildBase$ + qwikLoaderBundle;
32724
- this.openElement("link", ["rel", "modulepreload", "href", qwikLoaderBundle]);
32764
+ const linkAttrs = ["rel", "modulepreload", "href", qwikLoaderBundle];
32765
+ const nonce = this.renderOptions.serverData?.nonce;
32766
+ if (nonce) {
32767
+ linkAttrs.push("nonce", nonce);
32768
+ }
32769
+ this.openElement("link", linkAttrs);
32725
32770
  this.closeElement();
32726
- this.openElement("script", ["type", "module", "async", true, "src", qwikLoaderBundle]);
32771
+ const scriptAttrs = ["type", "module", "async", true, "src", qwikLoaderBundle];
32772
+ if (nonce) {
32773
+ scriptAttrs.push("nonce", nonce);
32774
+ }
32775
+ this.openElement("script", scriptAttrs);
32727
32776
  this.closeElement();
32728
32777
  }
32729
32778
  }
@@ -32947,9 +32996,11 @@ var SSRContainer = class extends _SharedContainer2 {
32947
32996
  value = this.trackSignalValue(value, lastNode, key, signalData);
32948
32997
  }
32949
32998
  if (key === dangerouslySetInnerHTML) {
32950
- innerHTML = String(value);
32951
- key = QContainerAttr;
32952
- value = "html" /* HTML */;
32999
+ if (value) {
33000
+ innerHTML = String(value);
33001
+ key = QContainerAttr;
33002
+ value = "html" /* HTML */;
33003
+ }
32953
33004
  if (tag === "style") {
32954
33005
  continue;
32955
33006
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwik.dev/core/testing",
3
- "version": "2.0.0-beta.6-dev+c42693f",
3
+ "version": "2.0.0-beta.8-dev+434cd18",
4
4
  "main": "index.mjs",
5
5
  "types": "index.d.ts",
6
6
  "private": true,
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@qwik.dev/core",
3
3
  "description": "An open source framework for building instant loading web apps at any scale, without the extra effort.",
4
- "version": "2.0.0-beta.6",
4
+ "version": "2.0.0-beta.8",
5
5
  "author": "Qwik Team",
6
6
  "bin": {
7
7
  "qwik": "./qwik-cli.cjs"
8
8
  },
9
9
  "bugs": "https://github.com/QwikDev/qwik/issues",
10
10
  "dependencies": {
11
- "csstype": "^3.1",
12
- "rollup": "^4.44.0"
11
+ "csstype": "^3.1.3",
12
+ "rollup": ">= ^4.44.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "ignore": "5.3.1",
16
16
  "image-size": "1.1.1",
17
17
  "kleur": "4.1.5",
18
- "prettier": "3.5.3",
18
+ "prettier": "3.6.2",
19
19
  "ts-morph": "23.0.0",
20
20
  "vitest": "3.2.4",
21
- "@qwik.dev/core": "2.0.0-beta.6",
21
+ "@qwik.dev/core": "2.0.0-beta.8",
22
22
  "@qwik.dev/dom": "2.1.19"
23
23
  },
24
24
  "engines": {
@@ -182,7 +182,7 @@
182
182
  "peerDependencies": {
183
183
  "prettier": "*",
184
184
  "vite": ">=5 <8",
185
- "vitest": ">=2 <3"
185
+ "vitest": ">=2 <4"
186
186
  },
187
187
  "peerDependenciesMeta": {
188
188
  "vitest": {
@@ -1,3 +0,0 @@
1
- export default {
2
- plugins: ['prettier-plugin-tailwindcss'],
3
- }