Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

permissions:
contents: read # Allow reading the repository content
id-token: write # Required for provenance and JSR authentication
id-token: write # Required for Trusted Publishing, provenance and JSR
container:
image: node:24

Expand Down Expand Up @@ -101,8 +101,6 @@ jobs:
echo "Stable release detected. Publishing to latest tag."
npm publish --provenance
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # fallback if Trusted Publishing is not set up

- name: Publish to JSR
run: |
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

## chuchi 0.1.7

- **Breaking:** cookies default to `Path=/`, remove them with the path they
were set with (`remove(name, { path })`).
- Fixes for cookies, `SsrCache`, scroll restoration, hash links and `//`
paths in the router.

## chuchi-utils 0.1.7

- Fixes for `range`, `searchScore` and `SlotArray.remove`.

## chuchi-core 0.1.6

- Better errors for non-json responses, first JSR release.

## chuchi-legacy 1.1.1

- `inViewY` fix, first JSR release.
2 changes: 1 addition & 1 deletion chuchi-core/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chuchi/core",
"version": "0.1.1",
"version": "0.1.6",
"license": "MIT or Apache-2.0",
"exports": {
"./api/Api": "./src/api/Api.ts",
Expand Down
2 changes: 1 addition & 1 deletion chuchi-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chuchi-core",
"version": "0.1.5",
"version": "0.1.6",
"author": "Sören Meier <info@soerenmeier.ch>",
"type": "module",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions chuchi-legacy/jsr.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "@chuchi/legacy",
"version": "1.0.2",
"version": "1.1.1",
"license": "MIT or Apache-2.0",
"exports": {
"./time/Date": "./src/time/Date.ts",
"./time/DateTime": "./src/time/DateTime.ts",
"./time/DateTimeRange": "./src/time/DateTimeRange.ts",
"./time/Duration": "./src/time/Duration.ts",
"./time/localization": "./src/time/localization.ts"
"./time/localization": "./src/time/localization.ts",
"./dom/Context2d": "./src/dom/Context2d.ts",
"./dom/utils": "./src/dom/utils.ts"
}
}
2 changes: 1 addition & 1 deletion chuchi-legacy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chuchi-legacy",
"version": "1.1.0",
"version": "1.1.1",
"author": "Sören Meier <info@soerenmeier.ch>",
"type": "module",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions chuchi-legacy/src/dom/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// create element
export function c(el: any, attrs: Record<string, any> = {}) {
export function c(el: any, attrs: Record<string, any> = {}): any {
el = document.createElement(el);
Object.entries(attrs).forEach(([key, val]) => {
switch (key) {
Expand Down Expand Up @@ -30,7 +30,7 @@ export class CustomEl {
}

// append child
export function a(to: Element, ...els: any[]) {
export function a(to: Element, ...els: any[]): Element {
els.forEach(el => {
if (!el) return;

Expand Down Expand Up @@ -64,13 +64,13 @@ export function ct(to: Element, className: string, cond: boolean = null) {
}

// returns { x, y }
export function offset(el: Element) {
export function offset(el: Element): { x: number; y: number } {
const { left, top } = el.getBoundingClientRect();
return { x: left, y: top };
}

// left right is ignored
export function inViewY(el: Element) {
export function inViewY(el: Element): boolean {
const wHeight = window.innerHeight;
const { top, bottom } = el.getBoundingClientRect();

Expand All @@ -79,12 +79,12 @@ export function inViewY(el: Element) {
}

// name --my-var
export function cssVar(name: string, el: Element = null) {
export function cssVar(name: string, el: Element = null): string {
if (!el) el = document.documentElement;
return getComputedStyle(el).getPropertyValue(name);
}

export function fontSize(el: Element = null) {
export function fontSize(el: Element = null): number {
if (!el) el = document.documentElement;
return parseFloat(getComputedStyle(el).fontSize);
}
2 changes: 1 addition & 1 deletion chuchi-utils/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chuchi/utils",
"version": "0.1.6",
"version": "0.1.7",
"license": "MIT or Apache-2.0",
"exports": {
".": "./src/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion chuchi-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chuchi-utils",
"version": "0.1.6",
"version": "0.1.7",
"author": "Sören Meier <info@soerenmeier.ch>",
"type": "module",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions chuchi/jsr.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "@chuchi/chuchi",
"version": "0.1.6",
"version": "0.1.7",
"license": "MIT or Apache-2.0",
"exports": {
".": "./src/index.ts",
"./ssr": "./src/ssr/index.ts",
"./stores": "./src/stores/index.ts"
"./stores": "./src/stores/index.ts",
"./api": "./src/api.ts",
"./cookies": "./src/cookies/index.ts"
}
}
2 changes: 1 addition & 1 deletion chuchi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chuchi",
"version": "0.1.6",
"version": "0.1.7",
"author": "Sören Meier <info@soerenmeier.ch>",
"type": "module",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading