@swiftwc/ui 0.0.0-dev.0

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.
@@ -0,0 +1,2 @@
1
+ import { Snapshot } from "../internal/snapshot";
2
+ export { Snapshot };
@@ -0,0 +1,8 @@
1
+ import { kebabCase } from "../internal/utils";
2
+ console.log(kebabCase(`Hello client!`));
3
+ import { Snapshot } from "../internal/snapshot";
4
+ console.log(77, Snapshot);
5
+ console.log(88, Snapshot.count);
6
+ Snapshot.getSnapshot();
7
+ console.log(99, Snapshot);
8
+ export { Snapshot };
@@ -0,0 +1 @@
1
+ export * from "./v-keyboard";
@@ -0,0 +1,6 @@
1
+ /*
2
+ * This is a barrel export file for all components and their related types.
3
+ *
4
+ * 🟢 You can import this file directly.
5
+ */
6
+ export * from "./v-keyboard";
@@ -0,0 +1,2 @@
1
+ export declare class VKeyboard extends HTMLElement {
2
+ }
@@ -0,0 +1,2 @@
1
+ export class VKeyboard extends HTMLElement {
2
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import packageJson from "../package.json";
3
+ console.log(`Hello world! ${packageJson.version}`);
@@ -0,0 +1,5 @@
1
+ export declare class Snapshot {
2
+ #private;
3
+ static get count(): number;
4
+ static getSnapshot(): void;
5
+ }
@@ -0,0 +1,23 @@
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
+ };
6
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
7
+ if (kind === "m") throw new TypeError("Private method is not writable");
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
10
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11
+ };
12
+ var _a, _Snapshot_count;
13
+ export class Snapshot {
14
+ static get count() {
15
+ return __classPrivateFieldGet(this, _a, "f", _Snapshot_count);
16
+ }
17
+ static getSnapshot() {
18
+ var _b;
19
+ __classPrivateFieldSet(this, _a, (_b = __classPrivateFieldGet(this, _a, "f", _Snapshot_count), _b++, _b), "f", _Snapshot_count);
20
+ }
21
+ }
22
+ _a = Snapshot;
23
+ _Snapshot_count = { value: 0 };
@@ -0,0 +1 @@
1
+ export { default as kebabCase } from "./kebab-case";
@@ -0,0 +1 @@
1
+ export { default as kebabCase } from "./kebab-case";
@@ -0,0 +1 @@
1
+ export default function (str: String): string;
@@ -0,0 +1,11 @@
1
+ export default function (str) {
2
+ return (str
3
+ // Replace uppercase letters with - + lowercase
4
+ .replace(/([A-Z])/g, "-$1")
5
+ // Replace spaces and underscores with -
6
+ .replace(/[\s_]+/g, "-")
7
+ // Convert to lowercase
8
+ .toLowerCase()
9
+ // Remove leading/trailing dashes
10
+ .replace(/^-+|-+$/g, ""));
11
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@swiftwc/ui",
3
+ "version": "0.0.0-dev.0",
4
+ "description": "Elegant SwiftUI-inspired web components for ambitious web apps and web extensions.",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "license": "MIT",
9
+ "author": {
10
+ "name": "The SwiftWC/UI Authors",
11
+ "url": "https://github.com/swiftwc/ui/graphs/contributors"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/swiftwc/ui.git",
16
+ "directory": "packages/ui"
17
+ },
18
+ "files": [
19
+ "generated",
20
+ "scss"
21
+ ],
22
+ "keywords": [
23
+ "components",
24
+ "ui",
25
+ "tailwind",
26
+ "swift"
27
+ ],
28
+ "type": "module",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./generated/index.d.ts",
32
+ "default": "./generated/index.js"
33
+ },
34
+ "./components": {
35
+ "types": "./generated/components/index.d.ts",
36
+ "default": "./generated/components/index.js"
37
+ },
38
+ "./client": {
39
+ "types": "./generated/client/index.d.ts",
40
+ "default": "./generated/client/index.js"
41
+ }
42
+ },
43
+ "bin": {
44
+ "swiftwc": "./generated/index.js"
45
+ },
46
+ "scripts": {
47
+ "prebuild": "rm -rf generated",
48
+ "build": "tsc"
49
+ }
50
+ }
@@ -0,0 +1 @@
1
+ @debug "Hello world!";