juxscript 1.1.187 → 1.1.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"TabularDriver.d.ts","sourceRoot":"","sources":["TabularDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,qBAAa,aAAa;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,GAAG,CAA4B;gB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QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAqBlH;;OAEG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB5B;;OAEG;IACG,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,SAAS,CAAC;IA0ExE;;OAEG;IACG,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAyEtG,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;IAmClB,OAAO,CAAC,SAAS;IAYjB,KAAK,IAAI,IAAI;CAMhB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,CAEhF"}
@@ -513,15 +513,22 @@ export class TabularDriver {
513
513
  let processedSheets = 0;
514
514
  for (const sheetName of workbook.SheetNames) {
515
515
  const worksheet = workbook.Sheets[sheetName];
516
- const range = XLSX.utils.decode_range(worksheet['!ref'] || 'A1');
516
+ const ref = worksheet['!ref'];
517
+ if (!ref) {
518
+ processedSheets++;
519
+ continue;
520
+ }
521
+ const range = XLSX.utils.decode_range(ref);
517
522
  const totalRows = range.e.r - range.s.r + 1;
518
523
  if (totalRows === 0) {
519
524
  processedSheets++;
520
525
  continue;
521
526
  }
522
- // NEW: Support headerRow option
527
+ // When headerRow is specified and > 0, we need to:
528
+ // 1. Tell sheet_to_json to start reading from that row
529
+ // 2. SheetJS treats the first row of the range as headers
523
530
  const jsonData = XLSX.utils.sheet_to_json(worksheet, {
524
- range: headerRow !== undefined ? headerRow : undefined, // ✅ Start from specified row
531
+ range: (headerRow !== undefined && headerRow > 0) ? headerRow : undefined,
525
532
  defval: null,
526
533
  raw: false,
527
534
  blankrows: false
@@ -638,7 +638,13 @@ export class TabularDriver {
638
638
  for (const sheetName of workbook.SheetNames) {
639
639
  const worksheet = workbook.Sheets[sheetName];
640
640
 
641
- const range = XLSX.utils.decode_range(worksheet['!ref'] || 'A1');
641
+ const ref = worksheet['!ref'];
642
+ if (!ref) {
643
+ processedSheets++;
644
+ continue;
645
+ }
646
+
647
+ const range = XLSX.utils.decode_range(ref);
642
648
  const totalRows = range.e.r - range.s.r + 1;
643
649
 
644
650
  if (totalRows === 0) {
@@ -646,9 +652,11 @@ export class TabularDriver {
646
652
  continue;
647
653
  }
648
654
 
649
- // NEW: Support headerRow option
655
+ // When headerRow is specified and > 0, we need to:
656
+ // 1. Tell sheet_to_json to start reading from that row
657
+ // 2. SheetJS treats the first row of the range as headers
650
658
  const jsonData: Record<string, any>[] = XLSX.utils.sheet_to_json(worksheet, {
651
- range: headerRow !== undefined ? headerRow : undefined, // ✅ Start from specified row
659
+ range: (headerRow !== undefined && headerRow > 0) ? headerRow : undefined,
652
660
  defval: null,
653
661
  raw: false,
654
662
  blankrows: false
@@ -438,4 +438,200 @@ code {
438
438
 
439
439
  .jux-button-warning:hover {
440
440
  background: hsl(var(--warning) / 0.9);
441
+ }
442
+
443
+ /* ═══════════════════════════════════════════════════════════════════
444
+ * MODAL
445
+ * ═══════════════════════════════════════════════════════════════════ */
446
+
447
+ .jux-modal-overlay {
448
+ position: fixed;
449
+ top: 0;
450
+ left: 0;
451
+ width: 100vw;
452
+ height: 100vh;
453
+ z-index: 9999;
454
+ background: rgba(0, 0, 0, 0.5);
455
+ display: flex;
456
+ align-items: center;
457
+ justify-content: center;
458
+ backdrop-filter: blur(2px);
459
+ }
460
+
461
+ .jux-modal {
462
+ position: relative;
463
+ background: hsl(var(--background));
464
+ border: 1px solid hsl(var(--border));
465
+ border-radius: var(--radius);
466
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
467
+ width: 90%;
468
+ max-height: 85vh;
469
+ overflow-y: auto;
470
+ animation: jux-modal-enter 0.2s ease-out;
471
+ }
472
+
473
+ @keyframes jux-modal-enter {
474
+ from {
475
+ opacity: 0;
476
+ transform: scale(0.96) translateY(8px);
477
+ }
478
+ to {
479
+ opacity: 1;
480
+ transform: scale(1) translateY(0);
481
+ }
482
+ }
483
+
484
+ .jux-modal-small { max-width: 400px; }
485
+ .jux-modal-medium { max-width: 600px; }
486
+ .jux-modal-large { max-width: 900px; }
487
+
488
+ .jux-modal-close {
489
+ position: absolute;
490
+ top: 0.75rem;
491
+ right: 0.75rem;
492
+ width: 2rem;
493
+ height: 2rem;
494
+ display: flex;
495
+ align-items: center;
496
+ justify-content: center;
497
+ background: transparent;
498
+ border: none;
499
+ border-radius: var(--radius);
500
+ color: hsl(var(--muted-foreground));
501
+ font-size: 1.25rem;
502
+ cursor: pointer;
503
+ transition: all 0.15s;
504
+ z-index: 1;
505
+ }
506
+
507
+ .jux-modal-close:hover {
508
+ background: hsl(var(--muted));
509
+ color: hsl(var(--foreground));
510
+ }
511
+
512
+ .jux-modal-header {
513
+ display: flex;
514
+ align-items: center;
515
+ gap: 0.5rem;
516
+ padding: 1.25rem 1.5rem;
517
+ border-bottom: 1px solid hsl(var(--border));
518
+ }
519
+
520
+ .jux-modal-header-icon {
521
+ display: flex;
522
+ align-items: center;
523
+ color: hsl(var(--foreground));
524
+ }
525
+
526
+ .jux-modal-header-title {
527
+ font-size: 1.125rem;
528
+ font-weight: 600;
529
+ color: hsl(var(--foreground));
530
+ }
531
+
532
+ .jux-modal-content {
533
+ padding: 1.5rem;
534
+ }
535
+
536
+ .jux-modal-footer {
537
+ display: flex;
538
+ align-items: center;
539
+ justify-content: flex-end;
540
+ gap: 0.5rem;
541
+ padding: 1rem 1.5rem;
542
+ border-top: 1px solid hsl(var(--border));
543
+ background: hsl(var(--muted) / 0.3);
544
+ border-radius: 0 0 var(--radius) var(--radius);
545
+ }
546
+
547
+ .jux-modal-action {
548
+ display: inline-flex;
549
+ align-items: center;
550
+ justify-content: center;
551
+ white-space: nowrap;
552
+ border-radius: var(--radius);
553
+ font-size: 0.875rem;
554
+ font-weight: 500;
555
+ height: 2.25rem;
556
+ padding: 0 1rem;
557
+ cursor: pointer;
558
+ transition: all 0.15s;
559
+ border: none;
560
+ }
561
+
562
+ .jux-modal-action-primary {
563
+ background: hsl(var(--primary));
564
+ color: hsl(var(--primary-foreground));
565
+ }
566
+
567
+ .jux-modal-action-primary:hover {
568
+ opacity: 0.9;
569
+ }
570
+
571
+ .jux-modal-action-secondary {
572
+ background: transparent;
573
+ border: 1px solid hsl(var(--input));
574
+ color: hsl(var(--foreground));
575
+ }
576
+
577
+ .jux-modal-action-secondary:hover {
578
+ background: hsl(var(--accent));
579
+ }
580
+
581
+ .jux-modal-action-default {
582
+ background: hsl(var(--primary));
583
+ color: hsl(var(--primary-foreground));
584
+ }
585
+
586
+ /* Position variants */
587
+ .jux-modal-position-top { align-items: flex-start; padding-top: 5vh; }
588
+ .jux-modal-position-bottom { align-items: flex-end; padding-bottom: 5vh; }
589
+ .jux-modal-position-fullscreen .jux-modal { width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; }
590
+
591
+ /* ═══════════════════════════════════════════════════════════════════
592
+ * RESHAPE MODAL (DataFrame Import Settings)
593
+ * ═══════════════════════════════════════════════════════════════════ */
594
+
595
+ .jux-reshape-hint {
596
+ font-size: 0.8125rem;
597
+ color: hsl(var(--muted-foreground));
598
+ margin-top: 0.5rem;
599
+ padding: 0.625rem 0.75rem;
600
+ background: hsl(var(--warning) / 0.08);
601
+ border-radius: var(--radius);
602
+ border: 1px solid hsl(var(--warning) / 0.2);
603
+ line-height: 1.5;
604
+ }
605
+
606
+ .jux-reshape-hint strong {
607
+ color: hsl(var(--foreground));
608
+ }
609
+
610
+ .jux-reshape-preview-container {
611
+ border: 1px solid hsl(var(--border));
612
+ border-radius: var(--radius);
613
+ padding: 1rem;
614
+ background: hsl(var(--muted) / 0.3);
615
+ max-height: 400px;
616
+ overflow: auto;
617
+ }
618
+
619
+ .jux-reshape-preview {
620
+ font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
621
+ font-size: 0.6875rem;
622
+ white-space: pre;
623
+ color: hsl(var(--foreground));
624
+ line-height: 1.6;
625
+ tab-size: 4;
626
+ }
627
+
628
+ /* ═══════════════════════════════════════════════════════════════════
629
+ * BUTTON SIZES
630
+ * ═══════════════════════════════════════════════════════════════════ */
631
+
632
+ .jux-button-sm {
633
+ height: 1.75rem;
634
+ padding: 0 0.625rem;
635
+ font-size: 0.75rem;
636
+ border-radius: calc(var(--radius) - 2px);
441
637
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.1.187",
3
+ "version": "1.1.189",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "index.js",