Release v0.1.3 with widget stylesheet and calendar updates#5
Conversation
Release v0.1.2 with TypeScript widgets and new modal features
- Added ols-widgets.css — default OLS dark-theme stylesheet for all four
widgets (ols-lighttime-*, ols-calendar-*, ols-orb-*, ols-arc-*);
copied to dist/widgets/ at build time; exported as
@olsystem/lt-lh/widgets/ols-widgets.css
- Fixed light day calculation in ols-calendar-widget.ts — was showing
total days since epoch (472); now correctly shows day within the
current Light Year via ((totalDays - 1) % 365) + 1 = 106LD
- Updated calendar widget label format from 'Day 106' to '106LD' to
match the OLS Light Calendar convention
- Fixed IIFE build naming in tsup.config.ts — removed .global suffix
from entry keys and added outExtension: () => ({ js: '.global.js' })
so output is widget.global.js instead of widget.global.global.js;
removed duplicate define key
- Added demo.html — standalone preview page for all four widgets using
ESM imports + importmap for zod; includes toggle click menus (LH →
auth / check-in, LD → auth / roots) and large toggle styles
- Updated README for v0.1.3: corrected styling note (CSS now ships),
added New in v0.1.3 section and roadmap for personal development AI
integration into Global ID ethical rating
- Bumped version to 0.1.3 in package.json and package-lock.json
1ba01c0 feat: update README and add default stylesheet; version bump to 0.1.3 703e41d Merge pull request #4 from onelightsystem/dev 8bdd92e Update tsup.config.ts - Added default stylesheet for widgets - Updated calendar widget display format - Fixed light day calculation - Included demo HTML for standalone preview - Adjusted package.json and package-lock.json for version alignment
There was a problem hiding this comment.
Pull request overview
This PR releases v0.1.3 of @olsystem/lt-lh, adding a default widget stylesheet, updating calendar widget day formatting/calculation, providing a standalone demo page, and adjusting the widget build output naming for IIFE bundles.
Changes:
- Ship a default widget stylesheet (
ols-widgets.css) and export it from the package. - Fix calendar widget display to
###LDand compute day-in-cycle modulo 365. - Adjust tsup IIFE output naming to avoid double
.global.global.js, and add a demo page.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tsup.config.ts | Updates widget IIFE bundle naming via outExtension while keeping ESM + IIFE widget builds. |
| src/widgets/ols-widgets.css | Adds baseline dark-theme CSS for all widgets using ols-* class namespace. |
| src/widgets/ols-calendar-widget.ts | Changes calendar widget day display to LD format and uses modulo-365 cycle logic. |
| README.md | Documents new stylesheet, calendar format changes, and adds v0.1.3 notes/roadmap. |
| package.json | Bumps version to 0.1.3, exports the CSS asset, and copies CSS into dist during build. |
| package-lock.json | Updates lockfile contents (but version fields are inconsistent with package.json). |
| demo.html | Adds a standalone demo page that imports dist widgets and the shipped CSS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -43,15 +43,18 @@ export function initCalendarWidget(options?: CalendarWidgetOptions): void { | |||
| const now = new Date(); | |||
| const todayUtcDay = Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()) / 86400000; | |||
There was a problem hiding this comment.
todayUtcDay is computed with Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()), which uses local date components to produce a UTC timestamp. This makes the day calculation timezone-dependent/off-by-one around local midnight for some timezones. If the intent is truly UTC-based day counting, use getUTCFullYear/getUTCMonth/getUTCDate (or rename the variable/logic if local-day behavior is intended).
| const todayUtcDay = Date.UTC(now.getFullYear(), now.getMonth(), now.getDate()) / 86400000; | |
| const todayUtcDay = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()) / 86400000; |
| - Light Day calculation fixed — correctly displays day within the current Light Year (modulo 365) | ||
| - IIFE build naming fixed (no more double `.global.global.js` suffix) | ||
| - Toggle click menus — LH toggle opens auth / check-in, LD toggle opens auth / roots | ||
| - `demo.html` included for standalone preview without a host app |
There was a problem hiding this comment.
README says demo.html is “included for standalone preview”, but package.json only publishes dist, README.md, and LICENSE via the files field, so consumers installing from npm won’t receive demo.html. Either add demo.html to the published files (or provide it under dist) or reword the README to indicate it’s only in the repository.
| - `demo.html` included for standalone preview without a host app | |
| - Repository includes `demo.html` for standalone preview without a host app |
|
@copilot apply changes based on the comments in this thread |
…negative-safe, README corrections Agent-Logs-Url: https://github.com/onelightsystem/LT-LH/sessions/6d088817-c797-4227-8273-750d0582cdd1 Co-authored-by: asvitloaten <33326470+asvitloaten@users.noreply.github.com>
Applied all changes in commit 8cc1113:
|
|
Thank you for the review! |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces several new features and improvements for the OLS Sun Light Time widget package, focusing on enhanced styling, improved calendar logic, and developer experience. The most significant updates include shipping a default CSS stylesheet, correcting the calendar widget's day calculation and display, adding a standalone demo page, and fixing IIFE bundle output naming.
Key changes:
Styling and Theming
ols-widgets.css) is now shipped with the package, providing baseline OLS dark-theme styles for all widgets. This can be imported or linked directly, and all class names use theols-*BEM namespace for easy overrides. [1] [2] [3] [4]Calendar Widget Improvements
106LDformat (e.g.,106LDfor "Light Day 106") instead ofDay 106, and the calculation is fixed to always show the day within the current Light Year (modulo 365), ignoring Gregorian leap years. [1] [2]Developer Experience
demo.htmlpage is included for standalone preview and testing of all widgets without needing a host app. This demo imports the new CSS and demonstrates toggle menus and widget usage. [1] [2]Build System and Distribution
.global.global.jssuffixes, and the build script now copies the CSS file to the distribution folder. [1] [2] [3]Documentation
These changes together make the widgets easier to style, more accurate in their display, and simpler to integrate and test.