@cedarjs/vite 3.0.1-next.27 → 3.0.1-next.29

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.
@@ -7622,6 +7622,7 @@ var require_react_dom_development = __commonJS({
7622
7622
  }
7623
7623
  switch (typeof value) {
7624
7624
  case "function":
7625
+ // $FlowIssue symbol is perfectly valid here
7625
7626
  case "symbol":
7626
7627
  return true;
7627
7628
  case "boolean": {
@@ -8636,6 +8637,7 @@ var require_react_dom_development = __commonJS({
8636
8637
  return "SuspenseList";
8637
8638
  case TracingMarkerComponent:
8638
8639
  return "TracingMarker";
8640
+ // The display name for this tags come from the user-provided type:
8639
8641
  case ClassComponent:
8640
8642
  case FunctionComponent:
8641
8643
  case IncompleteClassComponent:
@@ -9633,6 +9635,10 @@ var require_react_dom_development = __commonJS({
9633
9635
  return typeof props.is === "string";
9634
9636
  }
9635
9637
  switch (tagName) {
9638
+ // These are reserved SVG and MathML elements.
9639
+ // We don't mind this list too much because we expect it to never grow.
9640
+ // The alternative is to track the namespace in a few places which is convoluted.
9641
+ // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
9636
9642
  case "annotation-xml":
9637
9643
  case "color-profile":
9638
9644
  case "font-face":
@@ -12462,6 +12468,7 @@ var require_react_dom_development = __commonJS({
12462
12468
  }
12463
12469
  function getEventPriority(domEventName) {
12464
12470
  switch (domEventName) {
12471
+ // Used by SimpleEventPlugin:
12465
12472
  case "cancel":
12466
12473
  case "click":
12467
12474
  case "close":
@@ -12497,14 +12504,20 @@ var require_react_dom_development = __commonJS({
12497
12504
  case "touchend":
12498
12505
  case "touchstart":
12499
12506
  case "volumechange":
12507
+ // Used by polyfills:
12508
+ // eslint-disable-next-line no-fallthrough
12500
12509
  case "change":
12501
12510
  case "selectionchange":
12502
12511
  case "textInput":
12503
12512
  case "compositionstart":
12504
12513
  case "compositionend":
12505
12514
  case "compositionupdate":
12515
+ // Only enableCreateEventHandleAPI:
12516
+ // eslint-disable-next-line no-fallthrough
12506
12517
  case "beforeblur":
12507
12518
  case "afterblur":
12519
+ // Not used by React but could be by user code:
12520
+ // eslint-disable-next-line no-fallthrough
12508
12521
  case "beforeinput":
12509
12522
  case "blur":
12510
12523
  case "fullscreenchange":
@@ -12529,6 +12542,8 @@ var require_react_dom_development = __commonJS({
12529
12542
  case "toggle":
12530
12543
  case "touchmove":
12531
12544
  case "wheel":
12545
+ // Not used by React but could be by user code:
12546
+ // eslint-disable-next-line no-fallthrough
12532
12547
  case "mouseenter":
12533
12548
  case "mouseleave":
12534
12549
  case "pointerenter":
@@ -13714,6 +13729,7 @@ var require_react_dom_development = __commonJS({
13714
13729
  function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
13715
13730
  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
13716
13731
  switch (domEventName) {
13732
+ // Track the input node that has focus.
13717
13733
  case "focusin":
13718
13734
  if (isTextInputElement(targetNode) || targetNode.contentEditable === "true") {
13719
13735
  activeElement$1 = targetNode;
@@ -13726,6 +13742,8 @@ var require_react_dom_development = __commonJS({
13726
13742
  activeElementInst$1 = null;
13727
13743
  lastSelection = null;
13728
13744
  break;
13745
+ // Don't fire the event while the user is dragging. This matches the
13746
+ // semantics of the native select event.
13729
13747
  case "mousedown":
13730
13748
  mouseDown = true;
13731
13749
  break;
@@ -13735,10 +13753,20 @@ var require_react_dom_development = __commonJS({
13735
13753
  mouseDown = false;
13736
13754
  constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
13737
13755
  break;
13756
+ // Chrome and IE fire non-standard event when selection is changed (and
13757
+ // sometimes when it hasn't). IE's event fires out of order with respect
13758
+ // to key and input events on deletion, so we discard it.
13759
+ //
13760
+ // Firefox doesn't support selectionchange, so check selection status
13761
+ // after each key entry. The selection changes after keydown and before
13762
+ // keyup, but we check on keydown as well in the case of holding down a
13763
+ // key, when multiple keydown events are fired but only one keyup is.
13764
+ // This is also our approach for IE handling, for the reason above.
13738
13765
  case "selectionchange":
13739
13766
  if (skipSelectionChangeEvent) {
13740
13767
  break;
13741
13768
  }
13769
+ // falls through
13742
13770
  case "keydown":
13743
13771
  case "keyup":
13744
13772
  constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
@@ -13821,6 +13849,7 @@ var require_react_dom_development = __commonJS({
13821
13849
  if (getEventCharCode(nativeEvent) === 0) {
13822
13850
  return;
13823
13851
  }
13852
+ /* falls through */
13824
13853
  case "keydown":
13825
13854
  case "keyup":
13826
13855
  SyntheticEventCtor = SyntheticKeyboardEvent;
@@ -13841,11 +13870,14 @@ var require_react_dom_development = __commonJS({
13841
13870
  if (nativeEvent.button === 2) {
13842
13871
  return;
13843
13872
  }
13873
+ /* falls through */
13844
13874
  case "auxclick":
13845
13875
  case "dblclick":
13846
13876
  case "mousedown":
13847
13877
  case "mousemove":
13848
13878
  case "mouseup":
13879
+ // TODO: Disabled elements should not respond to mouse events
13880
+ /* falls through */
13849
13881
  case "mouseout":
13850
13882
  case "mouseover":
13851
13883
  case "contextmenu":
@@ -14759,6 +14791,8 @@ var require_react_dom_development = __commonJS({
14759
14791
  for (var _i = 0; _i < attributes.length; _i++) {
14760
14792
  var name = attributes[_i].name.toLowerCase();
14761
14793
  switch (name) {
14794
+ // Controlled attributes are not validated
14795
+ // TODO: Only ignore them on controlled tags.
14762
14796
  case "value":
14763
14797
  break;
14764
14798
  case "checked":
@@ -15026,24 +15060,37 @@ var require_react_dom_development = __commonJS({
15026
15060
  };
15027
15061
  var isTagValidWithParent = function(tag, parentTag) {
15028
15062
  switch (parentTag) {
15063
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
15029
15064
  case "select":
15030
15065
  return tag === "option" || tag === "optgroup" || tag === "#text";
15031
15066
  case "optgroup":
15032
15067
  return tag === "option" || tag === "#text";
15068
+ // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
15069
+ // but
15033
15070
  case "option":
15034
15071
  return tag === "#text";
15072
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
15073
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
15074
+ // No special behavior since these rules fall back to "in body" mode for
15075
+ // all except special table nodes which cause bad parsing behavior anyway.
15076
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
15035
15077
  case "tr":
15036
15078
  return tag === "th" || tag === "td" || tag === "style" || tag === "script" || tag === "template";
15079
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
15037
15080
  case "tbody":
15038
15081
  case "thead":
15039
15082
  case "tfoot":
15040
15083
  return tag === "tr" || tag === "style" || tag === "script" || tag === "template";
15084
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
15041
15085
  case "colgroup":
15042
15086
  return tag === "col" || tag === "template";
15087
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
15043
15088
  case "table":
15044
15089
  return tag === "caption" || tag === "colgroup" || tag === "tbody" || tag === "tfoot" || tag === "thead" || tag === "style" || tag === "script" || tag === "template";
15090
+ // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
15045
15091
  case "head":
15046
15092
  return tag === "base" || tag === "basefont" || tag === "bgsound" || tag === "link" || tag === "meta" || tag === "title" || tag === "noscript" || tag === "noframes" || tag === "style" || tag === "script" || tag === "template";
15093
+ // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
15047
15094
  case "html":
15048
15095
  return tag === "head" || tag === "body" || tag === "frameset";
15049
15096
  case "frameset":
@@ -18002,6 +18049,7 @@ var require_react_dom_development = __commonJS({
18002
18049
  case CaptureUpdate: {
18003
18050
  workInProgress2.flags = workInProgress2.flags & ~ShouldCapture | DidCapture;
18004
18051
  }
18052
+ // Intentional fallthrough
18005
18053
  case UpdateState: {
18006
18054
  var _payload = update.payload;
18007
18055
  var partialState;
@@ -24319,6 +24367,7 @@ var require_react_dom_development = __commonJS({
24319
24367
  insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);
24320
24368
  break;
24321
24369
  }
24370
+ // eslint-disable-next-line-no-fallthrough
24322
24371
  default:
24323
24372
  throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.");
24324
24373
  }
@@ -24418,6 +24467,7 @@ var require_react_dom_development = __commonJS({
24418
24467
  safelyDetachRef(deletedFiber, nearestMountedAncestor);
24419
24468
  }
24420
24469
  }
24470
+ // eslint-disable-next-line-no-fallthrough
24421
24471
  case HostText: {
24422
24472
  {
24423
24473
  var prevHostParent = hostParent;
@@ -25679,6 +25729,9 @@ var require_react_dom_development = __commonJS({
25679
25729
  case RootFatalErrored: {
25680
25730
  throw new Error("Root did not complete. This is a bug in React.");
25681
25731
  }
25732
+ // Flow knows about invariant, so it complains if I add a break
25733
+ // statement, but eslint doesn't know about invariant, so it complains
25734
+ // if I do. eslint-disable-next-line no-fallthrough
25682
25735
  case RootErrored: {
25683
25736
  commitRoot(root2, workInProgressRootRecoverableErrors, workInProgressTransitions);
25684
25737
  break;
@@ -27324,10 +27377,15 @@ var require_react_dom_development = __commonJS({
27324
27377
  case REACT_OFFSCREEN_TYPE:
27325
27378
  return createFiberFromOffscreen(pendingProps, mode, lanes, key);
27326
27379
  case REACT_LEGACY_HIDDEN_TYPE:
27380
+ // eslint-disable-next-line no-fallthrough
27327
27381
  case REACT_SCOPE_TYPE:
27382
+ // eslint-disable-next-line no-fallthrough
27328
27383
  case REACT_CACHE_TYPE:
27384
+ // eslint-disable-next-line no-fallthrough
27329
27385
  case REACT_TRACING_MARKER_TYPE:
27386
+ // eslint-disable-next-line no-fallthrough
27330
27387
  case REACT_DEBUG_TRACING_MODE_TYPE:
27388
+ // eslint-disable-next-line no-fallthrough
27331
27389
  default: {
27332
27390
  if (typeof type === "object" && type !== null) {
27333
27391
  switch (type.$$typeof) {
package/dist/cjs/index.js CHANGED
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var src_exports = {};
30
- __export(src_exports, {
29
+ var index_exports = {};
30
+ __export(index_exports, {
31
31
  cedar: () => cedar,
32
32
  cedarAutoImportsPlugin: () => import_vite_plugin_cedar_auto_import.cedarAutoImportsPlugin,
33
33
  cedarCellTransform: () => import_vite_plugin_cedar_cell2.cedarCellTransform,
@@ -41,9 +41,9 @@ __export(src_exports, {
41
41
  cedarTransformJsAsJsx: () => import_vite_plugin_jsx_loader2.cedarTransformJsAsJsx,
42
42
  cedarjsDirectoryNamedImportPlugin: () => import_vite_plugin_cedarjs_directory_named_import.cedarjsDirectoryNamedImportPlugin,
43
43
  cedarjsJobPathInjectorPlugin: () => import_vite_plugin_cedarjs_job_path_injector.cedarjsJobPathInjectorPlugin,
44
- default: () => src_default
44
+ default: () => index_default
45
45
  });
46
- module.exports = __toCommonJS(src_exports);
46
+ module.exports = __toCommonJS(index_exports);
47
47
  var import_plugin_react = __toESM(require("@vitejs/plugin-react"), 1);
48
48
  var import_babel_config = require("@cedarjs/babel-config");
49
49
  var import_project_config = require("@cedarjs/project-config");
@@ -99,7 +99,7 @@ function cedar({ mode } = {}) {
99
99
  (0, import_plugin_react.default)({ babel: babelConfig })
100
100
  ];
101
101
  }
102
- var src_default = cedar;
102
+ var index_default = cedar;
103
103
  // Annotate the CommonJS export names for ESM import in node:
104
104
  0 && (module.exports = {
105
105
  cedar,
@@ -159,6 +159,7 @@ async function parseExportNamesIntoNames(code, body, names) {
159
159
  }
160
160
  }
161
161
  continue;
162
+ // For CJS support
162
163
  case "ExpressionStatement": {
163
164
  let assignmentExpression = null;
164
165
  if (node.expression.type === "AssignmentExpression") {
@@ -115,6 +115,7 @@ function transformServerModule(mod, url, code) {
115
115
  const localTypes = /* @__PURE__ */ new Map();
116
116
  for (const node of mod.body) {
117
117
  switch (node.type) {
118
+ // TODO (RSC): Add code comments with examples of each type of node
118
119
  case "ExportDeclaration":
119
120
  if (node.declaration.type === "FunctionDeclaration") {
120
121
  const name = node.declaration.identifier.value;
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ function cedar({ mode } = {}) {
57
57
  react({ babel: babelConfig })
58
58
  ];
59
59
  }
60
- var src_default = cedar;
60
+ var index_default = cedar;
61
61
  export {
62
62
  cedar,
63
63
  cedarAutoImportsPlugin,
@@ -72,5 +72,5 @@ export {
72
72
  cedarTransformJsAsJsx2 as cedarTransformJsAsJsx,
73
73
  cedarjsDirectoryNamedImportPlugin,
74
74
  cedarjsJobPathInjectorPlugin,
75
- src_default as default
75
+ index_default as default
76
76
  };
@@ -126,6 +126,7 @@ async function parseExportNamesIntoNames(code, body, names) {
126
126
  }
127
127
  }
128
128
  continue;
129
+ // For CJS support
129
130
  case "ExpressionStatement": {
130
131
  let assignmentExpression = null;
131
132
  if (node.expression.type === "AssignmentExpression") {
@@ -82,6 +82,7 @@ function transformServerModule(mod, url, code) {
82
82
  const localTypes = /* @__PURE__ */ new Map();
83
83
  for (const node of mod.body) {
84
84
  switch (node.type) {
85
+ // TODO (RSC): Add code comments with examples of each type of node
85
86
  case "ExportDeclaration":
86
87
  if (node.declaration.type === "FunctionDeclaration") {
87
88
  const name = node.declaration.identifier.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "3.0.1-next.27+ab492debb",
3
+ "version": "3.0.1-next.29+17fc725a9",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,14 +64,14 @@
64
64
  "@babel/generator": "7.29.1",
65
65
  "@babel/parser": "7.29.2",
66
66
  "@babel/traverse": "7.29.0",
67
- "@cedarjs/auth": "3.0.1-next.27+ab492debb",
68
- "@cedarjs/babel-config": "3.0.1-next.27+ab492debb",
69
- "@cedarjs/cookie-jar": "3.0.1-next.27+ab492debb",
70
- "@cedarjs/internal": "3.0.1-next.27+ab492debb",
71
- "@cedarjs/project-config": "3.0.1-next.27+ab492debb",
72
- "@cedarjs/server-store": "3.0.1-next.27+ab492debb",
73
- "@cedarjs/testing": "3.0.1-next.27+ab492debb",
74
- "@cedarjs/web": "3.0.1-next.27+ab492debb",
67
+ "@cedarjs/auth": "3.0.1-next.29+17fc725a9",
68
+ "@cedarjs/babel-config": "3.0.1-next.29+17fc725a9",
69
+ "@cedarjs/cookie-jar": "3.0.1-next.29+17fc725a9",
70
+ "@cedarjs/internal": "3.0.1-next.29+17fc725a9",
71
+ "@cedarjs/project-config": "3.0.1-next.29+17fc725a9",
72
+ "@cedarjs/server-store": "3.0.1-next.29+17fc725a9",
73
+ "@cedarjs/testing": "3.0.1-next.29+17fc725a9",
74
+ "@cedarjs/web": "3.0.1-next.29+17fc725a9",
75
75
  "@swc/core": "1.15.21",
76
76
  "@vitejs/plugin-react": "4.7.0",
77
77
  "@whatwg-node/fetch": "0.10.13",
@@ -118,5 +118,5 @@
118
118
  "publishConfig": {
119
119
  "access": "public"
120
120
  },
121
- "gitHead": "ab492debbba62731613261d67a7b24d747bae5d8"
121
+ "gitHead": "17fc725a9f975121240ea058dff476d29653b80c"
122
122
  }