fluid-ui-svelte 0.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.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # create-svelte
2
+
3
+ Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
4
+
5
+ Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging).
6
+
7
+ ## Creating a project
8
+
9
+ If you're seeing this, you've probably already done this step. Congrats!
10
+
11
+ ```bash
12
+ # create a new project in the current directory
13
+ npm create svelte@latest
14
+
15
+ # create a new project in my-app
16
+ npm create svelte@latest my-app
17
+ ```
18
+
19
+ ## Developing
20
+
21
+ Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
22
+
23
+ ```bash
24
+ npm run dev
25
+
26
+ # or start the server and open the app in a new browser tab
27
+ npm run dev -- --open
28
+ ```
29
+
30
+ Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
31
+
32
+ ## Building
33
+
34
+ To build your library:
35
+
36
+ ```bash
37
+ npm run package
38
+ ```
39
+
40
+ To create a production version of your showcase app:
41
+
42
+ ```bash
43
+ npm run build
44
+ ```
45
+
46
+ You can preview the production build with `npm run preview`.
47
+
48
+ > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
49
+
50
+ ## Publishing
51
+
52
+ Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
53
+
54
+ To publish your library to [npm](https://www.npmjs.com):
55
+
56
+ ```bash
57
+ npm publish
58
+ ```
File without changes
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} AccordionProps */
2
+ /** @typedef {typeof __propDef.events} AccordionEvents */
3
+ /** @typedef {typeof __propDef.slots} AccordionSlots */
4
+ export default class Accordion extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type AccordionProps = typeof __propDef.props;
11
+ export type AccordionEvents = typeof __propDef.events;
12
+ export type AccordionSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1,6 @@
1
+ <script>export let buttonProps;
2
+ </script>
3
+
4
+ <button type={buttonProps.buttonType}>
5
+ <slot />
6
+ </button>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { ButtonProps } from './buttonTypes.js';
3
+ declare const __propDef: {
4
+ props: {
5
+ buttonProps: ButtonProps;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ type ButtonProps_ = typeof __propDef.props;
15
+ export { ButtonProps_ as ButtonProps };
16
+ export type ButtonEvents = typeof __propDef.events;
17
+ export type ButtonSlots = typeof __propDef.slots;
18
+ export default class Button extends SvelteComponent<ButtonProps, ButtonEvents, ButtonSlots> {
19
+ }
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export declare const ButtonProps: z.ZodObject<{
3
+ buttonType: z.ZodEnum<["button", "submit", "reset"]>;
4
+ }, "strip", z.ZodTypeAny, {
5
+ buttonType: "button" | "submit" | "reset";
6
+ }, {
7
+ buttonType: "button" | "submit" | "reset";
8
+ }>;
9
+ export type ButtonProps = z.infer<typeof ButtonProps>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ButtonProps = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ButtonProps = zod_1.z.object({ buttonType: zod_1.z.enum(["button", "submit", "reset"]) });
File without changes
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} ContainerProps */
2
+ /** @typedef {typeof __propDef.events} ContainerEvents */
3
+ /** @typedef {typeof __propDef.slots} ContainerSlots */
4
+ export default class Container extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type ContainerProps = typeof __propDef.props;
11
+ export type ContainerEvents = typeof __propDef.events;
12
+ export type ContainerSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
File without changes
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} InputProps */
2
+ /** @typedef {typeof __propDef.events} InputEvents */
3
+ /** @typedef {typeof __propDef.slots} InputSlots */
4
+ export default class Input extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type InputProps = typeof __propDef.props;
11
+ export type InputEvents = typeof __propDef.events;
12
+ export type InputSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1 @@
1
+ <script></script>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} TextProps */
2
+ /** @typedef {typeof __propDef.events} TextEvents */
3
+ /** @typedef {typeof __propDef.slots} TextSlots */
4
+ export default class Text extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type TextProps = typeof __propDef.props;
11
+ export type TextEvents = typeof __propDef.events;
12
+ export type TextSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1,5 @@
1
+ export { default as Button } from "./components/Button/Button.svelte";
2
+ export { default as Accordion } from "./components/Accordion/Accordion.svelte";
3
+ export { default as Container } from "./components/Container/Container.svelte";
4
+ export { default as Input } from "./components/Input/Input.svelte";
5
+ export { default as Text } from "./components/Text/Text.svelte";
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export { default as Button } from './components/Button/Button.svelte';
2
+ export { default as Accordion } from './components/Accordion/Accordion.svelte';
3
+ export { default as Container } from './components/Container/Container.svelte';
4
+ export { default as Input } from './components/Input/Input.svelte';
5
+ export { default as Text } from "./components/Text/Text.svelte";
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "fluid-ui-svelte",
3
+ "version": "0.0.1",
4
+ "description": "Unopinionated UI library for Svelte.",
5
+ "scripts": {
6
+ "dev": "vite dev",
7
+ "build": "vite build && npm run package",
8
+ "preview": "vite preview",
9
+ "package": "svelte-kit sync && svelte-package && publint",
10
+ "prepublishOnly": "npm run package",
11
+ "test": "npm run test:integration && npm run test:unit",
12
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
13
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
14
+ "lint": "prettier --plugin-search-dir . --check . && eslint .",
15
+ "format": "prettier --plugin-search-dir . --write .",
16
+ "test:integration": "playwright test",
17
+ "test:unit": "vitest"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "svelte": "./dist/index.js"
23
+ }
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "!dist/**/*.test.*",
28
+ "!dist/**/*.spec.*"
29
+ ],
30
+ "peerDependencies": {
31
+ "svelte": "^4.0.0"
32
+ },
33
+ "devDependencies": {
34
+ "@playwright/test": "^1.28.1",
35
+ "@sveltejs/adapter-auto": "^2.0.0",
36
+ "@sveltejs/kit": "^1.20.4",
37
+ "@sveltejs/package": "^2.0.0",
38
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
39
+ "@typescript-eslint/parser": "^6.0.0",
40
+ "eslint": "^8.28.0",
41
+ "eslint-config-prettier": "^8.5.0",
42
+ "eslint-plugin-svelte": "^2.30.0",
43
+ "prettier": "^2.8.0",
44
+ "prettier-plugin-svelte": "^2.10.1",
45
+ "publint": "^0.1.9",
46
+ "svelte": "^4.0.5",
47
+ "svelte-check": "^3.4.3",
48
+ "tslib": "^2.4.1",
49
+ "typescript": "^5.0.0",
50
+ "vite": "^4.4.2",
51
+ "vitest": "^0.32.2"
52
+ },
53
+ "svelte": "./dist/index.js",
54
+ "types": "./dist/index.d.ts",
55
+ "type": "module",
56
+ "dependencies": {
57
+ "zod": "^3.22.4"
58
+ }
59
+ }