@pindoba/astro-topbar 0.0.0-alpha-20241003230712

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/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Astro Starter Kit: Component Package
2
+
3
+ This is a template for an Astro component library. Use this template for writing components to use in multiple projects or publish to NPM.
4
+
5
+ ```sh
6
+ npm create astro@latest -- --template component
7
+ ```
8
+
9
+ [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/non-html-pages)
10
+ [![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/non-html-pages)
11
+ [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/component/devcontainer.json)
12
+
13
+ ## 🚀 Project Structure
14
+
15
+ Inside of your Astro project, you'll see the following folders and files:
16
+
17
+ ```text
18
+ /
19
+ ├── index.ts
20
+ ├── src
21
+ │ └── MyComponent.astro
22
+ ├── tsconfig.json
23
+ ├── package.json
24
+ ```
25
+
26
+ The `index.ts` file is the "entry point" for your package. Export your components in `index.ts` to make them importable from your package.
27
+
28
+ ## 🧞 Commands
29
+
30
+ All commands are run from the root of the project, from a terminal:
31
+
32
+ | Command | Action |
33
+ | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
+ | `npm link` | Registers this package locally. Run `npm link my-component-library` in an Astro project to install your components |
35
+ | `npm publish` | [Publishes](https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages#publishing-unscoped-public-packages) this package to NPM. Requires you to be [logged in](https://docs.npmjs.com/cli/v8/commands/npm-adduser) |
package/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ // Do not write code directly here, instead use the `src` folder!
2
+ // Then, use this file to export everything you want your user to access.
3
+
4
+ import Topbar from "./src/Topbar.astro";
5
+
6
+ export default Topbar;
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@pindoba/astro-topbar",
3
+ "version": "0.0.0-alpha-20241003230712",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": "./index.ts"
7
+ },
8
+ "files": [
9
+ "src",
10
+ "index.ts"
11
+ ],
12
+ "keywords": [
13
+ "astro-component"
14
+ ],
15
+ "devDependencies": {
16
+ "astro": "^4.15.11"
17
+ },
18
+ "peerDependencies": {
19
+ "astro": "^4.0.0"
20
+ },
21
+ "dependencies": {
22
+ "@astrojs/check": "^0.9.3",
23
+ "typescript": "^5.6.2",
24
+ "@pindoba/styles": "0.0.0-alpha-20241003230712",
25
+ "@pindoba/panda": "0.0.0-alpha-20241003230712"
26
+ },
27
+ "scripts": {
28
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
29
+ }
30
+ }
@@ -0,0 +1,15 @@
1
+ ---
2
+ import { topbarStyles } from "@pindoba/styles/blocks/topbar";
3
+
4
+ const classes = topbarStyles({});
5
+ ---
6
+
7
+ <div class={classes.root}>
8
+ <div class={classes.container}>
9
+ <slot name="logo" />
10
+ <div class={classes.right}>
11
+ <slot name="menu" />
12
+ <slot name="misc" />
13
+ </div>
14
+ </div>
15
+ </div>