@aicut/core 0.4.1 → 0.4.2

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/dist/index.d.cts CHANGED
@@ -135,6 +135,15 @@ interface EditorApi {
135
135
  readonly toolbarLeft: HTMLElement;
136
136
  /** Right-side bookend slot — conventionally export / save / share. */
137
137
  readonly toolbarRight: HTMLElement;
138
+ /**
139
+ * Optional editor header above the preview. Host appends branding,
140
+ * project name, file menu, etc. on the left and Share / Export /
141
+ * profile / settings on the right. Layout is identical to today's
142
+ * editor when both slots are empty — CSS collapses the bar.
143
+ */
144
+ readonly headerLeft: HTMLElement;
145
+ /** Right-side header slot — conventionally Share / Export / etc. */
146
+ readonly headerRight: HTMLElement;
138
147
  on<K extends EditorEventName>(event: K, handler: (payload: EditorEventMap[K]) => void): () => void;
139
148
  off<K extends EditorEventName>(event: K, handler: (payload: EditorEventMap[K]) => void): void;
140
149
  destroy(): void;
@@ -164,6 +173,8 @@ declare class Editor implements EditorApi {
164
173
  static create(opts: EditorOptions): Editor;
165
174
  get toolbarLeft(): HTMLElement;
166
175
  get toolbarRight(): HTMLElement;
176
+ get headerLeft(): HTMLElement;
177
+ get headerRight(): HTMLElement;
167
178
  play(): void;
168
179
  pause(): void;
169
180
  togglePlay(): void;
package/dist/index.d.ts CHANGED
@@ -135,6 +135,15 @@ interface EditorApi {
135
135
  readonly toolbarLeft: HTMLElement;
136
136
  /** Right-side bookend slot — conventionally export / save / share. */
137
137
  readonly toolbarRight: HTMLElement;
138
+ /**
139
+ * Optional editor header above the preview. Host appends branding,
140
+ * project name, file menu, etc. on the left and Share / Export /
141
+ * profile / settings on the right. Layout is identical to today's
142
+ * editor when both slots are empty — CSS collapses the bar.
143
+ */
144
+ readonly headerLeft: HTMLElement;
145
+ /** Right-side header slot — conventionally Share / Export / etc. */
146
+ readonly headerRight: HTMLElement;
138
147
  on<K extends EditorEventName>(event: K, handler: (payload: EditorEventMap[K]) => void): () => void;
139
148
  off<K extends EditorEventName>(event: K, handler: (payload: EditorEventMap[K]) => void): void;
140
149
  destroy(): void;
@@ -164,6 +173,8 @@ declare class Editor implements EditorApi {
164
173
  static create(opts: EditorOptions): Editor;
165
174
  get toolbarLeft(): HTMLElement;
166
175
  get toolbarRight(): HTMLElement;
176
+ get headerLeft(): HTMLElement;
177
+ get headerRight(): HTMLElement;
167
178
  play(): void;
168
179
  pause(): void;
169
180
  togglePlay(): void;
package/dist/index.js CHANGED
@@ -2436,6 +2436,11 @@ function scaleToSlider(scale) {
2436
2436
  var EditorUI = class {
2437
2437
  root;
2438
2438
  editor;
2439
+ header;
2440
+ /** Host-extensible slot at the very left of the editor header. */
2441
+ headerLeft;
2442
+ /** Host-extensible slot at the very right of the editor header. */
2443
+ headerRight;
2439
2444
  preview;
2440
2445
  fullscreenExitBtn;
2441
2446
  toolbar;
@@ -2449,6 +2454,15 @@ var EditorUI = class {
2449
2454
  const locale = editor.getLocale();
2450
2455
  root.classList.add("aicut-root");
2451
2456
  root.innerHTML = "";
2457
+ this.header = document.createElement("div");
2458
+ this.header.className = "aicut-header";
2459
+ this.header.setAttribute("data-testid", "aicut-header");
2460
+ this.headerLeft = document.createElement("div");
2461
+ this.headerLeft.className = "aicut-header-slot aicut-header-left";
2462
+ this.headerRight = document.createElement("div");
2463
+ this.headerRight.className = "aicut-header-slot aicut-header-right";
2464
+ this.header.append(this.headerLeft, this.headerRight);
2465
+ root.appendChild(this.header);
2452
2466
  this.preview = document.createElement("div");
2453
2467
  this.preview.className = "aicut-preview-host";
2454
2468
  this.preview.setAttribute("data-testid", "aicut-preview");
@@ -2727,6 +2741,12 @@ var Editor = class _Editor {
2727
2741
  get toolbarRight() {
2728
2742
  return this.ui.toolbarRight;
2729
2743
  }
2744
+ get headerLeft() {
2745
+ return this.ui.headerLeft;
2746
+ }
2747
+ get headerRight() {
2748
+ return this.ui.headerRight;
2749
+ }
2730
2750
  // ---- playback -------------------------------------------------------
2731
2751
  play() {
2732
2752
  this.engine.play();