@silexlabs/silex 3.0.0-alpha.152 → 3.0.0-alpha.153

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,5 +1,9 @@
1
1
  import { Editor, EditorConfig } from 'grapesjs';
2
2
  import { ClientConfig } from '../config';
3
+ export declare const cmdToggleLayers = "open-layers";
4
+ export declare const cmdToggleBlocks = "open-blocks";
5
+ export declare const cmdToggleSymbols = "open-symbols";
6
+ export declare const cmdToggleNotifications = "open-notifications";
3
7
  export declare function getEditorConfig(config: ClientConfig): EditorConfig;
4
8
  export declare function initEditor(config: EditorConfig): Promise<Editor>;
5
9
  export declare function getEditor(): Editor;
@@ -0,0 +1,71 @@
1
+ import { Editor, PluginOptions } from 'grapesjs';
2
+ /**
3
+ * Escapes the current context in this order : modal, Publish dialog, left panel.
4
+ * If none of these are open, it selects the body.
5
+ * @param editor The editor.
6
+ */
7
+ declare function escapeContext(editor: Editor): void;
8
+ export declare const cmdSelectBody = "select-body";
9
+ export declare let prefixKey: string;
10
+ export declare const defaultKms: {
11
+ kmOpenSettings: {
12
+ id: string;
13
+ keys: string;
14
+ handler: (editor: any) => void;
15
+ };
16
+ kmOpenPublish: {
17
+ id: string;
18
+ keys: string;
19
+ handler: (editor: any) => void;
20
+ };
21
+ kmOpenFonts: {
22
+ id: string;
23
+ keys: string;
24
+ handler: (editor: any) => void;
25
+ };
26
+ kmPreviewMode: {
27
+ id: string;
28
+ keys: string;
29
+ handler: (editor: any) => void;
30
+ options: {
31
+ prevent: boolean;
32
+ };
33
+ };
34
+ kmLayers: {
35
+ id: string;
36
+ keys: string;
37
+ handler: (editor: any) => void;
38
+ };
39
+ kmBlocks: {
40
+ id: string;
41
+ keys: string;
42
+ handler: (editor: any) => void;
43
+ };
44
+ kmNotifications: {
45
+ id: string;
46
+ keys: string;
47
+ handler: (editor: any) => void;
48
+ };
49
+ kmPages: {
50
+ id: string;
51
+ keys: string;
52
+ handler: (editor: any) => void;
53
+ };
54
+ kmSymbols: {
55
+ id: string;
56
+ keys: string;
57
+ handler: (editor: any) => void;
58
+ };
59
+ kmClosePanel: {
60
+ id: string;
61
+ keys: string;
62
+ handler: typeof escapeContext;
63
+ };
64
+ kmSelectBody: {
65
+ id: string;
66
+ keys: string;
67
+ handler: string;
68
+ };
69
+ };
70
+ export declare function keymapsPlugin(editor: Editor, opts: PluginOptions): void;
71
+ export {};
@@ -5,6 +5,7 @@ export interface PanelObject {
5
5
  command: string | ((editor: Editor) => void);
6
6
  text: string;
7
7
  className: string;
8
+ name?: string;
8
9
  attributes: {
9
10
  title?: string;
10
11
  containerClassName?: string;
@@ -4,3 +4,10 @@ export declare function onAll(editor: Editor, cbk: (c: Component) => void): void
4
4
  * SHA256 hash a string
5
5
  */
6
6
  export declare function hashString(str: string): Promise<string>;
7
+ /**
8
+ * Select the <body> element in the editor.
9
+ * @param editor The GrapesJS editor.
10
+ */
11
+ export declare function selectBody(editor: Editor): void;
12
+ export declare function isTextOrInputField(element: HTMLElement): boolean;
13
+ export declare function titleCase(str: string, sep?: string): string;
@@ -4575,6 +4575,108 @@ form.silex-form .silex-form__group.col2 {
4575
4575
  margin-left: 10px;
4576
4576
  }
4577
4577
 
4578
+ #publish-dialog header {
4579
+ display: flex;
4580
+ align-items: center;
4581
+ justify-content: space-between;
4582
+ padding-top: 10px;
4583
+ padding-bottom: 10px;
4584
+ font-size: 0.95rem;
4585
+ transition: 200ms;
4586
+ }
4587
+ #publish-dialog header svg {
4588
+ width: 1.4rem;
4589
+ vertical-align: middle;
4590
+ margin-right: 5px;
4591
+ }
4592
+ #publish-dialog header button {
4593
+ border: solid 2px #484848;
4594
+ border-radius: 50px;
4595
+ padding: 4px 9px;
4596
+ background-color: #444;
4597
+ color: #ddd;
4598
+ }
4599
+ #publish-dialog header .connector {
4600
+ color: #A291FF;
4601
+ }
4602
+ #publish-dialog main {
4603
+ max-height: none;
4604
+ }
4605
+ #publish-dialog main .buttons {
4606
+ display: grid;
4607
+ grid-template-columns: 1fr;
4608
+ grid-template-rows: auto;
4609
+ grid-row-gap: 0.5rem;
4610
+ transition: 200ms;
4611
+ }
4612
+ #publish-dialog main svg {
4613
+ height: 0.9rem;
4614
+ margin-left: 5px;
4615
+ }
4616
+ #publish-dialog main h3 {
4617
+ margin: 0;
4618
+ }
4619
+ #publish-dialog main p {
4620
+ margin-top: 0;
4621
+ }
4622
+ #publish-dialog main details {
4623
+ border-radius: 5px;
4624
+ border: solid #222 2px;
4625
+ background-color: #222;
4626
+ margin: 10px 0;
4627
+ padding: 10px;
4628
+ word-break: break-word;
4629
+ overflow-y: auto;
4630
+ max-height: 200px;
4631
+ position: relative;
4632
+ }
4633
+ #publish-dialog main details pre {
4634
+ word-break: break-word;
4635
+ }
4636
+ #publish-dialog main details summary {
4637
+ font-size: 0.95rem;
4638
+ opacity: 0.7;
4639
+ }
4640
+ #publish-dialog main details .logs {
4641
+ font-family: monospace;
4642
+ }
4643
+ #publish-dialog main details .logs * {
4644
+ margin: 0;
4645
+ padding-top: 3px;
4646
+ padding-bottom: 3px;
4647
+ border-radius: 5px;
4648
+ list-style: "-";
4649
+ }
4650
+ #publish-dialog main details .logs *:hover {
4651
+ transition: 200ms;
4652
+ background-color: rgba(255, 255, 255, 0.05);
4653
+ }
4654
+ #publish-dialog main details:hover {
4655
+ transition: 200ms;
4656
+ border-color: #575757;
4657
+ background-color: #292929;
4658
+ }
4659
+ #publish-dialog main details * {
4660
+ transition: 200ms;
4661
+ }
4662
+ #publish-dialog main details[open] summary {
4663
+ margin-bottom: 10px;
4664
+ }
4665
+ #publish-dialog main .silex-button {
4666
+ padding: 10px;
4667
+ width: 100%;
4668
+ transition: 200ms;
4669
+ }
4670
+ #publish-dialog main .silex-button:hover {
4671
+ filter: brightness(1.2);
4672
+ }
4673
+ #publish-dialog main .silex-button:active {
4674
+ filter: brightness(0.8);
4675
+ }
4676
+ #publish-dialog main .silex-button--primary {
4677
+ background-color: #8873FE;
4678
+ }
4679
+
4578
4680
  .gjs-suggest {
4579
4681
  max-height: 30vh;
4580
4682
  overflow-y: scroll;