git-remote-ops 0.1.0 → 0.2.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/AGENTS.md +33 -32
- package/README.md +80 -206
- package/dist/cli.js +215 -0
- package/dist/cli.js.map +1 -0
- package/{types → dist}/client.d.ts +11 -15
- package/dist/client.d.ts.map +1 -0
- package/{esm → dist}/client.js +107 -83
- package/dist/client.js.map +1 -0
- package/{types → dist}/errors.d.ts +30 -16
- package/dist/errors.d.ts.map +1 -0
- package/{esm → dist}/errors.js +17 -8
- package/dist/errors.js.map +1 -0
- package/{types → dist}/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/{esm → dist}/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/{types → dist}/logger.d.ts +11 -0
- package/dist/logger.d.ts.map +1 -0
- package/{esm → dist}/logger.js +3 -19
- package/dist/logger.js.map +1 -0
- package/{esm → dist}/objects/commit.js +1 -0
- package/dist/objects/commit.js.map +1 -0
- package/{esm → dist}/objects/index.js +1 -0
- package/dist/objects/index.js.map +1 -0
- package/{types → dist}/objects/tree.d.ts.map +1 -1
- package/{esm → dist}/objects/tree.js +2 -2
- package/dist/objects/tree.js.map +1 -0
- package/{esm → dist}/pack/delta.js +1 -0
- package/dist/pack/delta.js.map +1 -0
- package/{esm → dist}/pack/index.js +1 -0
- package/dist/pack/index.js.map +1 -0
- package/{types → dist}/pack/objects.d.ts.map +1 -1
- package/{esm → dist}/pack/objects.js +3 -3
- package/dist/pack/objects.js.map +1 -0
- package/{types → dist}/pack/parser.d.ts +19 -3
- package/dist/pack/parser.d.ts.map +1 -0
- package/{esm → dist}/pack/parser.js +46 -15
- package/dist/pack/parser.js.map +1 -0
- package/{esm → dist}/protocol/index.js +1 -0
- package/dist/protocol/index.js.map +1 -0
- package/{types → dist}/protocol/pkt_line.d.ts +3 -3
- package/{types → dist}/protocol/pkt_line.d.ts.map +1 -1
- package/{esm → dist}/protocol/pkt_line.js +1 -0
- package/dist/protocol/pkt_line.js.map +1 -0
- package/{esm → dist}/protocol/refs.js +1 -0
- package/dist/protocol/refs.js.map +1 -0
- package/{types → dist}/protocol/upload_pack.d.ts +1 -0
- package/{types → dist}/protocol/upload_pack.d.ts.map +1 -1
- package/{esm → dist}/protocol/upload_pack.js +10 -1
- package/dist/protocol/upload_pack.js.map +1 -0
- package/dist/store.d.ts +28 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +179 -0
- package/dist/store.js.map +1 -0
- package/{types → dist}/transport.d.ts +15 -2
- package/dist/transport.d.ts.map +1 -0
- package/{esm → dist}/transport.js +44 -15
- package/dist/transport.js.map +1 -0
- package/{types → dist}/types.d.ts +12 -7
- package/dist/types.d.ts.map +1 -0
- package/{esm → dist}/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -29
- package/esm/_dnt.shims.js +0 -72
- package/esm/cli.js +0 -217
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.js +0 -1
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_errors.js +0 -133
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_spread.js +0 -1
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.js +0 -1
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/_utils.js +0 -141
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/command.js +0 -1861
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.js +0 -357
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/mod.js +0 -13
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/type.js +0 -27
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.js +0 -16
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.js +0 -13
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.js +0 -14
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/command.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/enum.js +0 -24
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/file.js +0 -12
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/integer.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/number.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/secret.js +0 -7
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types/string.js +0 -9
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/types.js +0 -2
- package/esm/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.js +0 -26
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_errors.js +0 -129
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_utils.js +0 -100
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.js +0 -166
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/flags.js +0 -750
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/mod.js +0 -55
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.js +0 -11
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.js +0 -9
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/number.js +0 -11
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types/string.js +0 -4
- package/esm/deps/jsr.io/@cliffy/flags/1.1.0/types.js +0 -1
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.js +0 -16
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.js +0 -11
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.js +0 -25
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.js +0 -18
- package/esm/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.js +0 -11
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/_layout.js +0 -616
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/_utils.js +0 -79
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/border.js +0 -18
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/cell.js +0 -190
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/column.js +0 -117
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/consume_words.js +0 -64
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/mod.js +0 -42
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/row.js +0 -82
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/table.js +0 -341
- package/esm/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.js +0 -101
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_types.js +0 -2
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.js +0 -237
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.js +0 -2277
- package/esm/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.js +0 -46
- package/esm/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.js +0 -132
- package/esm/deps/jsr.io/@std/crypto/1.1.0/crypto.js +0 -270
- package/esm/deps/jsr.io/@std/crypto/1.1.0/mod.js +0 -23
- package/esm/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.js +0 -61
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common16.js +0 -51
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_common_detach.js +0 -13
- package/esm/deps/jsr.io/@std/encoding/1.0.10/_types.js +0 -2
- package/esm/deps/jsr.io/@std/encoding/1.0.10/hex.js +0 -87
- package/esm/deps/jsr.io/@std/fmt/1.0.10/colors.js +0 -903
- package/esm/deps/jsr.io/@std/text/1.0.18/closest_string.js +0 -46
- package/esm/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.js +0 -127
- package/esm/package.json +0 -3
- package/types/_dnt.shims.d.ts +0 -16
- package/types/_dnt.shims.d.ts.map +0 -1
- package/types/client.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.d.ts +0 -163
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_argument_types.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_errors.d.ts +0 -71
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_errors.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_spread.d.ts +0 -16
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_spread.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.d.ts +0 -15
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_type_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_utils.d.ts +0 -38
- package/types/deps/jsr.io/@cliffy/command/1.1.0/_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/command.d.ts +0 -1086
- package/types/deps/jsr.io/@cliffy/command/1.1.0/command.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.d.ts +0 -33
- package/types/deps/jsr.io/@cliffy/command/1.1.0/help/_help_generator.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/mod.d.ts +0 -78
- package/types/deps/jsr.io/@cliffy/command/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/type.d.ts +0 -51
- package/types/deps/jsr.io/@cliffy/command/1.1.0/type.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.d.ts +0 -10
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/action_list.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.d.ts +0 -10
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/boolean.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.d.ts +0 -10
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/child_command.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/command.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/command.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/enum.d.ts +0 -11
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/enum.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/file.d.ts +0 -6
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/file.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/integer.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/integer.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/number.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/number.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/secret.d.ts +0 -6
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/secret.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/string.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types/string.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types.d.ts +0 -161
- package/types/deps/jsr.io/@cliffy/command/1.1.0/types.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/command/1.1.0/upgrade/_check_version.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_errors.d.ts +0 -67
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_errors.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_utils.d.ts +0 -17
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.d.ts +0 -11
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/_validate_flags.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/flags.d.ts +0 -154
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/flags.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/mod.d.ts +0 -57
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/boolean.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/integer.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/number.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/number.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/string.d.ts +0 -4
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types/string.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types.d.ts +0 -170
- package/types/deps/jsr.io/@cliffy/flags/1.1.0/types.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/exit.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.d.ts +0 -7
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_args.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.d.ts +0 -7
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_columns.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.d.ts +0 -8
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/get_env.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.d.ts +0 -7
- package/types/deps/jsr.io/@cliffy/internal/1.1.0/runtime/inspect.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_layout.d.ts +0 -108
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_layout.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_utils.d.ts +0 -26
- package/types/deps/jsr.io/@cliffy/table/1.1.0/_utils.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/border.d.ts +0 -21
- package/types/deps/jsr.io/@cliffy/table/1.1.0/border.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/cell.d.ts +0 -155
- package/types/deps/jsr.io/@cliffy/table/1.1.0/cell.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/column.d.ts +0 -97
- package/types/deps/jsr.io/@cliffy/table/1.1.0/column.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/consume_words.d.ts +0 -30
- package/types/deps/jsr.io/@cliffy/table/1.1.0/consume_words.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/mod.d.ts +0 -43
- package/types/deps/jsr.io/@cliffy/table/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/row.d.ts +0 -67
- package/types/deps/jsr.io/@cliffy/table/1.1.0/row.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/table.d.ts +0 -235
- package/types/deps/jsr.io/@cliffy/table/1.1.0/table.d.ts.map +0 -1
- package/types/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.d.ts +0 -40
- package/types/deps/jsr.io/@cliffy/table/1.1.0/unicode_width.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_types.d.ts +0 -9
- package/types/deps/jsr.io/@std/crypto/1.1.0/_types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.d.ts +0 -2
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.d.ts +0 -69
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/lib/deno_std_wasm_crypto.internal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.d.ts +0 -13
- package/types/deps/jsr.io/@std/crypto/1.1.0/_wasm/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.d.ts +0 -76
- package/types/deps/jsr.io/@std/crypto/1.1.0/aes_gcm.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/crypto.d.ts +0 -149
- package/types/deps/jsr.io/@std/crypto/1.1.0/crypto.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/mod.d.ts +0 -22
- package/types/deps/jsr.io/@std/crypto/1.1.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.d.ts +0 -40
- package/types/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts +0 -23
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common16.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts +0 -4
- package/types/deps/jsr.io/@std/encoding/1.0.10/_common_detach.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts +0 -9
- package/types/deps/jsr.io/@std/encoding/1.0.10/_types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts +0 -39
- package/types/deps/jsr.io/@std/encoding/1.0.10/hex.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts +0 -700
- package/types/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/1.0.18/closest_string.d.ts +0 -42
- package/types/deps/jsr.io/@std/text/1.0.18/closest_string.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.d.ts +0 -23
- package/types/deps/jsr.io/@std/text/1.0.18/levenshtein_distance.d.ts.map +0 -1
- package/types/errors.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/logger.d.ts.map +0 -1
- package/types/pack/parser.d.ts.map +0 -1
- package/types/transport.d.ts.map +0 -1
- package/types/types.d.ts.map +0 -1
- /package/{types → dist}/cli.d.ts +0 -0
- /package/{types → dist}/cli.d.ts.map +0 -0
- /package/{types → dist}/objects/commit.d.ts +0 -0
- /package/{types → dist}/objects/commit.d.ts.map +0 -0
- /package/{types → dist}/objects/index.d.ts +0 -0
- /package/{types → dist}/objects/index.d.ts.map +0 -0
- /package/{types → dist}/objects/tree.d.ts +0 -0
- /package/{types → dist}/pack/delta.d.ts +0 -0
- /package/{types → dist}/pack/delta.d.ts.map +0 -0
- /package/{types → dist}/pack/index.d.ts +0 -0
- /package/{types → dist}/pack/index.d.ts.map +0 -0
- /package/{types → dist}/pack/objects.d.ts +0 -0
- /package/{types → dist}/protocol/index.d.ts +0 -0
- /package/{types → dist}/protocol/index.d.ts.map +0 -0
- /package/{types → dist}/protocol/refs.d.ts +0 -0
- /package/{types → dist}/protocol/refs.d.ts.map +0 -0
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Cell, type CellType } from "./cell.js";
|
|
2
|
-
import { Row, type RowType } from "./row.js";
|
|
3
|
-
import type { Table, TableSettings } from "./table.js";
|
|
4
|
-
/** Layout render settings. */
|
|
5
|
-
interface RenderSettings {
|
|
6
|
-
padding: Array<number>;
|
|
7
|
-
width: Array<number>;
|
|
8
|
-
columns: number;
|
|
9
|
-
hasBorder: boolean;
|
|
10
|
-
hasHeaderBorder: boolean;
|
|
11
|
-
hasBodyBorder: boolean;
|
|
12
|
-
rows: Array<Row<Cell>>;
|
|
13
|
-
}
|
|
14
|
-
/** Table layout renderer. */
|
|
15
|
-
export declare class TableLayout {
|
|
16
|
-
#private;
|
|
17
|
-
private table;
|
|
18
|
-
private options;
|
|
19
|
-
/**
|
|
20
|
-
* Table layout constructor.
|
|
21
|
-
* @param table Table instance.
|
|
22
|
-
* @param options Render options.
|
|
23
|
-
*/
|
|
24
|
-
constructor(table: Table, options: TableSettings);
|
|
25
|
-
/** Generate table string. */
|
|
26
|
-
toString(): string;
|
|
27
|
-
/**
|
|
28
|
-
* Generates table layout including row and col span, converts all none
|
|
29
|
-
* Cell/Row values to Cells and Rows and returns the layout rendering
|
|
30
|
-
* settings.
|
|
31
|
-
*/
|
|
32
|
-
protected createLayout(): RenderSettings;
|
|
33
|
-
private computeColumnDimensions;
|
|
34
|
-
private applyFlexShrink;
|
|
35
|
-
private applyFlexGrow;
|
|
36
|
-
private resolveColumnWeight;
|
|
37
|
-
/**
|
|
38
|
-
* Fills rows and cols by specified row/col span with a reference of the
|
|
39
|
-
* original cell.
|
|
40
|
-
*/
|
|
41
|
-
protected spanRows(rows: Array<RowType>): Array<Row<Cell>>;
|
|
42
|
-
protected getDeleteCount(rows: Array<Array<unknown>>, rowIndex: number, colIndex: number): 0 | 1;
|
|
43
|
-
/**
|
|
44
|
-
* Create a new row from existing row or cell array.
|
|
45
|
-
* @param row Original row.
|
|
46
|
-
*/
|
|
47
|
-
protected createRow(row: RowType): Row<Cell>;
|
|
48
|
-
/**
|
|
49
|
-
* Create a new cell from existing cell or cell value.
|
|
50
|
-
*
|
|
51
|
-
* @param cell Original cell.
|
|
52
|
-
* @param row Parent row.
|
|
53
|
-
* @param rowIndex The row index of the cell.
|
|
54
|
-
* @param colIndex The column index of the cell.
|
|
55
|
-
*/
|
|
56
|
-
protected createCell(cell: CellType | null | undefined, row: Row, rowIndex: number, colIndex: number): Cell;
|
|
57
|
-
private isHeaderRow;
|
|
58
|
-
/**
|
|
59
|
-
* Render table layout.
|
|
60
|
-
* @param opts Render options.
|
|
61
|
-
*/
|
|
62
|
-
protected renderRows(opts: RenderSettings): string;
|
|
63
|
-
/**
|
|
64
|
-
* Render row.
|
|
65
|
-
* @param rowSpan Current row span.
|
|
66
|
-
* @param rowIndex Current row index.
|
|
67
|
-
* @param opts Render options.
|
|
68
|
-
* @param isMultiline Is multiline row.
|
|
69
|
-
*/
|
|
70
|
-
protected renderRow(rowSpan: Array<number>, rowIndex: number, opts: RenderSettings, isMultiline?: boolean): string;
|
|
71
|
-
/**
|
|
72
|
-
* Render cell.
|
|
73
|
-
* @param colIndex Current col index.
|
|
74
|
-
* @param row Current row.
|
|
75
|
-
* @param opts Render options.
|
|
76
|
-
* @param noBorder Disable border.
|
|
77
|
-
*/
|
|
78
|
-
protected renderCell(colIndex: number, row: Row<Cell>, opts: RenderSettings, noBorder?: boolean): string;
|
|
79
|
-
/**
|
|
80
|
-
* Render specified length of cell. Returns the rendered value and a new cell
|
|
81
|
-
* with the rest value.
|
|
82
|
-
* @param cell Cell to render.
|
|
83
|
-
* @param maxLength Max length of content to render.
|
|
84
|
-
*/
|
|
85
|
-
protected renderCellValue(cell: Cell, maxLength: number): {
|
|
86
|
-
current: string;
|
|
87
|
-
next: string;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Render border row.
|
|
91
|
-
* @param prevRow Previous row.
|
|
92
|
-
* @param nextRow Next row.
|
|
93
|
-
* @param rowSpan Current row span.
|
|
94
|
-
* @param opts Render options.
|
|
95
|
-
*/
|
|
96
|
-
protected renderBorderRow(prevRow: Row<Cell> | undefined, nextRow: Row<Cell> | undefined, rowSpan: Array<number>, opts: RenderSettings): string;
|
|
97
|
-
/**
|
|
98
|
-
* Render border cell.
|
|
99
|
-
* @param colIndex Current index.
|
|
100
|
-
* @param prevRow Previous row.
|
|
101
|
-
* @param nextRow Next row.
|
|
102
|
-
* @param rowSpan Current row span.
|
|
103
|
-
* @param opts Render options.
|
|
104
|
-
*/
|
|
105
|
-
protected renderBorderCell(colIndex: number, prevRow: Row<Cell> | undefined, nextRow: Row<Cell> | undefined, rowSpan: Array<number>, opts: RenderSettings): string;
|
|
106
|
-
}
|
|
107
|
-
export {};
|
|
108
|
-
//# sourceMappingURL=_layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_layout.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/_layout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAkB,MAAM,WAAW,CAAC;AAEhE,OAAO,EAAE,GAAG,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAiB,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAMtE,8BAA8B;AAC9B,UAAU,cAAc;IACtB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;CACxB;AASD,6BAA6B;AAC7B,qBAAa,WAAW;;IAOpB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,OAAO;IAPjB;;;;OAIG;gBAEO,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,aAAa;IAGhC,6BAA6B;IACtB,QAAQ,IAAI,MAAM;IAKzB;;;;OAIG;IACH,SAAS,CAAC,YAAY,IAAI,cAAc;IA0DxC,OAAO,CAAC,uBAAuB;IAsC/B,OAA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KAAE;IAgDpC;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,CACvB,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,EAC9B,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,EAC9B,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EACtB,IAAI,EAAE,cAAc,GACnB,MAAM;IA2BT;;;;;;;OAOG;IACH,SAAS,CAAC,gBAAgB,CACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,EAC9B,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,EAC9B,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EACtB,IAAI,EAAE,cAAc,GACnB,MAAM;CAoJV"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get next words from the beginning of [content] until all words have a length lower or equal then [length].
|
|
3
|
-
*
|
|
4
|
-
* @param length Max length of all words.
|
|
5
|
-
* @param content The text content.
|
|
6
|
-
*/
|
|
7
|
-
import { type CellType } from "./cell.js";
|
|
8
|
-
/**
|
|
9
|
-
* Get longest cell from given row index.
|
|
10
|
-
*/
|
|
11
|
-
export declare function longest(index: number, rows: Array<Array<CellType>>, maxWidth?: number): number;
|
|
12
|
-
export declare const strLength: (str: string) => number;
|
|
13
|
-
/** Regex `source` to match any relevant ANSI code. */
|
|
14
|
-
export declare const ansiRegexSource: string;
|
|
15
|
-
interface UnclosedAnsiRunsResult {
|
|
16
|
-
currentSuffix: string;
|
|
17
|
-
nextPrefix: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get unclosed ANSI runs in a string.
|
|
21
|
-
*
|
|
22
|
-
* @param text - A string segment possibly containing unclosed ANSI runs.
|
|
23
|
-
*/
|
|
24
|
-
export declare function getUnclosedAnsiRuns(text: string): UnclosedAnsiRunsResult;
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=_utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_utils.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/_utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAOhD;;GAEG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAmBR;AAED,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,MAEvC,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,eAAe,QAGjB,CAAC;AAEZ,UAAU,sBAAsB;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAuCxE"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** Default border characters. */
|
|
2
|
-
export declare const border: {
|
|
3
|
-
top: string;
|
|
4
|
-
topMid: string;
|
|
5
|
-
topLeft: string;
|
|
6
|
-
topRight: string;
|
|
7
|
-
bottom: string;
|
|
8
|
-
bottomMid: string;
|
|
9
|
-
bottomLeft: string;
|
|
10
|
-
bottomRight: string;
|
|
11
|
-
left: string;
|
|
12
|
-
leftMid: string;
|
|
13
|
-
mid: string;
|
|
14
|
-
midMid: string;
|
|
15
|
-
right: string;
|
|
16
|
-
rightMid: string;
|
|
17
|
-
middle: string;
|
|
18
|
-
};
|
|
19
|
-
/** Default border characters. */
|
|
20
|
-
export type Border = typeof border;
|
|
21
|
-
//# sourceMappingURL=border.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"border.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/border.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;CAgBlB,CAAC;AAEF,iCAAiC;AACjC,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
/** Allowed cell value type. */
|
|
2
|
-
export type CellValue = number | string;
|
|
3
|
-
/** Allowed cell type. */
|
|
4
|
-
export type CellType = CellValue | Cell;
|
|
5
|
-
/** Cell alignment direction. */
|
|
6
|
-
export type Direction = "left" | "right" | "center";
|
|
7
|
-
/** Cell options. */
|
|
8
|
-
interface CellOptions {
|
|
9
|
-
/** Enable/disable cell border. */
|
|
10
|
-
border?: boolean;
|
|
11
|
-
/** Set coll span. */
|
|
12
|
-
colSpan?: number;
|
|
13
|
-
/** Set row span. */
|
|
14
|
-
rowSpan?: number;
|
|
15
|
-
/** Cell cell alignment direction. */
|
|
16
|
-
align?: Direction;
|
|
17
|
-
/**
|
|
18
|
-
* Any unterminated ANSI formatting overflowed from previous lines of a
|
|
19
|
-
* multi-line cell.
|
|
20
|
-
*/
|
|
21
|
-
unclosedAnsiRuns?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Cell representation.
|
|
25
|
-
*
|
|
26
|
-
* Can be used to customize a single cell.
|
|
27
|
-
*
|
|
28
|
-
* ```ts
|
|
29
|
-
* import { Cell, Table } from "./mod.ts";
|
|
30
|
-
*
|
|
31
|
-
* new Table()
|
|
32
|
-
* .body([
|
|
33
|
-
* ["Foo", new Cell("Bar").align("right")],
|
|
34
|
-
* ["Beep", "Boop"],
|
|
35
|
-
* ])
|
|
36
|
-
* .render();
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare class Cell {
|
|
40
|
-
private value;
|
|
41
|
-
protected options: CellOptions;
|
|
42
|
-
/** Get cell length. */
|
|
43
|
-
get length(): number;
|
|
44
|
-
/**
|
|
45
|
-
* Any unterminated ANSI formatting overflowed from previous lines of a
|
|
46
|
-
* multi-line cell.
|
|
47
|
-
*/
|
|
48
|
-
get unclosedAnsiRuns(): string;
|
|
49
|
-
set unclosedAnsiRuns(val: string);
|
|
50
|
-
/**
|
|
51
|
-
* Create a new cell. If value is a cell, the value and all options of the cell
|
|
52
|
-
* will be copied to the new cell.
|
|
53
|
-
*
|
|
54
|
-
* @param value Cell or cell value.
|
|
55
|
-
*/
|
|
56
|
-
static from(value: CellType): Cell;
|
|
57
|
-
/**
|
|
58
|
-
* Cell constructor.
|
|
59
|
-
*
|
|
60
|
-
* @param value Cell value.
|
|
61
|
-
*/
|
|
62
|
-
constructor(value: CellValue);
|
|
63
|
-
/** Get cell string value. */
|
|
64
|
-
toString(): string;
|
|
65
|
-
/** Get cell value. */
|
|
66
|
-
getValue(): CellValue;
|
|
67
|
-
/**
|
|
68
|
-
* Set cell value.
|
|
69
|
-
*
|
|
70
|
-
* @param value Cell or cell value.
|
|
71
|
-
*/
|
|
72
|
-
setValue(value: CellValue): this;
|
|
73
|
-
/**
|
|
74
|
-
* Clone cell with all options.
|
|
75
|
-
*
|
|
76
|
-
* @param value Cell or cell value.
|
|
77
|
-
*/
|
|
78
|
-
clone(value?: CellValue): Cell;
|
|
79
|
-
/**
|
|
80
|
-
* Setter:
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* Enable/disable cell border.
|
|
84
|
-
*
|
|
85
|
-
* @param enable Enable/disable cell border.
|
|
86
|
-
* @param override Override existing value.
|
|
87
|
-
*/
|
|
88
|
-
border(enable?: boolean, override?: boolean): this;
|
|
89
|
-
/**
|
|
90
|
-
* Set col span.
|
|
91
|
-
*
|
|
92
|
-
* ```ts
|
|
93
|
-
* import { Cell, Table } from "./mod.ts";
|
|
94
|
-
*
|
|
95
|
-
* new Table()
|
|
96
|
-
* .body([
|
|
97
|
-
* [
|
|
98
|
-
* new Cell("Row 1 & 2 Column 1").rowSpan(2),
|
|
99
|
-
* "Row 1 Column 2",
|
|
100
|
-
* "Row 1 Column 3",
|
|
101
|
-
* ],
|
|
102
|
-
* [new Cell("Row 2 Column 2 & 3").colSpan(2)],
|
|
103
|
-
* ])
|
|
104
|
-
* .border()
|
|
105
|
-
* .render();
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @param span Number of cols to span.
|
|
109
|
-
* @param override Override existing value.
|
|
110
|
-
*/
|
|
111
|
-
colSpan(span: number, override?: boolean): this;
|
|
112
|
-
/**
|
|
113
|
-
* Set row span.
|
|
114
|
-
*
|
|
115
|
-
* ```ts
|
|
116
|
-
* import { Cell, Table } from "./mod.ts";
|
|
117
|
-
*
|
|
118
|
-
* new Table()
|
|
119
|
-
* .body([
|
|
120
|
-
* [
|
|
121
|
-
* new Cell("Row 1 & 2 Column 1").rowSpan(2),
|
|
122
|
-
* "Row 1 Column 2",
|
|
123
|
-
* "Row 1 Column 3",
|
|
124
|
-
* ],
|
|
125
|
-
* [new Cell("Row 2 Column 2 & 3").colSpan(2)],
|
|
126
|
-
* ])
|
|
127
|
-
* .border()
|
|
128
|
-
* .render();
|
|
129
|
-
* ```
|
|
130
|
-
*
|
|
131
|
-
* @param span Number of rows to span.
|
|
132
|
-
* @param override Override existing value.
|
|
133
|
-
*/
|
|
134
|
-
rowSpan(span: number, override?: boolean): this;
|
|
135
|
-
/**
|
|
136
|
-
* Align cell content.
|
|
137
|
-
*
|
|
138
|
-
* @param direction Align direction.
|
|
139
|
-
* @param override Override existing value.
|
|
140
|
-
*/
|
|
141
|
-
align(direction: Direction, override?: boolean): this;
|
|
142
|
-
/**
|
|
143
|
-
* Getter:
|
|
144
|
-
*/
|
|
145
|
-
/** Check if cell has border. */
|
|
146
|
-
getBorder(): boolean;
|
|
147
|
-
/** Get col span. */
|
|
148
|
-
getColSpan(): number;
|
|
149
|
-
/** Get row span. */
|
|
150
|
-
getRowSpan(): number;
|
|
151
|
-
/** Get row span. */
|
|
152
|
-
getAlign(): Direction;
|
|
153
|
-
}
|
|
154
|
-
export {};
|
|
155
|
-
//# sourceMappingURL=cell.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/cell.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,yBAAyB;AACzB,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;AAExC,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpD,oBAAoB;AACpB,UAAU,WAAW;IACnB,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,IAAI;IAyCI,OAAO,CAAC,KAAK;IAxChC,SAAS,CAAC,OAAO,EAAE,WAAW,CAAM;IAEpC,uBAAuB;IACvB,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED;;;OAGG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IACD,IAAW,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAEtC;IAED;;;;;OAKG;WACW,IAAI,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAWzC;;;;OAIG;gBACwB,KAAK,EAAE,SAAS;IAE3C,6BAA6B;IACtB,QAAQ,IAAI,MAAM;IAIzB,sBAAsB;IACf,QAAQ,IAAI,SAAS;IAI5B;;;;OAIG;IACI,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAKvC;;;;OAIG;IACI,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI;IAIrC;;OAEG;IAEH;;;;;OAKG;IACI,MAAM,CAAC,MAAM,UAAO,EAAE,QAAQ,UAAO,GAAG,IAAI;IAOnD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,IAAI;IAOnD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,IAAI;IAOnD;;;;;OAKG;IACI,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,UAAO,GAAG,IAAI;IAOzD;;OAEG;IAEH,gCAAgC;IACzB,SAAS,IAAI,OAAO;IAI3B,oBAAoB;IACb,UAAU,IAAI,MAAM;IAM3B,oBAAoB;IACb,UAAU,IAAI,MAAM;IAM3B,oBAAoB;IACb,QAAQ,IAAI,SAAS;CAG7B"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import type { Direction } from "./cell.js";
|
|
2
|
-
/** Column options. */
|
|
3
|
-
export interface ColumnOptions {
|
|
4
|
-
/** Enable/disable cell border. */
|
|
5
|
-
border?: boolean;
|
|
6
|
-
/** Cell cell alignment direction. */
|
|
7
|
-
align?: Direction;
|
|
8
|
-
/** Set min column width. */
|
|
9
|
-
minWidth?: number;
|
|
10
|
-
/** Set max column width. */
|
|
11
|
-
maxWidth?: number;
|
|
12
|
-
/** Set cell padding. */
|
|
13
|
-
padding?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Set column flex-shrink weight. Follows CSS flex-shrink semantics: reduction
|
|
16
|
-
* is proportional to `weight × width`. 0 = no shrink (default), >= 1 = shrinkable.
|
|
17
|
-
*/
|
|
18
|
-
flexShrink?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Set column flex-grow weight. Follows CSS flex-grow semantics: available
|
|
21
|
-
* slack is distributed proportionally by weight. 0 = no grow (default), >= 1 = growable.
|
|
22
|
-
*/
|
|
23
|
-
flexGrow?: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Column representation.
|
|
27
|
-
*
|
|
28
|
-
* Can be used to customize a single column.
|
|
29
|
-
*
|
|
30
|
-
* ```ts
|
|
31
|
-
* import { Column, Table } from "./mod.ts";
|
|
32
|
-
*
|
|
33
|
-
* new Table()
|
|
34
|
-
* .body([
|
|
35
|
-
* ["Foo", "bar"],
|
|
36
|
-
* ["Beep", "Boop"],
|
|
37
|
-
* ])
|
|
38
|
-
* .column(0, new Column().border())
|
|
39
|
-
* .render();
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare class Column {
|
|
43
|
-
/**
|
|
44
|
-
* Create a new cell from column options or an existing column.
|
|
45
|
-
* @param options
|
|
46
|
-
*/
|
|
47
|
-
static from(options: ColumnOptions | Column): Column;
|
|
48
|
-
protected opts: ColumnOptions;
|
|
49
|
-
/** Set column options. */
|
|
50
|
-
options(options: ColumnOptions): this;
|
|
51
|
-
/** Set min column width. */
|
|
52
|
-
minWidth(width: number): this;
|
|
53
|
-
/** Set max column width. */
|
|
54
|
-
maxWidth(width: number): this;
|
|
55
|
-
/** Set column border. */
|
|
56
|
-
border(border?: boolean): this;
|
|
57
|
-
/** Set column padding. */
|
|
58
|
-
padding(padding: number): this;
|
|
59
|
-
/** Set column alignment. */
|
|
60
|
-
align(direction: Direction): this;
|
|
61
|
-
/**
|
|
62
|
-
* Set column flex-shrink weight. Follows CSS flex-shrink semantics: each
|
|
63
|
-
* column's share of the reduction is proportional to `weight × width`, so
|
|
64
|
-
* a wider column or one with a higher weight absorbs more of the overflow.
|
|
65
|
-
* 0 = rigid (never shrinks), 1 = default. See MDN flex-shrink for full detail.
|
|
66
|
-
*/
|
|
67
|
-
flexShrink(weight?: number): this;
|
|
68
|
-
/**
|
|
69
|
-
* Set column flex-grow weight. Follows CSS flex-grow semantics: available
|
|
70
|
-
* slack is distributed proportionally by weight, so weight 2 receives twice
|
|
71
|
-
* the extra space of weight 1. 0 = no grow.
|
|
72
|
-
* See MDN flex-grow for full detail.
|
|
73
|
-
*/
|
|
74
|
-
flexGrow(weight?: number): this;
|
|
75
|
-
/**
|
|
76
|
-
* Shorthand to set both flex-grow and flex-shrink to the same value. Follows
|
|
77
|
-
* CSS flex semantics: the column will both expand into and contract out of
|
|
78
|
-
* available space proportionally. 0 = rigid.
|
|
79
|
-
* See MDN flex for full detail.
|
|
80
|
-
*/
|
|
81
|
-
flex(weight?: number): this;
|
|
82
|
-
/** Get min column width. */
|
|
83
|
-
getMinWidth(): number | undefined;
|
|
84
|
-
/** Get max column width. */
|
|
85
|
-
getMaxWidth(): number | undefined;
|
|
86
|
-
/** Get column border. */
|
|
87
|
-
getBorder(): boolean | undefined;
|
|
88
|
-
/** Get column padding. */
|
|
89
|
-
getPadding(): number | undefined;
|
|
90
|
-
/** Get column alignment. */
|
|
91
|
-
getAlign(): Direction | undefined;
|
|
92
|
-
/** Get column flex-shrink weight. */
|
|
93
|
-
getFlexShrink(): number | undefined;
|
|
94
|
-
/** Get column flex-grow weight. */
|
|
95
|
-
getFlexGrow(): number | undefined;
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=column.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/column.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,sBAAsB;AACtB,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,QAAQ,CAAC,EA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C,mCAAmC;IACnC,WAAW,IAAI,MAAM,GAAG,SAAS;CAGlC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Consumes the maximum amount of words from a string which is not longer than
|
|
3
|
-
* given length. This function returns at least one word.
|
|
4
|
-
*
|
|
5
|
-
* ```ts
|
|
6
|
-
* import { consumeWords } from "./mod.ts";
|
|
7
|
-
*
|
|
8
|
-
* const str = consumeWords(9, "This is an example."); // returns: "This is"
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* @param length The maximum length of the returned string.
|
|
12
|
-
* @param content The content from which the string should be consumed.
|
|
13
|
-
*/
|
|
14
|
-
export declare function consumeWords(length: number, content: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* Consumes the maximum amount of chars from a string which is not longer than
|
|
17
|
-
* given length, ignoring ANSI codes when calculating the length.
|
|
18
|
-
* This function returns at least one char.
|
|
19
|
-
*
|
|
20
|
-
* ```ts
|
|
21
|
-
* import { consumeChars } from "./consume_words.ts";
|
|
22
|
-
*
|
|
23
|
-
* const str = consumeChars(9, "\x1b[31mThis is an example."); // returns: "\x1b[31mThis is a"
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @param length The maximum length of the returned string.
|
|
27
|
-
* @param content The content from which the string should be consumed.
|
|
28
|
-
*/
|
|
29
|
-
export declare function consumeChars(length: number, content: string): string;
|
|
30
|
-
//# sourceMappingURL=consume_words.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consume_words.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/consume_words.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAoBpE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAuBpE"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A table module to render unicode tables with [Deno](https://deno.com),
|
|
3
|
-
* [Node](https://nodejs.org) and [Bun](https://bun.sh/).
|
|
4
|
-
*
|
|
5
|
-
* > [!NOTE]\
|
|
6
|
-
* > The full documentation can be found at
|
|
7
|
-
* > [cliffy.io](https://cliffy.io/docs/table).
|
|
8
|
-
*
|
|
9
|
-
* ## Usage
|
|
10
|
-
*
|
|
11
|
-
* The table class provides a few chainable option methods. To see a list of all
|
|
12
|
-
* available options see [Table options](https://cliffy.io/docs/table/options).
|
|
13
|
-
*
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { Table } from "@cliffy/table";
|
|
16
|
-
*
|
|
17
|
-
* const table = new Table()
|
|
18
|
-
* .header(["Name", "Date", "City", "Country"])
|
|
19
|
-
* .body([
|
|
20
|
-
* ["Baxter Herman", "Oct 1, 2020", "Harderwijk", "Slovenia"],
|
|
21
|
-
* ["Jescie Wolfe", "Dec 4, 2020", "Alto Hospicio", "Japan"],
|
|
22
|
-
* ["Allegra Cleveland", "Apr 16, 2020", "Avernas-le-Bauduin", "Samoa"],
|
|
23
|
-
* ])
|
|
24
|
-
* .maxColWidth(10)
|
|
25
|
-
* .padding(1)
|
|
26
|
-
* .indent(2)
|
|
27
|
-
* .border(true)
|
|
28
|
-
* .render();
|
|
29
|
-
*
|
|
30
|
-
* table.push(["Aretha Gamble", "Feb 22, 2021", "Honolulu", "Georgia"]);
|
|
31
|
-
* table.sort();
|
|
32
|
-
* table.render();
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @module
|
|
36
|
-
*/
|
|
37
|
-
export { type Border, border } from "./border.js";
|
|
38
|
-
export { Cell, type CellType, type CellValue, type Direction } from "./cell.js";
|
|
39
|
-
export { Column, type ColumnOptions } from "./column.js";
|
|
40
|
-
export { consumeWords } from "./consume_words.js";
|
|
41
|
-
export { type DataRow, Row, type RowType } from "./row.js";
|
|
42
|
-
export { type BorderOptions, Table, type TableType } from "./table.js";
|
|
43
|
-
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@cliffy/table/1.1.0/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,OAAO,EAAE,GAAG,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type CellType, type Direction } from "./cell.js";
|
|
2
|
-
/** Allowed row type. */
|
|
3
|
-
export type RowType<T extends CellType | undefined = CellType | undefined> = Array<T> | Row<T>;
|
|
4
|
-
/** Json row. */
|
|
5
|
-
export type DataRow = Record<string, string | number>;
|
|
6
|
-
/** Row options. */
|
|
7
|
-
interface RowOptions {
|
|
8
|
-
indent?: number;
|
|
9
|
-
border?: boolean;
|
|
10
|
-
align?: Direction;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Row representation.
|
|
14
|
-
*
|
|
15
|
-
* Can be used to customize a single row.
|
|
16
|
-
*
|
|
17
|
-
* ```ts
|
|
18
|
-
* import { Row, Table } from "./mod.ts";
|
|
19
|
-
*
|
|
20
|
-
* new Table()
|
|
21
|
-
* .body([
|
|
22
|
-
* new Row("Foo", "Bar").align("right"),
|
|
23
|
-
* ["Beep", "Boop"],
|
|
24
|
-
* ])
|
|
25
|
-
* .render();
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export declare class Row<T extends CellType | undefined = CellType | undefined> extends Array<T> {
|
|
29
|
-
protected options: RowOptions;
|
|
30
|
-
/**
|
|
31
|
-
* Create a new row. If cells is a row, all cells and options of the row will
|
|
32
|
-
* be copied to the new row.
|
|
33
|
-
*
|
|
34
|
-
* @param cells Cells or row.
|
|
35
|
-
*/
|
|
36
|
-
static from<T extends CellType | undefined>(cells: RowType<T>): Row<T>;
|
|
37
|
-
/** Clone row recursively with all options. */
|
|
38
|
-
clone(): Row;
|
|
39
|
-
/**
|
|
40
|
-
* Setter:
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Enable/disable cell border.
|
|
44
|
-
*
|
|
45
|
-
* @param enable Enable/disable cell border.
|
|
46
|
-
* @param override Override existing value.
|
|
47
|
-
*/
|
|
48
|
-
border(enable?: boolean, override?: boolean): this;
|
|
49
|
-
/**
|
|
50
|
-
* Align row content.
|
|
51
|
-
*
|
|
52
|
-
* @param direction Align direction.
|
|
53
|
-
* @param override Override existing value.
|
|
54
|
-
*/
|
|
55
|
-
align(direction: Direction, override?: boolean): this;
|
|
56
|
-
/**
|
|
57
|
-
* Getter:
|
|
58
|
-
*/
|
|
59
|
-
/** Check if row has border. */
|
|
60
|
-
getBorder(): boolean;
|
|
61
|
-
/** Check if row or any child cell has border. */
|
|
62
|
-
hasBorder(): boolean;
|
|
63
|
-
/** Get row alignment. */
|
|
64
|
-
getAlign(): Direction;
|
|
65
|
-
}
|
|
66
|
-
export {};
|
|
67
|
-
//# sourceMappingURL=row.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@c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