tosijs-ui 1.17.1 → 1.17.3
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 +74 -0
- package/bin/make-icon-data.js +167 -1
- package/dist/affix.d.ts +6 -0
- package/dist/affix.js +19 -0
- package/dist/babylon-3d.js +3 -2
- package/dist/carousel.js +4 -3
- package/dist/data-table.js +8 -5
- package/dist/doc-system/site/dev-server.js +8 -3
- package/dist/doc-system/site/generate-site.d.ts +4 -0
- package/dist/doc-system/site/generate-site.js +119 -5
- package/dist/doc-system/site/orchestrator.js +1 -0
- package/dist/editable-rect.js +12 -8
- package/dist/filter-builder.js +6 -4
- package/dist/header.js +10 -6
- package/dist/icon-core.d.ts +46 -0
- package/dist/icon-core.js +511 -0
- package/dist/icon-rules.js +1 -1
- package/dist/icon-store.d.ts +10 -0
- package/dist/icon-store.js +44 -0
- package/dist/icon-svg.js +5 -1
- package/dist/icon-types.d.ts +2 -0
- package/dist/icons/activity.d.ts +1 -0
- package/dist/icons/activity.js +4 -0
- package/dist/icons/airplay.d.ts +1 -0
- package/dist/icons/airplay.js +4 -0
- package/dist/icons/alertCircle.d.ts +1 -0
- package/dist/icons/alertCircle.js +4 -0
- package/dist/icons/alertOctagon.d.ts +1 -0
- package/dist/icons/alertOctagon.js +4 -0
- package/dist/icons/alertTriangle.d.ts +1 -0
- package/dist/icons/alertTriangle.js +4 -0
- package/dist/icons/alignCenter.d.ts +1 -0
- package/dist/icons/alignCenter.js +4 -0
- package/dist/icons/alignJustify.d.ts +1 -0
- package/dist/icons/alignJustify.js +4 -0
- package/dist/icons/alignLeft.d.ts +1 -0
- package/dist/icons/alignLeft.js +4 -0
- package/dist/icons/alignRight.d.ts +1 -0
- package/dist/icons/alignRight.js +4 -0
- package/dist/icons/anchor.d.ts +1 -0
- package/dist/icons/anchor.js +4 -0
- package/dist/icons/aperture.d.ts +1 -0
- package/dist/icons/aperture.js +4 -0
- package/dist/icons/archive.d.ts +1 -0
- package/dist/icons/archive.js +4 -0
- package/dist/icons/arrowDown.d.ts +2 -0
- package/dist/icons/arrowDown.js +5 -0
- package/dist/icons/arrowDownCircle.d.ts +2 -0
- package/dist/icons/arrowDownCircle.js +5 -0
- package/dist/icons/arrowDownLeft.d.ts +2 -0
- package/dist/icons/arrowDownLeft.js +5 -0
- package/dist/icons/arrowDownRight.d.ts +2 -0
- package/dist/icons/arrowDownRight.js +5 -0
- package/dist/icons/arrowLeft.d.ts +2 -0
- package/dist/icons/arrowLeft.js +5 -0
- package/dist/icons/arrowLeftCircle.d.ts +2 -0
- package/dist/icons/arrowLeftCircle.js +5 -0
- package/dist/icons/arrowRight.d.ts +1 -0
- package/dist/icons/arrowRight.js +4 -0
- package/dist/icons/arrowRightCircle.d.ts +1 -0
- package/dist/icons/arrowRightCircle.js +4 -0
- package/dist/icons/arrowUp.d.ts +2 -0
- package/dist/icons/arrowUp.js +5 -0
- package/dist/icons/arrowUpCircle.d.ts +2 -0
- package/dist/icons/arrowUpCircle.js +5 -0
- package/dist/icons/arrowUpLeft.d.ts +2 -0
- package/dist/icons/arrowUpLeft.js +5 -0
- package/dist/icons/arrowUpRight.d.ts +1 -0
- package/dist/icons/arrowUpRight.js +4 -0
- package/dist/icons/atSign.d.ts +1 -0
- package/dist/icons/atSign.js +4 -0
- package/dist/icons/award.d.ts +1 -0
- package/dist/icons/award.js +4 -0
- package/dist/icons/barChart.d.ts +1 -0
- package/dist/icons/barChart.js +4 -0
- package/dist/icons/barChart2.d.ts +1 -0
- package/dist/icons/barChart2.js +4 -0
- package/dist/icons/battery.d.ts +1 -0
- package/dist/icons/battery.js +4 -0
- package/dist/icons/batteryCharging.d.ts +1 -0
- package/dist/icons/batteryCharging.js +4 -0
- package/dist/icons/bell.d.ts +1 -0
- package/dist/icons/bell.js +4 -0
- package/dist/icons/bellOff.d.ts +1 -0
- package/dist/icons/bellOff.js +4 -0
- package/dist/icons/blog.d.ts +1 -0
- package/dist/icons/blog.js +4 -0
- package/dist/icons/blueprint.d.ts +1 -0
- package/dist/icons/blueprint.js +4 -0
- package/dist/icons/bluetooth.d.ts +1 -0
- package/dist/icons/bluetooth.js +4 -0
- package/dist/icons/bold.d.ts +1 -0
- package/dist/icons/bold.js +4 -0
- package/dist/icons/book.d.ts +1 -0
- package/dist/icons/book.js +4 -0
- package/dist/icons/bookOpen.d.ts +1 -0
- package/dist/icons/bookOpen.js +4 -0
- package/dist/icons/bookmark.d.ts +1 -0
- package/dist/icons/bookmark.js +4 -0
- package/dist/icons/box.d.ts +1 -0
- package/dist/icons/box.js +4 -0
- package/dist/icons/briefcase.d.ts +1 -0
- package/dist/icons/briefcase.js +4 -0
- package/dist/icons/bug.d.ts +1 -0
- package/dist/icons/bug.js +4 -0
- package/dist/icons/calendar.d.ts +1 -0
- package/dist/icons/calendar.js +4 -0
- package/dist/icons/camera.d.ts +1 -0
- package/dist/icons/camera.js +4 -0
- package/dist/icons/cameraOff.d.ts +1 -0
- package/dist/icons/cameraOff.js +4 -0
- package/dist/icons/cast.d.ts +1 -0
- package/dist/icons/cast.js +4 -0
- package/dist/icons/check.d.ts +1 -0
- package/dist/icons/check.js +4 -0
- package/dist/icons/checkCircle.d.ts +1 -0
- package/dist/icons/checkCircle.js +4 -0
- package/dist/icons/checkSquare.d.ts +1 -0
- package/dist/icons/checkSquare.js +4 -0
- package/dist/icons/chevronDown.d.ts +2 -0
- package/dist/icons/chevronDown.js +5 -0
- package/dist/icons/chevronLeft.d.ts +2 -0
- package/dist/icons/chevronLeft.js +5 -0
- package/dist/icons/chevronRight.d.ts +1 -0
- package/dist/icons/chevronRight.js +4 -0
- package/dist/icons/chevronUp.d.ts +2 -0
- package/dist/icons/chevronUp.js +5 -0
- package/dist/icons/chevronsDown.d.ts +2 -0
- package/dist/icons/chevronsDown.js +5 -0
- package/dist/icons/chevronsLeft.d.ts +2 -0
- package/dist/icons/chevronsLeft.js +5 -0
- package/dist/icons/chevronsRight.d.ts +1 -0
- package/dist/icons/chevronsRight.js +4 -0
- package/dist/icons/chevronsUp.d.ts +2 -0
- package/dist/icons/chevronsUp.js +5 -0
- package/dist/icons/chrome.d.ts +1 -0
- package/dist/icons/chrome.js +4 -0
- package/dist/icons/circle.d.ts +1 -0
- package/dist/icons/circle.js +4 -0
- package/dist/icons/clipboard.d.ts +1 -0
- package/dist/icons/clipboard.js +4 -0
- package/dist/icons/clock.d.ts +1 -0
- package/dist/icons/clock.js +4 -0
- package/dist/icons/cloud.d.ts +1 -0
- package/dist/icons/cloud.js +4 -0
- package/dist/icons/cloudDrizzle.d.ts +1 -0
- package/dist/icons/cloudDrizzle.js +4 -0
- package/dist/icons/cloudLightning.d.ts +1 -0
- package/dist/icons/cloudLightning.js +4 -0
- package/dist/icons/cloudOff.d.ts +1 -0
- package/dist/icons/cloudOff.js +4 -0
- package/dist/icons/cloudRain.d.ts +1 -0
- package/dist/icons/cloudRain.js +4 -0
- package/dist/icons/cloudSnow.d.ts +1 -0
- package/dist/icons/cloudSnow.js +4 -0
- package/dist/icons/cmy.d.ts +1 -0
- package/dist/icons/cmy.js +4 -0
- package/dist/icons/code.d.ts +1 -0
- package/dist/icons/code.js +4 -0
- package/dist/icons/codepen.d.ts +1 -0
- package/dist/icons/codepen.js +4 -0
- package/dist/icons/codesandbox.d.ts +1 -0
- package/dist/icons/codesandbox.js +4 -0
- package/dist/icons/coffee.d.ts +1 -0
- package/dist/icons/coffee.js +4 -0
- package/dist/icons/columns.d.ts +1 -0
- package/dist/icons/columns.js +4 -0
- package/dist/icons/command.d.ts +1 -0
- package/dist/icons/command.js +4 -0
- package/dist/icons/compass.d.ts +1 -0
- package/dist/icons/compass.js +4 -0
- package/dist/icons/copy.d.ts +1 -0
- package/dist/icons/copy.js +4 -0
- package/dist/icons/cornerDownLeft.d.ts +2 -0
- package/dist/icons/cornerDownLeft.js +5 -0
- package/dist/icons/cornerDownRight.d.ts +1 -0
- package/dist/icons/cornerDownRight.js +4 -0
- package/dist/icons/cornerLeftDown.d.ts +2 -0
- package/dist/icons/cornerLeftDown.js +5 -0
- package/dist/icons/cornerLeftUp.d.ts +2 -0
- package/dist/icons/cornerLeftUp.js +5 -0
- package/dist/icons/cornerRightDown.d.ts +1 -0
- package/dist/icons/cornerRightDown.js +4 -0
- package/dist/icons/cornerRightUp.d.ts +1 -0
- package/dist/icons/cornerRightUp.js +4 -0
- package/dist/icons/cornerUpLeft.d.ts +2 -0
- package/dist/icons/cornerUpLeft.js +5 -0
- package/dist/icons/cornerUpRight.d.ts +1 -0
- package/dist/icons/cornerUpRight.js +4 -0
- package/dist/icons/cpu.d.ts +1 -0
- package/dist/icons/cpu.js +4 -0
- package/dist/icons/creditCard.d.ts +1 -0
- package/dist/icons/creditCard.js +4 -0
- package/dist/icons/crop.d.ts +1 -0
- package/dist/icons/crop.js +4 -0
- package/dist/icons/crosshair.d.ts +1 -0
- package/dist/icons/crosshair.js +4 -0
- package/dist/icons/data/arrowDown.d.ts +1 -1
- package/dist/icons/data/arrowDown.js +1 -1
- package/dist/icons/data/arrowDownCircle.d.ts +1 -1
- package/dist/icons/data/arrowDownCircle.js +1 -1
- package/dist/icons/data/arrowDownLeft.d.ts +1 -1
- package/dist/icons/data/arrowDownLeft.js +1 -1
- package/dist/icons/data/arrowDownRight.d.ts +1 -1
- package/dist/icons/data/arrowDownRight.js +1 -1
- package/dist/icons/data/arrowLeft.d.ts +1 -1
- package/dist/icons/data/arrowLeft.js +1 -1
- package/dist/icons/data/arrowLeftCircle.d.ts +1 -1
- package/dist/icons/data/arrowLeftCircle.js +1 -1
- package/dist/icons/data/arrowUp.d.ts +1 -1
- package/dist/icons/data/arrowUp.js +1 -1
- package/dist/icons/data/arrowUpCircle.d.ts +1 -1
- package/dist/icons/data/arrowUpCircle.js +1 -1
- package/dist/icons/data/arrowUpLeft.d.ts +1 -1
- package/dist/icons/data/arrowUpLeft.js +1 -1
- package/dist/icons/data/blog.d.ts +1 -1
- package/dist/icons/data/blog.js +1 -1
- package/dist/icons/data/blueprint.d.ts +1 -1
- package/dist/icons/data/blueprint.js +1 -1
- package/dist/icons/data/bug.d.ts +1 -1
- package/dist/icons/data/bug.js +1 -1
- package/dist/icons/data/chevronDown.d.ts +1 -1
- package/dist/icons/data/chevronDown.js +1 -1
- package/dist/icons/data/chevronLeft.d.ts +1 -1
- package/dist/icons/data/chevronLeft.js +1 -1
- package/dist/icons/data/chevronUp.d.ts +1 -1
- package/dist/icons/data/chevronUp.js +1 -1
- package/dist/icons/data/chevronsDown.d.ts +1 -1
- package/dist/icons/data/chevronsDown.js +1 -1
- package/dist/icons/data/chevronsLeft.d.ts +1 -1
- package/dist/icons/data/chevronsLeft.js +1 -1
- package/dist/icons/data/chevronsUp.d.ts +1 -1
- package/dist/icons/data/chevronsUp.js +1 -1
- package/dist/icons/data/cmy.d.ts +1 -1
- package/dist/icons/data/cmy.js +1 -1
- package/dist/icons/data/cornerDownLeft.d.ts +1 -1
- package/dist/icons/data/cornerDownLeft.js +1 -1
- package/dist/icons/data/cornerLeftDown.d.ts +1 -1
- package/dist/icons/data/cornerLeftDown.js +1 -1
- package/dist/icons/data/cornerLeftUp.d.ts +1 -1
- package/dist/icons/data/cornerLeftUp.js +1 -1
- package/dist/icons/data/cornerUpLeft.d.ts +1 -1
- package/dist/icons/data/cornerUpLeft.js +1 -1
- package/dist/icons/data/delete.js +1 -1
- package/dist/icons/data/discord.d.ts +1 -1
- package/dist/icons/data/discord.js +1 -1
- package/dist/icons/data/earth.d.ts +1 -1
- package/dist/icons/data/earth.js +1 -1
- package/dist/icons/data/facebook.d.ts +1 -1
- package/dist/icons/data/facebook.js +1 -1
- package/dist/icons/data/fatArrowDown.d.ts +1 -0
- package/dist/icons/data/fatArrowDown.js +1 -0
- package/dist/icons/data/fatArrowLeft.d.ts +1 -0
- package/dist/icons/data/fatArrowLeft.js +1 -0
- package/dist/icons/data/fatArrowRight.d.ts +1 -0
- package/dist/icons/data/fatArrowRight.js +1 -0
- package/dist/icons/data/fatArrowUp.d.ts +1 -0
- package/dist/icons/data/fatArrowUp.js +1 -0
- package/dist/icons/data/fontBold.d.ts +1 -1
- package/dist/icons/data/fontBold.js +1 -1
- package/dist/icons/data/fontItalic.d.ts +1 -1
- package/dist/icons/data/fontItalic.js +1 -1
- package/dist/icons/data/fontUnderline.d.ts +1 -1
- package/dist/icons/data/fontUnderline.js +1 -1
- package/dist/icons/data/game.d.ts +1 -1
- package/dist/icons/data/game.js +1 -1
- package/dist/icons/data/google.d.ts +1 -1
- package/dist/icons/data/google.js +1 -1
- package/dist/icons/data/indent.d.ts +1 -1
- package/dist/icons/data/indent.js +1 -1
- package/dist/icons/data/index.d.ts +644 -313
- package/dist/icons/data/index.js +643 -313
- package/dist/icons/data/info.d.ts +1 -1
- package/dist/icons/data/info.js +1 -1
- package/dist/icons/data/listBullet.d.ts +1 -1
- package/dist/icons/data/listBullet.js +1 -1
- package/dist/icons/data/listNumber.d.ts +1 -1
- package/dist/icons/data/listNumber.js +1 -1
- package/dist/icons/data/lock.d.ts +1 -1
- package/dist/icons/data/lock.js +1 -1
- package/dist/icons/data/npm.d.ts +1 -1
- package/dist/icons/data/npm.js +1 -1
- package/dist/icons/data/outdent.d.ts +1 -1
- package/dist/icons/data/outdent.js +1 -1
- package/dist/icons/data/package.js +1 -1
- package/dist/icons/data/pin.d.ts +1 -0
- package/dist/icons/data/pin.js +1 -0
- package/dist/icons/data/refreshCcw.d.ts +1 -1
- package/dist/icons/data/refreshCcw.js +1 -1
- package/dist/icons/data/rgb.d.ts +1 -1
- package/dist/icons/data/rgb.js +1 -1
- package/dist/icons/data/rotateCcw.d.ts +1 -1
- package/dist/icons/data/rotateCcw.js +1 -1
- package/dist/icons/data/settings.d.ts +1 -1
- package/dist/icons/data/settings.js +1 -1
- package/dist/icons/data/shift.d.ts +1 -0
- package/dist/icons/data/shift.js +1 -0
- package/dist/icons/data/skipBack.d.ts +1 -1
- package/dist/icons/data/skipBack.js +1 -1
- package/dist/icons/data/tab.d.ts +1 -0
- package/dist/icons/data/tab.js +1 -0
- package/dist/icons/data/thumbsDown.d.ts +1 -1
- package/dist/icons/data/thumbsDown.js +1 -1
- package/dist/icons/data/toggleLeft.d.ts +1 -1
- package/dist/icons/data/toggleLeft.js +1 -1
- package/dist/icons/data/tosi.d.ts +1 -1
- package/dist/icons/data/tosi.js +1 -1
- package/dist/icons/data/tosiFavicon.d.ts +1 -1
- package/dist/icons/data/tosiFavicon.js +1 -1
- package/dist/icons/data/tosiPlatform.d.ts +1 -1
- package/dist/icons/data/tosiPlatform.js +1 -1
- package/dist/icons/data/tosiUi.d.ts +1 -1
- package/dist/icons/data/tosiUi.js +1 -1
- package/dist/icons/data/tosiXr.d.ts +1 -1
- package/dist/icons/data/tosiXr.js +1 -1
- package/dist/icons/data/xrColor.d.ts +1 -1
- package/dist/icons/data/xrColor.js +1 -1
- package/dist/icons/data/youtube.d.ts +1 -1
- package/dist/icons/data/youtube.js +1 -1
- package/dist/icons/database.d.ts +1 -0
- package/dist/icons/database.js +4 -0
- package/dist/icons/delete.d.ts +1 -0
- package/dist/icons/delete.js +4 -0
- package/dist/icons/disc.d.ts +1 -0
- package/dist/icons/disc.js +4 -0
- package/dist/icons/discord.d.ts +1 -0
- package/dist/icons/discord.js +4 -0
- package/dist/icons/divide.d.ts +1 -0
- package/dist/icons/divide.js +4 -0
- package/dist/icons/divideCircle.d.ts +1 -0
- package/dist/icons/divideCircle.js +4 -0
- package/dist/icons/divideSquare.d.ts +1 -0
- package/dist/icons/divideSquare.js +4 -0
- package/dist/icons/dollarSign.d.ts +1 -0
- package/dist/icons/dollarSign.js +4 -0
- package/dist/icons/download.d.ts +1 -0
- package/dist/icons/download.js +4 -0
- package/dist/icons/downloadCloud.d.ts +1 -0
- package/dist/icons/downloadCloud.js +4 -0
- package/dist/icons/dribbble.d.ts +1 -0
- package/dist/icons/dribbble.js +4 -0
- package/dist/icons/droplet.d.ts +1 -0
- package/dist/icons/droplet.js +4 -0
- package/dist/icons/earth.d.ts +1 -0
- package/dist/icons/earth.js +4 -0
- package/dist/icons/edit.d.ts +1 -0
- package/dist/icons/edit.js +4 -0
- package/dist/icons/edit2.d.ts +1 -0
- package/dist/icons/edit2.js +4 -0
- package/dist/icons/edit3.d.ts +1 -0
- package/dist/icons/edit3.js +4 -0
- package/dist/icons/externalLink.d.ts +1 -0
- package/dist/icons/externalLink.js +4 -0
- package/dist/icons/eye.d.ts +1 -0
- package/dist/icons/eye.js +4 -0
- package/dist/icons/eyeOff.d.ts +1 -0
- package/dist/icons/eyeOff.js +4 -0
- package/dist/icons/facebook.d.ts +1 -0
- package/dist/icons/facebook.js +4 -0
- package/dist/icons/fastForward.d.ts +1 -0
- package/dist/icons/fastForward.js +4 -0
- package/dist/icons/fatArrowDown.d.ts +2 -0
- package/dist/icons/fatArrowDown.js +5 -0
- package/dist/icons/fatArrowLeft.d.ts +2 -0
- package/dist/icons/fatArrowLeft.js +5 -0
- package/dist/icons/fatArrowRight.d.ts +2 -0
- package/dist/icons/fatArrowRight.js +5 -0
- package/dist/icons/fatArrowUp.d.ts +2 -0
- package/dist/icons/fatArrowUp.js +5 -0
- package/dist/icons/feather.d.ts +1 -0
- package/dist/icons/feather.js +4 -0
- package/dist/icons/figma.d.ts +1 -0
- package/dist/icons/figma.js +4 -0
- package/dist/icons/file.d.ts +1 -0
- package/dist/icons/file.js +4 -0
- package/dist/icons/fileMinus.d.ts +1 -0
- package/dist/icons/fileMinus.js +4 -0
- package/dist/icons/filePlus.d.ts +1 -0
- package/dist/icons/filePlus.js +4 -0
- package/dist/icons/fileText.d.ts +1 -0
- package/dist/icons/fileText.js +4 -0
- package/dist/icons/film.d.ts +1 -0
- package/dist/icons/film.js +4 -0
- package/dist/icons/filter.d.ts +1 -0
- package/dist/icons/filter.js +4 -0
- package/dist/icons/flag.d.ts +1 -0
- package/dist/icons/flag.js +4 -0
- package/dist/icons/folder.d.ts +1 -0
- package/dist/icons/folder.js +4 -0
- package/dist/icons/folderMinus.d.ts +1 -0
- package/dist/icons/folderMinus.js +4 -0
- package/dist/icons/folderPlus.d.ts +1 -0
- package/dist/icons/folderPlus.js +4 -0
- package/dist/icons/fontBold.d.ts +1 -0
- package/dist/icons/fontBold.js +4 -0
- package/dist/icons/fontItalic.d.ts +1 -0
- package/dist/icons/fontItalic.js +4 -0
- package/dist/icons/fontUnderline.d.ts +1 -0
- package/dist/icons/fontUnderline.js +4 -0
- package/dist/icons/framer.d.ts +1 -0
- package/dist/icons/framer.js +4 -0
- package/dist/icons/frown.d.ts +1 -0
- package/dist/icons/frown.js +4 -0
- package/dist/icons/game.d.ts +1 -0
- package/dist/icons/game.js +4 -0
- package/dist/icons/gift.d.ts +1 -0
- package/dist/icons/gift.js +4 -0
- package/dist/icons/gitBranch.d.ts +1 -0
- package/dist/icons/gitBranch.js +4 -0
- package/dist/icons/gitCommit.d.ts +1 -0
- package/dist/icons/gitCommit.js +4 -0
- package/dist/icons/gitMerge.d.ts +1 -0
- package/dist/icons/gitMerge.js +4 -0
- package/dist/icons/gitPullRequest.d.ts +1 -0
- package/dist/icons/gitPullRequest.js +4 -0
- package/dist/icons/github.d.ts +1 -0
- package/dist/icons/github.js +4 -0
- package/dist/icons/gitlab.d.ts +1 -0
- package/dist/icons/gitlab.js +4 -0
- package/dist/icons/globe.d.ts +1 -0
- package/dist/icons/globe.js +4 -0
- package/dist/icons/google.d.ts +1 -0
- package/dist/icons/google.js +4 -0
- package/dist/icons/grid.d.ts +1 -0
- package/dist/icons/grid.js +4 -0
- package/dist/icons/hardDrive.d.ts +1 -0
- package/dist/icons/hardDrive.js +4 -0
- package/dist/icons/hash.d.ts +1 -0
- package/dist/icons/hash.js +4 -0
- package/dist/icons/headphones.d.ts +1 -0
- package/dist/icons/headphones.js +4 -0
- package/dist/icons/heart.d.ts +1 -0
- package/dist/icons/heart.js +4 -0
- package/dist/icons/helpCircle.d.ts +1 -0
- package/dist/icons/helpCircle.js +4 -0
- package/dist/icons/hexagon.d.ts +1 -0
- package/dist/icons/hexagon.js +4 -0
- package/dist/icons/home.d.ts +1 -0
- package/dist/icons/home.js +4 -0
- package/dist/icons/image.d.ts +1 -0
- package/dist/icons/image.js +4 -0
- package/dist/icons/inbox.d.ts +1 -0
- package/dist/icons/inbox.js +4 -0
- package/dist/icons/indent.d.ts +1 -0
- package/dist/icons/indent.js +4 -0
- package/dist/icons/info.d.ts +1 -0
- package/dist/icons/info.js +4 -0
- package/dist/icons/instagram.d.ts +1 -0
- package/dist/icons/instagram.js +4 -0
- package/dist/icons/italic.d.ts +1 -0
- package/dist/icons/italic.js +4 -0
- package/dist/icons/key.d.ts +1 -0
- package/dist/icons/key.js +4 -0
- package/dist/icons/layers.d.ts +1 -0
- package/dist/icons/layers.js +4 -0
- package/dist/icons/layout.d.ts +1 -0
- package/dist/icons/layout.js +4 -0
- package/dist/icons/lifeBuoy.d.ts +1 -0
- package/dist/icons/lifeBuoy.js +4 -0
- package/dist/icons/link.d.ts +1 -0
- package/dist/icons/link.js +4 -0
- package/dist/icons/link2.d.ts +1 -0
- package/dist/icons/link2.js +4 -0
- package/dist/icons/linkedin.d.ts +1 -0
- package/dist/icons/linkedin.js +4 -0
- package/dist/icons/list.d.ts +1 -0
- package/dist/icons/list.js +4 -0
- package/dist/icons/listBullet.d.ts +1 -0
- package/dist/icons/listBullet.js +4 -0
- package/dist/icons/listNumber.d.ts +1 -0
- package/dist/icons/listNumber.js +4 -0
- package/dist/icons/loader.d.ts +1 -0
- package/dist/icons/loader.js +4 -0
- package/dist/icons/lock.d.ts +1 -0
- package/dist/icons/lock.js +4 -0
- package/dist/icons/logIn.d.ts +1 -0
- package/dist/icons/logIn.js +4 -0
- package/dist/icons/logOut.d.ts +1 -0
- package/dist/icons/logOut.js +4 -0
- package/dist/icons/mail.d.ts +1 -0
- package/dist/icons/mail.js +4 -0
- package/dist/icons/map.d.ts +1 -0
- package/dist/icons/map.js +4 -0
- package/dist/icons/mapPin.d.ts +1 -0
- package/dist/icons/mapPin.js +4 -0
- package/dist/icons/maximize.d.ts +1 -0
- package/dist/icons/maximize.js +4 -0
- package/dist/icons/maximize2.d.ts +1 -0
- package/dist/icons/maximize2.js +4 -0
- package/dist/icons/meh.d.ts +1 -0
- package/dist/icons/meh.js +4 -0
- package/dist/icons/menu.d.ts +1 -0
- package/dist/icons/menu.js +4 -0
- package/dist/icons/messageCircle.d.ts +1 -0
- package/dist/icons/messageCircle.js +4 -0
- package/dist/icons/messageSquare.d.ts +1 -0
- package/dist/icons/messageSquare.js +4 -0
- package/dist/icons/mic.d.ts +1 -0
- package/dist/icons/mic.js +4 -0
- package/dist/icons/micOff.d.ts +1 -0
- package/dist/icons/micOff.js +4 -0
- package/dist/icons/minimize.d.ts +1 -0
- package/dist/icons/minimize.js +4 -0
- package/dist/icons/minimize2.d.ts +1 -0
- package/dist/icons/minimize2.js +4 -0
- package/dist/icons/minus.d.ts +1 -0
- package/dist/icons/minus.js +4 -0
- package/dist/icons/minusCircle.d.ts +1 -0
- package/dist/icons/minusCircle.js +4 -0
- package/dist/icons/minusSquare.d.ts +1 -0
- package/dist/icons/minusSquare.js +4 -0
- package/dist/icons/monitor.d.ts +1 -0
- package/dist/icons/monitor.js +4 -0
- package/dist/icons/moon.d.ts +1 -0
- package/dist/icons/moon.js +4 -0
- package/dist/icons/moreHorizontal.d.ts +1 -0
- package/dist/icons/moreHorizontal.js +4 -0
- package/dist/icons/moreVertical.d.ts +1 -0
- package/dist/icons/moreVertical.js +4 -0
- package/dist/icons/mousePointer.d.ts +1 -0
- package/dist/icons/mousePointer.js +4 -0
- package/dist/icons/move.d.ts +1 -0
- package/dist/icons/move.js +4 -0
- package/dist/icons/music.d.ts +1 -0
- package/dist/icons/music.js +4 -0
- package/dist/icons/navigation.d.ts +1 -0
- package/dist/icons/navigation.js +4 -0
- package/dist/icons/navigation2.d.ts +1 -0
- package/dist/icons/navigation2.js +4 -0
- package/dist/icons/npm.d.ts +1 -0
- package/dist/icons/npm.js +4 -0
- package/dist/icons/octagon.d.ts +1 -0
- package/dist/icons/octagon.js +4 -0
- package/dist/icons/outdent.d.ts +1 -0
- package/dist/icons/outdent.js +4 -0
- package/dist/icons/package.d.ts +1 -0
- package/dist/icons/package.js +4 -0
- package/dist/icons/paperclip.d.ts +1 -0
- package/dist/icons/paperclip.js +4 -0
- package/dist/icons/pause.d.ts +1 -0
- package/dist/icons/pause.js +4 -0
- package/dist/icons/pauseCircle.d.ts +1 -0
- package/dist/icons/pauseCircle.js +4 -0
- package/dist/icons/penTool.d.ts +1 -0
- package/dist/icons/penTool.js +4 -0
- package/dist/icons/percent.d.ts +1 -0
- package/dist/icons/percent.js +4 -0
- package/dist/icons/phone.d.ts +1 -0
- package/dist/icons/phone.js +4 -0
- package/dist/icons/phoneCall.d.ts +1 -0
- package/dist/icons/phoneCall.js +4 -0
- package/dist/icons/phoneForwarded.d.ts +1 -0
- package/dist/icons/phoneForwarded.js +4 -0
- package/dist/icons/phoneIncoming.d.ts +1 -0
- package/dist/icons/phoneIncoming.js +4 -0
- package/dist/icons/phoneMissed.d.ts +1 -0
- package/dist/icons/phoneMissed.js +4 -0
- package/dist/icons/phoneOff.d.ts +1 -0
- package/dist/icons/phoneOff.js +4 -0
- package/dist/icons/phoneOutgoing.d.ts +1 -0
- package/dist/icons/phoneOutgoing.js +4 -0
- package/dist/icons/pieChart.d.ts +1 -0
- package/dist/icons/pieChart.js +4 -0
- package/dist/icons/pin.d.ts +1 -0
- package/dist/icons/pin.js +4 -0
- package/dist/icons/play.d.ts +1 -0
- package/dist/icons/play.js +4 -0
- package/dist/icons/playCircle.d.ts +1 -0
- package/dist/icons/playCircle.js +4 -0
- package/dist/icons/plus.d.ts +1 -0
- package/dist/icons/plus.js +4 -0
- package/dist/icons/plusCircle.d.ts +1 -0
- package/dist/icons/plusCircle.js +4 -0
- package/dist/icons/plusSquare.d.ts +1 -0
- package/dist/icons/plusSquare.js +4 -0
- package/dist/icons/pocket.d.ts +1 -0
- package/dist/icons/pocket.js +4 -0
- package/dist/icons/power.d.ts +1 -0
- package/dist/icons/power.js +4 -0
- package/dist/icons/printer.d.ts +1 -0
- package/dist/icons/printer.js +4 -0
- package/dist/icons/radio.d.ts +1 -0
- package/dist/icons/radio.js +4 -0
- package/dist/icons/refreshCcw.d.ts +2 -0
- package/dist/icons/refreshCcw.js +5 -0
- package/dist/icons/refreshCw.d.ts +1 -0
- package/dist/icons/refreshCw.js +4 -0
- package/dist/icons/repeat.d.ts +1 -0
- package/dist/icons/repeat.js +4 -0
- package/dist/icons/resize.d.ts +1 -0
- package/dist/icons/resize.js +4 -0
- package/dist/icons/rewind.d.ts +1 -0
- package/dist/icons/rewind.js +4 -0
- package/dist/icons/rgb.d.ts +1 -0
- package/dist/icons/rgb.js +4 -0
- package/dist/icons/rotateCcw.d.ts +2 -0
- package/dist/icons/rotateCcw.js +5 -0
- package/dist/icons/rotateCw.d.ts +1 -0
- package/dist/icons/rotateCw.js +4 -0
- package/dist/icons/rss.d.ts +1 -0
- package/dist/icons/rss.js +4 -0
- package/dist/icons/save.d.ts +1 -0
- package/dist/icons/save.js +4 -0
- package/dist/icons/scissors.d.ts +1 -0
- package/dist/icons/scissors.js +4 -0
- package/dist/icons/search.d.ts +1 -0
- package/dist/icons/search.js +4 -0
- package/dist/icons/send.d.ts +1 -0
- package/dist/icons/send.js +4 -0
- package/dist/icons/server.d.ts +1 -0
- package/dist/icons/server.js +4 -0
- package/dist/icons/settings.d.ts +1 -0
- package/dist/icons/settings.js +4 -0
- package/dist/icons/share.d.ts +1 -0
- package/dist/icons/share.js +4 -0
- package/dist/icons/share2.d.ts +1 -0
- package/dist/icons/share2.js +4 -0
- package/dist/icons/shield.d.ts +1 -0
- package/dist/icons/shield.js +4 -0
- package/dist/icons/shieldOff.d.ts +1 -0
- package/dist/icons/shieldOff.js +4 -0
- package/dist/icons/shift.d.ts +1 -0
- package/dist/icons/shift.js +4 -0
- package/dist/icons/shoppingBag.d.ts +1 -0
- package/dist/icons/shoppingBag.js +4 -0
- package/dist/icons/shoppingCart.d.ts +1 -0
- package/dist/icons/shoppingCart.js +4 -0
- package/dist/icons/shuffle.d.ts +1 -0
- package/dist/icons/shuffle.js +4 -0
- package/dist/icons/sidebar.d.ts +1 -0
- package/dist/icons/sidebar.js +4 -0
- package/dist/icons/skipBack.d.ts +2 -0
- package/dist/icons/skipBack.js +5 -0
- package/dist/icons/skipForward.d.ts +1 -0
- package/dist/icons/skipForward.js +4 -0
- package/dist/icons/slack.d.ts +1 -0
- package/dist/icons/slack.js +4 -0
- package/dist/icons/slash.d.ts +1 -0
- package/dist/icons/slash.js +4 -0
- package/dist/icons/sliders.d.ts +1 -0
- package/dist/icons/sliders.js +4 -0
- package/dist/icons/smartphone.d.ts +1 -0
- package/dist/icons/smartphone.js +4 -0
- package/dist/icons/smile.d.ts +1 -0
- package/dist/icons/smile.js +4 -0
- package/dist/icons/sortAscending.d.ts +1 -0
- package/dist/icons/sortAscending.js +4 -0
- package/dist/icons/sortDescending.d.ts +1 -0
- package/dist/icons/sortDescending.js +4 -0
- package/dist/icons/speaker.d.ts +1 -0
- package/dist/icons/speaker.js +4 -0
- package/dist/icons/square.d.ts +1 -0
- package/dist/icons/square.js +4 -0
- package/dist/icons/star.d.ts +1 -0
- package/dist/icons/star.js +4 -0
- package/dist/icons/stopCircle.d.ts +1 -0
- package/dist/icons/stopCircle.js +4 -0
- package/dist/icons/sun.d.ts +1 -0
- package/dist/icons/sun.js +4 -0
- package/dist/icons/sunrise.d.ts +1 -0
- package/dist/icons/sunrise.js +4 -0
- package/dist/icons/sunset.d.ts +1 -0
- package/dist/icons/sunset.js +4 -0
- package/dist/icons/tab.d.ts +1 -0
- package/dist/icons/tab.js +4 -0
- package/dist/icons/table.d.ts +1 -0
- package/dist/icons/table.js +4 -0
- package/dist/icons/tablet.d.ts +1 -0
- package/dist/icons/tablet.js +4 -0
- package/dist/icons/tag.d.ts +1 -0
- package/dist/icons/tag.js +4 -0
- package/dist/icons/target.d.ts +1 -0
- package/dist/icons/target.js +4 -0
- package/dist/icons/terminal.d.ts +1 -0
- package/dist/icons/terminal.js +4 -0
- package/dist/icons/thermometer.d.ts +1 -0
- package/dist/icons/thermometer.js +4 -0
- package/dist/icons/thumbsDown.d.ts +2 -0
- package/dist/icons/thumbsDown.js +5 -0
- package/dist/icons/thumbsUp.d.ts +1 -0
- package/dist/icons/thumbsUp.js +4 -0
- package/dist/icons/toggleLeft.d.ts +2 -0
- package/dist/icons/toggleLeft.js +5 -0
- package/dist/icons/toggleRight.d.ts +1 -0
- package/dist/icons/toggleRight.js +4 -0
- package/dist/icons/tool.d.ts +1 -0
- package/dist/icons/tool.js +4 -0
- package/dist/icons/tosi.d.ts +1 -0
- package/dist/icons/tosi.js +4 -0
- package/dist/icons/tosiFavicon.d.ts +1 -0
- package/dist/icons/tosiFavicon.js +4 -0
- package/dist/icons/tosiPlatform.d.ts +1 -0
- package/dist/icons/tosiPlatform.js +4 -0
- package/dist/icons/tosiUi.d.ts +1 -0
- package/dist/icons/tosiUi.js +4 -0
- package/dist/icons/tosiXr.d.ts +1 -0
- package/dist/icons/tosiXr.js +4 -0
- package/dist/icons/trash.d.ts +1 -0
- package/dist/icons/trash.js +4 -0
- package/dist/icons/trash2.d.ts +1 -0
- package/dist/icons/trash2.js +4 -0
- package/dist/icons/trello.d.ts +1 -0
- package/dist/icons/trello.js +4 -0
- package/dist/icons/trendingDown.d.ts +1 -0
- package/dist/icons/trendingDown.js +4 -0
- package/dist/icons/trendingUp.d.ts +1 -0
- package/dist/icons/trendingUp.js +4 -0
- package/dist/icons/triangle.d.ts +1 -0
- package/dist/icons/triangle.js +4 -0
- package/dist/icons/truck.d.ts +1 -0
- package/dist/icons/truck.js +4 -0
- package/dist/icons/tv.d.ts +1 -0
- package/dist/icons/tv.js +4 -0
- package/dist/icons/twitch.d.ts +1 -0
- package/dist/icons/twitch.js +4 -0
- package/dist/icons/twitter.d.ts +1 -0
- package/dist/icons/twitter.js +4 -0
- package/dist/icons/type.d.ts +1 -0
- package/dist/icons/type.js +4 -0
- package/dist/icons/umbrella.d.ts +1 -0
- package/dist/icons/umbrella.js +4 -0
- package/dist/icons/underline.d.ts +1 -0
- package/dist/icons/underline.js +4 -0
- package/dist/icons/unlock.d.ts +1 -0
- package/dist/icons/unlock.js +4 -0
- package/dist/icons/upload.d.ts +1 -0
- package/dist/icons/upload.js +4 -0
- package/dist/icons/uploadCloud.d.ts +1 -0
- package/dist/icons/uploadCloud.js +4 -0
- package/dist/icons/user.d.ts +1 -0
- package/dist/icons/user.js +4 -0
- package/dist/icons/userCheck.d.ts +1 -0
- package/dist/icons/userCheck.js +4 -0
- package/dist/icons/userMinus.d.ts +1 -0
- package/dist/icons/userMinus.js +4 -0
- package/dist/icons/userPlus.d.ts +1 -0
- package/dist/icons/userPlus.js +4 -0
- package/dist/icons/userX.d.ts +1 -0
- package/dist/icons/userX.js +4 -0
- package/dist/icons/users.d.ts +1 -0
- package/dist/icons/users.js +4 -0
- package/dist/icons/video.d.ts +1 -0
- package/dist/icons/video.js +4 -0
- package/dist/icons/videoOff.d.ts +1 -0
- package/dist/icons/videoOff.js +4 -0
- package/dist/icons/voicemail.d.ts +1 -0
- package/dist/icons/voicemail.js +4 -0
- package/dist/icons/volume.d.ts +1 -0
- package/dist/icons/volume.js +4 -0
- package/dist/icons/volume1.d.ts +1 -0
- package/dist/icons/volume1.js +4 -0
- package/dist/icons/volume2.d.ts +1 -0
- package/dist/icons/volume2.js +4 -0
- package/dist/icons/volumeX.d.ts +1 -0
- package/dist/icons/volumeX.js +4 -0
- package/dist/icons/watch.d.ts +1 -0
- package/dist/icons/watch.js +4 -0
- package/dist/icons/wifi.d.ts +1 -0
- package/dist/icons/wifi.js +4 -0
- package/dist/icons/wifiOff.d.ts +1 -0
- package/dist/icons/wifiOff.js +4 -0
- package/dist/icons/wind.d.ts +1 -0
- package/dist/icons/wind.js +4 -0
- package/dist/icons/x.d.ts +1 -0
- package/dist/icons/x.js +4 -0
- package/dist/icons/xCircle.d.ts +1 -0
- package/dist/icons/xCircle.js +4 -0
- package/dist/icons/xOctagon.d.ts +1 -0
- package/dist/icons/xOctagon.js +4 -0
- package/dist/icons/xSquare.d.ts +1 -0
- package/dist/icons/xSquare.js +4 -0
- package/dist/icons/xrColor.d.ts +1 -0
- package/dist/icons/xrColor.js +4 -0
- package/dist/icons/youtube.d.ts +1 -0
- package/dist/icons/youtube.js +4 -0
- package/dist/icons/zap.d.ts +1 -0
- package/dist/icons/zap.js +4 -0
- package/dist/icons/zapOff.d.ts +1 -0
- package/dist/icons/zapOff.js +4 -0
- package/dist/icons/zoomIn.d.ts +1 -0
- package/dist/icons/zoomIn.js +4 -0
- package/dist/icons/zoomOut.d.ts +1 -0
- package/dist/icons/zoomOut.js +4 -0
- package/dist/icons.d.ts +1 -45
- package/dist/icons.js +33 -483
- package/dist/iife.js +147 -147
- package/dist/iife.js.map +391 -31
- package/dist/live-theme.js +0 -3
- package/dist/menu.d.ts +1 -1
- package/dist/menu.js +3 -2
- package/dist/month.js +6 -4
- package/dist/notifications.js +5 -3
- package/dist/palette.js +10 -8
- package/dist/pocket-bar.d.ts +3 -1
- package/dist/pocket-bar.js +4 -1
- package/dist/rating.d.ts +1 -0
- package/dist/rating.js +3 -1
- package/dist/rich-text.js +20 -11
- package/dist/search-field.js +2 -2
- package/dist/segmented.js +1 -1
- package/dist/select.js +4 -3
- package/dist/sizer.js +2 -2
- package/dist/tab-selector.js +2 -2
- package/dist/tag-list.js +2 -2
- package/dist/tag.js +2 -2
- package/dist/value-renderer.d.ts +2 -0
- package/dist/value-renderer.js +4 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.17.3
|
|
4
|
+
|
|
5
|
+
> A doc site answers `/slug` as well as `/slug/`, and a missing page gets a real 404 page.
|
|
6
|
+
> Nothing to change on upgrade. On Firebase, add `"cleanUrls": true` to `firebase.json` for
|
|
7
|
+
> `/slug` to serve the page; GitHub Pages, Netlify and Cloudflare Pages need nothing.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Every page (and alias) is also written as `/slug.html`, with its references written for
|
|
12
|
+
`/slug`, so a host that resolves extensionless paths (GitHub Pages, Netlify, Cloudflare
|
|
13
|
+
Pages, Firebase with `cleanUrls`) answers `/slug` with the page instead of a redirect. An
|
|
14
|
+
agent's fetch tool that does not follow redirects got a "moved" stub at
|
|
15
|
+
virta.tosijs.net/start. The canonical link stays `/slug/`; a file the site already has at
|
|
16
|
+
`/slug.html` is left alone and named in a warning.
|
|
17
|
+
- The build writes `404.html` (unless the site ships its own): it names the path asked for,
|
|
18
|
+
suggests the closest page, lists every page and links `llms.txt`. Every link in it is
|
|
19
|
+
absolute, since hosts serve it at whatever URL was asked for.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- After Cmd-K, the doc site's search field sat on top of a maximized live example. Opening the
|
|
24
|
+
palette raised the whole `<tosi-palette>` (its trigger included) to the page's highest
|
|
25
|
+
z-index and never put it back, and any overlay on the page (haltija's widget on a dev
|
|
26
|
+
server, a toast in an app) made that higher than the example's. The dialog never needed it:
|
|
27
|
+
`showModal()` already puts it in the top layer.
|
|
28
|
+
- The dev server served `/slug` from `slug/index.html`, whose references are written for
|
|
29
|
+
`/slug/`; it now serves `slug.html`. (Its `.html` fallback looked for `slug/.html` and never
|
|
30
|
+
matched.)
|
|
31
|
+
- The live-theme page showed two theme editors: its example had an `html` block and a `js`
|
|
32
|
+
block that each made one.
|
|
33
|
+
|
|
34
|
+
## 1.17.2
|
|
35
|
+
|
|
36
|
+
> Components carry only the icons they draw, and `<tosi-affix>` centres a caption on its
|
|
37
|
+
> content. Nothing to change on upgrade. An app that imports components one at a time ships
|
|
38
|
+
> about 20 kB gzip less per component; **`dist/iife.js` grows 1.8 kB** (508.0 kB gzip),
|
|
39
|
+
> because the whole set is now assembled from per-icon modules.
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- `tosijs-ui/icons/<name>` exports one icon as a function, the same one `icons.name` gives:
|
|
44
|
+
`import { chevronDown } from 'tosijs-ui/icons/chevronDown'`. Each module registers its icon
|
|
45
|
+
once however many modules import it, and imports any icon it is drawn from (`chevronDown`
|
|
46
|
+
brings `chevronRight`), so a bundler keeps only the icons something imports. `delete` and
|
|
47
|
+
`package` export `deleteIcon` and `packageIcon`.
|
|
48
|
+
- `tosijs-make-icons` gains `--modules <dir>` (one string module per icon, plus an index whose
|
|
49
|
+
default is the whole set), `--creators <dir>` (one creator module per icon) and
|
|
50
|
+
`--core <specifier>` (where creators import `iconCreator` from; default
|
|
51
|
+
`tosijs-ui/icon-core`).
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- Components import only the icons they draw, not all 320. Measured gzip, each imported alone:
|
|
56
|
+
`tosiTag` 4.4 kB, `tosiCarousel` 6.2 kB (was 23.8), menu 13.9 kB (was 34.2), select 13.7
|
|
57
|
+
(34.0), tabs 15.1 (35.4), month 15.9 (36.1), table 29.1 (48.9), rating 5.0 (25.5). Importing
|
|
58
|
+
`tosijs-ui` itself still brings the whole set, so nothing changes for an app that does.
|
|
59
|
+
- An icon a caller names (a menu item's `icon: 'folder'`, a select option's, a rating's) still
|
|
60
|
+
draws. On a page that has not loaded the whole set it appears a moment late, like a web font,
|
|
61
|
+
while the set loads. Import the icon's module, pass the icon itself where an element is
|
|
62
|
+
accepted (`icon: folder()`), or import `tosijs-ui/icons` up front, to draw it at once.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- `<tosi-affix>`: a centred caption is centred on its content, not on the content's cell. A
|
|
67
|
+
fixture wider than fixed-width content (the doc page's own "a caption, centred below")
|
|
68
|
+
widened the content's column, and the content sat at its start; the same happened in any
|
|
69
|
+
affix wider than its content, where an `ne` or `e` fixture also stood off the content's edge.
|
|
70
|
+
The content now takes the fixture's alignment with auto margins, which leave content that
|
|
71
|
+
fills its cell untouched.
|
|
72
|
+
- `tosijs-ui/icons/data/<name>` shipped stale icons: the per-icon modules were written once in
|
|
73
|
+
1.4.1 and never regenerated, so 54 of 313 differed from the icons actually drawn (including
|
|
74
|
+
1.17.0's open-path fix) and six (`fatArrowDown/Left/Right/Up`, `pin`, `shift`) had no module.
|
|
75
|
+
The build now writes them from the same data, and a test fails if they drift.
|
|
76
|
+
|
|
3
77
|
## 1.17.1
|
|
4
78
|
|
|
5
79
|
> Fixes from the 1.17.0 review, plus elastic table columns that can be dragged narrower. Nothing
|
package/bin/make-icon-data.js
CHANGED
|
@@ -16,6 +16,15 @@ Ingests SVG files from icon directories and generates an icon-data module
|
|
|
16
16
|
- `--input <dir1,dir2,...>` — directories to scan (default: `./icons`)
|
|
17
17
|
- `--output <path>` — output file (default: `./src/icon-data.ts`)
|
|
18
18
|
- `--optimize <true|false>` — round coordinates based on viewBox size (default: true)
|
|
19
|
+
- `--modules <dir>` — also write one module per icon into `dir` (`export const name = '…'`),
|
|
20
|
+
plus an `index`, so code can import just the icons it draws. tosijs-ui's own build writes
|
|
21
|
+
`src/icons/data/` this way; files there that are no longer icons are removed.
|
|
22
|
+
- `--creators <dir>` — with `--modules`, also write one module per icon that exports it as a
|
|
23
|
+
function, `export const chevronDown = iconCreator(…)`, registering it once when it loads.
|
|
24
|
+
A redirect's module imports the icon it redirects to. tosijs-ui's own build writes
|
|
25
|
+
`src/icons/` this way, published as `tosijs-ui/icons/<name>`.
|
|
26
|
+
- `--core <specifier>` — where `--creators` modules import `iconCreator` from (default
|
|
27
|
+
`tosijs-ui/icon-core`)
|
|
19
28
|
|
|
20
29
|
### Examples
|
|
21
30
|
|
|
@@ -99,6 +108,9 @@ const defaultOptions = {
|
|
|
99
108
|
input: './icons',
|
|
100
109
|
output: './src/icon-data.ts',
|
|
101
110
|
optimize: true, // Optimize coordinate precision based on viewBox size
|
|
111
|
+
modules: '', // A directory to also write one module per icon into
|
|
112
|
+
creators: '', // A directory to also write one creator module per icon into
|
|
113
|
+
core: 'tosijs-ui/icon-core', // Where creator modules import iconCreator from
|
|
102
114
|
}
|
|
103
115
|
const flags = Object.keys(defaultOptions)
|
|
104
116
|
|
|
@@ -128,7 +140,14 @@ for (const flag of flags) {
|
|
|
128
140
|
}
|
|
129
141
|
|
|
130
142
|
// Destructure options for easier use
|
|
131
|
-
const {
|
|
143
|
+
const {
|
|
144
|
+
input: iconDirectories,
|
|
145
|
+
output: outputFilePath,
|
|
146
|
+
optimize,
|
|
147
|
+
modules: modulesDir,
|
|
148
|
+
creators: creatorsDir,
|
|
149
|
+
core: coreSpecifier,
|
|
150
|
+
} = options
|
|
132
151
|
const isTypescript = outputFilePath.endsWith('.ts')
|
|
133
152
|
const shouldOptimize = optimize === true || optimize === 'true'
|
|
134
153
|
|
|
@@ -484,4 +503,151 @@ try {
|
|
|
484
503
|
|
|
485
504
|
fs.writeFileSync(outputFilePath, source, 'utf8')
|
|
486
505
|
|
|
506
|
+
/*
|
|
507
|
+
One module per icon, so a component can import the handful it draws instead of all of them
|
|
508
|
+
(tosijs-ui#3885). They are written from the same data in the same run, so they cannot drift
|
|
509
|
+
from the combined module: the 1.4.1 copies were written once, by hand, and by 1.17 a sixth of
|
|
510
|
+
them were wrong. A redirect's module holds the redirect, not its target; whoever registers
|
|
511
|
+
it registers the target too.
|
|
512
|
+
|
|
513
|
+
Files in the directory that are not icons any more are removed, but only ones this generator
|
|
514
|
+
writes (a module that starts `export const` or an index of `export {` lines), so a stray file
|
|
515
|
+
of someone else's survives.
|
|
516
|
+
*/
|
|
517
|
+
if (typeof modulesDir === 'string' && modulesDir !== '') {
|
|
518
|
+
const ext = isTypescript ? '.ts' : '.js'
|
|
519
|
+
fs.mkdirSync(modulesDir, { recursive: true })
|
|
520
|
+
/*
|
|
521
|
+
The export is the icon's name, unless that is not a name a module can bind: `delete` and (in
|
|
522
|
+
a module) `package` look like identifiers and are reserved, so they export `deleteIcon` and
|
|
523
|
+
`packageIcon` from `delete` and `package`, as the 1.4.1 modules did. Ask the parser, not a
|
|
524
|
+
pattern.
|
|
525
|
+
*/
|
|
526
|
+
const bindable = (name) => {
|
|
527
|
+
try {
|
|
528
|
+
new Function(`"use strict"; let ${name}`)
|
|
529
|
+
return true
|
|
530
|
+
} catch {
|
|
531
|
+
return false
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
const valid = (name) => /^[A-Za-z_$][\w$]*$/.test(name)
|
|
535
|
+
const names = Object.keys(iconData).filter(valid)
|
|
536
|
+
const exportName = (name) => (bindable(name) ? name : name + 'Icon')
|
|
537
|
+
const skipped = Object.keys(iconData).filter((name) => !valid(name))
|
|
538
|
+
if (skipped.length > 0) {
|
|
539
|
+
console.warn(
|
|
540
|
+
`make-icon-data: no module for ${skipped.join(', ')} (not an identifier)`
|
|
541
|
+
)
|
|
542
|
+
}
|
|
543
|
+
const wanted = new Set([...names.map((n) => n + ext), 'index' + ext])
|
|
544
|
+
for (const file of fs.readdirSync(modulesDir)) {
|
|
545
|
+
if (wanted.has(file) || !file.endsWith(ext)) continue
|
|
546
|
+
const full = path.join(modulesDir, file)
|
|
547
|
+
const head = fs.readFileSync(full, 'utf8').slice(0, 13)
|
|
548
|
+
if (head.startsWith('export const') || head.startsWith('export {')) {
|
|
549
|
+
fs.rmSync(full)
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
for (const name of names) {
|
|
553
|
+
const file = path.join(modulesDir, name + ext)
|
|
554
|
+
const text = `export const ${exportName(name)} = ${JSON.stringify(
|
|
555
|
+
iconData[name]
|
|
556
|
+
)}\n`
|
|
557
|
+
if (!fs.existsSync(file) || fs.readFileSync(file, 'utf8') !== text) {
|
|
558
|
+
fs.writeFileSync(file, text, 'utf8')
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
/*
|
|
562
|
+
The index re-exports every icon by name and, as its default, the whole set keyed by icon
|
|
563
|
+
name (so `delete`, not `deleteIcon`). Code that needs every icon imports the default, which
|
|
564
|
+
is built from the same modules a component imports one at a time: one copy of each string in
|
|
565
|
+
a bundle that has both, not two.
|
|
566
|
+
*/
|
|
567
|
+
const key = (n) => (/^[A-Za-z_$][\w$]*$/.test(n) ? n : quote(n))
|
|
568
|
+
fs.writeFileSync(
|
|
569
|
+
path.join(modulesDir, 'index' + ext),
|
|
570
|
+
names
|
|
571
|
+
.map((n) => `import { ${exportName(n)} } from './${n}.js'\n`)
|
|
572
|
+
.join('') +
|
|
573
|
+
`\nexport {\n${names.map((n) => ` ${exportName(n)},\n`).join('')}}\n` +
|
|
574
|
+
`\nexport default {\n${names
|
|
575
|
+
.map((n) =>
|
|
576
|
+
exportName(n) === n ? ` ${n},\n` : ` ${key(n)}: ${exportName(n)},\n`
|
|
577
|
+
)
|
|
578
|
+
.join('')}}\n`,
|
|
579
|
+
'utf8'
|
|
580
|
+
)
|
|
581
|
+
if (typeof creatorsDir === 'string' && creatorsDir !== '') {
|
|
582
|
+
writeCreators(creatorsDir, names, exportName, ext)
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
487
586
|
console.log(`Successfully generated icon data to: ${outputFilePath}`)
|
|
587
|
+
|
|
588
|
+
/*
|
|
589
|
+
A redirect draws another icon (`chevronDown` is `chevronRight90r`), so its creator module
|
|
590
|
+
imports that icon's, and registering one registers what it needs. The icon a redirect draws
|
|
591
|
+
is the longest icon name its value starts with, per `$`-stacked layer; a value that names no
|
|
592
|
+
icon (a composition rule's) imports nothing and resolves the way any unregistered name does.
|
|
593
|
+
*/
|
|
594
|
+
function redirectTargets(name) {
|
|
595
|
+
const spec = iconData[name]
|
|
596
|
+
if (spec.startsWith('<')) return []
|
|
597
|
+
const targets = new Set()
|
|
598
|
+
for (const layer of spec.split('$')) {
|
|
599
|
+
let best = ''
|
|
600
|
+
for (const other of Object.keys(iconData)) {
|
|
601
|
+
if (
|
|
602
|
+
other !== name &&
|
|
603
|
+
layer.startsWith(other) &&
|
|
604
|
+
other.length > best.length
|
|
605
|
+
)
|
|
606
|
+
best = other
|
|
607
|
+
}
|
|
608
|
+
if (best) targets.add(best)
|
|
609
|
+
}
|
|
610
|
+
return [...targets]
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
function writeCreators(dir, names, exportName, ext) {
|
|
614
|
+
if (typeof modulesDir !== 'string' || modulesDir === '') {
|
|
615
|
+
throw new Error('make-icon-data: --creators needs --modules')
|
|
616
|
+
}
|
|
617
|
+
fs.mkdirSync(dir, { recursive: true })
|
|
618
|
+
let dataPath = path.relative(dir, modulesDir).split(path.sep).join('/')
|
|
619
|
+
if (!dataPath.startsWith('.')) dataPath = './' + dataPath
|
|
620
|
+
const named = new Set(names)
|
|
621
|
+
for (const name of names) {
|
|
622
|
+
const exported = exportName(name)
|
|
623
|
+
const lines = [
|
|
624
|
+
'// Generated by make-icon-data. One icon, registered when this module loads.',
|
|
625
|
+
`import { iconCreator } from ${quote(coreSpecifier)}`,
|
|
626
|
+
...redirectTargets(name)
|
|
627
|
+
.filter((t) => named.has(t))
|
|
628
|
+
.map((t) => `import './${t}.js'`),
|
|
629
|
+
`import { ${exported} as spec } from '${dataPath}/${name}.js'`,
|
|
630
|
+
'',
|
|
631
|
+
`export const ${exported} = iconCreator(${quote(name)}, spec)`,
|
|
632
|
+
'',
|
|
633
|
+
]
|
|
634
|
+
const file = path.join(dir, name + ext)
|
|
635
|
+
const text = lines.join('\n')
|
|
636
|
+
if (!fs.existsSync(file) || fs.readFileSync(file, 'utf8') !== text) {
|
|
637
|
+
fs.writeFileSync(file, text, 'utf8')
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
const wanted = new Set(names.map((n) => n + ext))
|
|
641
|
+
for (const file of fs.readdirSync(dir)) {
|
|
642
|
+
if (wanted.has(file) || !file.endsWith(ext)) continue
|
|
643
|
+
const full = path.join(dir, file)
|
|
644
|
+
if (!fs.statSync(full).isFile()) continue
|
|
645
|
+
if (
|
|
646
|
+
fs
|
|
647
|
+
.readFileSync(full, 'utf8')
|
|
648
|
+
.startsWith('// Generated by make-icon-data.')
|
|
649
|
+
) {
|
|
650
|
+
fs.rmSync(full)
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
package/dist/affix.d.ts
CHANGED
|
@@ -50,6 +50,12 @@ export declare class TosiAffix extends Component<AffixParts> {
|
|
|
50
50
|
minHeight: string;
|
|
51
51
|
position: string;
|
|
52
52
|
};
|
|
53
|
+
':host > [part="content"][data-align="center"]::slotted(*)': {
|
|
54
|
+
marginInline: string;
|
|
55
|
+
};
|
|
56
|
+
':host > [part="content"][data-align="end"]::slotted(*)': {
|
|
57
|
+
marginInlineStart: string;
|
|
58
|
+
};
|
|
53
59
|
':host > [part="fixture"]': {
|
|
54
60
|
display: string;
|
|
55
61
|
flexDirection: string;
|
package/dist/affix.js
CHANGED
|
@@ -259,6 +259,17 @@ export class TosiAffix extends Component {
|
|
|
259
259
|
// a positioned child of the content is placed against the content, not the fixture
|
|
260
260
|
position: 'relative',
|
|
261
261
|
},
|
|
262
|
+
/*
|
|
263
|
+
Content narrower than its cell — a fixed width in a wider affix, or under a fixture wider
|
|
264
|
+
than it — follows the fixture, so a centred caption is centred on the content and not on
|
|
265
|
+
the cell. Auto margins do nothing to content that fills its cell.
|
|
266
|
+
*/
|
|
267
|
+
':host > [part="content"][data-align="center"]::slotted(*)': {
|
|
268
|
+
marginInline: 'auto',
|
|
269
|
+
},
|
|
270
|
+
':host > [part="content"][data-align="end"]::slotted(*)': {
|
|
271
|
+
marginInlineStart: 'auto',
|
|
272
|
+
},
|
|
262
273
|
':host > [part="fixture"]': {
|
|
263
274
|
display: 'flex',
|
|
264
275
|
flexDirection: 'var(--tosi-affix-direction)',
|
|
@@ -436,6 +447,14 @@ export class TosiAffix extends Component {
|
|
|
436
447
|
borderRadius: outerCorners(cell.edge, placement.inside, 'var(--tosi-affix-radius, var(--tosi-border-radius, 4px))'),
|
|
437
448
|
});
|
|
438
449
|
this.style.setProperty('--tosi-affix-direction', cell.direction);
|
|
450
|
+
// beside the content, it hugs the edge it is on; above, below or inside, it lines up with it
|
|
451
|
+
const side = cell.edge === 'e' || cell.edge === 'w';
|
|
452
|
+
this.parts.content.dataset.align =
|
|
453
|
+
side && !placement.inside
|
|
454
|
+
? cell.edge === 'e'
|
|
455
|
+
? 'end'
|
|
456
|
+
: 'start'
|
|
457
|
+
: cell.justifySelf;
|
|
439
458
|
}
|
|
440
459
|
render() {
|
|
441
460
|
super.render();
|
package/dist/babylon-3d.js
CHANGED
|
@@ -223,7 +223,8 @@ be used to load `.glb` files. Setting `src` calls this for you on connect.
|
|
|
223
223
|
/*{ "parent": "Components", "headTitle": "<tosi-3d> Babylon.js wrapper (deprecated) — tosijs-ui", "description": "Deprecated: <tosi-3d> is a thin Babylon.js wrapper kept for compatibility. New 3D work should use the tosijs-3d package." }*/
|
|
224
224
|
import { elements, withAttributes } from 'tosijs';
|
|
225
225
|
import { scriptTag } from './via-tag.js';
|
|
226
|
-
import {
|
|
226
|
+
import { svg2DataUrl } from './icon-core.js';
|
|
227
|
+
import { xrColor as xrColorIcon } from './icons/xrColor.js';
|
|
227
228
|
const noop = () => {
|
|
228
229
|
/* do not care */
|
|
229
230
|
};
|
|
@@ -310,7 +311,7 @@ export class B3d extends withAttributes({
|
|
|
310
311
|
width: 80,
|
|
311
312
|
backgroundColor: 'transparent',
|
|
312
313
|
filter: 'drop-shadow(0 0 4px #000c)',
|
|
313
|
-
backgroundImage: svg2DataUrl(
|
|
314
|
+
backgroundImage: svg2DataUrl(xrColorIcon()),
|
|
314
315
|
backgroundPosition: 'center',
|
|
315
316
|
backgroundRepeat: 'no-repeat',
|
|
316
317
|
border: 'none',
|
package/dist/carousel.js
CHANGED
|
@@ -72,7 +72,8 @@ This is a minimalist carousel component that supports the usual stuff.
|
|
|
72
72
|
*/
|
|
73
73
|
/*{ "parent": "Components", "description": "A minimal carousel with optional arrows and dots, several items per page, looping, and auto-advance that holds still while someone is looking." }*/
|
|
74
74
|
import { elements, vars, withAttributes } from 'tosijs';
|
|
75
|
-
import {
|
|
75
|
+
import { chevronLeft as chevronLeftIcon } from './icons/chevronLeft.js';
|
|
76
|
+
import { chevronRight as chevronRightIcon } from './icons/chevronRight.js';
|
|
76
77
|
import { prefersReducedMotion } from './reduced-motion.js';
|
|
77
78
|
const { button, slot, div } = elements;
|
|
78
79
|
export class TosiCarousel extends withAttributes({
|
|
@@ -382,12 +383,12 @@ export class TosiCarousel extends withAttributes({
|
|
|
382
383
|
}
|
|
383
384
|
}
|
|
384
385
|
content = () => [
|
|
385
|
-
div({ part: 'pager' }, button({ title: 'previous slide', part: 'back' },
|
|
386
|
+
div({ part: 'pager' }, button({ title: 'previous slide', part: 'back' }, chevronLeftIcon()), div(
|
|
386
387
|
/*
|
|
387
388
|
Focusable, so the strip can be scrolled from the keyboard (#3573); ← and → page it,
|
|
388
389
|
like the arrow buttons.
|
|
389
390
|
*/
|
|
390
|
-
{ title: 'slides', role: 'group', part: 'scroller', tabindex: 0 }, div({ part: 'grid' }, slot())), button({ title: 'next slide', part: 'forward' },
|
|
391
|
+
{ title: 'slides', role: 'group', part: 'scroller', tabindex: 0 }, div({ part: 'grid' }, slot())), button({ title: 'next slide', part: 'forward' }, chevronRightIcon())),
|
|
391
392
|
div({ title: 'choose slide to display', role: 'group', part: 'progress' }),
|
|
392
393
|
];
|
|
393
394
|
connectedCallback() {
|
package/dist/data-table.js
CHANGED
|
@@ -1313,7 +1313,10 @@ import { elements, vars, varDefault, tosiValue, getListItem, getListBinding, tos
|
|
|
1313
1313
|
import { trackDrag } from './track-drag.js';
|
|
1314
1314
|
import { naturalSorter } from './natural-compare.js';
|
|
1315
1315
|
import { resolveRowGroupId, withForcedGroups, clusterByGroup, groupRenderMeta, groupCounts, } from './row-grouping.js';
|
|
1316
|
-
import {
|
|
1316
|
+
import { chevronRight as chevronRightIcon } from './icons/chevronRight.js';
|
|
1317
|
+
import { sortAscending as sortAscendingIcon } from './icons/sortAscending.js';
|
|
1318
|
+
import { sortDescending as sortDescendingIcon } from './icons/sortDescending.js';
|
|
1319
|
+
import { moreVertical as moreVerticalIcon } from './icons/moreVertical.js';
|
|
1317
1320
|
import { valueRenderer, } from './value-renderer.js';
|
|
1318
1321
|
import { fieldForProperty, collectErrors, coerceToSchema, fieldEditable, } from './schema-form/fields.js';
|
|
1319
1322
|
import { getSchemaValidator, warnNoValidator } from './schema-form/validator.js';
|
|
@@ -2827,7 +2830,7 @@ export class TosiTable extends withAttributes({
|
|
|
2827
2830
|
if (item != null)
|
|
2828
2831
|
this.toggleRowDetail(item);
|
|
2829
2832
|
},
|
|
2830
|
-
},
|
|
2833
|
+
}, chevronRightIcon()));
|
|
2831
2834
|
return cell;
|
|
2832
2835
|
}
|
|
2833
2836
|
if (this.columnEditable(col)) {
|
|
@@ -2949,12 +2952,12 @@ export class TosiTable extends withAttributes({
|
|
|
2949
2952
|
let sortIcon;
|
|
2950
2953
|
switch (col.sort) {
|
|
2951
2954
|
case 'ascending':
|
|
2952
|
-
sortIcon =
|
|
2955
|
+
sortIcon = sortAscendingIcon();
|
|
2953
2956
|
ariaSort = 'descending';
|
|
2954
2957
|
break;
|
|
2955
2958
|
case 'descending':
|
|
2956
2959
|
ariaSort = 'ascending';
|
|
2957
|
-
sortIcon =
|
|
2960
|
+
sortIcon = sortDescendingIcon();
|
|
2958
2961
|
break;
|
|
2959
2962
|
}
|
|
2960
2963
|
// An expander column has nothing to sort by and should not be hidden by accident.
|
|
@@ -2966,7 +2969,7 @@ export class TosiTable extends withAttributes({
|
|
|
2966
2969
|
popColumnMenu(event.target, col);
|
|
2967
2970
|
event.stopPropagation();
|
|
2968
2971
|
},
|
|
2969
|
-
}, sortIcon ||
|
|
2972
|
+
}, sortIcon || moreVerticalIcon())
|
|
2970
2973
|
: {};
|
|
2971
2974
|
const cell = col.headerCell !== undefined
|
|
2972
2975
|
? col.headerCell(col)
|
|
@@ -1228,10 +1228,15 @@ export async function devServer(config, opts = {}) {
|
|
|
1228
1228
|
*/
|
|
1229
1229
|
if (!isUnderRoot(directory, basePath))
|
|
1230
1230
|
return null;
|
|
1231
|
-
|
|
1232
|
-
|
|
1231
|
+
// `/slug` is the build's `slug.html` (written for that URL) before `slug/index.html`;
|
|
1232
|
+
// `/slug/` is only ever the folder's index
|
|
1233
|
+
const candidates = [
|
|
1234
|
+
basePath,
|
|
1235
|
+
...(reqPath.endsWith('/') ? [] : [basePath + '.html']),
|
|
1236
|
+
path.join(basePath, 'index.html'),
|
|
1237
|
+
];
|
|
1238
|
+
for (const pathWithSuffix of candidates) {
|
|
1233
1239
|
try {
|
|
1234
|
-
const pathWithSuffix = path.join(basePath, suffix);
|
|
1235
1240
|
const stat = statSync(pathWithSuffix);
|
|
1236
1241
|
if (stat && stat.isFile()) {
|
|
1237
1242
|
return pathWithSuffix;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { Doc } from './docs.js';
|
|
2
2
|
import type { ProjectLinks, LinkItem } from '../../doc-browser.js';
|
|
3
|
+
import { NavNode } from '../nav-tree.js';
|
|
3
4
|
import { type AccessibilityMode, type ExampleBakes } from '../render.js';
|
|
4
5
|
declare global {
|
|
5
6
|
var Bun: any;
|
|
6
7
|
}
|
|
7
8
|
export interface GenerateSiteConfig {
|
|
8
9
|
docs: Doc[];
|
|
10
|
+
/** whether the site serves `/llms.txt`, which the 404 page then points to */
|
|
11
|
+
llmsTxt?: boolean;
|
|
9
12
|
/** `SiteConfig.aliases`: { alias path -> slug } (board #3513) */
|
|
10
13
|
aliases?: Record<string, string>;
|
|
11
14
|
/** `SiteConfig.searchPlaceholder` */
|
|
@@ -160,3 +163,4 @@ export declare function withStamp(url: string, stamp?: string): string;
|
|
|
160
163
|
*/
|
|
161
164
|
export declare function rebaseRelativeRefs(html: string, fromPath: string, depth: number): string;
|
|
162
165
|
export declare function generateSite(config: GenerateSiteConfig): Promise<number>;
|
|
166
|
+
export declare function notFoundHtml(pages: NavNode<Doc>[], slugMap: Record<string, string>, config: Pick<GenerateSiteConfig, 'projectName' | 'basePath' | 'lang' | 'llmsTxt'>): string;
|
|
@@ -163,11 +163,12 @@ export function relativeUrl(depth, p) {
|
|
|
163
163
|
}
|
|
164
164
|
async function pageHtml(doc, config, slugMap, configAttr, wikilinks,
|
|
165
165
|
/** the slug this copy is written at: the doc's own, or an alias of it */
|
|
166
|
-
at = slugMap[doc.filename] ?? ''
|
|
166
|
+
at = slugMap[doc.filename] ?? '',
|
|
167
|
+
/** the directory depth its references resolve from: 0 for the `/slug` copy (`slug.html`) */
|
|
168
|
+
depth = pageDepth(at)) {
|
|
167
169
|
const { projectName = '', baseUrl = '', lang = 'en', favicon = '/favicon.svg', docsUrl = '/docs.json', scriptUrl = '/iife.js', hydrateUrl, stylesUrl = '/doc-system.css', assetStamp, docsStamp, localizedUrl = '/localized-strings.txt', basePath, headExtra = '', bakes, } = config;
|
|
168
170
|
// Functional URLs are emitted relative to THIS page's depth so the build is
|
|
169
171
|
// mount-agnostic (issue #25); metadata URLs below stay absolute via withBase.
|
|
170
|
-
const depth = pageDepth(at);
|
|
171
172
|
const own = slugMap[doc.filename] ?? '';
|
|
172
173
|
const localizedAttr = config.localizedStrings
|
|
173
174
|
? ` localized="${escapeAttr(relativeUrl(depth, localizedUrl))}"`
|
|
@@ -210,9 +211,10 @@ at = slugMap[doc.filename] ?? '') {
|
|
|
210
211
|
config.liveExamples ?? 'auto'), (filename) => slugMap[filename] !== undefined
|
|
211
212
|
? relativeUrl(depth, pathForSlug(slugMap[filename]))
|
|
212
213
|
: null);
|
|
213
|
-
// A copy
|
|
214
|
-
// the same file (a README's
|
|
215
|
-
|
|
214
|
+
// A copy anywhere but the page's own path (an alias, or `/slug` with no slash): what the
|
|
215
|
+
// author wrote relative to that path must still reach the same file (a README's
|
|
216
|
+
// `img/logo.png` is /img/logo.png, not /readme/img/logo.png).
|
|
217
|
+
const body = at === own && depth === pageDepth(own)
|
|
216
218
|
? rendered
|
|
217
219
|
: rebaseRelativeRefs(rendered, pathForSlug(own), depth);
|
|
218
220
|
const nav = navHtml(config.docs, slugMap, doc.filename, depth);
|
|
@@ -562,6 +564,35 @@ export async function generateSite(config) {
|
|
|
562
564
|
await Bun.write(`${dir}/index.md`, doc.text.trimEnd() + '\n');
|
|
563
565
|
}
|
|
564
566
|
}
|
|
567
|
+
/*
|
|
568
|
+
Every page again as `slug.html`, with its references written for `/slug`, so the trailing
|
|
569
|
+
slash is optional. Hosts serve `/slug` from `slug/index.html` with a redirect, and a client
|
|
570
|
+
that does not follow it (an agent's fetch tool, onboarding from a typed URL) got a "moved"
|
|
571
|
+
stub instead of the page. With `slug.html` beside it, a host that resolves extensionless
|
|
572
|
+
paths to `.html` (GitHub Pages, Netlify, Cloudflare Pages, Firebase with `cleanUrls`)
|
|
573
|
+
answers `/slug` with the page itself. The canonical link stays `/slug/`.
|
|
574
|
+
*/
|
|
575
|
+
const slashless = [
|
|
576
|
+
...docs.map((doc) => [slugMap[doc.filename], doc]),
|
|
577
|
+
...Object.entries(aliases).map(([alias, target]) => [alias, docs.find((d) => slugMap[d.filename] === target)]),
|
|
578
|
+
];
|
|
579
|
+
const occupied = [];
|
|
580
|
+
for (const [at, doc] of slashless) {
|
|
581
|
+
if (at === '')
|
|
582
|
+
continue;
|
|
583
|
+
const file = `${outputDir}/${at}.html`;
|
|
584
|
+
// the output folder starts empty, so a file here is one the site ships: leave it alone
|
|
585
|
+
if (existsSync(file)) {
|
|
586
|
+
occupied.push(` /${at}.html`);
|
|
587
|
+
continue;
|
|
588
|
+
}
|
|
589
|
+
await Bun.write(file, await pageHtml(doc, config, slugMap, configAttr, wikilinks, at, 0));
|
|
590
|
+
}
|
|
591
|
+
if (occupied.length) {
|
|
592
|
+
console.warn(`\n⚠️ These pages are served only at /slug/, because the site already has a file where\n` +
|
|
593
|
+
` the /slug copy goes (rename the file to make the trailing slash optional):\n` +
|
|
594
|
+
`${occupied.join('\n')}\n`);
|
|
595
|
+
}
|
|
565
596
|
if (danglingWikilinks.length) {
|
|
566
597
|
misconfigured(config.strict, `\n⚠️ Wikilinks that reach no doc page. A target matches a page's slug (its file name)\n` +
|
|
567
598
|
` or its title; write [[slug|label]] to link one by file name, and an ordinary\n` +
|
|
@@ -631,5 +662,88 @@ export async function generateSite(config) {
|
|
|
631
662
|
await Bun.write(robotsPath, `${base}Sitemap: ${config.baseUrl}/sitemap.xml\n`);
|
|
632
663
|
}
|
|
633
664
|
}
|
|
665
|
+
// A site's own 404.html (copied from its static files) wins.
|
|
666
|
+
if (!existsSync(`${outputDir}/404.html`)) {
|
|
667
|
+
await Bun.write(`${outputDir}/404.html`, notFoundHtml(flattenNav(buildNavTree(docs, slugMap)), slugMap, config));
|
|
668
|
+
}
|
|
634
669
|
return count;
|
|
635
670
|
}
|
|
671
|
+
/*
|
|
672
|
+
The page a host serves for a path the site does not have: GitHub Pages and Firebase serve
|
|
673
|
+
`404.html` from the site root, at whatever URL was asked for, so nothing in it may be
|
|
674
|
+
relative. It lists every page, which is what a reader without JavaScript (an agent's fetch
|
|
675
|
+
tool, most often) needs to find its way, and with JavaScript it names the closest page to the
|
|
676
|
+
path asked for. The script is a nicety: under a policy that blocks inline scripts, the list
|
|
677
|
+
is still there.
|
|
678
|
+
*/
|
|
679
|
+
export function notFoundHtml(pages, slugMap, config) {
|
|
680
|
+
const { projectName = '', basePath, lang = 'en', llmsTxt } = config;
|
|
681
|
+
const href = (slug) => withBase(basePath, pathForSlug(slug));
|
|
682
|
+
const listed = pages.filter((node) => !node.doc.hidden);
|
|
683
|
+
const items = listed
|
|
684
|
+
.map((node) => ` <li><a href="${escapeAttr(href(node.slug))}">${escapeText(node.doc.title || node.slug || 'Home')}</a></li>`)
|
|
685
|
+
.join('\n');
|
|
686
|
+
const slugs = JSON.stringify(Object.values(slugMap).filter((slug) => slug !== '')).replace(/</g, '\\u003c');
|
|
687
|
+
const title = projectName
|
|
688
|
+
? `Page not found — ${projectName}`
|
|
689
|
+
: 'Page not found';
|
|
690
|
+
return `<!DOCTYPE html>
|
|
691
|
+
<html lang="${escapeAttr(lang)}">
|
|
692
|
+
<head>
|
|
693
|
+
<meta charset="utf-8" />
|
|
694
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
695
|
+
<meta name="robots" content="noindex" />
|
|
696
|
+
<title>${escapeText(title)}</title>
|
|
697
|
+
<style>
|
|
698
|
+
body { font: 16px/1.5 system-ui, sans-serif; max-width: 40em; margin: 2em auto; padding: 0 1em; }
|
|
699
|
+
@media (prefers-color-scheme: dark) { body { background: #111; color: #eee; } a { color: #8bf; } }
|
|
700
|
+
</style>
|
|
701
|
+
</head>
|
|
702
|
+
<body>
|
|
703
|
+
<h1>Page not found</h1>
|
|
704
|
+
<p>There is no page at <code id="asked"></code> on this site.<span id="closest"></span></p>
|
|
705
|
+
<p><a href="${escapeAttr(withBase(basePath, '/'))}">Home</a>${llmsTxt
|
|
706
|
+
? ` · <a href="${escapeAttr(withBase(basePath, '/llms.txt'))}">llms.txt</a> (every page, for agents)`
|
|
707
|
+
: ''}</p>
|
|
708
|
+
<h2>Pages</h2>
|
|
709
|
+
<ul>
|
|
710
|
+
${items}
|
|
711
|
+
</ul>
|
|
712
|
+
<script>
|
|
713
|
+
;(() => {
|
|
714
|
+
const slugs = ${slugs}
|
|
715
|
+
const base = ${JSON.stringify(withBase(basePath, '/'))}
|
|
716
|
+
const asked = decodeURIComponent(location.pathname)
|
|
717
|
+
document.getElementById('asked').textContent = asked
|
|
718
|
+
const want = asked.slice(base.length - 1).replace(/^\\/+|\\/+$/g, '').toLowerCase()
|
|
719
|
+
if (!want) return
|
|
720
|
+
const distance = (a, b) => {
|
|
721
|
+
const row = Array.from({ length: b.length + 1 }, (_, i) => i)
|
|
722
|
+
for (let i = 1; i <= a.length; i++) {
|
|
723
|
+
let prev = row[0]++
|
|
724
|
+
for (let j = 1; j <= b.length; j++) {
|
|
725
|
+
const next = Math.min(row[j] + 1, row[j - 1] + 1, prev + (a[i - 1] === b[j - 1] ? 0 : 1))
|
|
726
|
+
prev = row[j]
|
|
727
|
+
row[j] = next
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return row[b.length]
|
|
731
|
+
}
|
|
732
|
+
let best = '', score = Infinity
|
|
733
|
+
for (const slug of slugs) {
|
|
734
|
+
const prefix = Math.min(want.length, slug.length) >= 3 && (slug.startsWith(want) || want.startsWith(slug))
|
|
735
|
+
const d = prefix ? 0.5 : distance(want, slug)
|
|
736
|
+
if (d < score) [best, score] = [slug, d]
|
|
737
|
+
}
|
|
738
|
+
if (score > Math.max(2, want.length / 3)) return
|
|
739
|
+
const link = document.createElement('a')
|
|
740
|
+
link.href = base + best + '/'
|
|
741
|
+
link.textContent = base + best + '/'
|
|
742
|
+
const closest = document.getElementById('closest')
|
|
743
|
+
closest.append(' Did you mean ', link, '?')
|
|
744
|
+
})()
|
|
745
|
+
</script>
|
|
746
|
+
</body>
|
|
747
|
+
</html>
|
|
748
|
+
`;
|
|
749
|
+
}
|
|
@@ -1653,6 +1653,7 @@ export async function buildSite(config, opts = {}) {
|
|
|
1653
1653
|
const pageCount = await generateSite({
|
|
1654
1654
|
liveExamples: config.liveExamples,
|
|
1655
1655
|
docs,
|
|
1656
|
+
llmsTxt: config.llmsTxt !== false,
|
|
1656
1657
|
aliases: config.aliases,
|
|
1657
1658
|
searchPlaceholder: config.searchPlaceholder,
|
|
1658
1659
|
accessibility: config.accessibility,
|