@dosgato/templating 0.0.6 → 0.0.9

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.
@@ -100,7 +100,7 @@ export interface PageWithAncestors<DataType extends PageData = PageData> extends
100
100
  }
101
101
  export interface ComponentData {
102
102
  templateKey: string;
103
- areas: Record<string, ComponentData[]>;
103
+ areas?: Record<string, ComponentData[]>;
104
104
  }
105
105
  export interface PageData extends ComponentData {
106
106
  savedAtVersion: Date;
package/dist/links.d.ts CHANGED
@@ -7,9 +7,8 @@ export interface AssetLink {
7
7
  type: 'asset';
8
8
  source: string;
9
9
  id: string;
10
- siteId: string;
11
- path: string;
12
- checksum: string;
10
+ path?: string;
11
+ checksum?: string;
13
12
  }
14
13
  /**
15
14
  * Some components (e.g. document list) can point at a folder instead of individual
@@ -20,7 +19,6 @@ export interface AssetFolderLink {
20
19
  type: 'assetfolder';
21
20
  source: string;
22
21
  id: string;
23
- siteId: string;
24
22
  path: string;
25
23
  }
26
24
  /**
@@ -29,7 +27,6 @@ export interface AssetFolderLink {
29
27
  export interface PageLink {
30
28
  type: 'page';
31
29
  linkId: string;
32
- siteId: string;
33
30
  path: string;
34
31
  }
35
32
  /**
@@ -50,8 +47,9 @@ export interface WebLink {
50
47
  */
51
48
  export interface DataLink {
52
49
  type: 'data';
50
+ templateKey: string;
53
51
  id: string;
54
- siteId: string | null;
52
+ siteId?: string;
55
53
  path: string;
56
54
  }
57
55
  /**
@@ -2,13 +2,13 @@ export interface CSSBlock {
2
2
  css?: string;
3
3
  path?: string;
4
4
  version?: string;
5
- defer?: boolean;
5
+ async?: boolean;
6
6
  }
7
7
  export interface JSBlock {
8
8
  js?: string;
9
9
  path?: string;
10
10
  version?: string;
11
- defer?: boolean;
11
+ async?: boolean;
12
12
  }
13
13
  export interface FileDeclaration {
14
14
  path: string;
@@ -40,7 +40,7 @@ export declare abstract class ResourceProvider {
40
40
  * `path` property with the full server path (NOT URL) to a CSS file (node's __dirname function will
41
41
  * help you determine it). You MUST provide one or the other.
42
42
  *
43
- * You may also set `defer` to true if a css block is not needed for the initial render of
43
+ * You may also set `async` to true if a css block is not needed for the initial render of
44
44
  * the page. For instance, if your component has a modal that the user can trigger, you can
45
45
  * defer the CSS for that modal since it will not be needed until the page has gone interactive
46
46
  * and the user has clicked something.
@@ -49,9 +49,9 @@ export declare abstract class ResourceProvider {
49
49
  /**
50
50
  * Same as cssBlocks() but for javascript.
51
51
  *
52
- * In this case `defer` is much more useful, as most javascript is interactive and could run
52
+ * In this case `async` is much more useful, as most javascript is interactive and could run
53
53
  * after the page renders. Any code that adds event observers or the like should be marked with
54
- * defer to improve the initial render time.
54
+ * async to improve the initial render time.
55
55
  */
56
56
  static jsBlocks: Map<string, JSBlock>;
57
57
  /**
package/dist/provider.js CHANGED
@@ -30,7 +30,7 @@ exports.ResourceProvider = ResourceProvider;
30
30
  * `path` property with the full server path (NOT URL) to a CSS file (node's __dirname function will
31
31
  * help you determine it). You MUST provide one or the other.
32
32
  *
33
- * You may also set `defer` to true if a css block is not needed for the initial render of
33
+ * You may also set `async` to true if a css block is not needed for the initial render of
34
34
  * the page. For instance, if your component has a modal that the user can trigger, you can
35
35
  * defer the CSS for that modal since it will not be needed until the page has gone interactive
36
36
  * and the user has clicked something.
@@ -39,9 +39,9 @@ ResourceProvider.cssBlocks = new Map();
39
39
  /**
40
40
  * Same as cssBlocks() but for javascript.
41
41
  *
42
- * In this case `defer` is much more useful, as most javascript is interactive and could run
42
+ * In this case `async` is much more useful, as most javascript is interactive and could run
43
43
  * after the page renders. Any code that adds event observers or the like should be marked with
44
- * defer to improve the initial render time.
44
+ * async to improve the initial render time.
45
45
  */
46
46
  ResourceProvider.jsBlocks = new Map();
47
47
  /**
@@ -0,0 +1,8 @@
1
+ import { IconifyIcon } from '@iconify/svelte';
2
+ import { SvelteComponent } from 'svelte';
3
+ export interface UITemplate {
4
+ templateKey: string;
5
+ dialog: SvelteComponent;
6
+ preview?: IconifyIcon;
7
+ icon?: IconifyIcon;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.6",
3
+ "version": "0.0.9",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "exports": {
6
6
  "require": "./dist/index.js",
@@ -11,7 +11,10 @@
11
11
  "prepublishOnly": "npm run build",
12
12
  "build": "rm -rf dist && tsc"
13
13
  },
14
- "dependencies": {},
14
+ "dependencies": {
15
+ "@iconify/svelte": "^2.2.1",
16
+ "svelte": "^3.48.0"
17
+ },
15
18
  "devDependencies": {
16
19
  "eslint-config-standard-with-typescript": "^21.0.1",
17
20
  "typescript": "^4.4.2"