@innovastudio/contentbuilder 1.5.195 → 1.5.198

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.195",
4
+ "version": "1.5.198",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -5561,8 +5561,8 @@ class Util {
5561
5561
  if (plugin) {
5562
5562
  element.insertAdjacentHTML('afterend', html);
5563
5563
  newelement = element.nextElementSibling;
5564
- } else if (!element.nextElementSibling && !element.closest('[data-subblock]')) {
5565
- // active element is div.display > p.
5564
+ } else if (!element.nextElementSibling && element.closest('.display')) {
5565
+ /*if(!element.nextElementSibling && !element.closest('[data-subblock]')) { // active element is div.display > p. */
5566
5566
  let activeCol = this.builder.activeCol;
5567
5567
  let current;
5568
5568
  const elms = dom.elementChildren(activeCol);
@@ -90248,12 +90248,16 @@ OUT OF SCOPE requests include:
90248
90248
  ${imageGenEnabled ? '' : '- AI image generation (currently disabled - but external images are OK)'}
90249
90249
 
90250
90250
  IMPORTANT DISTINCTION:
90251
- - "Tell me about the weather in general" → VALID (chat/education)
90252
90251
  - "What's the weather in Tokyo right now?" → INVALID (requires real-time data)
90253
- - "Write a story about space" → VALID (chat/creative)
90252
+ - "Tell me about the weather in general" → VALID (chat task)
90254
90253
  - "Generate a video about space" → INVALID (video generation)
90255
- - "Explain how databases work" → VALID (chat/education)
90254
+ - "Write a story about space" → VALID (chat task)
90256
90255
  - "Create a database for me" → INVALID (database operations)
90256
+ - "Explain how databases work" → VALID (chat task)
90257
+ - "How would you design this?" → VALID (chat task)
90258
+ - "I need help with..." → VALID (chat task)
90259
+
90260
+ NOTE: Conversational requests, questions, and vague requests are ALL VALID and should be classified as "chat" tasks.
90257
90261
 
90258
90262
  Respond with a JSON object in this exact format:
90259
90263
  {
@@ -90278,6 +90282,15 @@ Task type definitions:
90278
90282
  - "chat": Conversations, questions, explanations, advice, discussions
90279
90283
  ${imageGenEnabled ? '- "image": Generate AI images and integrate them into the page' : ''}
90280
90284
 
90285
+ FALLBACK RULE:
90286
+ - If the request is vague, conversational, or doesn't clearly require code/image generation
90287
+ - If you're uncertain about how to categorize it
90288
+ - If it's a general question or discussion
90289
+ - If it seems like the user wants advice, help, or guidance
90290
+ → Create a single "chat" task with the original user message
90291
+
90292
+ CRITICAL: NEVER return an empty tasks array. When in doubt, use "chat".
90293
+
90281
90294
  CODE TASK RULES:
90282
90295
  - ALWAYS combine multiple code-related instructions into ONE code task
90283
90296
  - The AI can handle complex, multi-part code generation in a single task
@@ -90605,6 +90618,11 @@ ${isMixed ? 'CRITICAL: Only perform the task specified above. Do not answer othe
90605
90618
 
90606
90619
  const system = `You are a helpful AI assistant for a web builder tool. You can answer questions about web development, design, HTML, CSS, JavaScript, and provide general assistance.
90607
90620
 
90621
+ When providing code examples:
90622
+ - Use markdown code blocks with language tags: \`\`\`html, \`\`\`css, \`\`\`javascript
90623
+ - Use inline code for short snippets: \`<element>\`
90624
+ - Never output raw HTML that could be rendered by the browser
90625
+
90608
90626
  ${isMixed ? `CRITICAL INSTRUCTION: You are handling ONE SPECIFIC TASK from a multi-part request.
90609
90627
 
90610
90628
  Your ONLY task is: ${task.description}
@@ -90961,6 +90979,14 @@ ${this.builder.html()}
90961
90979
  } else {
90962
90980
  this.builder.uo.saveForUndo();
90963
90981
  }
90982
+ const parser = new DOMParser();
90983
+ const doc = parser.parseFromString(code, 'text/html');
90984
+ const containers = doc.querySelectorAll('div.is-container');
90985
+ containers.forEach(container => {
90986
+ container.classList.add('size-17', 'leading-17'); // add default font-size & line-height
90987
+ });
90988
+
90989
+ code = doc.body.innerHTML;
90964
90990
  this.builder.loadHtml(code);
90965
90991
  }
90966
90992
  escapeHtml(text) {
@@ -91504,11 +91530,13 @@ Classes: p-0, p-2, p-3, p-4, p-6, p-8, p-10, p-12
91504
91530
  **Example: Card with padding**
91505
91531
 
91506
91532
  <!-- Example: Card with padding -->
91507
- <div class="p-12 bg-gray-50">
91533
+ <div class="p-12 box-border bg-gray-50">
91508
91534
  <p class="size-18 pb-4">Card content</p>
91509
91535
  <p class="size-14 text-gray-600">Description</p>
91510
91536
  </div>
91511
91537
 
91538
+ **Key classes:** p-X, box-border (always use box-border with padding on DIV or cards)
91539
+
91512
91540
  ### Directional Padding
91513
91541
 
91514
91542
  Classes: px-4, py-4, pt-4, pb-4, pl-4, pr-4
@@ -91665,7 +91693,7 @@ border-2 border-solid mt-2 mb-1 font-normal tracking-normal rounded-full
91665
91693
  </a>
91666
91694
  </div>
91667
91695
 
91668
- **Key classes:** 'underline' + 'border-transparent' (no horizontal padding needed).
91696
+ **Key classes:** 'underline'+ 'underline-offset-4' + 'border-transparent' (no horizontal padding needed).
91669
91697
 
91670
91698
  **For button groups:**
91671
91699
 
@@ -91741,8 +91769,7 @@ Use grayscale for minimalist design.
91741
91769
  > **Editorial Style:** Stick to black, white, and grays for a clean, minimalist aesthetic. Use color sparingly for accents.
91742
91770
 
91743
91771
  ` + `
91744
-
91745
- ### Animation
91772
+ ## Animation
91746
91773
 
91747
91774
  **Transition**
91748
91775
 
@@ -91750,80 +91777,117 @@ Classes: transition-none, transition, transition-colors, transition-opacity, tra
91750
91777
 
91751
91778
  **Duration**
91752
91779
 
91753
- Classes: duration-75, duration-100, duration-150, duration-200, duration-300, duration-500, duration-700, duration-1000, duration-1500
91780
+ Classes: duration-75, duration-100, duration-150, duration-200, duration-300, duration-400, duration-500, duration-600, duration-700, duration-800, duration-900, duration-1000, duration-1500
91754
91781
 
91755
91782
  **Timing**
91756
91783
 
91757
91784
  Classes: ease-linear, ease-in, ease-out, ease-in-out
91758
91785
 
91759
- **Delay**
91786
+ **Hover Transforms**
91760
91787
 
91761
- Classes: delay-75, delay-100, delay-150, delay-200, delay-300, delay-500
91788
+ Classes: hover:scale-105, hover:-translate-y-1, hover:-translate-y-2
91762
91789
 
91763
- **Scale**
91790
+ **Hover Shadow**
91764
91791
 
91765
- Classes: scale-0, scale-50, scale-75, scale-90, scale-95, scale-100, scale-105, scale-110, scale-125, scale-150
91792
+ Classes: hover:shadow-sm, hover:shadow, hover:shadow-md, hover:shadow-lg, hover:shadow-xl, hover:shadow-2xl
91766
91793
 
91767
- **Hover Effect**
91794
+ **Hover Background Colors**
91768
91795
 
91769
- Classes: hover:scale-105
91796
+ Classes: hover:bg-white, hover:bg-black, hover:bg-gray-50, hover:bg-gray-100, hover:bg-gray-200, hover:bg-gray-300, hover:bg-gray-400, hover:bg-gray-500, hover:bg-gray-600, hover:bg-gray-700, hover:bg-gray-800, hover:bg-gray-900, hover:bg-transparent
91770
91797
 
91771
- **Rotate**
91798
+ **Hover Text Colors**
91772
91799
 
91773
- Classes: rotate-0, rotate-45, rotate-90, rotate-180
91800
+ Classes: hover:text-white, hover:text-black, hover:text-current, hover:text-gray-50, hover:text-gray-100, hover:text-gray-200, hover:text-gray-300, hover:text-gray-400, hover:text-gray-500, hover:text-gray-600, hover:text-gray-700, hover:text-gray-800, hover:text-gray-900, hover:text-gray-950
91774
91801
 
91775
- **Translate X**
91802
+ **Hover Opacity**
91776
91803
 
91777
- Classes: translate-x-0, translate-x-1, translate-x-2, translate-x-4, translate-x-8
91804
+ Classes: hover:opacity-70, hover:opacity-75, hover:opacity-80, hover:opacity-90, hover:opacity-95, hover:opacity-100
91778
91805
 
91779
- **Translate Y**
91806
+ **Animation keyframes**
91807
+
91808
+ Classes: spin, ping, pulse, bounce
91780
91809
 
91781
- Classes: translate-y-0, translate-y-1, translate-y-2, translate-y-4, translate-y-8
91810
+ ### Animation Examples
91782
91811
 
91783
- **Skew**
91812
+ **Example: Hover lift on Cards**
91784
91813
 
91785
- Classes: skew-x-0, skew-x-3, skew-x-6, skew-y-0, skew-y-3, skew-y-6
91814
+ <div class="row" style="gap: 30px;">
91815
+ <div class="column">
91816
+ <!-- card -->
91817
+ <div class="p-10 box-border bg-white h-full transition-transform duration-300 hover:-translate-y-2" style="border: 1px solid #e0e0e0;">
91818
+ <div class="mb-6 text-gray-300"><i class="bi bi-star-fill"></i><i class="bi bi-star-fill"></i><i class="bi bi-star-fill"></i><i class="bi bi-star-fill"></i><i class="bi bi-star-fill"></i></div>
91819
+ <p class="size-18 leading-16 mb-8 text-gray-800">"It's rare to find a tool that balances power with simplicity so effectively. It has completely streamlined our workflow."</p>
91820
+ <p class="size-13 font-bold uppercase tracking-widest">Freja E. — Company</p>
91821
+ </div>
91822
+ </div>
91823
+ <div class="column">
91824
+ <!-- card -->
91825
+ </div>
91826
+ <div class="column">
91827
+ <!-- card -->
91828
+ </div>
91829
+ </div>
91830
+
91831
+ **Key classes:** transition-transform, duration-300, hover:translate-y--2
91832
+
91833
+ **Example: Hover lift and shadow on Cards**
91834
+
91835
+ <div class="row" style="gap: 30px;">
91836
+ <div class="column">
91837
+ <!-- card -->
91838
+ <div class="p-10 box-border bg-white transition-all duration-300 ease-out hover:-translate-y-2 hover:shadow-xl" style="border: 1px solid #e5e5e5;">
91839
+ <!-- card content -->
91840
+ </div>
91841
+ </div>
91842
+ <div class="column">
91843
+ <!-- card -->
91844
+ </div>
91845
+ <div class="column">
91846
+ <!-- card -->
91847
+ </div>
91848
+ </div>
91786
91849
 
91787
- **Overflow**
91850
+ **Key classes:** transition-all duration-300 ease-out hover:-translate-y-2 hover:shadow-xl
91788
91851
 
91789
- Classes: overflow-hidden, overflow-visible, overflow-scroll, overflow-auto
91852
+ **Example: Hover zoom on Cards**
91790
91853
 
91791
- **Opacity**
91854
+ <div class="row" style="gap: 30px;">
91855
+ <div class="column">
91856
+ <!-- card -->
91857
+ <div class="p-12 box-border bg-white h-full flex flex-col items-center text-center transition-transform duration-300 ease-out hover:scale-105" style="box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);">
91858
+ <!-- card content -->
91859
+ </div>
91860
+ </div>
91861
+ <div class="column">
91862
+ <!-- card -->
91863
+ </div>
91864
+ <div class="column">
91865
+ <!-- card -->
91866
+ </div>
91867
+ </div>
91792
91868
 
91793
- Classes:
91869
+ **Key classes:** transition-transform, duration-300, ease-out, hover:scale-105
91794
91870
 
91795
- | Class | Color |
91796
- | ------------ | ------------- |
91797
- | '.opacity-0' | opacity: 0 |
91798
- | '.opacity-2' | opacity: 0.02 |
91799
- | '.opacity-4' | opacity: 0.04 |
91800
- | '.opacity-5' | opacity: 0.05 |
91801
- | '.opacity-6' | opacity: 0.06 |
91802
- | '.opacity-8' | opacity: 0.07 |
91803
- | '.opacity-10' | opacity: 0.1 |
91804
- | '.opacity-12' | opacity: 0.12 |
91805
- | '.opacity-15' | opacity: 0.15 |
91806
- | '.opacity-20' | opacity: 0.2 |
91807
- | '.opacity-25' | opacity: 0.25 |
91808
- | '.opacity-30' | opacity: 0.3 |
91809
- | '.opacity-35' | opacity: 0.35 |
91810
- | '.opacity-40' | opacity: 0.4 |
91811
- | '.opacity-45' | opacity: 0.45 |
91812
- | '.opacity-50' | opacity: 0.5 |
91813
- | '.opacity-55' | opacity: 0.55 |
91814
- | '.opacity-60' | opacity: 0.6 |
91815
- | '.opacity-65' | opacity: 0.65 |
91816
- | '.opacity-70' | opacity: 0.7 |
91817
- | '.opacity-75' | opacity: 0.75 |
91818
- | '.opacity-80' | opacity: 0.8 |
91819
- | '.opacity-85' | opacity: 0.85 |
91820
- | '.opacity-90' | opacity: 0.9 |
91821
- | '.opacity-95' | opacity: 0.95 |
91822
- | '.opacity-100' | opacity: 1 |
91871
+ **Example: Hover zoom on Images**
91823
91872
 
91824
- **Animation keyframes**
91873
+ <div class="row" style="gap:40px;">
91874
+ <div class="column">
91875
+ <div class="w-full overflow-hidden relative bg-gray-50 mb-6" style="aspect-ratio: 4 / 3;">
91876
+ <img src="image1.jpg" alt="Freja E. Andersen" class="w-full h-full object-cover transition-transform hover:scale-105 duration-1000">
91877
+ </div>
91878
+ <h4 class="size-20 font-normal">Freja E. Andersen</h4>
91879
+ <p class="size-14 text-gray-500 uppercase tracking-wide mt-1 mb-3">Lead Architect</p>
91880
+ <p class="size-15 text-gray-600 leading-16">Specializing in sustainable residential architecture with a focus on natural light.</p>
91881
+ </div>
91882
+ <div class="column">
91883
+
91884
+ </div>
91885
+ <div class="column">
91886
+
91887
+ </div>
91888
+ </div>
91825
91889
 
91826
- Classes: spin, ping, pulse, bounce
91890
+ **Key classes:** transition-transform, hover:scale-105, duration-1000 (or use duration-1500 for larger image)
91827
91891
  ` + `
91828
91892
  ---
91829
91893
  ` + `
@@ -91846,7 +91910,7 @@ Classes: spin, ping, pulse, bounce
91846
91910
 
91847
91911
  ### Card with Padding
91848
91912
 
91849
- <div class="p-12 bg-gray-50">
91913
+ <div class="p-12 box-border bg-gray-50">
91850
91914
  <p class="size-18 leading-17 text-black pb-4">
91851
91915
  Card title or content
91852
91916
  </p>
@@ -91893,16 +91957,18 @@ Classes: spin, ping, pulse, bounce
91893
91957
  </div>
91894
91958
  <div class="row">
91895
91959
  <div class="column">
91896
- <img class="pb-2" src="https://placehold.co/400x400/f5f5f5/999?text=Alex+T" alt="Team Member">
91960
+ <div class="w-full overflow-hidden relative bg-gray-50 mb-2" style="aspect-ratio: 4 / 3;">
91961
+ <img src="image1.jpg" alt="Freja E. Andersen" class="w-full h-full object-cover transition-transform hover:scale-105 duration-1000">
91962
+ </div>
91897
91963
  <h4 class="size-18 font-medium pb-2 text-center">Alex Thompson</h4>
91898
91964
  <p class="size-12 uppercase tracking-150 text-gray-500 pb-3 text-center">Founder &amp; CEO</p>
91899
91965
  <p class="size-15 leading-16 text-gray-600 text-center">Visionary leader with 15 years of experience.</p>
91900
91966
  </div>
91901
91967
  <div class="column">
91902
- <img class="pb-2" src="https://placehold.co/400x400/f5f5f5/999?text=Sophia+M" alt="Team Member">
91903
- <h4 class="size-18 font-medium pb-2 text-center">Sophia Martinez</h4>
91904
- <p class="size-12 uppercase tracking-150 text-gray-500 pb-3 text-center">CTO</p>
91905
- <p class="size-15 leading-16 text-gray-600 text-center">Technical architect building systems.</p>
91968
+ <!-- Next image -->
91969
+ </div>
91970
+ <div class="column">
91971
+ <!-- Next image -->
91906
91972
  </div>
91907
91973
  </div>
91908
91974
 
@@ -98423,7 +98489,9 @@ Please obtain a license at: https://innovastudio.com/contentbox`);
98423
98489
  if (!this.controlPanel) this.rte.click(col);
98424
98490
  }
98425
98491
  handleCellClick(col, e) {
98426
- if (col !== e.target.closest('.column')) return;
98492
+ if (this.useDefaultGrid) {
98493
+ if (col !== e.target.closest('.column')) return;
98494
+ }
98427
98495
  if (this.cleanEditing) {
98428
98496
  col.parentNode.querySelector('.is-row-tool').style.display = '';
98429
98497
  col.parentNode.querySelector('.is-col-tool').style.display = '';