@pi-r/chrome 0.7.3 → 0.8.0

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,8 +1,9 @@
1
1
  {
2
2
  "name": "@pi-r/chrome",
3
- "version": "0.7.3",
3
+ "version": "0.8.0",
4
4
  "description": "Chrome document constructor for E-mc.",
5
5
  "main": "index.js",
6
+ "types": "index.d.ts",
6
7
  "publishConfig": {
7
8
  "access": "public"
8
9
  },
@@ -20,9 +21,9 @@
20
21
  "license": "MIT",
21
22
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
23
  "dependencies": {
23
- "@e-mc/cloud": "^0.9.6",
24
- "@e-mc/core": "^0.9.6",
25
- "@e-mc/document": "^0.9.6",
26
- "@e-mc/types": "^0.9.6"
24
+ "@e-mc/cloud": "^0.10.0",
25
+ "@e-mc/core": "^0.10.0",
26
+ "@e-mc/document": "^0.10.0",
27
+ "@e-mc/types": "^0.10.0"
27
28
  }
28
29
  }
package/types/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { LocationUri, XmlTagNode } from '@e-mc/types/lib/squared';
3
3
  import type { DocumentConstructor, ICloud, IDocument, IFileManager } from '@e-mc/types/lib';
4
4
  import type { DocumentAsset as IDocumentAsset } from '@e-mc/types/lib/document';
5
5
  import type { LogTime } from '@e-mc/types/lib/logger';
6
- import type { DbSourceDataType, DocumentComponentOption, DocumentComponent as IDocumentComponent, DocumentComponentOptions as IDocumentComponentOptions, DocumentDirectory as IDocumentDirectory, DocumentEval as IDocumentEval, DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings } from '@e-mc/types/lib/settings';
6
+ import type { DbSourceDataType, DocumentComponentOption, DocumentComponent as IDocumentComponent, DocumentComponentOptions as IDocumentComponentOptions, DocumentDirectory as IDocumentDirectory, DocumentEval as IDocumentEval, DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings, DocumentUserSettings as IDocumentUserSettings } from '@e-mc/types/lib/settings';
7
7
 
8
8
  import type { CloudScopeOrigin } from '@e-mc/cloud/types';
9
9
  import type { IDomWriter, IXmlElement } from '@e-mc/document/parse/types';
@@ -39,13 +39,18 @@ interface DocumentEval extends IDocumentEval {
39
39
  userconfig?: boolean;
40
40
  }
41
41
 
42
- interface ChromeDocumentSettings extends IDocumentSettings {
42
+ interface ChromeDocumentUserSettings extends IDocumentUserSettings {
43
+ server_root?: ObjectMap<StringMap>;
44
+ }
45
+
46
+ interface ChromeDocumentSettings extends IDocumentSettings<ChromeDocumentUserSettings> {
43
47
  directory?: DocumentDirectory;
44
48
  options?: DocumentComponentOptions<boolean | number>;
49
+ server_root?: ObjectMap<StringMap>;
45
50
  export?: ObjectMap<string | FunctionType>;
46
51
  }
47
52
 
48
- type OutputType = "useUnsafeReplace" | "productionRelease" | "productionIncremental" | "templateMap" | "userAgentData";
53
+ type OutputType = "useUnsafeReplace" | "productionRelease" | "productionIncremental" | "serverRootMapping" | "sanitizeFramework" | "templateMap" | "userAgentData";
49
54
 
50
55
  export interface FormatUri extends Partial<LocationUri> {
51
56
  dictionary?: string;
@@ -119,9 +124,9 @@ export interface IChromeDocument<T extends IFileManager<U>, U extends DocumentAs
119
124
  get settings(): ChromeDocumentSettings;
120
125
  }
121
126
 
122
- export interface ChromeDocumentConstructor<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends DocumentConstructor<T, U> {
127
+ export interface ChromeDocumentConstructor<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends ConstructorDerived<DocumentConstructor<T, U>> {
123
128
  INTERNAL_ASSIGNUUID: string;
124
129
  INTERNAL_SERVERROOT: string;
125
130
  readonly prototype: IChromeDocument<T, U>;
126
131
  new(module?: DocumentModule, ...args: unknown[]): IChromeDocument<T, U>;
127
- }
132
+ }
@@ -1,4 +1,4 @@
1
- import type { AttributeAction, ConditionProperty, CssConditionData, ElementAction, ExcludeAction, FileAsset, FromAction, HashAction, DataSource as IDataSource, ImportAction, MetadataAction, ViewEngine } from '@e-mc/types/lib/squared';
1
+ import type { AttributeAction, ElementAction, ExcludeAction, FileAsset, FromAction, HashAction, DataSource as IDataSource, ImportAction, MetadataAction, ViewEngine } from '@e-mc/types/lib/squared';
2
2
 
3
3
  import type { UploadAction } from '@e-mc/types/lib/cloud';
4
4
  import type { CascadeAction, DbSource } from '@e-mc/types/lib/db';
@@ -23,6 +23,15 @@ interface ScopeData {
23
23
  end: Null<string>;
24
24
  }
25
25
 
26
+ interface ConditionProperty {
27
+ conditionText: string;
28
+ }
29
+
30
+ interface CssConditionData extends ConditionProperty {
31
+ name?: string;
32
+ conditionText: string;
33
+ }
34
+
26
35
  export interface UserAgentData {
27
36
  platform: string;
28
37
  name: string;
@@ -36,6 +45,7 @@ export interface UserAgentData {
36
45
  export interface DocumentOutput {
37
46
  productionRelease?: boolean | string;
38
47
  productionIncremental?: boolean;
48
+ serverRootMapping?: StringMap;
39
49
  useOriginalHtmlPage?: boolean | string;
40
50
  useUnsafeReplace?: ArrayOf<"html" | "css"> | boolean;
41
51
  useSessionCache?: boolean;
@@ -43,6 +53,7 @@ export interface DocumentOutput {
43
53
  normalizeHtmlOutput?: boolean | string;
44
54
  escapeReservedCharacters?: boolean;
45
55
  ignoreServerCodeBlocks?: string[];
56
+ sanitizeFramework?: string[];
46
57
  webBundle?: {
47
58
  rootDirAlias?: string;
48
59
  baseUrl?: string;