material 0.9.24 → 0.9.26

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 (127) hide show
  1. package/.editorconfig +36 -0
  2. package/.zed/README.md +64 -0
  3. package/.zed/settings.json +42 -0
  4. package/CONTRIBUTING.md +125 -0
  5. package/bun.lock +615 -0
  6. package/eslint.config.js +63 -0
  7. package/index.d.ts +77 -0
  8. package/package.json +1 -1
  9. package/src/module/extract.js +31 -30
  10. package/src/module/request.js +22 -2
  11. package/src/skin/material/base/body.scss +83 -0
  12. package/src/skin/material/base/{elevation.sass → elevation.scss} +76 -50
  13. package/src/skin/material/base/{grid.sass → grid.scss} +44 -32
  14. package/src/skin/material/base/typo.scss +133 -0
  15. package/src/skin/material/button/action.scss +124 -0
  16. package/src/skin/material/button/button.scss +245 -0
  17. package/src/skin/material/button/file.scss +27 -0
  18. package/src/skin/material/button/floating.scss +160 -0
  19. package/src/skin/material/button/raised.scss +145 -0
  20. package/src/skin/material/button/stroked.scss +102 -0
  21. package/src/skin/material/component/component.scss +11 -0
  22. package/src/skin/material/component/divider.scss +22 -0
  23. package/src/skin/material/component/image.scss +9 -0
  24. package/src/skin/material/component/label.scss +4 -0
  25. package/src/skin/material/component/navigation.scss +15 -0
  26. package/src/skin/material/component/progress.scss +176 -0
  27. package/src/skin/material/component/subheader.scss +5 -0
  28. package/src/skin/material/component/text.scss +101 -0
  29. package/src/skin/material/container/appbar.scss +215 -0
  30. package/src/skin/material/container/banner.scss +44 -0
  31. package/src/skin/material/container/card.scss +23 -0
  32. package/src/skin/material/container/container.scss +2 -0
  33. package/src/skin/material/container/dialog.scss +196 -0
  34. package/src/skin/material/container/drawer.scss +185 -0
  35. package/src/skin/material/container/menu.scss +69 -0
  36. package/src/skin/material/container/snackbar.scss +21 -0
  37. package/src/skin/material/container/tabs.scss +94 -0
  38. package/src/skin/material/container/toolbar.scss +207 -0
  39. package/src/skin/material/control/button.scss +172 -0
  40. package/src/skin/material/control/checkbox.scss +134 -0
  41. package/src/skin/material/control/colorpicker.scss +220 -0
  42. package/src/skin/material/control/menu.scss +25 -0
  43. package/src/skin/material/control/progress.scss +174 -0
  44. package/src/skin/material/control/search.scss +50 -0
  45. package/src/skin/material/control/selecter.scss +152 -0
  46. package/src/skin/material/control/selector.scss +46 -0
  47. package/src/skin/material/control/slider.scss +221 -0
  48. package/src/skin/material/control/snackbar.scss +77 -0
  49. package/src/skin/material/control/switch.scss +349 -0
  50. package/src/skin/material/control/switcher.scss +48 -0
  51. package/src/skin/material/control/textfield.scss +159 -0
  52. package/src/skin/material/control/tooltip.scss +42 -0
  53. package/src/skin/material/layout/layout.scss +92 -0
  54. package/src/skin/material/layout/resizer.scss +97 -0
  55. package/src/skin/material/material.scss +67 -0
  56. package/src/skin/material/module/ripple.scss +11 -0
  57. package/src/skin/material/theme/{default.sass → default.scss} +18 -17
  58. package/src/skin/material/theme/ocean.scss +30 -0
  59. package/src/skin/material/theme/theme.scss +4 -0
  60. package/src/skin/material/view/calendar.scss +219 -0
  61. package/src/skin/material/view/form.scss +21 -0
  62. package/src/skin/material/view/grid.scss +134 -0
  63. package/src/skin/material/view/list.scss +107 -0
  64. package/src/skin/material/view/listview.scss +221 -0
  65. package/src/skin/material/view/map.scss +8 -0
  66. package/src/skin/material/view/page.scss +5 -0
  67. package/src/skin/material/view/tabview-bak.scss +49 -0
  68. package/src/skin/material/view/tabview.scss +65 -0
  69. package/src/skin/material/view/tree.scss +85 -0
  70. package/src/skin/material/view/{view.sass → view.scss} +1 -0
  71. package/src/skin/material/base/body.sass +0 -55
  72. package/src/skin/material/base/typo.sass +0 -107
  73. package/src/skin/material/button/action.sass +0 -89
  74. package/src/skin/material/button/button.sass +0 -183
  75. package/src/skin/material/button/file.sass +0 -24
  76. package/src/skin/material/button/floating.sass +0 -113
  77. package/src/skin/material/button/raised.sass +0 -101
  78. package/src/skin/material/button/stroked.sass +0 -71
  79. package/src/skin/material/component/component.sass +0 -7
  80. package/src/skin/material/component/divider.sass +0 -17
  81. package/src/skin/material/component/image.sass +0 -6
  82. package/src/skin/material/component/label.sass +0 -2
  83. package/src/skin/material/component/navigation.sass +0 -13
  84. package/src/skin/material/component/progress.sass +0 -138
  85. package/src/skin/material/component/subheader.sass +0 -3
  86. package/src/skin/material/component/text.sass +0 -85
  87. package/src/skin/material/container/appbar.sass +0 -167
  88. package/src/skin/material/container/banner.sass +0 -38
  89. package/src/skin/material/container/card.sass +0 -19
  90. package/src/skin/material/container/dialog.sass +0 -172
  91. package/src/skin/material/container/drawer.sass +0 -159
  92. package/src/skin/material/container/menu.sass +0 -58
  93. package/src/skin/material/container/snackbar.sass +0 -18
  94. package/src/skin/material/container/tabs.sass +0 -75
  95. package/src/skin/material/container/toolbar.sass +0 -161
  96. package/src/skin/material/control/button.sass +0 -135
  97. package/src/skin/material/control/checkbox.sass +0 -105
  98. package/src/skin/material/control/colorpicker.sass +0 -188
  99. package/src/skin/material/control/dialog.sass +0 -0
  100. package/src/skin/material/control/menu.sass +0 -18
  101. package/src/skin/material/control/progress.sass +0 -136
  102. package/src/skin/material/control/search.sass +0 -40
  103. package/src/skin/material/control/selecter.sass +0 -131
  104. package/src/skin/material/control/selector.sass +0 -38
  105. package/src/skin/material/control/slider.sass +0 -181
  106. package/src/skin/material/control/snackbar.sass +0 -65
  107. package/src/skin/material/control/switch.sass +0 -284
  108. package/src/skin/material/control/switcher.sass +0 -41
  109. package/src/skin/material/control/textfield.sass +0 -126
  110. package/src/skin/material/control/tooltip.sass +0 -36
  111. package/src/skin/material/layout/layout.sass +0 -69
  112. package/src/skin/material/layout/resizer.sass +0 -69
  113. package/src/skin/material/material.sass +0 -66
  114. package/src/skin/material/module/ripple.sass +0 -9
  115. package/src/skin/material/theme/ocean.sass +0 -29
  116. package/src/skin/material/theme/theme.sass +0 -3
  117. package/src/skin/material/view/calendar.sass +0 -193
  118. package/src/skin/material/view/form.sass +0 -15
  119. package/src/skin/material/view/grid.sass +0 -116
  120. package/src/skin/material/view/list.sass +0 -87
  121. package/src/skin/material/view/listview.sass +0 -195
  122. package/src/skin/material/view/map.sass +0 -6
  123. package/src/skin/material/view/page.sass +0 -4
  124. package/src/skin/material/view/tabview-bak.sass +0 -40
  125. package/src/skin/material/view/tabview.sass +0 -55
  126. package/src/skin/material/view/tree.sass +0 -73
  127. /package/src/skin/material/{container/container.sass → control/dialog.scss} +0 -0
package/.editorconfig ADDED
@@ -0,0 +1,36 @@
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ # Unix-style newlines with a newline ending every file
7
+ [*]
8
+ end_of_line = lf
9
+ insert_final_newline = true
10
+ charset = utf-8
11
+ trim_trailing_whitespace = true
12
+
13
+ # JavaScript files
14
+ [*.js]
15
+ indent_style = space
16
+ indent_size = 2
17
+ quote_type = single
18
+
19
+ # JSON files
20
+ [*.json]
21
+ indent_style = space
22
+ indent_size = 2
23
+
24
+ # YAML files
25
+ [*.{yml,yaml}]
26
+ indent_style = space
27
+ indent_size = 2
28
+
29
+ # Markdown files
30
+ [*.md]
31
+ trim_trailing_whitespace = false
32
+
33
+ # Package files
34
+ [package.json]
35
+ indent_style = space
36
+ indent_size = 2
package/.zed/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # Zed Editor Settings for Material Library
2
+
3
+ This directory contains project-specific settings for the [Zed Editor](https://zed.dev/).
4
+
5
+ ## Features
6
+
7
+ ### Auto-formatting on Save
8
+
9
+ JavaScript files are automatically formatted using **ESLint with Standard JS rules** when you save them.
10
+
11
+ - **Formatter**: ESLint (`eslint --stdin --fix`)
12
+ - **Format on save**: Enabled
13
+ - **Indentation**: 2 spaces (no tabs)
14
+ - **Trailing whitespace**: Removed on save
15
+ - **Final newline**: Ensured on save
16
+
17
+ ### How It Works
18
+
19
+ The `settings.json` configures Zed to:
20
+ 1. Use ESLint as the external formatter
21
+ 2. Apply Standard JS rules via ESLint config
22
+ 3. Format automatically on save
23
+ 4. Enable ESLint LSP for real-time feedback
24
+
25
+ ### Manual Formatting
26
+
27
+ You can also format manually:
28
+ - **Command Palette**: `Format Document`
29
+ - **Keyboard shortcut**: Check Zed's keybindings
30
+
31
+ ### Standard JS Rules
32
+
33
+ The formatter follows [Standard JS](https://standardjs.com/) rules via ESLint:
34
+ - No semicolons
35
+ - Single quotes for strings
36
+ - 2 space indentation
37
+ - Space after function name
38
+ - And more...
39
+
40
+ Project-specific globals are defined in both:
41
+ - `eslint.config.js` - for ESLint/Zed
42
+ - `package.json` under `standard` - for Standard CLI
43
+
44
+ ## Requirements
45
+
46
+ - Zed Editor
47
+ - Node.js or Bun installed
48
+ - ESLint and Standard JS installed (via `bun install`)
49
+
50
+ ## Troubleshooting
51
+
52
+ If formatting doesn't work:
53
+ 1. Ensure dependencies are installed: `bun install`
54
+ 2. Test ESLint manually: `npx eslint src/module/extract.js`
55
+ 3. Test Standard JS manually: `npx standard src/module/extract.js`
56
+ 4. Restart Zed Editor
57
+ 5. Check Zed's output panel for errors
58
+
59
+ ## More Info
60
+
61
+ - [Zed Editor Documentation](https://zed.dev/docs)
62
+ - [ESLint](https://eslint.org/)
63
+ - [Standard JS](https://standardjs.com/)
64
+ - [EditorConfig](https://editorconfig.org/)
@@ -0,0 +1,42 @@
1
+ {
2
+ "languages": {
3
+ "JavaScript": {
4
+ "formatter": {
5
+ "external": {
6
+ "command": "npx",
7
+ "arguments": [
8
+ "eslint",
9
+ "--stdin",
10
+ "--fix",
11
+ "--stdin-filename",
12
+ "{buffer_path}"
13
+ ]
14
+ }
15
+ },
16
+ "code_actions_on_format": {
17
+ "source.fixAll.eslint": true
18
+ },
19
+ "format_on_save": "on",
20
+ "tab_size": 2,
21
+ "hard_tabs": false
22
+ }
23
+ },
24
+ "lsp": {
25
+ "eslint": {
26
+ "settings": {
27
+ "experimental": {
28
+ "useFlatConfig": true
29
+ },
30
+ "validate": "on",
31
+ "run": "onType",
32
+ "format": {
33
+ "enable": true
34
+ }
35
+ }
36
+ }
37
+ },
38
+ "tab_size": 2,
39
+ "hard_tabs": false,
40
+ "remove_trailing_whitespace_on_save": true,
41
+ "ensure_final_newline_on_save": true
42
+ }
@@ -0,0 +1,125 @@
1
+ # Contributing to Material
2
+
3
+ Thank you for your interest in contributing to Material! This document provides guidelines and information about our development workflow.
4
+
5
+ ## Development Setup
6
+
7
+ ### Prerequisites
8
+
9
+ - Node.js >= 16.14.0 or Bun
10
+ - Git
11
+
12
+ ### Installation
13
+
14
+ ```bash
15
+ # Clone the repository
16
+ git clone https://gitlab.com/alkaloid/material.git
17
+ cd material
18
+
19
+ # Install dependencies
20
+ bun install
21
+ # or
22
+ npm install
23
+ ```
24
+
25
+ ## Code Style
26
+
27
+ We use [Standard JS](https://standardjs.com/) style guide with ESLint for code quality and consistency.
28
+
29
+ ### Linting
30
+
31
+ Before submitting a pull request, ensure your code passes linting:
32
+
33
+ ```bash
34
+ # Check for linting errors
35
+ bun run lint
36
+
37
+ # Auto-fix linting errors (when possible)
38
+ bun run lint:fix
39
+ ```
40
+
41
+ We use [Standard JS](https://standardjs.com/) which comes bundled with ESLint and requires no configuration.
42
+
43
+ ### Code Style Rules
44
+
45
+ - **No semicolons** - Standard JS style
46
+ - **2 spaces** for indentation
47
+ - **Single quotes** for strings
48
+ - **Space before function parentheses** - `function foo () {}`
49
+ - **Object spacing** - `{ foo: 'bar' }`
50
+ - **No trailing whitespace**
51
+ - **LF line endings** (Unix style)
52
+ - **Final newline** in all files
53
+
54
+ ### EditorConfig
55
+
56
+ We use `.editorconfig` for consistent code style across different editors. Most modern editors (including Zed, VSCode, Sublime Text) support it automatically.
57
+
58
+ ### Standard JS
59
+
60
+ Standard JS is configured in `package.json` with project-specific globals. It includes ESLint internally, so no separate ESLint config is needed.
61
+
62
+ ## Browser Compatibility
63
+
64
+ Material is designed for modern browsers with ES6+ support:
65
+ - Chrome/Edge (latest)
66
+ - Firefox (latest)
67
+ - Safari (latest)
68
+
69
+ ## Testing
70
+
71
+ ```bash
72
+ # Run tests (when available)
73
+ bun test
74
+ ```
75
+
76
+ ## Project Structure
77
+
78
+ ```
79
+ material/
80
+ ├── src/ # Source files
81
+ │ ├── module/ # Utility modules
82
+ │ ├── mixin/ # Reusable mixins
83
+ │ ├── class/ # Base classes
84
+ │ └── *.js # Component files
85
+ ├── docs/ # Documentation
86
+ ├── packages/ # Additional packages
87
+ └── scripts/ # Build scripts
88
+ ```
89
+
90
+ ## Git Workflow
91
+
92
+ 1. Create a feature branch from `master`
93
+ 2. Make your changes
94
+ 3. Run linting: `bun run lint:fix` (Standard JS will auto-fix most issues)
95
+ 4. Commit with descriptive messages
96
+ 5. Push and create a merge request
97
+
98
+ ### Commit Messages
99
+
100
+ Follow conventional commit format when possible:
101
+ - `feat: add new component`
102
+ - `fix: resolve issue with dialog`
103
+ - `refactor: simplify event handling`
104
+ - `docs: update README`
105
+ - `style: fix linting issues`
106
+
107
+ ## Pull Request Guidelines
108
+
109
+ - Ensure all linting passes
110
+ - Update documentation if needed
111
+ - Keep changes focused and atomic
112
+ - Provide clear description of changes
113
+ - Reference related issues
114
+
115
+ ## Questions?
116
+
117
+ Feel free to open an issue for:
118
+ - Bug reports
119
+ - Feature requests
120
+ - Questions about usage
121
+ - Suggestions for improvement
122
+
123
+ ## License
124
+
125
+ This project is licensed under GPL-3.0. By contributing, you agree that your contributions will be licensed under the same license.