diff --git a/docs/classes/util.AssertionError.html b/docs/classes/util.AssertionError.html index 1fe0f06..eb95612 100644 --- a/docs/classes/util.AssertionError.html +++ b/docs/classes/util.AssertionError.html @@ -27,7 +27,7 @@

Hierarchy

+
  • Defined in src/framework/util/assert.ts:10
  • @@ -156,7 +156,7 @@
    message: Returns AssertionError
    +
  • Defined in src/framework/util/assert.ts:15
  • +
  • Defined in src/framework/util/disposable.ts:57
  • +
  • Defined in src/framework/util/disposable.ts:32
  • +
  • Defined in src/framework/util/expr/node.ts:243
  • Returns ParserError

    +
  • Defined in src/framework/util/expr/parser.ts:358
  • +
  • Defined in src/framework/util/expr/parser.ts:352
  • +
  • Defined in src/framework/util/expr/parser.ts:146
  • +
  • Defined in src/framework/util/expr/parser.ts:286
    • @@ -160,7 +160,7 @@

      Parameters

      Rest ...opIds: string[]
      Rest

    Returns undefined | BinaryOp

    +
  • Defined in src/framework/util/expr/parser.ts:319
  • +
  • Defined in src/framework/util/expr/parser.ts:118
  • +
  • Defined in src/framework/util/expr/parser.ts:80
  • +
  • Defined in src/framework/util/expr/parser.ts:76
  • Returns FunctionCall

    +
  • Defined in src/framework/util/expr/parser.ts:252
  • +
  • Defined in src/framework/util/expr/parser.ts:128
  • Returns IndexRef

    +
  • Defined in src/framework/util/expr/parser.ts:275
  • +
  • Defined in src/framework/util/expr/parser.ts:108
  • +
  • Defined in src/framework/util/expr/parser.ts:98
  • +
  • Defined in src/framework/util/expr/parser.ts:162
  • Returns undefined | T

    +
  • Defined in src/framework/util/expr/parser.ts:323
  • +
  • Defined in src/framework/util/expr/parser.ts:187
  • +
  • Defined in src/framework/util/expr/parser.ts:208
  • Returns PropertyRef

    +
  • Defined in src/framework/util/expr/parser.ts:263
  • +
  • Defined in src/framework/util/expr/parser.ts:67
  • Returns boolean

    +
  • Defined in src/framework/util/expr/parser.ts:306
  • +
  • Defined in src/framework/util/expr/parser.ts:178
  • Returns undefined | UnaryOp

    +
  • Defined in src/framework/util/expr/parser.ts:315
  • +
  • Defined in src/framework/util/expr/parser.ts:344
  • +
  • Defined in src/framework/util/expr/parser.ts:55
  • +
  • Defined in src/framework/util/log/level.ts:84
  • style?: string
    @@ -136,7 +136,7 @@
    +
  • Defined in src/framework/util/log/level.ts:83
  • value: number
    @@ -144,7 +144,7 @@
    +
  • Defined in src/framework/util/log/level.ts:82
  • ALL: LogLevel = ...
    @@ -152,7 +152,7 @@
    +
  • Defined in src/framework/util/log/level.ts:20
  • DEBUG: LogLevel = ...
    @@ -160,12 +160,12 @@
    +
  • Defined in src/framework/util/log/level.ts:24
  • DEFAULT: LogLevel = LogLevel.OFF
    +
  • Defined in src/framework/util/log/level.ts:58
  • ERROR: LogLevel = ...
    @@ -173,7 +173,7 @@
    +
  • Defined in src/framework/util/log/level.ts:51
  • INFO: LogLevel = ...
    @@ -181,12 +181,12 @@
    +
  • Defined in src/framework/util/log/level.ts:33
  • LEVELS: Map<string, LogLevel> = ...
    +
  • Defined in src/framework/util/log/level.ts:60
  • OFF: LogLevel = ...
    @@ -194,7 +194,7 @@
    +
  • Defined in src/framework/util/log/level.ts:16
  • WARN: LogLevel = ...
    @@ -202,7 +202,7 @@
    +
  • Defined in src/framework/util/log/level.ts:42
  • Methods

    @@ -210,26 +210,43 @@
    +

    Returns undefined | LogLevel

    The log label or undefined if no such level exists.

    + +
    +
  • Defined in src/framework/util/log/level.ts:94
  • +

    Gets the log level for the given log label.

    +

    Parameters

    • -
      label: string
    • +
      label: string
      +

      The log label, "OFF", "ALL", "DEBUG", + "INFO", "WARN", or "ERROR".

      +
    • -
      defaultLevel: LogLevel
    -

    Returns LogLevel

  • +

    Returns LogLevel

    The log label or the given defaultLevel + if no such level exists.

    + +
    +
  • Defined in src/framework/util/log/level.ts:104
  • +
  • Defined in src/framework/util/log/logger.ts:44
  • name: string
    @@ -137,17 +137,17 @@
    +
  • Defined in src/framework/util/log/logger.ts:42
  • seenWarnings: Set<string> = ...
    +
  • Defined in src/framework/util/log/logger.ts:15
  • globalLevel: LogLevel = ...
    +
  • Defined in src/framework/util/log/logger.ts:14
  • Methods

    @@ -167,7 +167,7 @@
    Rest Returns void
    +
  • Defined in src/framework/util/log/logger.ts:92
  • +
  • Defined in src/framework/util/log/logger.ts:128
  • +
  • Defined in src/framework/util/log/logger.ts:57
  • +
  • Defined in src/framework/util/log/logger.ts:50
  • +
  • Defined in src/framework/util/log/logger.ts:100
  • +
  • Defined in src/framework/util/log/logger.ts:72
  • +
  • Defined in src/framework/util/log/logger.ts:80
  • Log data with given level.

    @@ -291,7 +291,7 @@
    Rest Returns void
  • +
  • Defined in src/framework/util/log/logger.ts:142
  • +
  • Defined in src/framework/util/log/logger.ts:65
  • +
  • Defined in src/framework/util/log/logger.ts:108
  • +
  • Defined in src/framework/util/log/logger.ts:116
  • +
  • Defined in src/framework/util/log/logger.ts:20
  • +
  • Defined in src/framework/util/log/logger.ts:29
  • +
  • Defined in src/framework/contrib/tool-views.ts:120
  • +
  • Defined in src/framework/contrib/commands.ts:118
  • +
  • Defined in src/framework/contrib/configuration.ts:107
  • +
  • Defined in src/framework/contrib/configuration.ts:111
  • +
  • Defined in src/framework/contrib/configuration.ts:119
  • +
  • Defined in src/framework/contrib/data-views.ts:104
  • +
  • Defined in src/framework/contrib/configuration.ts:100
  • +
  • Defined in src/framework/contrib/commands.ts:111
  • +
  • Defined in src/framework/contrib/register.ts:36
  • +
  • Defined in src/framework/contrib/data-views.ts:93
  • +
  • Defined in src/framework/contrib/status-bar-items.ts:33
  • +
  • Defined in src/framework/contrib/stores.ts:22
  • +
  • Defined in src/framework/contrib/tool-views.ts:99
  • +
  • Defined in src/framework/contrib/command-palette.ts:25
  • +
  • Defined in src/framework/contrib/commands.ts:99
  • +
  • Defined in src/framework/contrib/configuration.ts:370
  • +
  • Defined in src/framework/contrib/configuration.ts:169
  • +
  • Defined in src/framework/contrib/configuration.ts:128
  • +
  • Defined in src/framework/contrib/data-views.ts:84
  • +
  • Defined in src/framework/contrib/data-views.ts:80
  • +
  • Defined in src/framework/contrib/configuration.ts:89
  • +
  • Defined in src/framework/contrib/keybindings.ts:94
  • +
  • Defined in src/framework/contrib/menus.ts:127
  • +
  • Defined in src/framework/contrib/status-bar-items.ts:43
  • +
  • Defined in src/framework/contrib/stores.ts:35
  • +
  • Defined in src/framework/contrib/submenus.ts:53
  • +
  • Defined in src/framework/contrib/tool-views.ts:106
  • +
  • Defined in src/framework/contrib/tool-views.ts:88
  • +
  • Defined in src/framework/core/contrib-point/when.ts:61
  • +
  • Defined in src/framework/core/contrib-point/get.ts:33
  • +
  • Defined in src/framework/core/contrib-point/get.ts:55
  • +
  • Defined in src/framework/core/contrib-point/get.ts:88
  • +
  • Defined in src/framework/core/extension/get.ts:29
  • +
  • Defined in src/framework/core/code-contrib/load.ts:24
  • +
  • Defined in src/framework/core/code-contrib/register.ts:26
  • +
  • Defined in src/framework/core/contrib-point/register.ts:18
  • +
  • Defined in src/framework/core/extension/register.ts:39
  • +
  • Defined in src/framework/core/config.ts:24
  • +
  • Defined in src/framework/react/hooks.ts:107
  • +
  • Defined in src/framework/react/hooks.ts:69
  • +
  • Defined in src/framework/react/hooks.ts:53
  • +
  • Defined in src/framework/react/hooks.ts:123
  • Returns Selector<State, Result>

    +
  • Defined in src/framework/util/selector.ts:45
  • @@ -159,7 +159,7 @@
    x3: Returns Result
  • Returns Selector<State, Result>

    +
  • Defined in src/framework/util/selector.ts:50
  • @@ -209,7 +209,7 @@
    x4: Returns Result
  • Returns Selector<State, Result>

    +
  • Defined in src/framework/util/selector.ts:56
  • @@ -265,7 +265,7 @@
    x5: Returns Result
  • Returns Selector<State, Result>

    +
  • Defined in src/framework/util/selector.ts:63
  • @@ -327,7 +327,7 @@
    x6: Returns Result
  • Returns Selector<State, Result>

    +
  • Defined in src/framework/util/selector.ts:71
  • @@ -395,7 +395,7 @@
    x7: Returns Result
  • Returns Selector<State, Result>

    +
  • Defined in src/framework/util/selector.ts:80
  • @@ -469,7 +469,7 @@
    x8: Returns Result
  • Returns Selector<State, Result>

    +
  • Defined in src/framework/util/selector.ts:98
  • Returns number

    +
  • Defined in src/framework/util/json/ui-schema.ts:154
  • @@ -47,7 +47,7 @@

    Parameters

    schema: StringUiSchema
  • Returns string

    +
  • Defined in src/framework/util/json/ui-schema.ts:155
  • @@ -57,7 +57,7 @@

    Parameters

    schema: TupleUiSchema
  • Returns TupleUiValue

    +
  • Defined in src/framework/util/json/ui-schema.ts:156
  • @@ -67,7 +67,7 @@

    Parameters

    schema: ListUiSchema
  • Returns ListUiValue

    +
  • Defined in src/framework/util/json/ui-schema.ts:157
  • @@ -77,7 +77,7 @@

    Parameters

    schema: ObjectUiSchema
  • Returns ObjectUiValue

    +
  • Defined in src/framework/util/json/ui-schema.ts:158
  • @@ -87,7 +87,7 @@

    Parameters

    schema: UiSchema
  • Returns UiValue

    +
  • Defined in src/framework/util/json/ui-schema.ts:159
  • +
  • Defined in src/framework/util/json/ui-schema.ts:131
  • +
  • Defined in src/framework/util/json/ui-schema.ts:134
  • +
  • Defined in src/framework/util/json/ui-schema.ts:146
  • +
  • Defined in src/framework/util/json/ui-schema.ts:137
  • +
  • Defined in src/framework/util/json/ui-schema.ts:149
  • +
  • Defined in src/framework/util/json/ui-schema.ts:140
  • +
  • Defined in src/framework/util/json/ui-schema.ts:143
  • Such code contributions are loaded lazily. Only the first time a code contribution is needed by a consumer, the contributing extension will be -activated.

    -

    Therefore, code contributions are loaded asynchronously using the +activated. Therefore, code contributions are loaded asynchronously using the loadCodeContribution function:

    import { loadCodeContribution } from "@forman2/extendit";
    import { type Command } from "./command";

    async function getCommand(commandId: string): Promise<Command> {
    return await loadCodeContribution<Command>("commands", commandId);
    } @@ -131,7 +131,7 @@

    @forman2/extendit

    that is used for implementing React components:

    import { useLoadCodeContribution } from "@forman2/extendit/react";
    import { type Command } from "./command";

    interface CommandButtonProps {
    command: Command;
    }

    export default function CommandButton({ command }: CommandButtonProps) {
    const commandCode = useLoadCodeContribution("commands", command.id);
    if (!commandCode) { // Happens on first render only
    return null;
    }
    return (
    <button
    onClick={commandCode.data}
    disabled={commandCode.loading || commandCode.error}
    >
    {command.title}
    </button>
    );
    }
    -

    Documentation

    We currently only have this file, the +

    Documentation

    We currently only have this file and the API docs, sorry.

    Development

    Source Code

    Get sources and install dependencies first:

    $ git clone https://github.com/forman/extendit
    $ cd extendit
    $ npm install diff --git a/docs/interfaces/contrib.Command.html b/docs/interfaces/contrib.Command.html index 8ab39b5..4b5b085 100644 --- a/docs/interfaces/contrib.Command.html +++ b/docs/interfaces/contrib.Command.html @@ -23,7 +23,7 @@

    Hierarchy

    • Command
    +
  • Defined in src/framework/contrib/commands.ts:35
  • @@ -46,41 +46,41 @@
    +
  • Defined in src/framework/contrib/commands.ts:25
  • checked?: When
    +
  • Defined in src/framework/contrib/commands.ts:37
  • command: string
    +
  • Defined in src/framework/contrib/commands.ts:23
  • enablement?: When
    +
  • Defined in src/framework/contrib/commands.ts:36
  • icon?: string
    +
  • Defined in src/framework/contrib/commands.ts:27
  • title?: string
    +
  • Defined in src/framework/contrib/commands.ts:24
  • tooltip?: string
    +
  • Defined in src/framework/contrib/commands.ts:26
  • +
  • Defined in src/framework/contrib/commands.ts:26
  • +
  • Defined in src/framework/contrib/menus.ts:44
  • +
  • Defined in src/framework/contrib/configuration.ts:358
  • +
  • Defined in src/framework/contrib/configuration.ts:362
  • +
  • Defined in src/framework/contrib/data-views.ts:21
  • +
  • Defined in src/framework/contrib/data-views.ts:43
  • +
  • Defined in src/framework/contrib/data-views.ts:21
  • +
  • Defined in src/framework/contrib/keybindings.ts:30
  • +
  • Defined in src/framework/contrib/keybindings.ts:26
  • +
  • Defined in src/framework/contrib/menus.ts:26
  • +
  • Defined in src/framework/contrib/menus.ts:37
  • +
  • Defined in src/framework/contrib/submenus.ts:17
  • +
  • Defined in src/framework/contrib/tool-views.ts:28
  • +
  • Defined in src/framework/core/types.ts:289
  • +
  • Defined in src/framework/core/types.ts:133
  • deactivate?: ((extensionContext) => void | Promise<void>)
    @@ -90,7 +90,7 @@

    Parameters

    extensionContext: ExtensionContext

    Returns void | Promise<void>

    +
  • Defined in src/framework/core/types.ts:138
  • +
  • Defined in src/framework/core/types.ts:235
  • schema: AnySchema | JsonTypedSchema<TM>
    @@ -89,7 +89,7 @@
    +
  • Defined in src/framework/core/types.ts:226
  • +
  • Defined in src/framework/core/types.ts:317
  • +
  • Defined in src/framework/util/json/ui-schema.ts:65
  • +
  • Defined in src/framework/util/disposable.ts:11
  • +
  • Defined in src/framework/util/json/ui-schema.ts:69
  • +
  • Defined in src/framework/util/json/ui-schema.ts:79
  • +
  • Defined in src/framework/core/index.ts:1
  • Index

    diff --git a/docs/modules/react.html b/docs/modules/react.html index a5514af..d255d94 100644 --- a/docs/modules/react.html +++ b/docs/modules/react.html @@ -16,7 +16,7 @@
  • react
  • Module react

    +
  • Defined in src/framework/react/index.ts:1
  • Index

    diff --git a/docs/modules/util.expr.html b/docs/modules/util.expr.html index c76a32d..1c799a7 100644 --- a/docs/modules/util.expr.html +++ b/docs/modules/util.expr.html @@ -17,7 +17,7 @@
  • expr
  • Namespace expr

    +
  • Defined in src/framework/util/expr/index.ts:1
  • Index

    diff --git a/docs/modules/util.html b/docs/modules/util.html index 1200987..3624e24 100644 --- a/docs/modules/util.html +++ b/docs/modules/util.html @@ -16,7 +16,7 @@
  • util
  • Module util

    +
  • Defined in src/framework/util/index.ts:1
  • Index

    diff --git a/docs/modules/util.log.html b/docs/modules/util.log.html index 734b97d..7dae6bc 100644 --- a/docs/modules/util.log.html +++ b/docs/modules/util.log.html @@ -17,7 +17,7 @@
  • log
  • Namespace log

    +
  • Defined in src/framework/util/log/index.ts:1
  • Index

    diff --git a/docs/types/contrib.CommandFn.html b/docs/types/contrib.CommandFn.html index 1092e82..cdad00f 100644 --- a/docs/types/contrib.CommandFn.html +++ b/docs/types/contrib.CommandFn.html @@ -38,7 +38,7 @@

    Parameters

    Rest ...args: A
    Rest

    Returns T

    +
  • Defined in src/framework/contrib/commands.ts:95
  • +
  • Defined in src/framework/contrib/configuration.ts:32
  • +
  • Defined in src/framework/contrib/configuration.ts:366
  • +
  • Defined in src/framework/contrib/configuration.ts:33
  • +
  • Defined in src/framework/core/types.ts:324
  • +
  • Defined in src/framework/core/types.ts:42
  • +
  • Defined in src/framework/util/json/json.ts:38
  • +
  • Defined in src/framework/util/json/json-meta-schema.ts:17
  • +
  • Defined in src/framework/util/json/json-schema.ts:9
  • +
  • Defined in src/framework/util/json/json.ts:13
  • +
  • Defined in src/framework/util/json/ui-schema.ts:28
  • +
  • Defined in src/framework/util/json/ui-schema.ts:16
  • +
  • Defined in src/framework/util/json/ui-schema.ts:88
  • +
  • Defined in src/framework/util/json/ui-schema.ts:10
  • +
  • Defined in src/framework/util/selector.ts:17
  • +
  • Defined in src/framework/util/json/ui-schema.ts:22
  • +
  • Defined in src/framework/util/json/ui-schema.ts:125
  • +
  • Defined in src/framework/util/json/ui-schema.ts:38
  • +
  • Defined in src/framework/util/expr/node.ts:12
  • +
  • Defined in src/framework/contrib/commands.ts:80
  • +
  • Defined in src/framework/contrib/configuration.ts:74
  • +
  • Defined in src/framework/contrib/data-views.ts:69
  • +
  • Defined in src/framework/contrib/status-bar-items.ts:26
  • +
  • Defined in src/framework/contrib/stores.ts:17
  • +
  • Defined in src/framework/contrib/submenus.ts:46
  • +
  • Defined in src/framework/contrib/tool-views.ts:63
  • +
  • Defined in src/framework/util/json/json-meta-schema.ts:9