@akiojin/gwt 6.30.3 → 9.0.1

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.
Files changed (98) hide show
  1. package/.cargo/config.toml +2 -0
  2. package/.claude-plugin/marketplace.json +18 -0
  3. package/.coderabbit.yaml +8 -0
  4. package/.codex/skills/gwt-fix-issue/scripts/inspect_issue.py +833 -0
  5. package/.dockerignore +63 -0
  6. package/.gitattributes +27 -0
  7. package/.husky/commit-msg +2 -0
  8. package/.husky/pre-commit +9 -0
  9. package/.husky/pre-push +12 -0
  10. package/.markdownlint.json +18 -0
  11. package/.markdownlintignore +2 -0
  12. package/Dockerfile +58 -0
  13. package/README.ja.md +161 -484
  14. package/README.md +164 -444
  15. package/cliff.toml +56 -0
  16. package/clippy.toml +2 -0
  17. package/cmake/ci-disable-native.cmake +16 -0
  18. package/codecov.yml +16 -0
  19. package/commitlint.config.cjs +107 -0
  20. package/deny.toml +35 -0
  21. package/docker-compose.yml +59 -0
  22. package/messages/errors.toml +52 -0
  23. package/package.json +12 -22
  24. package/rustfmt.toml +8 -0
  25. package/scripts/check-e2e-coverage-threshold.mjs +238 -0
  26. package/scripts/entrypoint.sh +36 -25
  27. package/scripts/install-linux-deps.sh +46 -0
  28. package/scripts/postinstall.js +79 -227
  29. package/scripts/release_issue_refs.py +317 -0
  30. package/scripts/run-local-backend-tests-on-commit.sh +15 -0
  31. package/scripts/run-local-e2e-coverage-on-commit.sh +69 -0
  32. package/scripts/run-local-e2e-on-commit.sh +60 -0
  33. package/scripts/test-all.sh +13 -0
  34. package/scripts/test_release_issue_refs.py +257 -0
  35. package/scripts/validate-skill-frontmatter.sh +108 -0
  36. package/scripts/verify-ci-node-toolchain.sh +76 -0
  37. package/scripts/verify-husky-hooks.sh +6 -0
  38. package/scripts/voice-eval.sh +48 -0
  39. package/tests/voice_eval/README.md +53 -0
  40. package/tests/voice_eval/manifest.template.json +55 -0
  41. package/tests/voice_eval/samples/.gitkeep +1 -0
  42. package/tests/voice_eval/script-ja.txt +10 -0
  43. package/vendor/ratatui-core/src/backend/test.rs +1077 -0
  44. package/vendor/ratatui-core/src/backend.rs +405 -0
  45. package/vendor/ratatui-core/src/buffer/assert.rs +71 -0
  46. package/vendor/ratatui-core/src/buffer/buffer.rs +1388 -0
  47. package/vendor/ratatui-core/src/buffer/cell.rs +377 -0
  48. package/vendor/ratatui-core/src/buffer.rs +9 -0
  49. package/vendor/ratatui-core/src/layout/alignment.rs +89 -0
  50. package/vendor/ratatui-core/src/layout/constraint.rs +526 -0
  51. package/vendor/ratatui-core/src/layout/direction.rs +63 -0
  52. package/vendor/ratatui-core/src/layout/flex.rs +212 -0
  53. package/vendor/ratatui-core/src/layout/layout.rs +2838 -0
  54. package/vendor/ratatui-core/src/layout/margin.rs +79 -0
  55. package/vendor/ratatui-core/src/layout/offset.rs +66 -0
  56. package/vendor/ratatui-core/src/layout/position.rs +253 -0
  57. package/vendor/ratatui-core/src/layout/rect/iter.rs +356 -0
  58. package/vendor/ratatui-core/src/layout/rect/ops.rs +136 -0
  59. package/vendor/ratatui-core/src/layout/rect.rs +1114 -0
  60. package/vendor/ratatui-core/src/layout/size.rs +147 -0
  61. package/vendor/ratatui-core/src/layout.rs +333 -0
  62. package/vendor/ratatui-core/src/lib.rs +82 -0
  63. package/vendor/ratatui-core/src/style/anstyle.rs +348 -0
  64. package/vendor/ratatui-core/src/style/color.rs +788 -0
  65. package/vendor/ratatui-core/src/style/palette/material.rs +608 -0
  66. package/vendor/ratatui-core/src/style/palette/tailwind.rs +653 -0
  67. package/vendor/ratatui-core/src/style/palette.rs +6 -0
  68. package/vendor/ratatui-core/src/style/palette_conversion.rs +82 -0
  69. package/vendor/ratatui-core/src/style/stylize.rs +668 -0
  70. package/vendor/ratatui-core/src/style.rs +1069 -0
  71. package/vendor/ratatui-core/src/symbols/bar.rs +51 -0
  72. package/vendor/ratatui-core/src/symbols/block.rs +51 -0
  73. package/vendor/ratatui-core/src/symbols/border.rs +709 -0
  74. package/vendor/ratatui-core/src/symbols/braille.rs +21 -0
  75. package/vendor/ratatui-core/src/symbols/half_block.rs +3 -0
  76. package/vendor/ratatui-core/src/symbols/line.rs +259 -0
  77. package/vendor/ratatui-core/src/symbols/marker.rs +82 -0
  78. package/vendor/ratatui-core/src/symbols/merge.rs +748 -0
  79. package/vendor/ratatui-core/src/symbols/pixel.rs +30 -0
  80. package/vendor/ratatui-core/src/symbols/scrollbar.rs +46 -0
  81. package/vendor/ratatui-core/src/symbols/shade.rs +5 -0
  82. package/vendor/ratatui-core/src/symbols.rs +15 -0
  83. package/vendor/ratatui-core/src/terminal/frame.rs +192 -0
  84. package/vendor/ratatui-core/src/terminal/terminal.rs +926 -0
  85. package/vendor/ratatui-core/src/terminal/viewport.rs +58 -0
  86. package/vendor/ratatui-core/src/terminal.rs +40 -0
  87. package/vendor/ratatui-core/src/text/grapheme.rs +84 -0
  88. package/vendor/ratatui-core/src/text/line.rs +1678 -0
  89. package/vendor/ratatui-core/src/text/masked.rs +149 -0
  90. package/vendor/ratatui-core/src/text/span.rs +904 -0
  91. package/vendor/ratatui-core/src/text/text.rs +1434 -0
  92. package/vendor/ratatui-core/src/text.rs +64 -0
  93. package/vendor/ratatui-core/src/widgets/stateful_widget.rs +193 -0
  94. package/vendor/ratatui-core/src/widgets/widget.rs +174 -0
  95. package/vendor/ratatui-core/src/widgets.rs +9 -0
  96. package/bin/gwt.js +0 -131
  97. package/scripts/postinstall.test.js +0 -71
  98. package/scripts/release-download.js +0 -66
@@ -0,0 +1,6 @@
1
+ #![allow(clippy::unreadable_literal)]
2
+
3
+ //! A module for defining color palettes.
4
+
5
+ pub mod material;
6
+ pub mod tailwind;
@@ -0,0 +1,82 @@
1
+ //! Conversions from colors in the `palette` crate to [`Color`].
2
+
3
+ use ::palette::LinSrgb;
4
+ use ::palette::bool_mask::LazySelect;
5
+ use ::palette::num::{Arithmetics, MulSub, PartialCmp, Powf, Real};
6
+ use palette::Srgb;
7
+ use palette::stimulus::IntoStimulus;
8
+
9
+ use crate::style::Color;
10
+
11
+ /// Convert an [`palette::Srgb`] color to a [`Color`].
12
+ ///
13
+ /// # Examples
14
+ ///
15
+ /// ```
16
+ /// use palette::Srgb;
17
+ /// use ratatui_core::style::Color;
18
+ ///
19
+ /// let color = Color::from(Srgb::new(1.0f32, 0.0, 0.0));
20
+ /// assert_eq!(color, Color::Rgb(255, 0, 0));
21
+ /// ```
22
+ impl<T: IntoStimulus<u8>> From<Srgb<T>> for Color {
23
+ fn from(color: Srgb<T>) -> Self {
24
+ let (red, green, blue) = color.into_format().into_components();
25
+ Self::Rgb(red, green, blue)
26
+ }
27
+ }
28
+
29
+ /// Convert a [`palette::LinSrgb`] color to a [`Color`].
30
+ ///
31
+ /// Note: this conversion only works for floating point linear sRGB colors. If you have a linear
32
+ /// sRGB color in another format, you need to convert it to floating point first.
33
+ ///
34
+ /// # Examples
35
+ ///
36
+ /// ```
37
+ /// use palette::LinSrgb;
38
+ /// use ratatui_core::style::Color;
39
+ ///
40
+ /// let color = Color::from(LinSrgb::new(1.0f32, 0.0, 0.0));
41
+ /// assert_eq!(color, Color::Rgb(255, 0, 0));
42
+ /// ```
43
+ impl<T: IntoStimulus<u8>> From<LinSrgb<T>> for Color
44
+ where
45
+ T: Real + Powf + MulSub + Arithmetics + PartialCmp + Clone,
46
+ T::Mask: LazySelect<T>,
47
+ {
48
+ fn from(color: LinSrgb<T>) -> Self {
49
+ let srgb_color = Srgb::<T>::from_linear(color);
50
+ Self::from(srgb_color)
51
+ }
52
+ }
53
+
54
+ #[cfg(test)]
55
+ mod tests {
56
+ use super::*;
57
+
58
+ #[test]
59
+ fn from_srgb() {
60
+ const RED: Color = Color::Rgb(255, 0, 0);
61
+ assert_eq!(Color::from(Srgb::new(255u8, 0, 0)), RED);
62
+ assert_eq!(Color::from(Srgb::new(65535u16, 0, 0)), RED);
63
+ assert_eq!(Color::from(Srgb::new(1.0f32, 0.0, 0.0)), RED);
64
+
65
+ assert_eq!(
66
+ Color::from(Srgb::new(0.5f32, 0.5, 0.5)),
67
+ Color::Rgb(128, 128, 128)
68
+ );
69
+ }
70
+
71
+ #[test]
72
+ fn from_lin_srgb() {
73
+ const RED: Color = Color::Rgb(255, 0, 0);
74
+ assert_eq!(Color::from(LinSrgb::new(1.0f32, 0.0, 0.0)), RED);
75
+ assert_eq!(Color::from(LinSrgb::new(1.0f64, 0.0, 0.0)), RED);
76
+
77
+ assert_eq!(
78
+ Color::from(LinSrgb::new(0.5f32, 0.5, 0.5)),
79
+ Color::Rgb(188, 188, 188)
80
+ );
81
+ }
82
+ }