Skip to content

Commit

Permalink
Merge pull request #12029 from keymanapp/chore/developer/api-refresh
Browse files Browse the repository at this point in the history
chore(developer): api doc refresh
  • Loading branch information
mcdurdin authored Jul 27, 2024
2 parents 2f6ffd9 + 6310c2e commit 0e0e96c
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 79 deletions.
2 changes: 1 addition & 1 deletion developer/docs/api/etc/kmc-analyze.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { CompilerCallbacks } from '@keymanapp/common-types';
import { CompilerEvent } from '@keymanapp/common-types';
import { Osk } from '@keymanapp/developer-utils';
import { Osk } from '@keymanapp/kmc-kmn';

// @public
export class AnalyzeOskCharacterUse {
Expand Down
36 changes: 5 additions & 31 deletions developer/docs/api/etc/kmc-keyboard-info.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ export class KeyboardInfoCompilerMessages {
filename: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_FileIsNotValid: number;
static ERROR_FontFileCannotBeRead: number;
// (undocumented)
static Error_FileIsNotValid: (o: {
static Error_FontFileCannotBeRead: (o: {
filename: string;
e: any;
}) => CompilerEvent;
// (undocumented)
static ERROR_FontFileCannotBeRead: number;
static ERROR_FontFileMetaDataIsInvalid: number;
// (undocumented)
static Error_FontFileCannotBeRead: (o: {
static Error_FontFileMetaDataIsInvalid: (o: {
filename: string;
message: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_InvalidAuthorEmail: number;
Expand Down Expand Up @@ -87,37 +87,11 @@ export class KeyboardInfoCompilerMessages {
// (undocumented)
static Error_NoLicenseFound: () => CompilerEvent;
// (undocumented)
static ERROR_OutputValidation: number;
// (undocumented)
static Error_OutputValidation: (o: {
message: any;
}) => CompilerEvent;
// (undocumented)
static FATAL_UnexpectedException: number;
// (undocumented)
static Fatal_UnexpectedException: (o: {
e: any;
}) => CompilerEvent;
// (undocumented)
static HINT_OutputValidation: number;
// (undocumented)
static Hint_OutputValidation: (o: {
message: any;
}) => CompilerEvent;
// (undocumented)
static WARN_MetadataFieldInconsistent: number;
// (undocumented)
static Warn_MetadataFieldInconsistent: (o: {
field: string;
value: any;
expected: any;
}) => CompilerEvent;
// (undocumented)
static WARN_OutputValidation: number;
// (undocumented)
static Warn_OutputValidation: (o: {
message: any;
}) => CompilerEvent;
}

// @public
Expand Down
104 changes: 91 additions & 13 deletions developer/docs/api/etc/kmc-kmn.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ import { KeymanCompiler } from '@keymanapp/common-types';
import { KeymanCompilerArtifactOptional } from '@keymanapp/common-types';
import { KeymanCompilerArtifacts } from '@keymanapp/common-types';
import { KeymanCompilerResult } from '@keymanapp/common-types';
import { Osk } from '@keymanapp/developer-utils';
import { TouchLayout } from '@keymanapp/common-types';
import { UnicodeSet } from '@keymanapp/common-types';
import { UnicodeSetParser } from '@keymanapp/common-types';

// Warning: (ae-internal-missing-underscore) The name "CompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export class CompilerMessages extends KmnCompilerMessages {
}
import { VisualKeyboard } from '@keymanapp/common-types';

// Warning: (ae-internal-missing-underscore) The name "CompilerResultExtraGroup" should be prefixed with an underscore because the declaration is marked as @internal
//
Expand Down Expand Up @@ -184,6 +179,10 @@ export class KmnCompilerMessages {
// (undocumented)
static Error_CharacterExpansionMustBeFollowedByCharacter: () => CompilerEvent;
// (undocumented)
static ERROR_CharacterRangeTooLong: number;
// (undocumented)
static Error_CharacterRangeTooLong: () => CompilerEvent;
// (undocumented)
static ERROR_CodeInvalidInKeyStore: number;
// (undocumented)
static Error_CodeInvalidInKeyStore: () => CompilerEvent;
Expand Down Expand Up @@ -220,6 +219,10 @@ export class KmnCompilerMessages {
// (undocumented)
static Error_ExpansionMustFollowCharacterOrVKey: () => CompilerEvent;
// (undocumented)
static ERROR_ExtendedStringTooLong: number;
// (undocumented)
static Error_ExtendedStringTooLong: () => CompilerEvent;
// (undocumented)
static ERROR_FileNotFound: number;
// (undocumented)
static Error_FileNotFound: (o: {
Expand Down Expand Up @@ -381,6 +384,10 @@ export class KmnCompilerMessages {
// (undocumented)
static Error_InvalidSystemStore: () => CompilerEvent;
// (undocumented)
static ERROR_InvalidTarget: number;
// (undocumented)
static Error_InvalidTarget: () => CompilerEvent;
// (undocumented)
static ERROR_InvalidToken: number;
// (undocumented)
static Error_InvalidToken: () => CompilerEvent;
Expand Down Expand Up @@ -419,6 +426,14 @@ export class KmnCompilerMessages {
// (undocumented)
static Error_NewContextGroupMustBeReadonly: () => CompilerEvent;
// (undocumented)
static ERROR_NonBMPCharactersNotSupportedInKeySection: number;
// (undocumented)
static Error_NonBMPCharactersNotSupportedInKeySection: () => CompilerEvent;
// (undocumented)
static ERROR_NoTargetsSpecified: number;
// (undocumented)
static Error_NoTargetsSpecified: () => CompilerEvent;
// (undocumented)
static ERROR_NoTokensFound: number;
// (undocumented)
static Error_NoTokensFound: () => CompilerEvent;
Expand Down Expand Up @@ -456,6 +471,10 @@ export class KmnCompilerMessages {
// (undocumented)
static Error_OutsInVirtualKeySection: () => CompilerEvent;
// (undocumented)
static ERROR_OutsTooLong: number;
// (undocumented)
static Error_OutsTooLong: () => CompilerEvent;
// (undocumented)
static ERROR_PostKeystrokeGroupMustBeReadonly: number;
// (undocumented)
static Error_PostKeystrokeGroupMustBeReadonly: () => CompilerEvent;
Expand Down Expand Up @@ -522,6 +541,10 @@ export class KmnCompilerMessages {
line: number;
}) => CompilerEvent;
// (undocumented)
static ERROR_VirtualKeyExpansionTooLong: number;
// (undocumented)
static Error_VirtualKeyExpansionTooLong: () => CompilerEvent;
// (undocumented)
static ERROR_VirtualKeyInContext: number;
// (undocumented)
static Error_VirtualKeyInContext: () => CompilerEvent;
Expand Down Expand Up @@ -596,6 +619,10 @@ export class KmnCompilerMessages {
// (undocumented)
static Fatal_UnicodeSetOutOfRange: () => CompilerEvent;
// (undocumented)
static HINT_IndexStoreLong: number;
// (undocumented)
static Hint_IndexStoreLong: () => CompilerEvent;
// (undocumented)
static HINT_NonUnicodeFile: number;
// (undocumented)
static Hint_NonUnicodeFile: () => CompilerEvent;
Expand Down Expand Up @@ -850,12 +877,6 @@ export class KmwCompilerMessages extends KmnCompilerMessages {
msg: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_NotAnyRequiresVersion14: number;
// (undocumented)
static Error_NotAnyRequiresVersion14: (o: {
line: number;
}) => CompilerEvent;
// (undocumented)
static ERROR_TouchLayoutFileDoesNotExist: number;
// (undocumented)
static Error_TouchLayoutFileDoesNotExist: (o: {
Expand All @@ -875,6 +896,63 @@ export class KmwCompilerMessages extends KmnCompilerMessages {
static Hint_TouchLayoutUsesUnsupportedGesturesDownlevel: (o: {
keyId: string;
}) => CompilerEvent;
// (undocumented)
static INFO_MinimumEngineVersion: number;
// (undocumented)
static Info_MinimumEngineVersion: (o: {
version: string;
}) => CompilerEvent;
}

declare namespace Osk {
export {
parseMapping,
remapVisualKeyboard,
remapTouchLayout,
StringRefUsage,
StringRef,
StringResult,
PuaMap
}
}
export { Osk }

// @public (undocumented)
function parseMapping(mapping: any): PuaMap;

// @public (undocumented)
type PuaMap = {
[index: string]: string;
};

// @public (undocumented)
function remapTouchLayout(source: TouchLayout.TouchLayoutFile, map: PuaMap): boolean;

// @public (undocumented)
function remapVisualKeyboard(vk: VisualKeyboard.VisualKeyboard, map: PuaMap): boolean;

// @public (undocumented)
interface StringRef {
// (undocumented)
str: string;
// (undocumented)
usages: StringRefUsage[];
}

// @public (undocumented)
interface StringRefUsage {
// (undocumented)
count: number;
// (undocumented)
filename: string;
}

// @public
interface StringResult {
pua: string;
str: string;
unicode: string;
usages: StringRefUsage[] | string[];
}

```
98 changes: 64 additions & 34 deletions developer/docs/api/etc/kmc-ldml.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,10 @@ import { LDMLKeyboardTestDataXMLSourceFile } from '@keymanapp/common-types';
import { LDMLKeyboardXMLSourceFileReaderOptions } from '@keymanapp/common-types';
import { UnicodeSetParser } from '@keymanapp/common-types';

// @public
export interface LdmlCompilerOptions extends CompilerOptions {
readerOptions: LDMLKeyboardXMLSourceFileReaderOptions;
}

// @public
export class LdmlKeyboardCompiler implements KeymanCompiler {
// @internal
compile(source: LDMLKeyboardXMLSourceFile, postValidate?: boolean): Promise<KMXPlus.KMXPlusFile>;
// @internal
getUsetParser(): Promise<UnicodeSetParser>;
init(callbacks: CompilerCallbacks, options: LdmlCompilerOptions): Promise<boolean>;
// Warning: (ae-forgotten-export) The symbol "LDMLKeyboardXMLSourceFile" needs to be exported by the entry point main.d.ts
//
// @internal
load(filename: string): LDMLKeyboardXMLSourceFile | null;
// @internal
loadTestData(filename: string): LDMLKeyboardTestDataXMLSourceFile | null;
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerResult" needs to be exported by the entry point main.d.ts
run(inputFilename: string, outputFilename?: string): Promise<LdmlKeyboardCompilerResult>;
// @internal
validate(source: LDMLKeyboardXMLSourceFile): Promise<boolean>;
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerArtifacts" needs to be exported by the entry point main.d.ts
write(artifacts: LdmlKeyboardCompilerArtifacts): Promise<boolean>;
}

// Warning: (ae-internal-missing-underscore) The name "LdmlKeyboardCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
// Warning: (ae-internal-missing-underscore) The name "LdmlCompilerMessages" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export class LdmlKeyboardCompilerMessages {
export class LdmlCompilerMessages {
// (undocumented)
static ERROR_CantReferenceSetFromUnicodeSet: number;
// (undocumented)
Expand Down Expand Up @@ -108,6 +82,24 @@ export class LdmlKeyboardCompilerMessages {
lowestCh: number;
}) => CompilerEvent;
// (undocumented)
static ERROR_IllegalTransformAsterisk: number;
// (undocumented)
static Error_IllegalTransformAsterisk: (o: {
from: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_IllegalTransformDollarsign: number;
// (undocumented)
static Error_IllegalTransformDollarsign: (o: {
from: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_IllegalTransformPlus: number;
// (undocumented)
static Error_IllegalTransformPlus: (o: {
from: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_InvalidFile: number;
// (undocumented)
static Error_InvalidFile: (o: {
Expand Down Expand Up @@ -227,6 +219,12 @@ export class LdmlKeyboardCompilerMessages {
modifiers: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_TransformFromMatchesNothing: number;
// (undocumented)
static Error_TransformFromMatchesNothing: (o: {
from: string;
}) => CompilerEvent;
// (undocumented)
static ERROR_UnparseableReorderSet: number;
// (undocumented)
static Error_UnparseableReorderSet: (o: {
Expand All @@ -241,12 +239,6 @@ export class LdmlKeyboardCompilerMessages {
message: string;
}) => CompilerEvent;
// (undocumented)
static FATAL_SectionCompilerFailed: number;
// (undocumented)
static Fatal_SectionCompilerFailed: (o: {
sect: string;
}) => CompilerEvent;
// (undocumented)
static HINT_CharClassImplicitDenorm: number;
// (undocumented)
static Hint_CharClassImplicitDenorm: (o: {
Expand All @@ -260,6 +252,18 @@ export class LdmlKeyboardCompilerMessages {
locale: string;
}) => CompilerEvent;
// (undocumented)
static HINT_NoDisplayForMarker: number;
// (undocumented)
static Hint_NoDisplayForMarker: (o: {
id: string;
}) => CompilerEvent;
// (undocumented)
static HINT_NoDisplayForSwitch: number;
// (undocumented)
static Hint_NoDisplayForSwitch: (o: {
id: string;
}) => CompilerEvent;
// (undocumented)
static HINT_NormalizationDisabled: number;
// (undocumented)
static Hint_NormalizationDisabled: () => CompilerEvent;
Expand Down Expand Up @@ -295,6 +299,32 @@ export class LdmlKeyboardCompilerMessages {
}) => CompilerEvent;
}

// @public
export interface LdmlCompilerOptions extends CompilerOptions {
readerOptions: LDMLKeyboardXMLSourceFileReaderOptions;
}

// @public
export class LdmlKeyboardCompiler implements KeymanCompiler {
// @internal
compile(source: LDMLKeyboardXMLSourceFile, postValidate?: boolean): Promise<KMXPlus.KMXPlusFile>;
// @internal
getUsetParser(): Promise<UnicodeSetParser>;
init(callbacks: CompilerCallbacks, options: LdmlCompilerOptions): Promise<boolean>;
// Warning: (ae-forgotten-export) The symbol "LDMLKeyboardXMLSourceFile" needs to be exported by the entry point main.d.ts
//
// @internal
load(filename: string): LDMLKeyboardXMLSourceFile | null;
// @internal
loadTestData(filename: string): LDMLKeyboardTestDataXMLSourceFile | null;
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerResult" needs to be exported by the entry point main.d.ts
run(inputFilename: string, outputFilename?: string): Promise<LdmlKeyboardCompilerResult>;
// @internal
validate(source: LDMLKeyboardXMLSourceFile): Promise<boolean>;
// Warning: (ae-forgotten-export) The symbol "LdmlKeyboardCompilerArtifacts" needs to be exported by the entry point main.d.ts
write(artifacts: LdmlKeyboardCompilerArtifacts): Promise<boolean>;
}

// (No @packageDocumentation comment for this package)

```
Loading

0 comments on commit 0e0e96c

Please sign in to comment.