@bagelink/blox 1.10.17 → 1.10.21
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/README.md +161 -151
- package/dist/CmsPageView.vue.d.ts +3 -0
- package/dist/CmsPageView.vue.d.ts.map +1 -0
- package/dist/PageRenderer.d.ts +19 -0
- package/dist/PageRenderer.d.ts.map +1 -0
- package/dist/PreviewApp-BZNzZkit.js +4 -0
- package/dist/PreviewApp-C1WvJWI4.cjs +4 -0
- package/dist/PreviewApp.vue.d.ts +3 -0
- package/dist/PreviewApp.vue.d.ts.map +1 -0
- package/dist/PreviewRenderer.d.ts +37 -0
- package/dist/PreviewRenderer.d.ts.map +1 -0
- package/dist/api/index.d.ts +13 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/types.d.ts +94 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/bridge.d.ts +44 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/components/LocaleRouterLink.vue.d.ts +26 -0
- package/dist/components/LocaleRouterLink.vue.d.ts.map +1 -0
- package/dist/composables/useLocale.d.ts +9 -0
- package/dist/composables/useLocale.d.ts.map +1 -0
- package/dist/composables/useLocaleNav.d.ts +14 -0
- package/dist/composables/useLocaleNav.d.ts.map +1 -0
- package/dist/composables/usePageContext.d.ts +2 -0
- package/dist/composables/usePageContext.d.ts.map +1 -0
- package/dist/core.d.ts +26 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/index.cjs +1643 -6481
- package/dist/index.d.ts +20 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1645 -6483
- package/dist/localeStrategy.d.ts +39 -0
- package/dist/localeStrategy.d.ts.map +1 -0
- package/dist/schema.d.ts +19 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/style.css +151 -898
- package/dist/symbols.d.ts +11 -0
- package/dist/symbols.d.ts.map +1 -0
- package/package.json +3 -2
- package/dist/components/base/Button.vue.d.ts +0 -26
- package/dist/components/base/Button.vue.d.ts.map +0 -1
- package/dist/components/base/Container.vue.d.ts +0 -37
- package/dist/components/base/Container.vue.d.ts.map +0 -1
- package/dist/components/base/Image.vue.d.ts +0 -26
- package/dist/components/base/Image.vue.d.ts.map +0 -1
- package/dist/components/base/Spacer.vue.d.ts +0 -16
- package/dist/components/base/Spacer.vue.d.ts.map +0 -1
- package/dist/components/base/Text.vue.d.ts +0 -13
- package/dist/components/base/Text.vue.d.ts.map +0 -1
- package/dist/components/base/Title.vue.d.ts +0 -14
- package/dist/components/base/Title.vue.d.ts.map +0 -1
- package/dist/components/blocks/BigImage.vue.d.ts +0 -12
- package/dist/components/blocks/BigImage.vue.d.ts.map +0 -1
- package/dist/components/blocks/BigQuote.vue.d.ts +0 -14
- package/dist/components/blocks/BigQuote.vue.d.ts.map +0 -1
- package/dist/components/blocks/BlockFooter.vue.d.ts +0 -17
- package/dist/components/blocks/BlockFooter.vue.d.ts.map +0 -1
- package/dist/components/blocks/BlockNav.vue.d.ts +0 -22
- package/dist/components/blocks/BlockNav.vue.d.ts.map +0 -1
- package/dist/components/blocks/Cards.vue.d.ts +0 -18
- package/dist/components/blocks/Cards.vue.d.ts.map +0 -1
- package/dist/components/blocks/Contact.vue.d.ts +0 -22
- package/dist/components/blocks/Contact.vue.d.ts.map +0 -1
- package/dist/components/blocks/CountDown.vue.d.ts +0 -76
- package/dist/components/blocks/CountDown.vue.d.ts.map +0 -1
- package/dist/components/blocks/Cta.vue.d.ts +0 -15
- package/dist/components/blocks/Cta.vue.d.ts.map +0 -1
- package/dist/components/blocks/Faq.vue.d.ts +0 -20
- package/dist/components/blocks/Faq.vue.d.ts.map +0 -1
- package/dist/components/blocks/Grid.vue.d.ts +0 -24
- package/dist/components/blocks/Grid.vue.d.ts.map +0 -1
- package/dist/components/blocks/Icons.vue.d.ts +0 -16
- package/dist/components/blocks/Icons.vue.d.ts.map +0 -1
- package/dist/components/blocks/IconsList.vue.d.ts +0 -22
- package/dist/components/blocks/IconsList.vue.d.ts.map +0 -1
- package/dist/components/blocks/ImageCarousel.vue.d.ts +0 -16
- package/dist/components/blocks/ImageCarousel.vue.d.ts.map +0 -1
- package/dist/components/blocks/ImageLinkBoxes.vue.d.ts +0 -14
- package/dist/components/blocks/ImageLinkBoxes.vue.d.ts.map +0 -1
- package/dist/components/blocks/Logos.vue.d.ts +0 -17
- package/dist/components/blocks/Logos.vue.d.ts.map +0 -1
- package/dist/components/blocks/PopUp.vue.d.ts +0 -23
- package/dist/components/blocks/PopUp.vue.d.ts.map +0 -1
- package/dist/components/blocks/PriceTable.vue.d.ts +0 -24
- package/dist/components/blocks/PriceTable.vue.d.ts.map +0 -1
- package/dist/components/blocks/Space.vue.d.ts +0 -25
- package/dist/components/blocks/Space.vue.d.ts.map +0 -1
- package/dist/components/blocks/Tabs.vue.d.ts +0 -15
- package/dist/components/blocks/Tabs.vue.d.ts.map +0 -1
- package/dist/components/blocks/Team.vue.d.ts +0 -19
- package/dist/components/blocks/Team.vue.d.ts.map +0 -1
- package/dist/components/blocks/Testimonials.vue.d.ts +0 -18
- package/dist/components/blocks/Testimonials.vue.d.ts.map +0 -1
- package/dist/components/blocks/Text.vue.d.ts +0 -10
- package/dist/components/blocks/Text.vue.d.ts.map +0 -1
- package/dist/components/blocks/TextImage.vue.d.ts +0 -20
- package/dist/components/blocks/TextImage.vue.d.ts.map +0 -1
- package/dist/components/blocks/TextSide.vue.d.ts +0 -19
- package/dist/components/blocks/TextSide.vue.d.ts.map +0 -1
- package/dist/components/blocks/Title.vue.d.ts +0 -16
- package/dist/components/blocks/Title.vue.d.ts.map +0 -1
- package/dist/components/blocks/TitleSide.vue.d.ts +0 -21
- package/dist/components/blocks/TitleSide.vue.d.ts.map +0 -1
- package/dist/components/blocks/VideoBox.vue.d.ts +0 -15
- package/dist/components/blocks/VideoBox.vue.d.ts.map +0 -1
- package/dist/components/blocks/blocks.d.ts +0 -27
- package/dist/components/blocks/blocks.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -19
- package/dist/components/index.d.ts.map +0 -1
- package/dist/config/baseComponents.d.ts +0 -50
- package/dist/config/baseComponents.d.ts.map +0 -1
- package/dist/config/blockComponents.d.ts +0 -41
- package/dist/config/blockComponents.d.ts.map +0 -1
- package/dist/core/communication.d.ts +0 -44
- package/dist/core/communication.d.ts.map +0 -1
- package/dist/core/registry.d.ts +0 -56
- package/dist/core/registry.d.ts.map +0 -1
- package/dist/core/renderer.d.ts +0 -27
- package/dist/core/renderer.d.ts.map +0 -1
- package/dist/core/types.d.ts +0 -105
- package/dist/core/types.d.ts.map +0 -1
- package/dist/setup.d.ts +0 -132
- package/dist/setup.d.ts.map +0 -1
- package/dist/utils/componentPreviewGenerator.d.ts +0 -113
- package/dist/utils/componentPreviewGenerator.d.ts.map +0 -1
- package/dist/utils/normalizer.d.ts +0 -18
- package/dist/utils/normalizer.d.ts.map +0 -1
- package/dist/utils/styles.d.ts +0 -13
- package/dist/utils/styles.d.ts.map +0 -1
- package/dist/views/ExternalPreview.vue.d.ts +0 -12
- package/dist/views/ExternalPreview.vue.d.ts.map +0 -1
- package/dist/views/RenderPage.vue.d.ts +0 -10
- package/dist/views/RenderPage.vue.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -61,17 +61,15 @@ import App from './App.vue'
|
|
|
61
61
|
|
|
62
62
|
const app = createApp(App)
|
|
63
63
|
const router = createRouter({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
history: createWebHistory(),
|
|
65
|
+
routes: [
|
|
66
|
+
// Your app routes
|
|
67
|
+
],
|
|
68
68
|
})
|
|
69
69
|
|
|
70
70
|
// Create and configure Blox
|
|
71
71
|
const blox = createBlox()
|
|
72
|
-
blox
|
|
73
|
-
.registerComponents([ButtonConfig, TextConfig, TitleConfig])
|
|
74
|
-
.registerRoutes(router)
|
|
72
|
+
blox.registerComponents([ButtonConfig, TextConfig, TitleConfig]).registerRoutes(router)
|
|
75
73
|
|
|
76
74
|
app.use(blox)
|
|
77
75
|
app.use(router)
|
|
@@ -79,6 +77,7 @@ app.mount('#app')
|
|
|
79
77
|
```
|
|
80
78
|
|
|
81
79
|
That's it! Preview routes are now available at:
|
|
80
|
+
|
|
82
81
|
- `/blox/preview/:pageId?` - External preview with editor communication
|
|
83
82
|
- `/blox/render/:pageId?` - Static page rendering
|
|
84
83
|
|
|
@@ -89,24 +88,22 @@ import { createBlox, createComponentConfig, ButtonConfig } from '@bagelink/blox'
|
|
|
89
88
|
import MyHeroSection from './components/MyHeroSection.vue'
|
|
90
89
|
|
|
91
90
|
const MyHeroConfig = createComponentConfig({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
91
|
+
id: 'MyHero',
|
|
92
|
+
label: 'Hero Section',
|
|
93
|
+
icon: 'hero_section',
|
|
94
|
+
component: MyHeroSection,
|
|
95
|
+
content: [
|
|
96
|
+
{
|
|
97
|
+
type: 'text',
|
|
98
|
+
key: 'title',
|
|
99
|
+
label: 'Hero Title',
|
|
100
|
+
defaultValue: 'Welcome!',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
104
103
|
})
|
|
105
104
|
|
|
106
105
|
const blox = createBlox()
|
|
107
|
-
blox
|
|
108
|
-
.registerComponents([ButtonConfig, MyHeroConfig])
|
|
109
|
-
.registerRoutes(router)
|
|
106
|
+
blox.registerComponents([ButtonConfig, MyHeroConfig]).registerRoutes(router)
|
|
110
107
|
|
|
111
108
|
app.use(blox)
|
|
112
109
|
```
|
|
@@ -146,7 +143,7 @@ app.mount('#app')
|
|
|
146
143
|
|
|
147
144
|
```vue
|
|
148
145
|
<template>
|
|
149
|
-
|
|
146
|
+
<RenderPage :page-data="pageData" />
|
|
150
147
|
</template>
|
|
151
148
|
|
|
152
149
|
<script setup lang="ts">
|
|
@@ -163,7 +160,7 @@ const pageData = {
|
|
|
163
160
|
|
|
164
161
|
```vue
|
|
165
162
|
<template>
|
|
166
|
-
|
|
163
|
+
<ExternalPreview :origin="editorOrigin" />
|
|
167
164
|
</template>
|
|
168
165
|
|
|
169
166
|
<script setup lang="ts">
|
|
@@ -188,9 +185,9 @@ registerComponent('Button', MyButton)
|
|
|
188
185
|
|
|
189
186
|
// Or register multiple components at once
|
|
190
187
|
registerComponents({
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
Button: MyButton,
|
|
189
|
+
Hero: MyHero,
|
|
190
|
+
Text: MyText,
|
|
194
191
|
})
|
|
195
192
|
```
|
|
196
193
|
|
|
@@ -203,13 +200,13 @@ import { createCommunicationBridge } from '@bagelink/blox'
|
|
|
203
200
|
|
|
204
201
|
// Create a communication bridge
|
|
205
202
|
const bridge = createCommunicationBridge({
|
|
206
|
-
|
|
207
|
-
|
|
203
|
+
origin: 'https://editor.com',
|
|
204
|
+
targetWindow: window.parent,
|
|
208
205
|
})
|
|
209
206
|
|
|
210
207
|
// Listen for messages
|
|
211
208
|
bridge.on('update', ({ data }) => {
|
|
212
|
-
|
|
209
|
+
console.log('Received update:', data)
|
|
213
210
|
})
|
|
214
211
|
|
|
215
212
|
// Send messages
|
|
@@ -256,6 +253,7 @@ registerComponent('Button', MyButton)
|
|
|
256
253
|
```
|
|
257
254
|
|
|
258
255
|
**Parameters:**
|
|
256
|
+
|
|
259
257
|
- `type` - The block type identifier (e.g., 'Button', 'Hero')
|
|
260
258
|
- `component` - Vue component constructor or async import
|
|
261
259
|
|
|
@@ -269,13 +267,14 @@ Register multiple components at once.
|
|
|
269
267
|
import { registerComponents } from '@bagelink/blox'
|
|
270
268
|
|
|
271
269
|
registerComponents({
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
Button: MyButton,
|
|
271
|
+
Hero: MyHero,
|
|
272
|
+
Text: MyText,
|
|
275
273
|
})
|
|
276
274
|
```
|
|
277
275
|
|
|
278
276
|
**Parameters:**
|
|
277
|
+
|
|
279
278
|
- `components` - Object mapping type names to components
|
|
280
279
|
|
|
281
280
|
---
|
|
@@ -296,7 +295,7 @@ Check if a component type is registered.
|
|
|
296
295
|
|
|
297
296
|
```typescript
|
|
298
297
|
if (hasComponent('Button')) {
|
|
299
|
-
|
|
298
|
+
// Button is registered
|
|
300
299
|
}
|
|
301
300
|
```
|
|
302
301
|
|
|
@@ -356,6 +355,7 @@ siteB.register('Button', ButtonB)
|
|
|
356
355
|
```
|
|
357
356
|
|
|
358
357
|
**Returns:** Object with methods:
|
|
358
|
+
|
|
359
359
|
- `register(type, component)` - Register to namespace
|
|
360
360
|
- `get(type)` - Get from namespace
|
|
361
361
|
- `getAll()` - Get all from namespace
|
|
@@ -372,13 +372,14 @@ Create a communication bridge for postMessage communication.
|
|
|
372
372
|
import { createCommunicationBridge } from '@bagelink/blox'
|
|
373
373
|
|
|
374
374
|
const bridge = createCommunicationBridge({
|
|
375
|
-
|
|
376
|
-
|
|
375
|
+
origin: 'https://editor.com',
|
|
376
|
+
targetWindow: window.parent,
|
|
377
377
|
})
|
|
378
378
|
```
|
|
379
379
|
|
|
380
380
|
**Parameters:**
|
|
381
|
-
|
|
381
|
+
|
|
382
|
+
- `config.origin` - Allowed origin (string or '\*')
|
|
382
383
|
- `config.targetWindow` - Target window (default: window.parent)
|
|
383
384
|
- `config.onMessage` - Optional global message handler
|
|
384
385
|
|
|
@@ -390,14 +391,15 @@ Register a message handler.
|
|
|
390
391
|
|
|
391
392
|
```typescript
|
|
392
393
|
const unsubscribe = bridge.on('update', ({ data }) => {
|
|
393
|
-
|
|
394
|
+
console.log('Received update:', data)
|
|
394
395
|
})
|
|
395
396
|
|
|
396
397
|
// Later: unsubscribe()
|
|
397
398
|
```
|
|
398
399
|
|
|
399
400
|
**Parameters:**
|
|
400
|
-
|
|
401
|
+
|
|
402
|
+
- `type` - Message type or '\*' for all messages
|
|
401
403
|
- `handler` - Handler function
|
|
402
404
|
|
|
403
405
|
**Returns:** Unsubscribe function
|
|
@@ -424,6 +426,7 @@ bridge.send('update', null, { components: [...] })
|
|
|
424
426
|
```
|
|
425
427
|
|
|
426
428
|
**Parameters:**
|
|
429
|
+
|
|
427
430
|
- `type` - Message type
|
|
428
431
|
- `message` - Optional message payload
|
|
429
432
|
- `data` - Optional data payload
|
|
@@ -465,6 +468,7 @@ await initializePage(pageData)
|
|
|
465
468
|
```
|
|
466
469
|
|
|
467
470
|
**What it does:**
|
|
471
|
+
|
|
468
472
|
- Injects responsive CSS
|
|
469
473
|
- Applies page settings
|
|
470
474
|
- Loads Google Fonts
|
|
@@ -548,6 +552,7 @@ const styles = generateBlockStyles(blockData, false)
|
|
|
548
552
|
```
|
|
549
553
|
|
|
550
554
|
**Parameters:**
|
|
555
|
+
|
|
551
556
|
- `data` - Block data object
|
|
552
557
|
- `isMobile` - Whether to use mobile overrides (default: false)
|
|
553
558
|
|
|
@@ -586,9 +591,9 @@ Normalize component data (convert string booleans, numbers, etc.).
|
|
|
586
591
|
import { normalizeComponentData } from '@bagelink/blox'
|
|
587
592
|
|
|
588
593
|
const normalized = normalizeComponentData({
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
594
|
+
width: '800',
|
|
595
|
+
fullWidth: 'true',
|
|
596
|
+
title: 'Hello',
|
|
592
597
|
})
|
|
593
598
|
// { width: 800, fullWidth: true, title: 'Hello' }
|
|
594
599
|
```
|
|
@@ -622,18 +627,17 @@ const merged = deepMerge(defaults, customSettings)
|
|
|
622
627
|
Preview component for external sites.
|
|
623
628
|
|
|
624
629
|
```vue
|
|
625
|
-
<ExternalPreview
|
|
626
|
-
:origin="editorOrigin"
|
|
627
|
-
:initial-page-data="pageData"
|
|
628
|
-
/>
|
|
630
|
+
<ExternalPreview :origin="editorOrigin" :initial-page-data="pageData" />
|
|
629
631
|
```
|
|
630
632
|
|
|
631
633
|
**Props:**
|
|
632
|
-
|
|
634
|
+
|
|
635
|
+
- `origin?: string` - Allowed editor origin (default: '\*')
|
|
633
636
|
- `initialPageData?: PageData` - Optional initial page data
|
|
634
637
|
|
|
635
638
|
**Events:**
|
|
636
639
|
Communicates via postMessage with these message types:
|
|
640
|
+
|
|
637
641
|
- `ready` - Sent when preview is ready
|
|
638
642
|
- `focus` - Sent when block is focused
|
|
639
643
|
- `highlight` - Sent when block is highlighted
|
|
@@ -645,13 +649,11 @@ Communicates via postMessage with these message types:
|
|
|
645
649
|
Production render component.
|
|
646
650
|
|
|
647
651
|
```vue
|
|
648
|
-
<RenderPage
|
|
649
|
-
:page-data="pageData"
|
|
650
|
-
:mobile-breakpoint="910"
|
|
651
|
-
/>
|
|
652
|
+
<RenderPage :page-data="pageData" :mobile-breakpoint="910" />
|
|
652
653
|
```
|
|
653
654
|
|
|
654
655
|
**Props:**
|
|
656
|
+
|
|
655
657
|
- `pageData: PageData` - **Required** page data to render
|
|
656
658
|
- `mobileBreakpoint?: number` - Window width for mobile (default: 910)
|
|
657
659
|
|
|
@@ -663,9 +665,9 @@ Production render component.
|
|
|
663
665
|
|
|
664
666
|
```typescript
|
|
665
667
|
interface ComponentData {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
668
|
+
id: string
|
|
669
|
+
type: string
|
|
670
|
+
data: Record<string, any>
|
|
669
671
|
}
|
|
670
672
|
```
|
|
671
673
|
|
|
@@ -675,12 +677,12 @@ interface ComponentData {
|
|
|
675
677
|
|
|
676
678
|
```typescript
|
|
677
679
|
interface PageData {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
680
|
+
id?: string
|
|
681
|
+
components: ComponentData[]
|
|
682
|
+
pageSettings?: PageSettings
|
|
683
|
+
header_code?: string
|
|
684
|
+
body_code?: string
|
|
685
|
+
language?: Record<string, any>
|
|
684
686
|
}
|
|
685
687
|
```
|
|
686
688
|
|
|
@@ -690,20 +692,20 @@ interface PageData {
|
|
|
690
692
|
|
|
691
693
|
```typescript
|
|
692
694
|
interface PageSettings {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
695
|
+
selectedGoogleFont?: string
|
|
696
|
+
pageLanguage?: string
|
|
697
|
+
pageDirection?: 'ltr' | 'rtl'
|
|
698
|
+
additionalHeadCode?: string
|
|
699
|
+
additionalBodyCode?: string
|
|
700
|
+
customFavicon?: string
|
|
701
|
+
customOgImage?: string
|
|
702
|
+
customKeywords?: string
|
|
703
|
+
customRobotsMeta?: string
|
|
704
|
+
customAnalyticsCode?: string
|
|
705
|
+
disableGlobalHeadCode?: boolean
|
|
706
|
+
disableGlobalBodyCode?: boolean
|
|
707
|
+
disableGoogleAnalytics?: boolean
|
|
708
|
+
disableFacebookPixel?: boolean
|
|
707
709
|
}
|
|
708
710
|
```
|
|
709
711
|
|
|
@@ -713,16 +715,16 @@ interface PageSettings {
|
|
|
713
715
|
|
|
714
716
|
```typescript
|
|
715
717
|
interface GlobalSettings {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
718
|
+
selectedGoogleFont?: string
|
|
719
|
+
pageLanguage?: string
|
|
720
|
+
pageDirection?: 'ltr' | 'rtl'
|
|
721
|
+
globalHeadCode?: string
|
|
722
|
+
globalBodyCode?: string
|
|
723
|
+
favicon?: string
|
|
724
|
+
ogImage?: string
|
|
725
|
+
siteKeywords?: string
|
|
726
|
+
googleAnalyticsId?: string
|
|
727
|
+
facebookPixelId?: string
|
|
726
728
|
}
|
|
727
729
|
```
|
|
728
730
|
|
|
@@ -732,15 +734,15 @@ interface GlobalSettings {
|
|
|
732
734
|
|
|
733
735
|
```typescript
|
|
734
736
|
type MessageType =
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
737
|
+
| 'ready'
|
|
738
|
+
| 'update'
|
|
739
|
+
| 'focus'
|
|
740
|
+
| 'highlight'
|
|
741
|
+
| 'preview'
|
|
742
|
+
| 'meta'
|
|
743
|
+
| 'delete'
|
|
744
|
+
| 'disableLinks'
|
|
745
|
+
| 'newBlock'
|
|
744
746
|
```
|
|
745
747
|
|
|
746
748
|
---
|
|
@@ -749,10 +751,10 @@ type MessageType =
|
|
|
749
751
|
|
|
750
752
|
```typescript
|
|
751
753
|
interface EditorMessage {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
754
|
+
type: MessageType
|
|
755
|
+
message?: any
|
|
756
|
+
data?: any
|
|
757
|
+
isMobile?: boolean
|
|
756
758
|
}
|
|
757
759
|
```
|
|
758
760
|
|
|
@@ -762,8 +764,8 @@ interface EditorMessage {
|
|
|
762
764
|
|
|
763
765
|
```typescript
|
|
764
766
|
interface BlockProps {
|
|
765
|
-
|
|
766
|
-
|
|
767
|
+
isMobile?: boolean
|
|
768
|
+
[key: string]: any
|
|
767
769
|
}
|
|
768
770
|
```
|
|
769
771
|
|
|
@@ -773,57 +775,57 @@ interface BlockProps {
|
|
|
773
775
|
|
|
774
776
|
```typescript
|
|
775
777
|
interface StyleConfig {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
778
|
+
// Spacing
|
|
779
|
+
marginTop?: number
|
|
780
|
+
marginBottom?: number
|
|
781
|
+
marginTopMobile?: number
|
|
782
|
+
marginBottomMobile?: number
|
|
783
|
+
padding?: number
|
|
784
|
+
paddingMobile?: number
|
|
785
|
+
|
|
786
|
+
// Width
|
|
787
|
+
width?: number
|
|
788
|
+
widthMobile?: number
|
|
789
|
+
widthPercent?: number
|
|
790
|
+
widthPercentMobile?: number
|
|
791
|
+
fullWidth?: boolean
|
|
792
|
+
fullWidthMobile?: boolean
|
|
793
|
+
|
|
794
|
+
// Colors
|
|
795
|
+
backgroundColor?: string
|
|
796
|
+
backgroundColorMobile?: string
|
|
797
|
+
textColor?: string
|
|
798
|
+
textColorMobile?: string
|
|
799
|
+
|
|
800
|
+
// Border
|
|
801
|
+
borderWidth?: number
|
|
802
|
+
borderWidthMobile?: number
|
|
803
|
+
borderStyle?: string
|
|
804
|
+
borderStyleMobile?: string
|
|
805
|
+
borderColor?: string
|
|
806
|
+
borderColorMobile?: string
|
|
807
|
+
borderRadius?: number
|
|
808
|
+
borderRadiusMobile?: number
|
|
809
|
+
|
|
810
|
+
// Typography
|
|
811
|
+
fontFamily?: string
|
|
812
|
+
fontFamilyMobile?: string
|
|
813
|
+
center?: boolean
|
|
814
|
+
centerMobile?: boolean
|
|
815
|
+
|
|
816
|
+
// Effects
|
|
817
|
+
shadowType?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'custom'
|
|
818
|
+
shadowTypeMobile?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'custom'
|
|
819
|
+
zIndex?: number
|
|
820
|
+
zIndexMobile?: number
|
|
821
|
+
|
|
822
|
+
// Visibility
|
|
823
|
+
showDesktop?: boolean
|
|
824
|
+
showMobile?: boolean
|
|
825
|
+
|
|
826
|
+
// Custom
|
|
827
|
+
customId?: string
|
|
828
|
+
customCSS?: string
|
|
827
829
|
}
|
|
828
830
|
```
|
|
829
831
|
|
|
@@ -834,6 +836,7 @@ interface StyleConfig {
|
|
|
834
836
|
### Editor → Preview
|
|
835
837
|
|
|
836
838
|
#### `update`
|
|
839
|
+
|
|
837
840
|
Update components data.
|
|
838
841
|
|
|
839
842
|
```typescript
|
|
@@ -845,6 +848,7 @@ Update components data.
|
|
|
845
848
|
```
|
|
846
849
|
|
|
847
850
|
#### `focus`
|
|
851
|
+
|
|
848
852
|
Focus a specific block.
|
|
849
853
|
|
|
850
854
|
```typescript
|
|
@@ -855,6 +859,7 @@ Focus a specific block.
|
|
|
855
859
|
```
|
|
856
860
|
|
|
857
861
|
#### `highlight`
|
|
862
|
+
|
|
858
863
|
Highlight a specific block.
|
|
859
864
|
|
|
860
865
|
```typescript
|
|
@@ -865,6 +870,7 @@ Highlight a specific block.
|
|
|
865
870
|
```
|
|
866
871
|
|
|
867
872
|
#### `preview`
|
|
873
|
+
|
|
868
874
|
Toggle preview mode.
|
|
869
875
|
|
|
870
876
|
```typescript
|
|
@@ -875,6 +881,7 @@ Toggle preview mode.
|
|
|
875
881
|
```
|
|
876
882
|
|
|
877
883
|
#### `disableLinks`
|
|
884
|
+
|
|
878
885
|
Disable link navigation.
|
|
879
886
|
|
|
880
887
|
```typescript
|
|
@@ -889,6 +896,7 @@ Disable link navigation.
|
|
|
889
896
|
### Preview → Editor
|
|
890
897
|
|
|
891
898
|
#### `ready`
|
|
899
|
+
|
|
892
900
|
Preview is ready.
|
|
893
901
|
|
|
894
902
|
```typescript
|
|
@@ -901,6 +909,7 @@ Preview is ready.
|
|
|
901
909
|
```
|
|
902
910
|
|
|
903
911
|
#### `focus`
|
|
912
|
+
|
|
904
913
|
User focused a block.
|
|
905
914
|
|
|
906
915
|
```typescript
|
|
@@ -911,6 +920,7 @@ User focused a block.
|
|
|
911
920
|
```
|
|
912
921
|
|
|
913
922
|
#### `highlight`
|
|
923
|
+
|
|
914
924
|
User highlighted a block.
|
|
915
925
|
|
|
916
926
|
```typescript
|
|
@@ -921,6 +931,7 @@ User highlighted a block.
|
|
|
921
931
|
```
|
|
922
932
|
|
|
923
933
|
#### `delete`
|
|
934
|
+
|
|
924
935
|
User wants to delete a block.
|
|
925
936
|
|
|
926
937
|
```typescript
|
|
@@ -945,4 +956,3 @@ MIT © [Bagel Studio](https://bagelstudio.co.il)
|
|
|
945
956
|
- [GitHub Repository](https://github.com/bageldb/bagelink)
|
|
946
957
|
- [Documentation](https://github.com/bageldb/bagelink/tree/master/packages/blox)
|
|
947
958
|
- [Issues](https://github.com/bageldb/bagelink/issues)
|
|
948
|
-
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=CmsPageView.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CmsPageView.vue.d.ts","sourceRoot":"","sources":["../src/CmsPageView.vue"],"names":[],"mappings":";AAkOA,wBAMG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Block } from './api/types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
blocks: {
|
|
5
|
+
type: PropType<Block[]>;
|
|
6
|
+
default: () => Block[];
|
|
7
|
+
};
|
|
8
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
11
|
+
blocks: {
|
|
12
|
+
type: PropType<Block[]>;
|
|
13
|
+
default: () => Block[];
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
blocks: Block[];
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=PageRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageRenderer.d.ts","sourceRoot":"","sources":["../src/PageRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;;;cAQtB,QAAQ,CAAC,KAAK,EAAE,CAAC;uBACnB,KAAK,EAAE;;;;;;cADL,QAAQ,CAAC,KAAK,EAAE,CAAC;uBACnB,KAAK,EAAE;;;;;AALvB,wBAoBE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=PreviewApp.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewApp.vue.d.ts","sourceRoot":"","sources":["../src/PreviewApp.vue"],"names":[],"mappings":";AAyQA,wBAMG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Block } from './api/types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
blocks: {
|
|
5
|
+
type: PropType<Block[]>;
|
|
6
|
+
default: () => Block[];
|
|
7
|
+
};
|
|
8
|
+
selectedIndex: {
|
|
9
|
+
type: PropType<number | null>;
|
|
10
|
+
default: null;
|
|
11
|
+
};
|
|
12
|
+
hoveredIndex: {
|
|
13
|
+
type: PropType<number | null>;
|
|
14
|
+
default: null;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
blocks: {
|
|
20
|
+
type: PropType<Block[]>;
|
|
21
|
+
default: () => Block[];
|
|
22
|
+
};
|
|
23
|
+
selectedIndex: {
|
|
24
|
+
type: PropType<number | null>;
|
|
25
|
+
default: null;
|
|
26
|
+
};
|
|
27
|
+
hoveredIndex: {
|
|
28
|
+
type: PropType<number | null>;
|
|
29
|
+
default: null;
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
|
+
blocks: Block[];
|
|
33
|
+
selectedIndex: number | null;
|
|
34
|
+
hoveredIndex: number | null;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
36
|
+
export default _default;
|
|
37
|
+
//# sourceMappingURL=PreviewRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewRenderer.d.ts","sourceRoot":"","sources":["../src/PreviewRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;;;cAatB,QAAQ,CAAC,KAAK,EAAE,CAAC;uBACnB,KAAK,EAAE;;;cAGJ,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;cAIvB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;cARxB,QAAQ,CAAC,KAAK,EAAE,CAAC;uBACnB,KAAK,EAAE;;;cAGJ,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;cAIvB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;AAZ1C,wBA6EE"}
|