@m3e/divider 1.0.0-rc.2

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 matraic
4
+ Contact: matraic@yahoo.com
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # @m3e/divider
2
+
3
+ The `m3e-divider` component visually separates content within layouts, lists, or containers using a thin, unobtrusive line. It supports horizontal and vertical orientation, with optional inset variants to align with layout padding and visual hierarchy. The divider thickness, color, and inset behavior are customizable via CSS properties to maintain consistency across surfaces. It is designed to reinforce spatial relationships without drawing attention, preserving focus on primary content.
4
+
5
+ > **This package is part of [M3E](https://github.com/matraic/m3e) monorepo**, a unified suite of Material 3 web components. [Explore the docs](https://matraic.github.io/m3e) to see them in action.
6
+
7
+ ## ๐Ÿ“ฆ Installation
8
+
9
+ ```bash
10
+ npm install @m3e/divider
11
+ ```
12
+
13
+ ## ๐Ÿ’ป Editor Integration
14
+
15
+ This package includes a [Custom Elements Manifest](https://github.com/webcomponents/custom-elements-manifest) to support enhanced editor tooling and developer experience.
16
+
17
+ ### Visual Studio Code
18
+
19
+ To enable autocomplete and hover documentation for `@m3e/divider`, install the [Custom Elements Manifest Language Server](https://marketplace.visualstudio.com/items?itemName=pwrs.cem-language-server-vscode) extension. It will automatically detect the manifest bundled with this package and surface tag names, attributes, slots, and events in supported files.
20
+
21
+ Alternately, you can explicitly reference the `html-custom-data.json` and `css-custom-data.json` in your workspace settings:
22
+
23
+ ```json
24
+ {
25
+ "html.customData": ["./node_modules/@m3e/divider/dist/html-custom-data.json"],
26
+ "css.customData": ["./node_modules/@m3e/divider/dist/css-custom-data.json"]
27
+ }
28
+ ```
29
+
30
+ ## ๐Ÿš€ Browser Usage
31
+
32
+ This package uses [JavaScript Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#module_specifiers). To use it directly in a browser without a bundler, use a module script similar to the following.
33
+
34
+ ```html
35
+ <script type="module" src="/node_modules/@m3e/divider/dist/index.js"></script>
36
+ ```
37
+
38
+ In addition, you must use an [import map](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap) to include dependencies.
39
+
40
+ ```html
41
+ <script type="importmap">
42
+ {
43
+ "imports": {
44
+ "lit": "https://cdn.jsdelivr.net/npm/lit@3.3.0/+esm",
45
+ "@m3e/core": "/node_modules/@m3e/core/dist/index.js"
46
+ }
47
+ }
48
+ </script>
49
+ ```
50
+
51
+ > For production, use index.min.js for faster load times.
52
+
53
+ ## ๐Ÿ—‚๏ธ Elements
54
+
55
+ - `m3e-divider` โ€” A thin line that separates content in lists or other containers.
56
+
57
+ ## ๐Ÿงช Examples
58
+
59
+ The following example illustrates a basic horizontal divider.
60
+
61
+ ```html
62
+ <m3e-divider></m3e-divider>
63
+ ```
64
+
65
+ ## ๐Ÿ“– API Reference
66
+
67
+ This section details the attributes and CSS custom properties available for the `m3e-divider` component.
68
+
69
+ ### โš™๏ธ Attributes
70
+
71
+ | Attribute | Type | Default | Description |
72
+ | ------------- | --------- | ------- | ------------------------------------------------------------------ |
73
+ | `inset` | `boolean` | `false` | Whether the divider is indented with equal padding on both sides. |
74
+ | `inset-start` | `boolean` | `false` | Whether the divider is indented with padding on the leading side. |
75
+ | `inset-end` | `boolean` | `false` | Whether the divider is indented with padding on the trailing side. |
76
+ | `vertical` | `boolean` | `false` | Whether the divider is vertically aligned with adjacent content. |
77
+
78
+ ### ๐ŸŽ›๏ธ CSS Custom Properties
79
+
80
+ | Property | Description |
81
+ | -------------------------------- | -------------------------------------------------------------------- |
82
+ | `--m3e-divider-thickness` | Thickness of the divider line. |
83
+ | `--m3e-divider-color` | Color of the divider line. |
84
+ | `--m3e-divider-inset-size` | Fallback inset size when no specific start or end inset is provided. |
85
+ | `--m3e-divider-inset-start-size` | Leading inset size. |
86
+ | `--m3e-divider-inset-end-size` | Trailing inset size. |
87
+
88
+ ## ๐Ÿค Contributing
89
+
90
+ See the root monorepo `CONTRIBUTING.md` for guidelines on contributing to this package.
91
+
92
+ ## ๐Ÿ“„ License
93
+
94
+ This package is licensed under the MIT License.
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "properties": [
5
+ {
6
+ "name": "--m3e-divider-thickness",
7
+ "description": "Thickness of the divider line.",
8
+ "values": []
9
+ },
10
+ {
11
+ "name": "--m3e-divider-color",
12
+ "description": "Color of the divider line.",
13
+ "values": []
14
+ },
15
+ {
16
+ "name": "--m3e-divider-inset-size",
17
+ "description": "When inset, fallback inset size used when no specific start or end inset is provided.",
18
+ "values": []
19
+ },
20
+ {
21
+ "name": "--m3e-divider-inset-start-size",
22
+ "description": "When inset, leading inset size.",
23
+ "values": []
24
+ },
25
+ {
26
+ "name": "--m3e-divider-inset-end-size",
27
+ "description": "When inset, trailing inset size.",
28
+ "values": []
29
+ }
30
+ ],
31
+ "pseudoElements": []
32
+ }