qstd 0.1.6 → 0.2.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/CHANGELOG.md +24 -4
- package/dist/client/index.cjs +24 -1
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +24 -2
- package/dist/{random-DMErOOdk.d.cts → log-DPBPow2d.d.cts} +14 -1
- package/dist/{random-DMErOOdk.d.ts → log-DPBPow2d.d.ts} +14 -1
- package/dist/preset/index.cjs +10 -3
- package/dist/preset/index.js +10 -3
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/server/index.cjs +23 -0
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +23 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.1] - 2025-11-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added `Log` utility module with logging functions
|
|
15
|
+
- `log()` - Pretty print values with JSON.stringify
|
|
16
|
+
- `info()` - Log with [info] prefix
|
|
17
|
+
- `warn()` - Log with [warn] prefix
|
|
18
|
+
- `error()` - Log with [error] prefix
|
|
19
|
+
- Available in both `qstd/client` and `qstd/server`
|
|
20
|
+
|
|
21
|
+
## [0.2.0] - 2025-11-22
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Enhanced `center` utility to support directional centering
|
|
26
|
+
- `center` - centers both axes (placeContent + placeItems)
|
|
27
|
+
- `center="x"` - centers horizontally (justifyContent)
|
|
28
|
+
- `center="y"` - centers vertically (alignItems)
|
|
29
|
+
- Added `prepare:local` convenience script for local testing workflow
|
|
30
|
+
- Updated DEVELOPMENT.md with local testing workflow using playground symbolic link
|
|
31
|
+
|
|
32
|
+
## [0.1.6] - Previous
|
|
33
|
+
|
|
10
34
|
### Added
|
|
11
35
|
|
|
12
36
|
- Initial package structure
|
|
@@ -17,7 +41,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
41
|
- Panda CSS preset placeholder
|
|
18
42
|
- Block component placeholder
|
|
19
43
|
|
|
20
|
-
## [0.1.0] - TBD
|
|
21
|
-
|
|
22
|
-
Initial beta release (to be published)
|
|
23
|
-
|
package/dist/client/index.cjs
CHANGED
|
@@ -516,6 +516,28 @@ var hexColor = () => {
|
|
|
516
516
|
return hex;
|
|
517
517
|
};
|
|
518
518
|
|
|
519
|
+
// src/shared/log.ts
|
|
520
|
+
var log_exports = {};
|
|
521
|
+
__export(log_exports, {
|
|
522
|
+
error: () => error,
|
|
523
|
+
info: () => info,
|
|
524
|
+
log: () => log,
|
|
525
|
+
warn: () => warn
|
|
526
|
+
});
|
|
527
|
+
var stringify = (value) => JSON.stringify(value, null, 2);
|
|
528
|
+
var log = (...values) => {
|
|
529
|
+
console.log(...values.map(stringify));
|
|
530
|
+
};
|
|
531
|
+
var info = (...values) => {
|
|
532
|
+
console.log("[info]", ...values.map(stringify));
|
|
533
|
+
};
|
|
534
|
+
var warn = (...values) => {
|
|
535
|
+
console.log("[warn]", ...values.map(stringify));
|
|
536
|
+
};
|
|
537
|
+
var error = (...values) => {
|
|
538
|
+
console.log("[error]", ...values.map(stringify));
|
|
539
|
+
};
|
|
540
|
+
|
|
519
541
|
// src/client/dom.ts
|
|
520
542
|
var dom_exports = {};
|
|
521
543
|
__export(dom_exports, {
|
|
@@ -560,7 +582,7 @@ var scrollIntoView = (el, options) => {
|
|
|
560
582
|
var copy = async (text) => {
|
|
561
583
|
try {
|
|
562
584
|
await navigator.clipboard.writeText(text);
|
|
563
|
-
} catch (
|
|
585
|
+
} catch (error2) {
|
|
564
586
|
const textArea = document.createElement("textarea");
|
|
565
587
|
textArea.value = text;
|
|
566
588
|
textArea.style.position = "fixed";
|
|
@@ -581,6 +603,7 @@ exports.Dom = dom_exports;
|
|
|
581
603
|
exports.Flow = flow_exports;
|
|
582
604
|
exports.Int = int_exports;
|
|
583
605
|
exports.List = list_exports;
|
|
606
|
+
exports.Log = log_exports;
|
|
584
607
|
exports.Money = money_exports;
|
|
585
608
|
exports.Random = random_exports;
|
|
586
609
|
exports.Str = str_exports;
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Dict, f as Flow, i as Int, l as List, m as Money, r as Random, s as Str, t as Time } from '../
|
|
1
|
+
export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-DPBPow2d.cjs';
|
|
2
2
|
import 'date-fns';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Dict, f as Flow, i as Int, l as List, m as Money, r as Random, s as Str, t as Time } from '../
|
|
1
|
+
export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-DPBPow2d.js';
|
|
2
2
|
import 'date-fns';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/client/index.js
CHANGED
|
@@ -514,6 +514,28 @@ var hexColor = () => {
|
|
|
514
514
|
return hex;
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
+
// src/shared/log.ts
|
|
518
|
+
var log_exports = {};
|
|
519
|
+
__export(log_exports, {
|
|
520
|
+
error: () => error,
|
|
521
|
+
info: () => info,
|
|
522
|
+
log: () => log,
|
|
523
|
+
warn: () => warn
|
|
524
|
+
});
|
|
525
|
+
var stringify = (value) => JSON.stringify(value, null, 2);
|
|
526
|
+
var log = (...values) => {
|
|
527
|
+
console.log(...values.map(stringify));
|
|
528
|
+
};
|
|
529
|
+
var info = (...values) => {
|
|
530
|
+
console.log("[info]", ...values.map(stringify));
|
|
531
|
+
};
|
|
532
|
+
var warn = (...values) => {
|
|
533
|
+
console.log("[warn]", ...values.map(stringify));
|
|
534
|
+
};
|
|
535
|
+
var error = (...values) => {
|
|
536
|
+
console.log("[error]", ...values.map(stringify));
|
|
537
|
+
};
|
|
538
|
+
|
|
517
539
|
// src/client/dom.ts
|
|
518
540
|
var dom_exports = {};
|
|
519
541
|
__export(dom_exports, {
|
|
@@ -558,7 +580,7 @@ var scrollIntoView = (el, options) => {
|
|
|
558
580
|
var copy = async (text) => {
|
|
559
581
|
try {
|
|
560
582
|
await navigator.clipboard.writeText(text);
|
|
561
|
-
} catch (
|
|
583
|
+
} catch (error2) {
|
|
562
584
|
const textArea = document.createElement("textarea");
|
|
563
585
|
textArea.value = text;
|
|
564
586
|
textArea.style.position = "fixed";
|
|
@@ -574,4 +596,4 @@ var copy = async (text) => {
|
|
|
574
596
|
}
|
|
575
597
|
};
|
|
576
598
|
|
|
577
|
-
export { dict_exports as Dict, dom_exports as Dom, flow_exports as Flow, int_exports as Int, list_exports as List, money_exports as Money, random_exports as Random, str_exports as Str, time_exports as Time };
|
|
599
|
+
export { dict_exports as Dict, dom_exports as Dom, flow_exports as Flow, int_exports as Int, list_exports as List, log_exports as Log, money_exports as Money, random_exports as Random, str_exports as Str, time_exports as Time };
|
|
@@ -444,4 +444,17 @@ declare namespace random {
|
|
|
444
444
|
export { random_coinFlip as coinFlip, random_date as date, random_hexColor as hexColor, random_item as item, random_num as num, random_shuffle as shuffle };
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
|
|
447
|
+
declare const log: (...values: unknown[]) => void;
|
|
448
|
+
declare const info: (...values: unknown[]) => void;
|
|
449
|
+
declare const warn: (...values: unknown[]) => void;
|
|
450
|
+
declare const error: (...values: unknown[]) => void;
|
|
451
|
+
|
|
452
|
+
declare const log$1_error: typeof error;
|
|
453
|
+
declare const log$1_info: typeof info;
|
|
454
|
+
declare const log$1_log: typeof log;
|
|
455
|
+
declare const log$1_warn: typeof warn;
|
|
456
|
+
declare namespace log$1 {
|
|
457
|
+
export { log$1_error as error, log$1_info as info, log$1_log as log, log$1_warn as warn };
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export { log$1 as a, dict as d, flow as f, int as i, list as l, money as m, random as r, str as s, time as t };
|
|
@@ -444,4 +444,17 @@ declare namespace random {
|
|
|
444
444
|
export { random_coinFlip as coinFlip, random_date as date, random_hexColor as hexColor, random_item as item, random_num as num, random_shuffle as shuffle };
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
|
|
447
|
+
declare const log: (...values: unknown[]) => void;
|
|
448
|
+
declare const info: (...values: unknown[]) => void;
|
|
449
|
+
declare const warn: (...values: unknown[]) => void;
|
|
450
|
+
declare const error: (...values: unknown[]) => void;
|
|
451
|
+
|
|
452
|
+
declare const log$1_error: typeof error;
|
|
453
|
+
declare const log$1_info: typeof info;
|
|
454
|
+
declare const log$1_log: typeof log;
|
|
455
|
+
declare const log$1_warn: typeof warn;
|
|
456
|
+
declare namespace log$1 {
|
|
457
|
+
export { log$1_error as error, log$1_info as info, log$1_log as log, log$1_warn as warn };
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export { log$1 as a, dict as d, flow as f, int as i, list as l, money as m, random as r, str as s, time as t };
|
package/dist/preset/index.cjs
CHANGED
|
@@ -146,9 +146,16 @@ var preset = {
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
center: {
|
|
149
|
-
values: { type: "boolean" },
|
|
150
|
-
transform() {
|
|
151
|
-
|
|
149
|
+
values: { type: "boolean | 'x' | 'y'" },
|
|
150
|
+
transform(value) {
|
|
151
|
+
if (value === "x") {
|
|
152
|
+
return { justifyContent: "center" };
|
|
153
|
+
}
|
|
154
|
+
if (value === "y") {
|
|
155
|
+
return { alignItems: "center" };
|
|
156
|
+
} else {
|
|
157
|
+
return { placeContent: "center", placeItems: "center" };
|
|
158
|
+
}
|
|
152
159
|
}
|
|
153
160
|
},
|
|
154
161
|
relative: {
|
package/dist/preset/index.js
CHANGED
|
@@ -144,9 +144,16 @@ var preset = {
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
center: {
|
|
147
|
-
values: { type: "boolean" },
|
|
148
|
-
transform() {
|
|
149
|
-
|
|
147
|
+
values: { type: "boolean | 'x' | 'y'" },
|
|
148
|
+
transform(value) {
|
|
149
|
+
if (value === "x") {
|
|
150
|
+
return { justifyContent: "center" };
|
|
151
|
+
}
|
|
152
|
+
if (value === "y") {
|
|
153
|
+
return { alignItems: "center" };
|
|
154
|
+
} else {
|
|
155
|
+
return { placeContent: "center", placeItems: "center" };
|
|
156
|
+
}
|
|
150
157
|
}
|
|
151
158
|
},
|
|
152
159
|
relative: {
|
package/dist/react/index.d.cts
CHANGED
|
@@ -12109,7 +12109,7 @@ interface UtilityValues {
|
|
|
12109
12109
|
debug: boolean;
|
|
12110
12110
|
containerName: CssProperties["containerName"];
|
|
12111
12111
|
grid: boolean;
|
|
12112
|
-
center: boolean;
|
|
12112
|
+
center: boolean | 'x' | 'y';
|
|
12113
12113
|
relative: boolean;
|
|
12114
12114
|
absolute: boolean;
|
|
12115
12115
|
fixed: boolean;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -12109,7 +12109,7 @@ interface UtilityValues {
|
|
|
12109
12109
|
debug: boolean;
|
|
12110
12110
|
containerName: CssProperties["containerName"];
|
|
12111
12111
|
grid: boolean;
|
|
12112
|
-
center: boolean;
|
|
12112
|
+
center: boolean | 'x' | 'y';
|
|
12113
12113
|
relative: boolean;
|
|
12114
12114
|
absolute: boolean;
|
|
12115
12115
|
fixed: boolean;
|
package/dist/server/index.cjs
CHANGED
|
@@ -521,6 +521,28 @@ var hexColor = () => {
|
|
|
521
521
|
return hex;
|
|
522
522
|
};
|
|
523
523
|
|
|
524
|
+
// src/shared/log.ts
|
|
525
|
+
var log_exports = {};
|
|
526
|
+
__export(log_exports, {
|
|
527
|
+
error: () => error,
|
|
528
|
+
info: () => info,
|
|
529
|
+
log: () => log,
|
|
530
|
+
warn: () => warn
|
|
531
|
+
});
|
|
532
|
+
var stringify = (value) => JSON.stringify(value, null, 2);
|
|
533
|
+
var log = (...values) => {
|
|
534
|
+
console.log(...values.map(stringify));
|
|
535
|
+
};
|
|
536
|
+
var info = (...values) => {
|
|
537
|
+
console.log("[info]", ...values.map(stringify));
|
|
538
|
+
};
|
|
539
|
+
var warn = (...values) => {
|
|
540
|
+
console.log("[warn]", ...values.map(stringify));
|
|
541
|
+
};
|
|
542
|
+
var error = (...values) => {
|
|
543
|
+
console.log("[error]", ...values.map(stringify));
|
|
544
|
+
};
|
|
545
|
+
|
|
524
546
|
// src/server/file.ts
|
|
525
547
|
var file_exports = {};
|
|
526
548
|
__export(file_exports, {
|
|
@@ -535,6 +557,7 @@ exports.File = file_exports;
|
|
|
535
557
|
exports.Flow = flow_exports;
|
|
536
558
|
exports.Int = int_exports;
|
|
537
559
|
exports.List = list_exports;
|
|
560
|
+
exports.Log = log_exports;
|
|
538
561
|
exports.Money = money_exports;
|
|
539
562
|
exports.Random = random_exports;
|
|
540
563
|
exports.Str = str_exports;
|
package/dist/server/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Dict, f as Flow, i as Int, l as List, m as Money, r as Random, s as Str, t as Time } from '../
|
|
1
|
+
export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-DPBPow2d.cjs';
|
|
2
2
|
import 'date-fns';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as Dict, f as Flow, i as Int, l as List, m as Money, r as Random, s as Str, t as Time } from '../
|
|
1
|
+
export { d as Dict, f as Flow, i as Int, l as List, a as Log, m as Money, r as Random, s as Str, t as Time } from '../log-DPBPow2d.js';
|
|
2
2
|
import 'date-fns';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/server/index.js
CHANGED
|
@@ -515,6 +515,28 @@ var hexColor = () => {
|
|
|
515
515
|
return hex;
|
|
516
516
|
};
|
|
517
517
|
|
|
518
|
+
// src/shared/log.ts
|
|
519
|
+
var log_exports = {};
|
|
520
|
+
__export(log_exports, {
|
|
521
|
+
error: () => error,
|
|
522
|
+
info: () => info,
|
|
523
|
+
log: () => log,
|
|
524
|
+
warn: () => warn
|
|
525
|
+
});
|
|
526
|
+
var stringify = (value) => JSON.stringify(value, null, 2);
|
|
527
|
+
var log = (...values) => {
|
|
528
|
+
console.log(...values.map(stringify));
|
|
529
|
+
};
|
|
530
|
+
var info = (...values) => {
|
|
531
|
+
console.log("[info]", ...values.map(stringify));
|
|
532
|
+
};
|
|
533
|
+
var warn = (...values) => {
|
|
534
|
+
console.log("[warn]", ...values.map(stringify));
|
|
535
|
+
};
|
|
536
|
+
var error = (...values) => {
|
|
537
|
+
console.log("[error]", ...values.map(stringify));
|
|
538
|
+
};
|
|
539
|
+
|
|
518
540
|
// src/server/file.ts
|
|
519
541
|
var file_exports = {};
|
|
520
542
|
__export(file_exports, {
|
|
@@ -524,4 +546,4 @@ var readFile = (filePath, encoding = "utf-8") => {
|
|
|
524
546
|
return fs.readFileSync(filePath, encoding);
|
|
525
547
|
};
|
|
526
548
|
|
|
527
|
-
export { dict_exports as Dict, file_exports as File, flow_exports as Flow, int_exports as Int, list_exports as List, money_exports as Money, random_exports as Random, str_exports as Str, time_exports as Time };
|
|
549
|
+
export { dict_exports as Dict, file_exports as File, flow_exports as Flow, int_exports as Int, list_exports as List, log_exports as Log, money_exports as Money, random_exports as Random, str_exports as Str, time_exports as Time };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qstd",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Standard Block component and utilities library with Panda CSS",
|
|
5
5
|
"author": "malin1",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,21 +41,6 @@
|
|
|
41
41
|
"sideEffects": [
|
|
42
42
|
"dist/react/index.css"
|
|
43
43
|
],
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "panda codegen && panda cssgen && tsup && node scripts/inject-css-import.js",
|
|
46
|
-
"dev": "tsup --watch",
|
|
47
|
-
"prepublishOnly": "pnpm build",
|
|
48
|
-
"test": "vitest run",
|
|
49
|
-
"test:watch": "vitest",
|
|
50
|
-
"test:all": "pnpx tsx tests/test-all.ts",
|
|
51
|
-
"test:block": "node tests/test-block.tsx",
|
|
52
|
-
"test:playground": "node tests/playground-e2e.mjs",
|
|
53
|
-
"typecheck": "tsc --noEmit",
|
|
54
|
-
"typecheck:perf": "tsc --noEmit --extendedDiagnostics",
|
|
55
|
-
"typecheck:trace": "tsc --noEmit --generateTrace ./performance/ts-trace",
|
|
56
|
-
"analyze:tsserver": "bash performance/analyze-tsserver.sh",
|
|
57
|
-
"lint": "eslint src --ext ts,tsx"
|
|
58
|
-
},
|
|
59
44
|
"peerDependencies": {
|
|
60
45
|
"react": "^18.0.0 || ^19.0.0",
|
|
61
46
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -108,5 +93,20 @@
|
|
|
108
93
|
"bugs": {
|
|
109
94
|
"url": "https://github.com/55cancri/qstd/issues"
|
|
110
95
|
},
|
|
111
|
-
"homepage": "https://github.com/55cancri/qstd#readme"
|
|
112
|
-
|
|
96
|
+
"homepage": "https://github.com/55cancri/qstd#readme",
|
|
97
|
+
"scripts": {
|
|
98
|
+
"build": "panda codegen && panda cssgen && tsup && node scripts/inject-css-import.js",
|
|
99
|
+
"dev": "tsup --watch",
|
|
100
|
+
"prepare:local": "pnpm build && cd playground && pnpm prepare",
|
|
101
|
+
"test": "vitest run",
|
|
102
|
+
"test:watch": "vitest",
|
|
103
|
+
"test:all": "pnpx tsx tests/test-all.ts",
|
|
104
|
+
"test:block": "node tests/test-block.tsx",
|
|
105
|
+
"test:playground": "node tests/playground-e2e.mjs",
|
|
106
|
+
"typecheck": "tsc --noEmit",
|
|
107
|
+
"typecheck:perf": "tsc --noEmit --extendedDiagnostics",
|
|
108
|
+
"typecheck:trace": "tsc --noEmit --generateTrace ./performance/ts-trace",
|
|
109
|
+
"analyze:tsserver": "bash performance/analyze-tsserver.sh",
|
|
110
|
+
"lint": "eslint src --ext ts,tsx"
|
|
111
|
+
}
|
|
112
|
+
}
|