@builder.io/sdk-qwik 0.0.2-1 → 0.0.6

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.
@@ -11,7 +11,7 @@ import BlockStyles from "./block-styles";
11
11
  import { isEmptyHtmlElement } from "./render-block.helpers.js";
12
12
  import RenderComponent from "./render-component";
13
13
  import RenderRepeatedBlock from "./render-repeated-block";
14
- import { Fragment, Host, h } from "@builder.io/qwik";
14
+ import { Fragment, h } from "@builder.io/qwik";
15
15
  export const component = function component(props, state) {
16
16
  const componentName = getProcessedBlock({
17
17
  block: props.block,
@@ -161,7 +161,7 @@ export const RenderBlock = (props) => {
161
161
  const state = {};
162
162
  state.tagName = tagName(props, state);
163
163
  return (
164
- <Host q:host-pseudo="">
164
+ <>
165
165
  {shouldWrap(props, state) ? (
166
166
  !isEmptyHtmlElement(tagName(props, state)) ? (
167
167
  <state.tagName {...attributes(props, state)}>
@@ -172,7 +172,6 @@ export const RenderBlock = (props) => {
172
172
  key={index}
173
173
  repeatContext={data.context}
174
174
  block={data.block}
175
- context={props.context}
176
175
  ></RenderRepeatedBlock>
177
176
  );
178
177
  })
@@ -214,7 +213,7 @@ export const RenderBlock = (props) => {
214
213
  context={props.context}
215
214
  ></RenderComponent>
216
215
  )}
217
- </Host>
216
+ </>
218
217
  );
219
218
  };
220
219
  export default RenderBlock;
@@ -330,30 +329,57 @@ export const COMPONENT = {
330
329
  children: [
331
330
  {
332
331
  "@type": "@builder.io/mitosis/node",
333
- name: "Host",
334
- meta: {},
332
+ name: "Show",
333
+ meta: {
334
+ else: {
335
+ "@type": "@builder.io/mitosis/node",
336
+ name: "RenderComponent",
337
+ meta: {},
338
+ scope: {},
339
+ properties: {},
340
+ bindings: {
341
+ _spread: {
342
+ code: "renderComponentProps(props,state)",
343
+ },
344
+ context: {
345
+ code: "props.context",
346
+ },
347
+ },
348
+ children: [],
349
+ },
350
+ },
335
351
  scope: {},
336
- properties: {
337
- "q:host-pseudo": "",
352
+ properties: {},
353
+ bindings: {
354
+ when: {
355
+ code: "shouldWrap(props,state)",
356
+ },
338
357
  },
339
- bindings: {},
340
358
  children: [
359
+ {
360
+ "@type": "@builder.io/mitosis/node",
361
+ name: "div",
362
+ meta: {},
363
+ scope: {},
364
+ properties: {
365
+ _text: "\n ",
366
+ },
367
+ bindings: {},
368
+ children: [],
369
+ },
341
370
  {
342
371
  "@type": "@builder.io/mitosis/node",
343
372
  name: "Show",
344
373
  meta: {
345
374
  else: {
346
375
  "@type": "@builder.io/mitosis/node",
347
- name: "RenderComponent",
376
+ name: "state.tagName",
348
377
  meta: {},
349
378
  scope: {},
350
379
  properties: {},
351
380
  bindings: {
352
381
  _spread: {
353
- code: "renderComponentProps(props,state)",
354
- },
355
- context: {
356
- code: "props.context",
382
+ code: "attributes(props,state)",
357
383
  },
358
384
  },
359
385
  children: [],
@@ -363,7 +389,7 @@ export const COMPONENT = {
363
389
  properties: {},
364
390
  bindings: {
365
391
  when: {
366
- code: "shouldWrap(props,state)",
392
+ code: "!isEmptyHtmlElement(tagName(props,state))",
367
393
  },
368
394
  },
369
395
  children: [
@@ -373,34 +399,20 @@ export const COMPONENT = {
373
399
  meta: {},
374
400
  scope: {},
375
401
  properties: {
376
- _text: "\n ",
402
+ _text: "\n ",
377
403
  },
378
404
  bindings: {},
379
405
  children: [],
380
406
  },
381
407
  {
382
408
  "@type": "@builder.io/mitosis/node",
383
- name: "Show",
384
- meta: {
385
- else: {
386
- "@type": "@builder.io/mitosis/node",
387
- name: "state.tagName",
388
- meta: {},
389
- scope: {},
390
- properties: {},
391
- bindings: {
392
- _spread: {
393
- code: "attributes(props,state)",
394
- },
395
- },
396
- children: [],
397
- },
398
- },
409
+ name: "state.tagName",
410
+ meta: {},
399
411
  scope: {},
400
412
  properties: {},
401
413
  bindings: {
402
- when: {
403
- code: "!isEmptyHtmlElement(tagName(props,state))",
414
+ _spread: {
415
+ code: "attributes(props,state)",
404
416
  },
405
417
  },
406
418
  children: [
@@ -410,20 +422,31 @@ export const COMPONENT = {
410
422
  meta: {},
411
423
  scope: {},
412
424
  properties: {
413
- _text: "\n ",
425
+ _text: "\n ",
414
426
  },
415
427
  bindings: {},
416
428
  children: [],
417
429
  },
418
430
  {
419
431
  "@type": "@builder.io/mitosis/node",
420
- name: "state.tagName",
432
+ name: "div",
433
+ meta: {},
434
+ scope: {},
435
+ properties: {
436
+ _text: "\n ",
437
+ },
438
+ bindings: {},
439
+ children: [],
440
+ },
441
+ {
442
+ "@type": "@builder.io/mitosis/node",
443
+ name: "Show",
421
444
  meta: {},
422
445
  scope: {},
423
446
  properties: {},
424
447
  bindings: {
425
- _spread: {
426
- code: "attributes(props,state)",
448
+ when: {
449
+ code: "repeatItemData(props,state)",
427
450
  },
428
451
  },
429
452
  children: [
@@ -433,95 +456,45 @@ export const COMPONENT = {
433
456
  meta: {},
434
457
  scope: {},
435
458
  properties: {
436
- _text: "\n ",
459
+ _text: "\n ",
437
460
  },
438
461
  bindings: {},
439
462
  children: [],
440
463
  },
441
464
  {
442
465
  "@type": "@builder.io/mitosis/node",
443
- name: "div",
466
+ name: "For",
444
467
  meta: {},
445
- scope: {},
468
+ scope: {
469
+ For: ["data", "index"],
470
+ },
446
471
  properties: {
447
- _text: "\n ",
472
+ _forName: "data",
473
+ _indexName: "index",
448
474
  },
449
- bindings: {},
450
- children: [],
451
- },
452
- {
453
- "@type": "@builder.io/mitosis/node",
454
- name: "Show",
455
- meta: {},
456
- scope: {},
457
- properties: {},
458
475
  bindings: {
459
- when: {
476
+ each: {
460
477
  code: "repeatItemData(props,state)",
461
478
  },
462
479
  },
463
480
  children: [
464
481
  {
465
482
  "@type": "@builder.io/mitosis/node",
466
- name: "div",
483
+ name: "RenderRepeatedBlock",
467
484
  meta: {},
468
485
  scope: {},
469
- properties: {
470
- _text: "\n ",
471
- },
472
- bindings: {},
473
- children: [],
474
- },
475
- {
476
- "@type": "@builder.io/mitosis/node",
477
- name: "For",
478
- meta: {},
479
- scope: {
480
- For: ["data", "index"],
481
- },
482
- properties: {
483
- _forName: "data",
484
- _indexName: "index",
485
- },
486
+ properties: {},
486
487
  bindings: {
487
- each: {
488
- code: "repeatItemData(props,state)",
488
+ key: {
489
+ code: "index",
489
490
  },
490
- },
491
- children: [
492
- {
493
- "@type": "@builder.io/mitosis/node",
494
- name: "RenderRepeatedBlock",
495
- meta: {},
496
- scope: {},
497
- properties: {},
498
- bindings: {
499
- key: {
500
- code: "index",
501
- },
502
- repeatContext: {
503
- code: "data.context",
504
- },
505
- block: {
506
- code: "data.block",
507
- },
508
- context: {
509
- code: "props.context",
510
- },
511
- },
512
- children: [],
491
+ repeatContext: {
492
+ code: "data.context",
493
+ },
494
+ block: {
495
+ code: "data.block",
513
496
  },
514
- ],
515
- },
516
- {
517
- "@type": "@builder.io/mitosis/node",
518
- name: "div",
519
- meta: {},
520
- scope: {},
521
- properties: {
522
- _text: "\n ",
523
497
  },
524
- bindings: {},
525
498
  children: [],
526
499
  },
527
500
  ],
@@ -537,113 +510,54 @@ export const COMPONENT = {
537
510
  bindings: {},
538
511
  children: [],
539
512
  },
540
- {
541
- "@type": "@builder.io/mitosis/node",
542
- name: "Show",
543
- meta: {},
544
- scope: {},
545
- properties: {},
546
- bindings: {
547
- when: {
548
- code: "!repeatItemData(props,state)",
549
- },
550
- },
551
- children: [
552
- {
553
- "@type": "@builder.io/mitosis/node",
554
- name: "div",
555
- meta: {},
556
- scope: {},
557
- properties: {
558
- _text: "\n ",
559
- },
560
- bindings: {},
561
- children: [],
562
- },
563
- {
564
- "@type": "@builder.io/mitosis/node",
565
- name: "RenderComponent",
566
- meta: {},
567
- scope: {},
568
- properties: {},
569
- bindings: {
570
- _spread: {
571
- code: "renderComponentProps(props,state)",
572
- },
573
- },
574
- children: [],
575
- },
576
- {
577
- "@type": "@builder.io/mitosis/node",
578
- name: "div",
579
- meta: {},
580
- scope: {},
581
- properties: {
582
- _text: "\n ",
583
- },
584
- bindings: {},
585
- children: [],
586
- },
587
- ],
513
+ ],
514
+ },
515
+ {
516
+ "@type": "@builder.io/mitosis/node",
517
+ name: "div",
518
+ meta: {},
519
+ scope: {},
520
+ properties: {
521
+ _text: "\n ",
522
+ },
523
+ bindings: {},
524
+ children: [],
525
+ },
526
+ {
527
+ "@type": "@builder.io/mitosis/node",
528
+ name: "Show",
529
+ meta: {},
530
+ scope: {},
531
+ properties: {},
532
+ bindings: {
533
+ when: {
534
+ code: "!repeatItemData(props,state)",
588
535
  },
536
+ },
537
+ children: [
589
538
  {
590
539
  "@type": "@builder.io/mitosis/node",
591
540
  name: "div",
592
541
  meta: {},
593
542
  scope: {},
594
543
  properties: {
595
- _text: "\n ",
544
+ _text: "\n ",
596
545
  },
597
546
  bindings: {},
598
547
  children: [],
599
548
  },
600
549
  {
601
550
  "@type": "@builder.io/mitosis/node",
602
- name: "div",
551
+ name: "RenderComponent",
603
552
  meta: {},
604
553
  scope: {},
605
- properties: {
606
- _text: "\n ",
607
- },
608
- bindings: {},
609
- children: [],
610
- },
611
- {
612
- "@type": "@builder.io/mitosis/node",
613
- name: "For",
614
- meta: {},
615
- scope: {
616
- For: ["child"],
617
- },
618
- properties: {
619
- _forName: "child",
620
- },
554
+ properties: {},
621
555
  bindings: {
622
- each: {
623
- code: "childrenWithoutParentComponent(props,state)",
556
+ _spread: {
557
+ code: "renderComponentProps(props,state)",
624
558
  },
625
559
  },
626
- children: [
627
- {
628
- "@type": "@builder.io/mitosis/node",
629
- name: "RenderBlock",
630
- meta: {},
631
- scope: {},
632
- properties: {},
633
- bindings: {
634
- key: {
635
- code: "'render-block-' + child.id",
636
- },
637
- block: {
638
- code: "child",
639
- },
640
- context: {
641
- code: "props.context",
642
- },
643
- },
644
- children: [],
645
- },
646
- ],
560
+ children: [],
647
561
  },
648
562
  {
649
563
  "@type": "@builder.io/mitosis/node",
@@ -656,52 +570,111 @@ export const COMPONENT = {
656
570
  bindings: {},
657
571
  children: [],
658
572
  },
573
+ ],
574
+ },
575
+ {
576
+ "@type": "@builder.io/mitosis/node",
577
+ name: "div",
578
+ meta: {},
579
+ scope: {},
580
+ properties: {
581
+ _text: "\n ",
582
+ },
583
+ bindings: {},
584
+ children: [],
585
+ },
586
+ {
587
+ "@type": "@builder.io/mitosis/node",
588
+ name: "div",
589
+ meta: {},
590
+ scope: {},
591
+ properties: {
592
+ _text: "\n ",
593
+ },
594
+ bindings: {},
595
+ children: [],
596
+ },
597
+ {
598
+ "@type": "@builder.io/mitosis/node",
599
+ name: "For",
600
+ meta: {},
601
+ scope: {
602
+ For: ["child"],
603
+ },
604
+ properties: {
605
+ _forName: "child",
606
+ },
607
+ bindings: {
608
+ each: {
609
+ code: "childrenWithoutParentComponent(props,state)",
610
+ },
611
+ },
612
+ children: [
659
613
  {
660
614
  "@type": "@builder.io/mitosis/node",
661
- name: "For",
615
+ name: "RenderBlock",
662
616
  meta: {},
663
- scope: {
664
- For: ["child"],
665
- },
666
- properties: {
667
- _forName: "child",
668
- },
617
+ scope: {},
618
+ properties: {},
669
619
  bindings: {
670
- each: {
671
- code: "childrenWithoutParentComponent(props,state)",
620
+ key: {
621
+ code: "'render-block-' + child.id",
672
622
  },
673
- },
674
- children: [
675
- {
676
- "@type": "@builder.io/mitosis/node",
677
- name: "BlockStyles",
678
- meta: {},
679
- scope: {},
680
- properties: {},
681
- bindings: {
682
- key: {
683
- code: "'block-style-' + child.id",
684
- },
685
- block: {
686
- code: "child",
687
- },
688
- context: {
689
- code: "props.context",
690
- },
691
- },
692
- children: [],
623
+ block: {
624
+ code: "child",
693
625
  },
694
- ],
626
+ context: {
627
+ code: "props.context",
628
+ },
629
+ },
630
+ children: [],
631
+ },
632
+ ],
633
+ },
634
+ {
635
+ "@type": "@builder.io/mitosis/node",
636
+ name: "div",
637
+ meta: {},
638
+ scope: {},
639
+ properties: {
640
+ _text: "\n ",
641
+ },
642
+ bindings: {},
643
+ children: [],
644
+ },
645
+ {
646
+ "@type": "@builder.io/mitosis/node",
647
+ name: "For",
648
+ meta: {},
649
+ scope: {
650
+ For: ["child"],
651
+ },
652
+ properties: {
653
+ _forName: "child",
654
+ },
655
+ bindings: {
656
+ each: {
657
+ code: "childrenWithoutParentComponent(props,state)",
695
658
  },
659
+ },
660
+ children: [
696
661
  {
697
662
  "@type": "@builder.io/mitosis/node",
698
- name: "div",
663
+ name: "BlockStyles",
699
664
  meta: {},
700
665
  scope: {},
701
- properties: {
702
- _text: "\n ",
666
+ properties: {},
667
+ bindings: {
668
+ key: {
669
+ code: "'block-style-' + child.id",
670
+ },
671
+ block: {
672
+ code: "child",
673
+ },
674
+ context: {
675
+ code: "props.context",
676
+ },
703
677
  },
704
- bindings: {},
705
678
  children: [],
706
679
  },
707
680
  ],
@@ -712,7 +685,7 @@ export const COMPONENT = {
712
685
  meta: {},
713
686
  scope: {},
714
687
  properties: {
715
- _text: "\n ",
688
+ _text: "\n ",
716
689
  },
717
690
  bindings: {},
718
691
  children: [],
@@ -725,13 +698,24 @@ export const COMPONENT = {
725
698
  meta: {},
726
699
  scope: {},
727
700
  properties: {
728
- _text: "\n ",
701
+ _text: "\n ",
729
702
  },
730
703
  bindings: {},
731
704
  children: [],
732
705
  },
733
706
  ],
734
707
  },
708
+ {
709
+ "@type": "@builder.io/mitosis/node",
710
+ name: "div",
711
+ meta: {},
712
+ scope: {},
713
+ properties: {
714
+ _text: "\n ",
715
+ },
716
+ bindings: {},
717
+ children: [],
718
+ },
735
719
  ],
736
720
  },
737
721
  ],