@loomcli/core 0.5.0 → 0.7.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/NOTICE +34 -0
- package/dist/application.d.ts +18 -2
- package/dist/application.js +302 -75
- package/dist/bindings.d.ts +15 -10
- package/dist/bindings.js +34 -15
- package/dist/capture.d.ts +65 -0
- package/dist/capture.js +99 -0
- package/dist/chain.d.ts +15 -6
- package/dist/chain.js +40 -20
- package/dist/command-rules.d.ts +55 -0
- package/dist/command-rules.js +142 -0
- package/dist/command.d.ts +65 -23
- package/dist/command.js +734 -236
- package/dist/controls.d.ts +8 -0
- package/dist/controls.js +23 -0
- package/dist/defect.d.ts +18 -0
- package/dist/defect.js +272 -0
- package/dist/developer.d.ts +24 -0
- package/dist/developer.js +52 -0
- package/dist/diagnostic-text.d.ts +81 -0
- package/dist/diagnostic-text.js +283 -0
- package/dist/diagnostic.d.ts +11 -0
- package/dist/diagnostic.js +70 -0
- package/dist/errors.d.ts +108 -24
- package/dist/errors.js +324 -53
- package/dist/exit-codes.d.ts +45 -0
- package/dist/exit-codes.js +46 -0
- package/dist/extension.d.ts +41 -8
- package/dist/extension.js +142 -57
- package/dist/facts.d.ts +71 -11
- package/dist/facts.js +106 -23
- package/dist/globals.d.ts +29 -21
- package/dist/globals.js +117 -46
- package/dist/glyphs.generated.js +1 -1
- package/dist/hints.d.ts +79 -0
- package/dist/hints.js +247 -0
- package/dist/host.d.ts +13 -0
- package/dist/host.js +43 -1
- package/dist/identity.d.ts +19 -0
- package/dist/identity.js +72 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +6 -0
- package/dist/input-rules.d.ts +68 -0
- package/dist/input-rules.js +152 -0
- package/dist/inspect.d.ts +12 -12
- package/dist/inspect.js +92 -48
- package/dist/lanes.js +1 -1
- package/dist/locate.js +4 -4
- package/dist/options.d.ts +30 -2
- package/dist/options.js +143 -46
- package/dist/output.d.ts +9 -2
- package/dist/output.js +18 -2
- package/dist/plain.d.ts +56 -0
- package/dist/plain.js +238 -0
- package/dist/plugin-rules.d.ts +68 -0
- package/dist/plugin-rules.js +164 -0
- package/dist/plugin-settings.d.ts +18 -0
- package/dist/plugin-settings.js +38 -0
- package/dist/plugin.d.ts +27 -15
- package/dist/plugin.js +429 -144
- package/dist/prototypes.d.ts +7 -0
- package/dist/prototypes.js +29 -0
- package/dist/rendering.d.ts +6 -1
- package/dist/rendering.js +23 -5
- package/dist/rules.d.ts +51 -0
- package/dist/rules.js +115 -0
- package/dist/sequence.js +6 -1
- package/dist/sources.d.ts +6 -4
- package/dist/sources.js +25 -16
- package/dist/style-layout.js +2 -2
- package/dist/style-width.d.ts +13 -0
- package/dist/style-width.js +170 -0
- package/dist/style-wire.js +1 -1
- package/dist/style.js +1 -1
- package/dist/theme.d.ts +4 -0
- package/dist/theme.js +25 -5
- package/dist/thenable.d.ts +15 -0
- package/dist/thenable.js +29 -0
- package/dist/translators.d.ts +69 -0
- package/dist/translators.js +253 -0
- package/dist/types.d.ts +13 -3
- package/dist/unicode.generated.d.ts +27 -0
- package/dist/unicode.generated.js +1036 -0
- package/dist/validation.d.ts +69 -7
- package/dist/validation.js +211 -67
- package/dist/view.d.ts +61 -22
- package/dist/view.js +168 -81
- package/licenses/unicode-LICENSE.txt +41 -0
- package/licenses/uucode-LICENSE.md +35 -0
- package/package.json +9 -5
package/NOTICE
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@loomcli/core
|
|
2
|
+
|
|
3
|
+
This package includes material from uucode and from the Unicode Character
|
|
4
|
+
Database. Its license field reads "MIT AND Unicode-3.0": the Unicode tables
|
|
5
|
+
named below stay under the Unicode License v3, and every other file is under
|
|
6
|
+
the MIT License in LICENSE or, for the ported width iterator, in
|
|
7
|
+
licenses/uucode-LICENSE.md. Neither license asks anything of an application
|
|
8
|
+
that installs this package beyond keeping these notices with the files they
|
|
9
|
+
cover.
|
|
10
|
+
|
|
11
|
+
Unicode Character Database
|
|
12
|
+
Copyright © 1991-2025 Unicode, Inc.
|
|
13
|
+
Licensed under the Unicode License v3.
|
|
14
|
+
A copy of the License is in licenses/unicode-LICENSE.txt, and at
|
|
15
|
+
https://www.unicode.org/license.txt
|
|
16
|
+
|
|
17
|
+
uucode
|
|
18
|
+
Copyright (c) 2026 Tim Culverhouse
|
|
19
|
+
Licensed under the MIT License.
|
|
20
|
+
A copy of the License is in licenses/uucode-LICENSE.md.
|
|
21
|
+
Source: @rockorager/uucode 2.2.1 on npm
|
|
22
|
+
|
|
23
|
+
The Unicode tables core measures text with, in dist/unicode.generated.js, are
|
|
24
|
+
generated by the Loom repository's scripts/generate-unicode-tables.mjs from
|
|
25
|
+
the data files of @rockorager/uucode 2.2.1, which derive from Unicode 17 data.
|
|
26
|
+
The generator writes the same values as a JavaScript module, so a bundle
|
|
27
|
+
carries them.
|
|
28
|
+
|
|
29
|
+
The grapheme width iterator in dist/style-width.js is ported from the
|
|
30
|
+
@rockorager/uucode 2.2.1 width module. Changes made to it:
|
|
31
|
+
|
|
32
|
+
- It is written in TypeScript and reads the generated tables module.
|
|
33
|
+
- It yields each grapheme's start, end, and width, and no longer yields the
|
|
34
|
+
grapheme's text or offers clone, peek, or a standalone string width.
|
package/dist/application.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AfterAction, AttachmentConstraint, AfterArgument, AfterCommand, AfterResult, Command, CommandMethod, CommandNodeHandle, CommandState, ResultMethod } from './command.js';
|
|
1
|
+
import type { AfterAction, AttachmentConstraint, AfterArgument, AfterCommand, AfterResult, ChildOwner, Command, CommandMethod, CommandNodeHandle, CommandState, ResultMethod } from './command.js';
|
|
2
2
|
import type { ApplicationEnvironment, applicationEnvironment } from './environment.js';
|
|
3
3
|
import type { ExtensionValue } from './extension.js';
|
|
4
4
|
import type { GlobalsState } from './globals.js';
|
|
5
5
|
import type { CommandGraph } from './inspect.js';
|
|
6
6
|
import type { BuiltPlugin, Plugin } from './plugin.js';
|
|
7
7
|
import type { RenderingPolicy } from './rendering.js';
|
|
8
|
+
import type { Translation, TranslatorRegistry } from './translators.js';
|
|
8
9
|
import type { Action, ArgumentConfig, ArgumentValue, declaredTypes, DeclaredTypes, DefaultConstraint, GlobalNameConstraint, GlobalOmissionConstraint, PerValueConstraint, NameConstraint, ExitCode, OptionConfig, OptionValue, ResultViews, ResultViewsOf, RowViews, RunOptions, ValidateOmittedConstraint } from './types.js';
|
|
9
10
|
import type { ViewContributions, ViewOverride } from './view.js';
|
|
10
11
|
/**
|
|
@@ -14,9 +15,20 @@ import type { ViewContributions, ViewOverride } from './view.js';
|
|
|
14
15
|
* to no bare token, so it has no name to alias.
|
|
15
16
|
*/
|
|
16
17
|
export type ApplicationMethod = Exclude<CommandMethod, 'alias'> | 'globalOption';
|
|
18
|
+
/**
|
|
19
|
+
* The build fact file, `loom.packet.json`, that the entry imports and hands to the Application.
|
|
20
|
+
* `build` is typed `string`, because a JSON module types its members that way, and the Application
|
|
21
|
+
* constructor accepts `development` or `distributed` alone. Core ignores every other member.
|
|
22
|
+
*/
|
|
23
|
+
export interface Packet {
|
|
24
|
+
readonly build: string;
|
|
25
|
+
}
|
|
17
26
|
export interface ApplicationOptions<Plugins extends readonly Plugin[] = readonly Plugin[]> {
|
|
18
27
|
rendering?: RenderingPolicy;
|
|
28
|
+
/** The packet that says whether this is a development build. With none, it is distributed. */
|
|
29
|
+
packet?: Packet;
|
|
19
30
|
views?: readonly ViewOverride[];
|
|
31
|
+
translators?: readonly Translation[];
|
|
20
32
|
plugins?: Plugins;
|
|
21
33
|
extensions?: readonly ExtensionValue<'command'>[];
|
|
22
34
|
description?: string;
|
|
@@ -29,13 +41,17 @@ export interface ApplicationOptions<Plugins extends readonly Plugin[] = readonly
|
|
|
29
41
|
interface ApplicationConfig {
|
|
30
42
|
/** Whether the application's own `command()` or `action()` has run, which closes `globalOption()`. */
|
|
31
43
|
composed: boolean;
|
|
44
|
+
/** Whether the packet reads `development`, read once at construction. */
|
|
45
|
+
development: boolean;
|
|
32
46
|
/** Each installed plugin's view contributions, in installation order. */
|
|
33
47
|
contributors: readonly ViewContributions[];
|
|
34
48
|
facts: ApplicationFacts;
|
|
35
49
|
/** The parent that claimed each node the graph holds, so one value attaches at one point. */
|
|
36
|
-
owners: ReadonlyMap<CommandNodeHandle,
|
|
50
|
+
owners: ReadonlyMap<CommandNodeHandle, ChildOwner>;
|
|
37
51
|
plugins: readonly BuiltPlugin[];
|
|
38
52
|
rendering: RenderingPolicy;
|
|
53
|
+
/** The application's translations, then each installed plugin's, in resolution order. */
|
|
54
|
+
translators: TranslatorRegistry;
|
|
39
55
|
/** The application's own view overrides. */
|
|
40
56
|
views: ViewContributions;
|
|
41
57
|
}
|