@aicut/core 0.2.0 → 0.4.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aicut/core",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Framework-agnostic core for the AiCut video editor — canvas timeline, data model, HTML5 playback engine, plus an opt-in 3D lighting picker.",
5
5
  "license": "MIT",
6
6
  "author": "ziqiang <ziqiangytu@gmail.com>",
package/styles/theme.css CHANGED
@@ -429,51 +429,33 @@
429
429
 
430
430
  .aicut-lighting-editor {
431
431
  --aicut-lighting-canvas-bg: color-mix(in srgb, var(--aicut-controls-text, rgba(255, 255, 255, 0.85)) 4%, transparent);
432
- --aicut-lighting-section-gap: 14px;
432
+ --aicut-lighting-section-gap: 18px;
433
433
  --aicut-lighting-control-w: 220px;
434
434
  display: block;
435
435
  }
436
436
 
437
437
  .aicut-lighting-body {
438
438
  display: grid;
439
- /* Fixed widths: scene 240, controls 220. Smart column gets the rest
440
- when open; collapses to 0 when closed; removed entirely when smart
441
- mode is disabled (see the data-smart-* rules below). */
442
- grid-template-columns: 240px 220px minmax(0, 1fr);
443
- gap: 16px;
439
+ /* Just two columns: scene 240 + controls 220. Hosts that want to
440
+ render an adjacent panel (AI smart mode, prompt, presets, …) put
441
+ their own DOM beside <LightingEditor> in their own layout. */
442
+ grid-template-columns: 240px 220px;
443
+ gap: 28px;
444
444
  align-items: start;
445
- padding: 16px;
445
+ padding: 24px;
446
446
  background: var(--aicut-controls-bg, #1f1f22);
447
447
  color: var(--aicut-controls-text, rgba(255, 255, 255, 0.85));
448
448
  border-radius: var(--aicut-radius-md, 12px);
449
449
  }
450
450
 
451
- /* When smart mode is disabled outright, the smart column doesn't
452
- render — collapse the grid to 2 columns so we don't leave a gap. */
453
- .aicut-lighting-editor[data-smart-enabled="false"] .aicut-lighting-body {
454
- grid-template-columns: 240px 220px;
455
- }
456
-
457
- /* When smart mode is enabled but the drawer is closed, keep the slot
458
- in the DOM (portals stay valid) but shrink the column to zero —
459
- smooth animated drawer collapse from the right. */
460
- .aicut-lighting-editor[data-smart-open="false"] .aicut-lighting-body {
461
- grid-template-columns: 240px 220px 0fr;
462
- }
463
- .aicut-lighting-editor[data-smart-open="false"] .aicut-lighting-smart-wrapper {
464
- opacity: 0;
465
- pointer-events: none;
466
- visibility: hidden;
467
- }
468
-
469
451
  /* --- Scene column --- */
470
452
  .aicut-lighting-scene-col {
471
453
  display: flex;
472
454
  flex-direction: column;
473
455
  align-items: center;
474
- gap: 8px;
456
+ gap: 12px;
475
457
  /* Self-center vertically so the sphere stays at the visual midpoint
476
- of the row even when the smart drawer stretches the row taller
458
+ of the row even when an adjacent host panel makes the row taller
477
459
  than the scene column's own content. */
478
460
  align-self: center;
479
461
  }
@@ -550,7 +532,7 @@
550
532
  .aicut-lighting-section {
551
533
  display: flex;
552
534
  flex-direction: column;
553
- gap: 6px;
535
+ gap: 8px;
554
536
  }
555
537
  .aicut-lighting-section-row {
556
538
  flex-direction: row;
@@ -653,74 +635,20 @@
653
635
  left: 16px;
654
636
  }
655
637
 
656
- .aicut-lighting-reset {
657
- margin-left: auto;
658
- height: 28px;
659
- padding: 0 12px;
660
- border: 1px solid var(--aicut-controls-border, rgba(255, 255, 255, 0.08));
661
- border-radius: 6px;
662
- background: transparent;
663
- color: var(--aicut-controls-text, rgba(255, 255, 255, 0.85));
664
- font: inherit;
665
- font-size: 12px;
666
- cursor: pointer;
667
- }
668
- .aicut-lighting-reset:hover {
669
- background: var(--aicut-controls-hover, rgba(255, 255, 255, 0.08));
670
- }
671
-
672
- .aicut-lighting-smart-slot {
673
- min-width: 0;
674
- }
675
-
676
- /* --- Smart wrapper (drawer + × button) --- */
677
-
678
- .aicut-lighting-smart-wrapper {
679
- position: relative;
680
- min-width: 0;
681
- overflow: hidden;
682
- transition: opacity 180ms ease;
683
- }
684
-
685
- .aicut-lighting-smart-close {
686
- position: absolute;
687
- top: 0;
688
- right: 0;
689
- width: 24px;
690
- height: 24px;
691
- display: inline-flex;
638
+ /* Host-controlled footer area where Reset / Generate / preset-save
639
+ buttons go. Library renders this empty div; the React wrapper's
640
+ `controlsFooter` prop / Vue's <slot name="controlsFooter"> portals
641
+ the host content in. */
642
+ .aicut-lighting-controls-footer {
643
+ display: flex;
692
644
  align-items: center;
693
- justify-content: center;
694
- border: 0;
695
- border-radius: 6px;
696
- background: transparent;
697
- color: color-mix(in srgb, var(--aicut-controls-text, rgba(255, 255, 255, 0.85)) 60%, transparent);
698
- font-size: 18px;
699
- line-height: 1;
700
- cursor: pointer;
701
- z-index: 1;
702
- transition: background-color 120ms ease, color 120ms ease;
703
- }
704
- .aicut-lighting-smart-close:hover {
705
- background: var(--aicut-controls-hover, rgba(255, 255, 255, 0.08));
706
- color: var(--aicut-controls-text, rgba(255, 255, 255, 0.85));
707
- }
708
-
709
- /* Push the host content down a touch so it doesn't sit under × */
710
- .aicut-lighting-smart-wrapper > .aicut-lighting-smart-slot {
711
- padding-top: 4px;
712
- padding-right: 28px;
645
+ justify-content: flex-end;
646
+ gap: 8px;
647
+ flex-wrap: wrap;
648
+ min-height: 0;
649
+ margin-top: 4px;
713
650
  }
714
-
715
- /* --- Smart-mode pill toggle in the controls header --- */
716
-
717
- .aicut-lighting-smart-toggle-row {
718
- display: inline-flex;
719
- align-items: center;
720
- gap: 6px;
651
+ .aicut-lighting-controls-footer:empty {
652
+ display: none;
721
653
  }
722
654
 
723
- .aicut-lighting-smart-toggle-label {
724
- font-size: 11px;
725
- color: color-mix(in srgb, var(--aicut-controls-text, rgba(255, 255, 255, 0.85)) 70%, transparent);
726
- }