@e-mc/document 0.1.0 → 0.3.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.
@@ -1,39 +0,0 @@
1
- plugins {
2
- id 'com.android.application'
3
- }
4
-
5
- android {
6
- namespace ''
7
- compileSdk 33
8
-
9
- defaultConfig {
10
- applicationId ''
11
- minSdk 19
12
- targetSdk 33
13
- versionCode 1
14
- versionName '1.0'
15
-
16
- testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
17
- }
18
- buildTypes {
19
- release {
20
- debuggable false
21
- minifyEnabled true
22
- shrinkResources false
23
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24
- }
25
- }
26
- compileOptions {
27
- sourceCompatibility JavaVersion.VERSION_1_8
28
- targetCompatibility JavaVersion.VERSION_1_8
29
- }
30
- buildFeatures {
31
- viewBinding false
32
- }
33
- }
34
-
35
- dependencies {
36
- testImplementation 'junit:junit:4.13.2'
37
- androidTestImplementation 'androidx.test.ext:junit:1.1.5'
38
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
39
- }
@@ -1,18 +0,0 @@
1
- pluginManagement {
2
- repositories {
3
- gradlePluginPortal()
4
- google()
5
- mavenCentral()
6
- }
7
- }
8
-
9
- dependencyResolutionManagement {
10
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
11
- repositories {
12
- google()
13
- mavenCentral()
14
- }
15
- }
16
-
17
- rootProject.name = '{{projectName}}'
18
- include '{{name}}'
@@ -1,44 +0,0 @@
1
- plugins {
2
- id 'com.android.application'
3
- id 'org.jetbrains.kotlin.android'
4
- }
5
-
6
- android {
7
- namespace ''
8
- compileSdk 33
9
-
10
- defaultConfig {
11
- applicationId ''
12
- minSdk 19
13
- targetSdk 33
14
- versionCode 1
15
- versionName '1.0'
16
-
17
- testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
18
- }
19
- buildTypes {
20
- release {
21
- debuggable false
22
- minifyEnabled true
23
- shrinkResources false
24
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25
- }
26
- }
27
- compileOptions {
28
- sourceCompatibility JavaVersion.VERSION_1_8
29
- targetCompatibility JavaVersion.VERSION_1_8
30
- }
31
- kotlinOptions {
32
- jvmTarget = '1.8'
33
- }
34
- buildFeatures {
35
- viewBinding false
36
- }
37
- }
38
-
39
- dependencies {
40
- implementation 'androidx.core:core-ktx:1.9.0'
41
- testImplementation 'junit:junit:4.13.2'
42
- androidTestImplementation 'androidx.test.ext:junit:1.1.5'
43
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
44
- }
@@ -1,18 +0,0 @@
1
- pluginManagement {
2
- repositories {
3
- gradlePluginPortal()
4
- google()
5
- mavenCentral()
6
- }
7
- }
8
-
9
- dependencyResolutionManagement {
10
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
11
- repositories {
12
- google()
13
- mavenCentral()
14
- }
15
- }
16
-
17
- rootProject.name = '{{projectName}}'
18
- include '{{name}}'
@@ -1,46 +0,0 @@
1
- plugins {
2
- id("com.android.application")
3
- kotlin("android")
4
- }
5
-
6
- android {
7
- namespace = ""
8
- compileSdk(33)
9
-
10
- defaultConfig {
11
- applicationId = ""
12
- minSdk(19)
13
- targetSdk(33)
14
- versionCode = 1
15
- versionName = "1.0"
16
-
17
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18
- }
19
- buildTypes {
20
- getByName("release") {
21
- isDebuggable = false
22
- isMinifyEnabled = true
23
- isShrinkResources = false
24
- proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
25
- }
26
- }
27
- kotlinOptions {
28
- jvmTarget = "1.8"
29
- }
30
- buildFeatures {
31
- viewBinding = true
32
- }
33
- }
34
-
35
- java {
36
- sourceCompatibility = JavaVersion.VERSION_1_8
37
- targetCompatibility = JavaVersion.VERSION_1_8
38
- }
39
-
40
- dependencies {
41
- implementation("org.jetbrains.kotlin:kotlin-stdlib:1.8.10")
42
- implementation("androidx.core:core-ktx:1.9.0")
43
- testImplementation("junit:junit:4.13.2")
44
- androidTestImplementation("androidx.test.ext:junit:1.1.5")
45
- androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
46
- }
@@ -1,18 +0,0 @@
1
- pluginManagement {
2
- repositories {
3
- gradlePluginPortal()
4
- google()
5
- mavenCentral()
6
- }
7
- }
8
-
9
- dependencyResolutionManagement {
10
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
11
- repositories {
12
- google()
13
- mavenCentral()
14
- }
15
- }
16
-
17
- rootProject.name = "${{projectName}}"
18
- include("{{name}}")
@@ -1,119 +0,0 @@
1
- import type { LocationUri, XmlTagNode } from '../../types/lib/squared';
2
- import type { ChromeAsset, CssRuleData, DataSource, DocumentOutput } from '../../types/lib/chrome';
3
-
4
- import type { DocumentConstructor, IDocument, IFileManager } from '../../types/lib';
5
- import type { DocumentAsset as IDocumentAsset } from '../../types/lib/document';
6
- import type { LogTime } from '../../types/lib/logger';
7
- import type { DbSourceDataType, DocumentComponentOption, DocumentComponent as IDocumentComponent, DocumentComponentOptions as IDocumentComponentOptions, DocumentDirectory as IDocumentDirectory, DocumentEval as IDocumentEval, DocumentModule as IDocumentModule, DocumentSettings as IDocumentSettings } from '../../types/lib/settings';
8
-
9
- import type { CloudScopeOrigin } from '../../cloud/types';
10
- import type { IDomWriter, IXmlElement } from '../parse/document';
11
-
12
- interface DocumentDirectory extends IDocumentDirectory {
13
- template?: string;
14
- data?: string;
15
- export?: string;
16
- schema?: string;
17
- sql?: string;
18
- }
19
-
20
- interface DocumentComponentExtended<T> extends DbSourceDataType<T> {
21
- uri?: T;
22
- local?: T;
23
- export?: T;
24
- }
25
-
26
- interface DocumentComponentOptions<T> extends IDocumentComponentOptions, DocumentComponentExtended<DocumentComponentOption<T>> {}
27
-
28
- interface DocumentEval extends IDocumentEval {
29
- template?: boolean;
30
- userconfig?: boolean;
31
- }
32
-
33
- interface ChromeDocumentSettings extends IDocumentSettings {
34
- directory?: DocumentDirectory;
35
- options?: DocumentComponentOptions<boolean | number>;
36
- export?: ObjectMap<string | FunctionType>;
37
- }
38
-
39
- type OutputType = "useUnsafeReplace" | "productionRelease" | "productionIncremental" | "templateMap";
40
-
41
- export interface FormatUri extends Partial<LocationUri> {
42
- dictionary?: string;
43
- }
44
-
45
- export interface FinalizeProcessing<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> {
46
- readonly host: T;
47
- readonly startTime: LogTime;
48
- readonly hashed: Set<DocumentAsset>;
49
- readonly contentMap: StringMap;
50
- readonly bufferMap: ObjectMap<BufferContent>;
51
- readonly cacheMiss: string[];
52
- readonly productionRelease: Undef<true>;
53
- }
54
-
55
- export interface DocumentComponent<T = boolean> extends IDocumentComponent<T, T>, DocumentComponentExtended<T> {}
56
-
57
- export interface DocumentModule extends IDocumentModule {
58
- eval?: DocumentEval;
59
- format?: {
60
- uuid?: FormatUri;
61
- };
62
- settings?: ChromeDocumentSettings;
63
- }
64
-
65
- export interface DocumentAsset extends IDocumentAsset, ChromeAsset {
66
- relativeUrl?: string;
67
- inlineFilename?: string;
68
- srcSet?: string[];
69
- inlineUrl?: string;
70
- inlineUrlMap?: StringMap;
71
- inlineUrlCloud?: string;
72
- inlineUrlCloudMap?: StringMap;
73
- inlineBase64?: string;
74
- modified?: boolean;
75
- }
76
-
77
- export interface UserConfig extends CssRuleData, Omit<DocumentOutput, OutputType> {
78
- useUnsafeHtmlReplace?: boolean;
79
- useUnsafeCssReplace?: boolean;
80
- }
81
-
82
- export interface IChromeDocument<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends IDocument<T, U, DocumentModule, DocumentComponent>, Pick<DocumentOutput, OutputType> {
83
- htmlFile: Null<U>;
84
- cssFiles: U[];
85
- jsFiles: U[];
86
- svgFiles: U[];
87
- baseDirectory: string;
88
- baseUrl: string;
89
- config: UserConfig;
90
- related: Map<U, Set<U>>;
91
- replaced: U[];
92
- formatMap?: ObjectMap<FormatUri>;
93
- setElementSrc(asset: U, element: IXmlElement, value: string): void;
94
- findDataValue(name: string): Undef<string>;
95
- setInlinedAttributes(processing: FinalizeProcessing<T>): void;
96
- applyTransforms(processing: FinalizeProcessing<T>): Promise<void>;
97
- rewriteHtml(processing: FinalizeProcessing<T>): Promise<void>;
98
- setElementAttributes(processing: FinalizeProcessing<T>, domBase: IDomWriter): Promise<void>;
99
- applyDataSource(processing: FinalizeProcessing<T>, domBase: IDomWriter): Promise<void>;
100
- setProductionAttributes(processing: FinalizeProcessing<T>): void;
101
- removeUnusedStyles(source: string, options?: UserConfig): Undef<string>;
102
- removeServerRoot(value: string): string;
103
- replaceContent(source: string, match: RegExpExecArray | string, mimeType?: string): Undef<string>;
104
- cloudInit(state: CloudScopeOrigin<T, U>): void;
105
- cloudObject(state: CloudScopeOrigin<T, U>, file: U): boolean;
106
- cloudUpload(state: CloudScopeOrigin<T, U>, file: U, url: string, active: boolean): Promise<boolean>;
107
- cloudFinalize(state: CloudScopeOrigin<T, U>): Promise<unknown[]>;
108
- get settings(): ChromeDocumentSettings;
109
- get editing(): U[];
110
- get dataSource(): DataSource[];
111
- get elements(): XmlTagNode[];
112
- }
113
-
114
- export interface ChromeDocumentConstructor<T extends IFileManager<U>, U extends DocumentAsset = DocumentAsset> extends DocumentConstructor<T, U> {
115
- INTERNAL_ASSIGNUUID: string;
116
- INTERNAL_SERVERROOT: string;
117
- readonly prototype: IChromeDocument<T, U>;
118
- new(module?: DocumentModule, ...args: unknown[]): IChromeDocument<T, U>;
119
- }
package/chrome/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { IFileManager } from '../../types/lib';
2
-
3
- import type { ChromeDocumentConstructor, DocumentAsset } from './document';
4
-
5
- declare const Chrome: ChromeDocumentConstructor<IFileManager<DocumentAsset>>;
6
-
7
- export = Chrome;