@bookklik/senangstart-icons 1.0.8 → 1.0.12
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/.agent/skills/build-scripts/SKILL.md +155 -0
- package/.agent/skills/icon-development/SKILL.md +154 -0
- package/.agent/skills/senangstart-icons-architecture/SKILL.md +123 -0
- package/.agent/skills/testing/SKILL.md +202 -0
- package/.agent/skills/web-components/SKILL.md +209 -0
- package/.agent/workflows/add-icon.md +85 -0
- package/.agent/workflows/build.md +73 -0
- package/.agent/workflows/dev.md +52 -0
- package/.agent/workflows/docs.md +77 -0
- package/.agent/workflows/publish.md +80 -0
- package/.agent/workflows/test.md +56 -0
- package/README.md +13 -5
- package/dist/icons.min.js +2 -0
- package/dist/icons.min.js.map +1 -0
- package/dist/senangstart-icon.min.js +1 -1
- package/dist/senangstart-icon.min.js.map +1 -1
- package/docs/.vitepress/config.mjs +15 -13
- package/docs/guide/configuration.md +3 -48
- package/docs/guide/getting-started.md +10 -3
- package/docs/guide/installation.md +1 -1
- package/docs/guide/styling.md +10 -10
- package/docs/guide/usage.md +53 -44
- package/docs/icons/alert.md +12 -8
- package/docs/icons/align-bottom-object.md +12 -8
- package/docs/icons/align-center-object.md +12 -8
- package/docs/icons/align-left-object.md +12 -8
- package/docs/icons/align-middle-object.md +12 -8
- package/docs/icons/align-right-object.md +12 -8
- package/docs/icons/align-top-object.md +12 -8
- package/docs/icons/ar.md +12 -8
- package/docs/icons/archive-box.md +12 -8
- package/docs/icons/arrow-down.md +12 -8
- package/docs/icons/arrow-left-arrow-right.md +12 -8
- package/docs/icons/arrow-left-on-rectangle.md +12 -8
- package/docs/icons/arrow-left-right.md +12 -8
- package/docs/icons/arrow-left.md +12 -8
- package/docs/icons/arrow-long-down.md +12 -8
- package/docs/icons/arrow-long-left.md +12 -8
- package/docs/icons/arrow-long-right.md +12 -8
- package/docs/icons/arrow-long-up.md +12 -8
- package/docs/icons/arrow-path.md +12 -8
- package/docs/icons/arrow-right-on-rectangle.md +12 -8
- package/docs/icons/arrow-right.md +12 -8
- package/docs/icons/arrow-rotate-ccw.md +12 -8
- package/docs/icons/arrow-rotate-cw.md +12 -8
- package/docs/icons/arrow-top-right-on-square.md +12 -8
- package/docs/icons/arrow-up-arrow-down.md +12 -8
- package/docs/icons/arrow-up-down-left-right.md +12 -8
- package/docs/icons/arrow-up-down.md +12 -8
- package/docs/icons/arrow-up.md +12 -8
- package/docs/icons/banknotes.md +12 -8
- package/docs/icons/bars-3.md +12 -8
- package/docs/icons/basket.md +12 -8
- package/docs/icons/battery-0.md +12 -8
- package/docs/icons/battery-10.md +12 -8
- package/docs/icons/battery-100.md +12 -8
- package/docs/icons/battery-50.md +12 -8
- package/docs/icons/bell-alert.md +12 -8
- package/docs/icons/bell.md +12 -8
- package/docs/icons/bolt.md +12 -8
- package/docs/icons/book-close.md +12 -8
- package/docs/icons/book-open.md +12 -8
- package/docs/icons/book-stacked.md +12 -8
- package/docs/icons/bookmark.md +12 -8
- package/docs/icons/briefcase.md +12 -8
- package/docs/icons/brush.md +12 -8
- package/docs/icons/cake.md +12 -8
- package/docs/icons/calendar-approve.md +12 -8
- package/docs/icons/calendar-days.md +12 -8
- package/docs/icons/calendar-minus.md +12 -8
- package/docs/icons/calendar-plus.md +12 -8
- package/docs/icons/calendar-reject.md +12 -8
- package/docs/icons/calendar.md +12 -8
- package/docs/icons/camera.md +12 -8
- package/docs/icons/carousel.md +12 -8
- package/docs/icons/chart-bar.md +12 -8
- package/docs/icons/chart-line.md +12 -8
- package/docs/icons/chart-pie.md +12 -8
- package/docs/icons/chat-bubble-left-ellipsis.md +12 -8
- package/docs/icons/chat-bubble-left-right.md +12 -8
- package/docs/icons/chat-bubble-left.md +12 -8
- package/docs/icons/chat-bubble-right-ellipsis.md +12 -8
- package/docs/icons/chat-bubble-right.md +12 -8
- package/docs/icons/chatbot.md +12 -8
- package/docs/icons/check.md +12 -8
- package/docs/icons/chevron-double-down.md +12 -8
- package/docs/icons/chevron-double-left.md +12 -8
- package/docs/icons/chevron-double-right.md +12 -8
- package/docs/icons/chevron-double-up.md +12 -8
- package/docs/icons/chevron-down.md +12 -8
- package/docs/icons/chevron-left.md +12 -8
- package/docs/icons/chevron-right.md +12 -8
- package/docs/icons/chevron-up.md +12 -8
- package/docs/icons/circle.md +12 -8
- package/docs/icons/clipboard-document-check.md +12 -8
- package/docs/icons/clipboard.md +12 -8
- package/docs/icons/clock.md +12 -8
- package/docs/icons/cloud.md +12 -8
- package/docs/icons/code.md +12 -8
- package/docs/icons/cog-6-tooth.md +12 -8
- package/docs/icons/compress.md +12 -8
- package/docs/icons/computer-code.md +12 -8
- package/docs/icons/computer-desktop.md +12 -8
- package/docs/icons/computer-laptop.md +12 -8
- package/docs/icons/cone.md +12 -8
- package/docs/icons/console.md +12 -8
- package/docs/icons/container.md +12 -8
- package/docs/icons/contrast.md +12 -8
- package/docs/icons/controller.md +12 -8
- package/docs/icons/credit-card.md +12 -8
- package/docs/icons/crop.md +12 -8
- package/docs/icons/crosshair.md +12 -8
- package/docs/icons/cube.md +12 -8
- package/docs/icons/currency-dollar.md +12 -8
- package/docs/icons/currency-euro.md +12 -8
- package/docs/icons/currency-pound.md +12 -8
- package/docs/icons/currency-ringgit.md +12 -8
- package/docs/icons/currency-yen.md +12 -8
- package/docs/icons/cursor.md +12 -8
- package/docs/icons/cylinder-half.md +12 -8
- package/docs/icons/cylinder.md +12 -8
- package/docs/icons/device-phone-mobile.md +12 -8
- package/docs/icons/device-tablet.md +12 -8
- package/docs/icons/diamond.md +12 -8
- package/docs/icons/document-duplicate.md +12 -8
- package/docs/icons/document-text.md +12 -8
- package/docs/icons/document.md +12 -8
- package/docs/icons/dodecahedron.md +12 -8
- package/docs/icons/double-tick.md +12 -8
- package/docs/icons/draw-curve.md +12 -8
- package/docs/icons/draw-line.md +12 -8
- package/docs/icons/envelope-open.md +12 -8
- package/docs/icons/envelope.md +12 -8
- package/docs/icons/eraser.md +12 -8
- package/docs/icons/exclamation-circle.md +12 -8
- package/docs/icons/exclamation-triangle.md +12 -8
- package/docs/icons/expand.md +12 -8
- package/docs/icons/eye-slash.md +12 -8
- package/docs/icons/eye.md +12 -8
- package/docs/icons/flag.md +12 -8
- package/docs/icons/flip-horizontal.md +12 -8
- package/docs/icons/flip-vertical.md +12 -8
- package/docs/icons/focus.md +12 -8
- package/docs/icons/folder-minus.md +12 -8
- package/docs/icons/folder-open.md +12 -8
- package/docs/icons/folder-plus.md +12 -8
- package/docs/icons/folder.md +12 -8
- package/docs/icons/font.md +12 -8
- package/docs/icons/game.md +12 -8
- package/docs/icons/gift.md +12 -8
- package/docs/icons/globe-alt.md +12 -8
- package/docs/icons/gradient.md +12 -8
- package/docs/icons/grid.md +12 -8
- package/docs/icons/group-object.md +12 -8
- package/docs/icons/hand-grab.md +12 -8
- package/docs/icons/hand-thumb-down.md +12 -8
- package/docs/icons/hand-thumb-up.md +12 -8
- package/docs/icons/hand.md +12 -8
- package/docs/icons/heart-extruded.md +12 -8
- package/docs/icons/heart.md +12 -8
- package/docs/icons/hexagon.md +12 -8
- package/docs/icons/home.md +12 -8
- package/docs/icons/horizontal-3-dots.md +12 -8
- package/docs/icons/hourglass-0.md +12 -8
- package/docs/icons/hourglass-100.md +12 -8
- package/docs/icons/hourglass-50.md +12 -8
- package/docs/icons/hourglass-80.md +12 -8
- package/docs/icons/icosahedron.md +12 -8
- package/docs/icons/inbox.md +12 -8
- package/docs/icons/information-circle.md +12 -8
- package/docs/icons/key.md +12 -8
- package/docs/icons/layer-stacks.md +12 -8
- package/docs/icons/layout.md +12 -8
- package/docs/icons/light-bulb.md +12 -8
- package/docs/icons/lock-closed.md +12 -8
- package/docs/icons/lock-open.md +12 -8
- package/docs/icons/magic-wand.md +12 -8
- package/docs/icons/magnifying-glass-focus.md +12 -8
- package/docs/icons/magnifying-glass-minus.md +12 -8
- package/docs/icons/magnifying-glass-plus.md +12 -8
- package/docs/icons/magnifying-glass.md +12 -8
- package/docs/icons/map-pin.md +12 -8
- package/docs/icons/map.md +12 -8
- package/docs/icons/marquee.md +12 -8
- package/docs/icons/maximize.md +12 -8
- package/docs/icons/medal.md +12 -8
- package/docs/icons/microphone-mute.md +12 -8
- package/docs/icons/microphone.md +12 -8
- package/docs/icons/minimize.md +12 -8
- package/docs/icons/minus.md +12 -8
- package/docs/icons/moon.md +12 -8
- package/docs/icons/musical-note.md +12 -8
- package/docs/icons/octahedron.md +12 -8
- package/docs/icons/panorama.md +12 -8
- package/docs/icons/paper-clip.md +12 -8
- package/docs/icons/pause-circle.md +12 -8
- package/docs/icons/pause.md +12 -8
- package/docs/icons/pencil.md +12 -8
- package/docs/icons/phone-x-mark.md +12 -8
- package/docs/icons/phone.md +12 -8
- package/docs/icons/photo.md +12 -8
- package/docs/icons/plane.md +12 -8
- package/docs/icons/play-circle.md +12 -8
- package/docs/icons/play.md +12 -8
- package/docs/icons/plus.md +12 -8
- package/docs/icons/polygon.md +12 -8
- package/docs/icons/presentation-chart-line.md +12 -8
- package/docs/icons/presentation-media.md +12 -8
- package/docs/icons/pyramid.md +12 -8
- package/docs/icons/qr-code.md +12 -8
- package/docs/icons/question-mark-circle.md +12 -8
- package/docs/icons/rectangle.md +12 -8
- package/docs/icons/reel.md +12 -8
- package/docs/icons/robot.md +12 -8
- package/docs/icons/roof.md +12 -8
- package/docs/icons/rotate-add.md +12 -8
- package/docs/icons/rotate-minus.md +12 -8
- package/docs/icons/save.md +12 -8
- package/docs/icons/scissor.md +12 -8
- package/docs/icons/shapes.md +12 -8
- package/docs/icons/shield-check.md +12 -8
- package/docs/icons/shield-exclamation.md +12 -8
- package/docs/icons/shopping-bag.md +12 -8
- package/docs/icons/shopping-cart.md +12 -8
- package/docs/icons/sliders-horizontal.md +12 -8
- package/docs/icons/sliders-vertical.md +12 -8
- package/docs/icons/sparkles.md +12 -8
- package/docs/icons/speaker-wave.md +12 -8
- package/docs/icons/speaker-x-mark.md +12 -8
- package/docs/icons/sphere-half.md +12 -8
- package/docs/icons/sphere.md +12 -8
- package/docs/icons/square.md +12 -8
- package/docs/icons/star.md +12 -8
- package/docs/icons/stop-circle.md +12 -8
- package/docs/icons/stop.md +12 -8
- package/docs/icons/sun.md +12 -8
- package/docs/icons/table.md +12 -8
- package/docs/icons/tabs.md +12 -8
- package/docs/icons/tetrahedron.md +12 -8
- package/docs/icons/text-align-center.md +12 -8
- package/docs/icons/text-align-justify.md +12 -8
- package/docs/icons/text-align-left.md +12 -8
- package/docs/icons/text-align-right.md +12 -8
- package/docs/icons/text.md +12 -8
- package/docs/icons/thunder.md +12 -8
- package/docs/icons/tic-tac-toe.md +12 -8
- package/docs/icons/time-reset.md +12 -8
- package/docs/icons/torus-knot.md +12 -8
- package/docs/icons/torus.md +12 -8
- package/docs/icons/trash.md +12 -8
- package/docs/icons/trophy.md +12 -8
- package/docs/icons/truck.md +12 -8
- package/docs/icons/tube.md +12 -8
- package/docs/icons/ungroup-object.md +12 -8
- package/docs/icons/user-circle.md +12 -8
- package/docs/icons/user-group.md +12 -8
- package/docs/icons/user-minus.md +12 -8
- package/docs/icons/user-plus.md +12 -8
- package/docs/icons/user.md +12 -8
- package/docs/icons/users.md +12 -8
- package/docs/icons/vertical-3-dots.md +12 -8
- package/docs/icons/video-camera.md +12 -8
- package/docs/icons/vr.md +12 -8
- package/docs/icons/wedge.md +12 -8
- package/docs/icons/whiteboard.md +12 -8
- package/docs/icons/wifi.md +12 -8
- package/docs/icons/window.md +12 -8
- package/docs/icons/x-mark.md +12 -8
- package/docs/index.md +12 -5
- package/docs/ms/guide/configuration.md +3 -48
- package/docs/ms/guide/getting-started.md +10 -3
- package/docs/ms/guide/installation.md +1 -1
- package/docs/ms/guide/styling.md +10 -10
- package/docs/ms/guide/usage.md +52 -44
- package/docs/ms/icons/alert.md +12 -8
- package/docs/ms/icons/align-bottom-object.md +12 -8
- package/docs/ms/icons/align-center-object.md +12 -8
- package/docs/ms/icons/align-left-object.md +12 -8
- package/docs/ms/icons/align-middle-object.md +12 -8
- package/docs/ms/icons/align-right-object.md +12 -8
- package/docs/ms/icons/align-top-object.md +12 -8
- package/docs/ms/icons/ar.md +12 -8
- package/docs/ms/icons/archive-box.md +12 -8
- package/docs/ms/icons/arrow-down.md +12 -8
- package/docs/ms/icons/arrow-left-arrow-right.md +12 -8
- package/docs/ms/icons/arrow-left-on-rectangle.md +12 -8
- package/docs/ms/icons/arrow-left-right.md +12 -8
- package/docs/ms/icons/arrow-left.md +12 -8
- package/docs/ms/icons/arrow-long-down.md +12 -8
- package/docs/ms/icons/arrow-long-left.md +12 -8
- package/docs/ms/icons/arrow-long-right.md +12 -8
- package/docs/ms/icons/arrow-long-up.md +12 -8
- package/docs/ms/icons/arrow-path.md +12 -8
- package/docs/ms/icons/arrow-right-on-rectangle.md +12 -8
- package/docs/ms/icons/arrow-right.md +12 -8
- package/docs/ms/icons/arrow-rotate-ccw.md +12 -8
- package/docs/ms/icons/arrow-rotate-cw.md +12 -8
- package/docs/ms/icons/arrow-top-right-on-square.md +12 -8
- package/docs/ms/icons/arrow-up-arrow-down.md +12 -8
- package/docs/ms/icons/arrow-up-down-left-right.md +12 -8
- package/docs/ms/icons/arrow-up-down.md +12 -8
- package/docs/ms/icons/arrow-up.md +12 -8
- package/docs/ms/icons/banknotes.md +12 -8
- package/docs/ms/icons/bars-3.md +12 -8
- package/docs/ms/icons/basket.md +12 -8
- package/docs/ms/icons/battery-0.md +12 -8
- package/docs/ms/icons/battery-10.md +12 -8
- package/docs/ms/icons/battery-100.md +12 -8
- package/docs/ms/icons/battery-50.md +12 -8
- package/docs/ms/icons/bell-alert.md +12 -8
- package/docs/ms/icons/bell.md +12 -8
- package/docs/ms/icons/bolt.md +12 -8
- package/docs/ms/icons/book-close.md +12 -8
- package/docs/ms/icons/book-open.md +12 -8
- package/docs/ms/icons/book-stacked.md +12 -8
- package/docs/ms/icons/bookmark.md +12 -8
- package/docs/ms/icons/briefcase.md +12 -8
- package/docs/ms/icons/brush.md +12 -8
- package/docs/ms/icons/cake.md +12 -8
- package/docs/ms/icons/calendar-approve.md +12 -8
- package/docs/ms/icons/calendar-days.md +12 -8
- package/docs/ms/icons/calendar-minus.md +12 -8
- package/docs/ms/icons/calendar-plus.md +12 -8
- package/docs/ms/icons/calendar-reject.md +12 -8
- package/docs/ms/icons/calendar.md +12 -8
- package/docs/ms/icons/camera.md +12 -8
- package/docs/ms/icons/carousel.md +12 -8
- package/docs/ms/icons/chart-bar.md +12 -8
- package/docs/ms/icons/chart-line.md +12 -8
- package/docs/ms/icons/chart-pie.md +12 -8
- package/docs/ms/icons/chat-bubble-left-ellipsis.md +12 -8
- package/docs/ms/icons/chat-bubble-left-right.md +12 -8
- package/docs/ms/icons/chat-bubble-left.md +12 -8
- package/docs/ms/icons/chat-bubble-right-ellipsis.md +12 -8
- package/docs/ms/icons/chat-bubble-right.md +12 -8
- package/docs/ms/icons/chatbot.md +12 -8
- package/docs/ms/icons/check.md +12 -8
- package/docs/ms/icons/chevron-double-down.md +12 -8
- package/docs/ms/icons/chevron-double-left.md +12 -8
- package/docs/ms/icons/chevron-double-right.md +12 -8
- package/docs/ms/icons/chevron-double-up.md +12 -8
- package/docs/ms/icons/chevron-down.md +12 -8
- package/docs/ms/icons/chevron-left.md +12 -8
- package/docs/ms/icons/chevron-right.md +12 -8
- package/docs/ms/icons/chevron-up.md +12 -8
- package/docs/ms/icons/circle.md +12 -8
- package/docs/ms/icons/clipboard-document-check.md +12 -8
- package/docs/ms/icons/clipboard.md +12 -8
- package/docs/ms/icons/clock.md +12 -8
- package/docs/ms/icons/cloud.md +12 -8
- package/docs/ms/icons/code.md +12 -8
- package/docs/ms/icons/cog-6-tooth.md +12 -8
- package/docs/ms/icons/compress.md +12 -8
- package/docs/ms/icons/computer-code.md +12 -8
- package/docs/ms/icons/computer-desktop.md +12 -8
- package/docs/ms/icons/computer-laptop.md +12 -8
- package/docs/ms/icons/cone.md +12 -8
- package/docs/ms/icons/console.md +12 -8
- package/docs/ms/icons/container.md +12 -8
- package/docs/ms/icons/contrast.md +12 -8
- package/docs/ms/icons/controller.md +12 -8
- package/docs/ms/icons/credit-card.md +12 -8
- package/docs/ms/icons/crop.md +12 -8
- package/docs/ms/icons/crosshair.md +12 -8
- package/docs/ms/icons/cube.md +12 -8
- package/docs/ms/icons/currency-dollar.md +12 -8
- package/docs/ms/icons/currency-euro.md +12 -8
- package/docs/ms/icons/currency-pound.md +12 -8
- package/docs/ms/icons/currency-ringgit.md +12 -8
- package/docs/ms/icons/currency-yen.md +12 -8
- package/docs/ms/icons/cursor.md +12 -8
- package/docs/ms/icons/cylinder-half.md +12 -8
- package/docs/ms/icons/cylinder.md +12 -8
- package/docs/ms/icons/device-phone-mobile.md +12 -8
- package/docs/ms/icons/device-tablet.md +12 -8
- package/docs/ms/icons/diamond.md +12 -8
- package/docs/ms/icons/document-duplicate.md +12 -8
- package/docs/ms/icons/document-text.md +12 -8
- package/docs/ms/icons/document.md +12 -8
- package/docs/ms/icons/dodecahedron.md +12 -8
- package/docs/ms/icons/double-tick.md +12 -8
- package/docs/ms/icons/draw-curve.md +12 -8
- package/docs/ms/icons/draw-line.md +12 -8
- package/docs/ms/icons/envelope-open.md +12 -8
- package/docs/ms/icons/envelope.md +12 -8
- package/docs/ms/icons/eraser.md +12 -8
- package/docs/ms/icons/exclamation-circle.md +12 -8
- package/docs/ms/icons/exclamation-triangle.md +12 -8
- package/docs/ms/icons/expand.md +12 -8
- package/docs/ms/icons/eye-slash.md +12 -8
- package/docs/ms/icons/eye.md +12 -8
- package/docs/ms/icons/flag.md +12 -8
- package/docs/ms/icons/flip-horizontal.md +12 -8
- package/docs/ms/icons/flip-vertical.md +12 -8
- package/docs/ms/icons/focus.md +12 -8
- package/docs/ms/icons/folder-minus.md +12 -8
- package/docs/ms/icons/folder-open.md +12 -8
- package/docs/ms/icons/folder-plus.md +12 -8
- package/docs/ms/icons/folder.md +12 -8
- package/docs/ms/icons/font.md +12 -8
- package/docs/ms/icons/game.md +12 -8
- package/docs/ms/icons/gift.md +12 -8
- package/docs/ms/icons/globe-alt.md +12 -8
- package/docs/ms/icons/gradient.md +12 -8
- package/docs/ms/icons/grid.md +12 -8
- package/docs/ms/icons/group-object.md +12 -8
- package/docs/ms/icons/hand-grab.md +12 -8
- package/docs/ms/icons/hand-thumb-down.md +12 -8
- package/docs/ms/icons/hand-thumb-up.md +12 -8
- package/docs/ms/icons/hand.md +12 -8
- package/docs/ms/icons/heart-extruded.md +12 -8
- package/docs/ms/icons/heart.md +12 -8
- package/docs/ms/icons/hexagon.md +12 -8
- package/docs/ms/icons/home.md +12 -8
- package/docs/ms/icons/horizontal-3-dots.md +12 -8
- package/docs/ms/icons/hourglass-0.md +12 -8
- package/docs/ms/icons/hourglass-100.md +12 -8
- package/docs/ms/icons/hourglass-50.md +12 -8
- package/docs/ms/icons/hourglass-80.md +12 -8
- package/docs/ms/icons/icosahedron.md +12 -8
- package/docs/ms/icons/inbox.md +12 -8
- package/docs/ms/icons/information-circle.md +12 -8
- package/docs/ms/icons/key.md +12 -8
- package/docs/ms/icons/layer-stacks.md +12 -8
- package/docs/ms/icons/layout.md +12 -8
- package/docs/ms/icons/light-bulb.md +12 -8
- package/docs/ms/icons/lock-closed.md +12 -8
- package/docs/ms/icons/lock-open.md +12 -8
- package/docs/ms/icons/magic-wand.md +12 -8
- package/docs/ms/icons/magnifying-glass-focus.md +12 -8
- package/docs/ms/icons/magnifying-glass-minus.md +12 -8
- package/docs/ms/icons/magnifying-glass-plus.md +12 -8
- package/docs/ms/icons/magnifying-glass.md +12 -8
- package/docs/ms/icons/map-pin.md +12 -8
- package/docs/ms/icons/map.md +12 -8
- package/docs/ms/icons/marquee.md +12 -8
- package/docs/ms/icons/maximize.md +12 -8
- package/docs/ms/icons/medal.md +12 -8
- package/docs/ms/icons/microphone-mute.md +12 -8
- package/docs/ms/icons/microphone.md +12 -8
- package/docs/ms/icons/minimize.md +12 -8
- package/docs/ms/icons/minus.md +12 -8
- package/docs/ms/icons/moon.md +12 -8
- package/docs/ms/icons/musical-note.md +12 -8
- package/docs/ms/icons/octahedron.md +12 -8
- package/docs/ms/icons/panorama.md +12 -8
- package/docs/ms/icons/paper-clip.md +12 -8
- package/docs/ms/icons/pause-circle.md +12 -8
- package/docs/ms/icons/pause.md +12 -8
- package/docs/ms/icons/pencil.md +12 -8
- package/docs/ms/icons/phone-x-mark.md +12 -8
- package/docs/ms/icons/phone.md +12 -8
- package/docs/ms/icons/photo.md +12 -8
- package/docs/ms/icons/plane.md +12 -8
- package/docs/ms/icons/play-circle.md +12 -8
- package/docs/ms/icons/play.md +12 -8
- package/docs/ms/icons/plus.md +12 -8
- package/docs/ms/icons/polygon.md +12 -8
- package/docs/ms/icons/presentation-chart-line.md +12 -8
- package/docs/ms/icons/presentation-media.md +12 -8
- package/docs/ms/icons/pyramid.md +12 -8
- package/docs/ms/icons/qr-code.md +12 -8
- package/docs/ms/icons/question-mark-circle.md +12 -8
- package/docs/ms/icons/rectangle.md +12 -8
- package/docs/ms/icons/reel.md +12 -8
- package/docs/ms/icons/robot.md +12 -8
- package/docs/ms/icons/roof.md +12 -8
- package/docs/ms/icons/rotate-add.md +12 -8
- package/docs/ms/icons/rotate-minus.md +12 -8
- package/docs/ms/icons/save.md +12 -8
- package/docs/ms/icons/scissor.md +12 -8
- package/docs/ms/icons/shapes.md +12 -8
- package/docs/ms/icons/shield-check.md +12 -8
- package/docs/ms/icons/shield-exclamation.md +12 -8
- package/docs/ms/icons/shopping-bag.md +12 -8
- package/docs/ms/icons/shopping-cart.md +12 -8
- package/docs/ms/icons/sliders-horizontal.md +12 -8
- package/docs/ms/icons/sliders-vertical.md +12 -8
- package/docs/ms/icons/sparkles.md +12 -8
- package/docs/ms/icons/speaker-wave.md +12 -8
- package/docs/ms/icons/speaker-x-mark.md +12 -8
- package/docs/ms/icons/sphere-half.md +12 -8
- package/docs/ms/icons/sphere.md +12 -8
- package/docs/ms/icons/square.md +12 -8
- package/docs/ms/icons/star.md +12 -8
- package/docs/ms/icons/stop-circle.md +12 -8
- package/docs/ms/icons/stop.md +12 -8
- package/docs/ms/icons/sun.md +12 -8
- package/docs/ms/icons/table.md +12 -8
- package/docs/ms/icons/tabs.md +12 -8
- package/docs/ms/icons/tetrahedron.md +12 -8
- package/docs/ms/icons/text-align-center.md +12 -8
- package/docs/ms/icons/text-align-justify.md +12 -8
- package/docs/ms/icons/text-align-left.md +12 -8
- package/docs/ms/icons/text-align-right.md +12 -8
- package/docs/ms/icons/text.md +12 -8
- package/docs/ms/icons/thunder.md +12 -8
- package/docs/ms/icons/tic-tac-toe.md +12 -8
- package/docs/ms/icons/time-reset.md +12 -8
- package/docs/ms/icons/torus-knot.md +12 -8
- package/docs/ms/icons/torus.md +12 -8
- package/docs/ms/icons/trash.md +12 -8
- package/docs/ms/icons/trophy.md +12 -8
- package/docs/ms/icons/truck.md +12 -8
- package/docs/ms/icons/tube.md +12 -8
- package/docs/ms/icons/ungroup-object.md +12 -8
- package/docs/ms/icons/user-circle.md +12 -8
- package/docs/ms/icons/user-group.md +12 -8
- package/docs/ms/icons/user-minus.md +12 -8
- package/docs/ms/icons/user-plus.md +12 -8
- package/docs/ms/icons/user.md +12 -8
- package/docs/ms/icons/users.md +12 -8
- package/docs/ms/icons/vertical-3-dots.md +12 -8
- package/docs/ms/icons/video-camera.md +12 -8
- package/docs/ms/icons/vr.md +12 -8
- package/docs/ms/icons/wedge.md +12 -8
- package/docs/ms/icons/whiteboard.md +12 -8
- package/docs/ms/icons/wifi.md +12 -8
- package/docs/ms/icons/window.md +12 -8
- package/docs/ms/icons/x-mark.md +12 -8
- package/docs/ms/index.md +12 -5
- package/docs/public/assets/senangstart-icons-logo.svg +1 -0
- package/docs/public/assets/ss-logo.svg +83 -0
- package/docs/public/llms.txt +285 -0
- package/package.json +6 -1
- package/scripts/build-icon-docs.js +24 -16
- package/scripts/build-svgs.js +14 -6
- package/scripts/build.js +11 -0
- package/scripts/generate-llms-txt.js +70 -0
- package/src/index.js +1 -2
- package/tests/build-icon-docs.test.js +3 -1
- package/webpack.config.js +44 -39
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Build Scripts
|
|
3
|
+
description: Understanding and modifying the SenangStart Icons build pipeline
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Build Scripts Skill
|
|
7
|
+
|
|
8
|
+
This skill covers the build pipeline scripts for SenangStart Icons.
|
|
9
|
+
|
|
10
|
+
## Build Pipeline Overview
|
|
11
|
+
|
|
12
|
+
The build system consists of four scripts that run sequentially:
|
|
13
|
+
|
|
14
|
+
1. `build-svgs.js` → Generates SVG files from JSON
|
|
15
|
+
2. `build-css.js` → Generates CSS with mask-based icons
|
|
16
|
+
3. `build-icon-docs.js` → Generates markdown documentation
|
|
17
|
+
4. `webpack` → Bundles everything into dist/
|
|
18
|
+
|
|
19
|
+
## Script Details
|
|
20
|
+
|
|
21
|
+
### 1. build-svgs.js
|
|
22
|
+
|
|
23
|
+
**Location:** `scripts/build-svgs.js`
|
|
24
|
+
|
|
25
|
+
**Purpose:** Converts icons.json into individual SVG files and a JS index
|
|
26
|
+
|
|
27
|
+
**Inputs:**
|
|
28
|
+
- `src/icons.json`
|
|
29
|
+
|
|
30
|
+
**Outputs:**
|
|
31
|
+
- `src/svg/{slug}.svg` - Individual SVG files
|
|
32
|
+
- `src/svg/index.js` - Export map for Webpack
|
|
33
|
+
|
|
34
|
+
**Key Logic:**
|
|
35
|
+
```javascript
|
|
36
|
+
// Each icon generates an SVG with standard attributes
|
|
37
|
+
const svgContent = `<svg viewBox="${vBox}" fill="${fl}" stroke="${strk}" stroke-width="${strkWidth}" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
|
|
38
|
+
<g><path d="${src}" /></g>
|
|
39
|
+
</svg>`;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### 2. build-css.js
|
|
45
|
+
|
|
46
|
+
**Location:** `scripts/build-css.js`
|
|
47
|
+
|
|
48
|
+
**Purpose:** Generates CSS using mask-image for pure-CSS icons
|
|
49
|
+
|
|
50
|
+
**Inputs:**
|
|
51
|
+
- `src/icons.json`
|
|
52
|
+
|
|
53
|
+
**Outputs:**
|
|
54
|
+
- `src/icons.css`
|
|
55
|
+
|
|
56
|
+
**Key Logic:**
|
|
57
|
+
```javascript
|
|
58
|
+
// Base .ss class styles
|
|
59
|
+
.ss {
|
|
60
|
+
display: inline-block;
|
|
61
|
+
width: 1em;
|
|
62
|
+
height: 1em;
|
|
63
|
+
background-color: currentColor;
|
|
64
|
+
-webkit-mask-size: contain;
|
|
65
|
+
mask-size: contain;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Each icon gets a mask-image class
|
|
69
|
+
.ss-{slug} {
|
|
70
|
+
mask-image: url("data:image/svg+xml,...");
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**SVG Encoding Function:**
|
|
75
|
+
```javascript
|
|
76
|
+
function encodeSvg(svg) {
|
|
77
|
+
return svg
|
|
78
|
+
.replace(/"/g, "'")
|
|
79
|
+
.replace(/%/g, "%25")
|
|
80
|
+
.replace(/#/g, "%23")
|
|
81
|
+
// ... more replacements
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### 3. build-icon-docs.js
|
|
88
|
+
|
|
89
|
+
**Location:** `scripts/build-icon-docs.js`
|
|
90
|
+
|
|
91
|
+
**Purpose:** Generates VitePress markdown pages for each icon
|
|
92
|
+
|
|
93
|
+
**Inputs:**
|
|
94
|
+
- `src/icons.json`
|
|
95
|
+
|
|
96
|
+
**Outputs:**
|
|
97
|
+
- `docs/icons/{slug}.md` - English icon pages
|
|
98
|
+
- `docs/ms/icons/{slug}.md` - Malay icon pages
|
|
99
|
+
- `docs/icons/index.md` - English gallery
|
|
100
|
+
- `docs/ms/icons/index.md` - Malay gallery
|
|
101
|
+
|
|
102
|
+
**Key Features:**
|
|
103
|
+
- Generates SVG preview with inline SVG
|
|
104
|
+
- Creates usage examples for both methods
|
|
105
|
+
- Includes icon metadata (name, slug, tags)
|
|
106
|
+
- Provides raw SVG code
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### 4. build.js (Orchestrator)
|
|
111
|
+
|
|
112
|
+
**Location:** `scripts/build.js`
|
|
113
|
+
|
|
114
|
+
**Purpose:** Runs all build steps in sequence
|
|
115
|
+
|
|
116
|
+
**Execution Order:**
|
|
117
|
+
```javascript
|
|
118
|
+
execSync('node scripts/build-svgs.js');
|
|
119
|
+
execSync('node scripts/build-css.js');
|
|
120
|
+
execSync('node scripts/build-icon-docs.js');
|
|
121
|
+
execSync('npx webpack --mode production');
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Modifying Build Scripts
|
|
125
|
+
|
|
126
|
+
### Adding New Icon Properties
|
|
127
|
+
|
|
128
|
+
1. Update `icons.json` schema documentation
|
|
129
|
+
2. Modify `build-svgs.js` to use new property
|
|
130
|
+
3. Modify `build-css.js` if CSS output changes
|
|
131
|
+
4. Update `build-icon-docs.js` to display new property
|
|
132
|
+
5. Add tests in `tests/build-*.test.js`
|
|
133
|
+
|
|
134
|
+
### Adding Build Outputs
|
|
135
|
+
|
|
136
|
+
1. Create new build script in `scripts/`
|
|
137
|
+
2. Add npm script to `package.json`
|
|
138
|
+
3. Include in `scripts/build.js` orchestrator
|
|
139
|
+
4. Write tests for the new script
|
|
140
|
+
|
|
141
|
+
## Webpack Configuration
|
|
142
|
+
|
|
143
|
+
**Location:** `webpack.config.js`
|
|
144
|
+
|
|
145
|
+
**Entry:** `src/index.js`
|
|
146
|
+
|
|
147
|
+
**Output:**
|
|
148
|
+
- `dist/senangstart-icon.min.js` (UMD)
|
|
149
|
+
- `dist/senangstart.min.css`
|
|
150
|
+
|
|
151
|
+
**Key Features:**
|
|
152
|
+
- Babel transpilation for browser compatibility
|
|
153
|
+
- CSS extraction and minification
|
|
154
|
+
- SVG as asset/source (inline in JS)
|
|
155
|
+
- Source maps enabled
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Icon Development
|
|
3
|
+
description: Guidelines for creating and optimizing SVG icons for SenangStart Icons
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Icon Development Skill
|
|
7
|
+
|
|
8
|
+
This skill covers best practices for creating, optimizing, and adding icons to the library.
|
|
9
|
+
|
|
10
|
+
## Icon Requirements
|
|
11
|
+
|
|
12
|
+
### SVG Specifications
|
|
13
|
+
|
|
14
|
+
| Property | Value |
|
|
15
|
+
|----------|-------|
|
|
16
|
+
| ViewBox | `0 0 24 24` (standard) |
|
|
17
|
+
| Fill | `none` (stroke-based icons) |
|
|
18
|
+
| Stroke | `currentColor` |
|
|
19
|
+
| Stroke Width | `2` (default) |
|
|
20
|
+
| Stroke Linecap | `round` |
|
|
21
|
+
| Stroke Linejoin | `round` |
|
|
22
|
+
|
|
23
|
+
### Path Guidelines
|
|
24
|
+
|
|
25
|
+
1. **Use single path when possible** - Simpler paths are easier to render
|
|
26
|
+
2. **Optimize coordinates** - Round to 1-2 decimal places
|
|
27
|
+
3. **Center the icon** - Keep equal padding on all sides
|
|
28
|
+
4. **Design for stroke** - Icons should look good at varying stroke widths
|
|
29
|
+
|
|
30
|
+
## Creating an Icon
|
|
31
|
+
|
|
32
|
+
### Step 1: Design the SVG
|
|
33
|
+
|
|
34
|
+
Create in your preferred SVG editor (Figma, Illustrator, Inkscape):
|
|
35
|
+
|
|
36
|
+
```svg
|
|
37
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
|
38
|
+
fill="none" stroke="currentColor" stroke-width="2"
|
|
39
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
40
|
+
<path d="M12 2L2 7l10 5 10-5-10-5z"/>
|
|
41
|
+
</svg>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Step 2: Extract the Path
|
|
45
|
+
|
|
46
|
+
Copy just the `d` attribute value from the `<path>` element.
|
|
47
|
+
|
|
48
|
+
### Step 3: Add to icons.json
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"name": "Layer Stack",
|
|
53
|
+
"slug": "layer-stack",
|
|
54
|
+
"src": "M12 2L2 7l10 5 10-5-10-5z",
|
|
55
|
+
"tags": ["layer", "stack", "design", "graphics"]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 4: Build and Verify
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm run build
|
|
63
|
+
npm run docs:dev
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Path Optimization
|
|
67
|
+
|
|
68
|
+
### Remove Unnecessary Precision
|
|
69
|
+
|
|
70
|
+
Before:
|
|
71
|
+
```
|
|
72
|
+
M12.000000 2.000000L2.000000 7.000000
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
After:
|
|
76
|
+
```
|
|
77
|
+
M12 2L2 7
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Combine Continuous Paths
|
|
81
|
+
|
|
82
|
+
Before:
|
|
83
|
+
```
|
|
84
|
+
M5 5L10 5 M10 5L15 5
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
After:
|
|
88
|
+
```
|
|
89
|
+
M5 5L15 5
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Use Relative Commands
|
|
93
|
+
|
|
94
|
+
Before:
|
|
95
|
+
```
|
|
96
|
+
M5 5L10 10L15 5
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
After:
|
|
100
|
+
```
|
|
101
|
+
M5 5l5 5l5-5
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Naming Conventions
|
|
105
|
+
|
|
106
|
+
### Icon Names (name field)
|
|
107
|
+
- Title case with spaces: `"Arrow Left"`, `"Shopping Cart"`
|
|
108
|
+
- Descriptive and concise
|
|
109
|
+
|
|
110
|
+
### Slugs (slug field)
|
|
111
|
+
- Lowercase with hyphens: `arrow-left`, `shopping-cart`
|
|
112
|
+
- Match the name but URL-safe
|
|
113
|
+
- Keep consistent with existing patterns
|
|
114
|
+
|
|
115
|
+
### Tags (tags array)
|
|
116
|
+
- Include broken-down name words
|
|
117
|
+
- Add related concepts
|
|
118
|
+
- Include action verbs if applicable
|
|
119
|
+
- Example: `["arrow", "left", "back", "previous", "navigate"]`
|
|
120
|
+
|
|
121
|
+
## Multi-Path Icons
|
|
122
|
+
|
|
123
|
+
For complex icons with multiple paths, combine them:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"name": "Complex Icon",
|
|
128
|
+
"slug": "complex-icon",
|
|
129
|
+
"src": "M5 5h14 M5 12h14 M5 19h14",
|
|
130
|
+
"tags": ["menu", "hamburger", "bars"]
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Custom Properties
|
|
135
|
+
|
|
136
|
+
Override defaults when needed:
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"name": "Filled Circle",
|
|
141
|
+
"slug": "filled-circle",
|
|
142
|
+
"src": "M12 12m-10 0a10 10 0 1 0 20 0a10 10 0 1 0-20 0",
|
|
143
|
+
"fill": "currentColor",
|
|
144
|
+
"stroke": "none",
|
|
145
|
+
"tags": ["circle", "dot", "bullet"]
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Testing Icons
|
|
150
|
+
|
|
151
|
+
1. **Visual check** - Preview in browser via `index.html`
|
|
152
|
+
2. **Thickness test** - Verify icon looks good at various thicknesses
|
|
153
|
+
3. **Size test** - Check rendering at small (16px) and large (48px) sizes
|
|
154
|
+
4. **Color test** - Verify `currentColor` inheritance works
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: SenangStart Icons Architecture
|
|
3
|
+
description: Understanding the SenangStart Icons library architecture and core components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SenangStart Icons Architecture
|
|
7
|
+
|
|
8
|
+
This skill provides a comprehensive understanding of the SenangStart Icons library architecture.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
SenangStart Icons is an SVG icon library with two delivery methods:
|
|
13
|
+
1. **Web Component** (`<ss-icon>`) - Dynamic icon rendering with thickness control
|
|
14
|
+
2. **CSS Classes** (`<i class="ss ss-{slug}">`) - Static mask-based icons
|
|
15
|
+
|
|
16
|
+
## Project Structure
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
senangstart-icons/
|
|
20
|
+
├── src/
|
|
21
|
+
│ ├── icons.json # Master icon definitions
|
|
22
|
+
│ ├── icons.css # Generated CSS (mask-based)
|
|
23
|
+
│ ├── index.js # Main entry point
|
|
24
|
+
│ ├── ss-icon.js # Web Component definition
|
|
25
|
+
│ ├── ss-loader.js # Class-based icon loader
|
|
26
|
+
│ ├── style.css # Base styles
|
|
27
|
+
│ └── svg/ # Generated SVG files
|
|
28
|
+
│ ├── index.js # Icon exports
|
|
29
|
+
│ └── {slug}.svg # Individual icons
|
|
30
|
+
├── dist/ # Bundled output
|
|
31
|
+
├── docs/ # VitePress documentation
|
|
32
|
+
├── scripts/ # Build scripts
|
|
33
|
+
└── tests/ # Vitest tests
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Core Components
|
|
37
|
+
|
|
38
|
+
### 1. Icon Definitions (`src/icons.json`)
|
|
39
|
+
|
|
40
|
+
The single source of truth for all icons:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"name": "Check",
|
|
45
|
+
"slug": "check",
|
|
46
|
+
"src": "M5 13l4 4L19 7",
|
|
47
|
+
"tags": ["approve", "success", "done"]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Optional properties: `viewBox`, `fill`, `stroke`, `strokeWidth`
|
|
52
|
+
|
|
53
|
+
### 2. Web Component (`src/ss-icon.js`)
|
|
54
|
+
|
|
55
|
+
Custom element that renders icons dynamically:
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<ss-icon icon="check" thickness="1.5"></ss-icon>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Features:
|
|
62
|
+
- Shadow DOM encapsulation
|
|
63
|
+
- Reactive to `icon` and `thickness` attribute changes
|
|
64
|
+
- Inherits color from `currentColor`
|
|
65
|
+
- Scales with font size (1em × 1em)
|
|
66
|
+
|
|
67
|
+
### 3. Class Loader (`src/ss-loader.js`)
|
|
68
|
+
|
|
69
|
+
Injects SVG into elements with `ss ss-{slug}` classes:
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<i class="ss ss-check"></i>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Features:
|
|
76
|
+
- Automatic DOM observation for dynamic content
|
|
77
|
+
- Uses MutationObserver for live updates
|
|
78
|
+
- Marks processed elements with `data-ss-loaded`
|
|
79
|
+
|
|
80
|
+
### 4. CSS Icons (`src/icons.css`)
|
|
81
|
+
|
|
82
|
+
Pure CSS icons using mask-image:
|
|
83
|
+
|
|
84
|
+
```css
|
|
85
|
+
.ss { /* base styles */ }
|
|
86
|
+
.ss-check {
|
|
87
|
+
-webkit-mask-image: url("data:image/svg+xml,...");
|
|
88
|
+
mask-image: url("data:image/svg+xml,...");
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Advantages: No JavaScript required, inherits text color
|
|
93
|
+
|
|
94
|
+
## Build Pipeline
|
|
95
|
+
|
|
96
|
+
```mermaid
|
|
97
|
+
graph LR
|
|
98
|
+
A[icons.json] --> B[build-svgs.js]
|
|
99
|
+
B --> C[src/svg/*.svg]
|
|
100
|
+
B --> D[src/svg/index.js]
|
|
101
|
+
A --> E[build-css.js]
|
|
102
|
+
E --> F[src/icons.css]
|
|
103
|
+
A --> G[build-icon-docs.js]
|
|
104
|
+
G --> H[docs/icons/*.md]
|
|
105
|
+
C --> I[webpack]
|
|
106
|
+
D --> I
|
|
107
|
+
F --> I
|
|
108
|
+
I --> J[dist/]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Key Files Reference
|
|
112
|
+
|
|
113
|
+
| File | Purpose |
|
|
114
|
+
|------|---------|
|
|
115
|
+
| `src/icons.json` | Icon definitions (add icons here) |
|
|
116
|
+
| `src/ss-icon.js` | Web Component class |
|
|
117
|
+
| `src/ss-loader.js` | DOM mutation observer for class-based icons |
|
|
118
|
+
| `scripts/build.js` | Orchestrates full build |
|
|
119
|
+
| `scripts/build-svgs.js` | Generates SVG files |
|
|
120
|
+
| `scripts/build-css.js` | Generates CSS with mask-image |
|
|
121
|
+
| `scripts/build-icon-docs.js` | Generates VitePress docs |
|
|
122
|
+
| `webpack.config.js` | Bundle configuration |
|
|
123
|
+
| `vitest.config.js` | Test configuration |
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Testing
|
|
3
|
+
description: Writing and running tests for SenangStart Icons
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Testing Skill
|
|
7
|
+
|
|
8
|
+
This skill covers testing practices for SenangStart Icons using Vitest.
|
|
9
|
+
|
|
10
|
+
## Test Setup
|
|
11
|
+
|
|
12
|
+
**Configuration:** `vitest.config.js`
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
export default defineConfig({
|
|
16
|
+
test: {
|
|
17
|
+
globals: true, // describe, it, expect available globally
|
|
18
|
+
environment: 'node', // Node.js environment
|
|
19
|
+
include: ['tests/**/*.test.js'],
|
|
20
|
+
coverage: {
|
|
21
|
+
provider: 'v8',
|
|
22
|
+
reporter: ['text', 'html'],
|
|
23
|
+
include: ['src/**/*.js', 'scripts/**/*.js'],
|
|
24
|
+
exclude: ['src/svg/**']
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Test Files Overview
|
|
31
|
+
|
|
32
|
+
| File | Tests |
|
|
33
|
+
|------|-------|
|
|
34
|
+
| `ss-icon.test.js` | Web Component rendering |
|
|
35
|
+
| `ss-loader.test.js` | Class-based icon injection |
|
|
36
|
+
| `build-svgs.test.js` | SVG generation |
|
|
37
|
+
| `build-css.test.js` | CSS generation |
|
|
38
|
+
| `build-icon-docs.test.js` | Documentation generation |
|
|
39
|
+
| `build-pipeline.test.js` | Full build integration |
|
|
40
|
+
|
|
41
|
+
## Writing Tests
|
|
42
|
+
|
|
43
|
+
### Testing Build Scripts
|
|
44
|
+
|
|
45
|
+
Mock the file system to avoid actual file operations:
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
49
|
+
import fs from 'fs';
|
|
50
|
+
|
|
51
|
+
vi.mock('fs');
|
|
52
|
+
|
|
53
|
+
describe('build-svgs', () => {
|
|
54
|
+
beforeEach(() => {
|
|
55
|
+
vi.clearAllMocks();
|
|
56
|
+
|
|
57
|
+
// Mock icons.json content
|
|
58
|
+
fs.readFileSync.mockReturnValue(JSON.stringify([
|
|
59
|
+
{ name: 'Check', slug: 'check', src: 'M5 13l4 4L19 7', tags: [] }
|
|
60
|
+
]));
|
|
61
|
+
|
|
62
|
+
fs.existsSync.mockReturnValue(true);
|
|
63
|
+
fs.writeFileSync.mockImplementation(() => {});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('should generate SVG files', () => {
|
|
67
|
+
require('../scripts/build-svgs.js');
|
|
68
|
+
|
|
69
|
+
expect(fs.writeFileSync).toHaveBeenCalledWith(
|
|
70
|
+
expect.stringContaining('check.svg'),
|
|
71
|
+
expect.stringContaining('<svg')
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Testing Web Component (with jsdom)
|
|
78
|
+
|
|
79
|
+
```javascript
|
|
80
|
+
import { describe, it, expect, beforeEach } from 'vitest';
|
|
81
|
+
import { JSDOM } from 'jsdom';
|
|
82
|
+
|
|
83
|
+
describe('SSIcon', () => {
|
|
84
|
+
let document, window;
|
|
85
|
+
|
|
86
|
+
beforeEach(() => {
|
|
87
|
+
const dom = new JSDOM('<!DOCTYPE html><html><body></body></html>', {
|
|
88
|
+
runScripts: 'dangerously'
|
|
89
|
+
});
|
|
90
|
+
window = dom.window;
|
|
91
|
+
document = window.document;
|
|
92
|
+
|
|
93
|
+
// Define custom element in jsdom context
|
|
94
|
+
// ...
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('should render icon SVG', () => {
|
|
98
|
+
const icon = document.createElement('ss-icon');
|
|
99
|
+
icon.setAttribute('icon', 'check');
|
|
100
|
+
document.body.appendChild(icon);
|
|
101
|
+
|
|
102
|
+
expect(icon.shadowRoot.innerHTML).toContain('<svg');
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Testing CSS Generation
|
|
108
|
+
|
|
109
|
+
```javascript
|
|
110
|
+
describe('build-css', () => {
|
|
111
|
+
it('should generate base .ss class', () => {
|
|
112
|
+
require('../scripts/build-css.js');
|
|
113
|
+
|
|
114
|
+
const cssContent = fs.writeFileSync.mock.calls[0][1];
|
|
115
|
+
expect(cssContent).toContain('.ss {');
|
|
116
|
+
expect(cssContent).toContain('mask-size: contain');
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it('should generate icon classes with mask-image', () => {
|
|
120
|
+
require('../scripts/build-css.js');
|
|
121
|
+
|
|
122
|
+
const cssContent = fs.writeFileSync.mock.calls[0][1];
|
|
123
|
+
expect(cssContent).toContain('.ss-check {');
|
|
124
|
+
expect(cssContent).toContain('mask-image: url("data:image/svg+xml');
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Running Tests
|
|
130
|
+
|
|
131
|
+
### All Tests
|
|
132
|
+
```bash
|
|
133
|
+
npm test
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Watch Mode
|
|
137
|
+
```bash
|
|
138
|
+
npm run test:watch
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### With Coverage
|
|
142
|
+
```bash
|
|
143
|
+
npm run test:coverage
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Specific Test File
|
|
147
|
+
```bash
|
|
148
|
+
npx vitest run tests/ss-icon.test.js
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Test Patterns
|
|
152
|
+
|
|
153
|
+
### Mocking Child Process
|
|
154
|
+
|
|
155
|
+
```javascript
|
|
156
|
+
import { execSync } from 'child_process';
|
|
157
|
+
|
|
158
|
+
vi.mock('child_process', () => ({
|
|
159
|
+
execSync: vi.fn()
|
|
160
|
+
}));
|
|
161
|
+
|
|
162
|
+
it('should run webpack', () => {
|
|
163
|
+
require('../scripts/build.js');
|
|
164
|
+
expect(execSync).toHaveBeenCalledWith(
|
|
165
|
+
'npx webpack --mode production',
|
|
166
|
+
expect.any(Object)
|
|
167
|
+
);
|
|
168
|
+
});
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Testing Error Handling
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
it('should handle missing icon gracefully', () => {
|
|
175
|
+
const icon = document.createElement('ss-icon');
|
|
176
|
+
icon.setAttribute('icon', 'nonexistent');
|
|
177
|
+
document.body.appendChild(icon);
|
|
178
|
+
|
|
179
|
+
expect(icon.shadowRoot.innerHTML).toBe('');
|
|
180
|
+
});
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Snapshot Testing
|
|
184
|
+
|
|
185
|
+
```javascript
|
|
186
|
+
it('should match SVG snapshot', () => {
|
|
187
|
+
const icon = document.createElement('ss-icon');
|
|
188
|
+
icon.setAttribute('icon', 'check');
|
|
189
|
+
document.body.appendChild(icon);
|
|
190
|
+
|
|
191
|
+
expect(icon.shadowRoot.innerHTML).toMatchSnapshot();
|
|
192
|
+
});
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Coverage Goals
|
|
196
|
+
|
|
197
|
+
- **Statements:** > 80%
|
|
198
|
+
- **Branches:** > 70%
|
|
199
|
+
- **Functions:** > 80%
|
|
200
|
+
- **Lines:** > 80%
|
|
201
|
+
|
|
202
|
+
Exclude `src/svg/` from coverage as it's generated code.
|