diff --git a/Gemfile b/Gemfile index 1f0cc71..de97a9f 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ gem "hanami-controller", "2.1.0" gem "hanami-validations", "2.1.0" gem "hanami-assets", "2.1.0" gem "hanami-view", "2.1.0" +# gem "hanami-view", file: "~/Documents/projects/hanami/view" gem "csv" gem "rom-sql" diff --git a/Gemfile.lock b/Gemfile.lock index 918c6c0..886754c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,7 +48,7 @@ GEM tzinfo (~> 2.0) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) - airbrussh (1.5.1) + airbrussh (1.5.2) sshkit (>= 1.6.1, != 1.7.0) ast (2.4.2) babosa (2.0.0) @@ -156,11 +156,31 @@ GEM dry-schema (>= 1.12, < 2) zeitwerk (~> 2.6) ed25519 (1.3.0) - faker (3.3.0) + faker (3.3.1) i18n (>= 1.8.11, < 2) - faraday (1.2.0) - multipart-post (>= 1.2, < 3) - ruby2_keywords + faraday (1.10.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) ffi (1.16.3) formatador (1.1.0) georuby (2.5.2) @@ -253,7 +273,7 @@ GEM irb (1.12.0) rdoc reline (>= 0.4.2) - json (2.7.1) + json (2.7.2) jwt (2.8.1) base64 language_server-protocol (3.17.0.3) @@ -300,14 +320,14 @@ GEM net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.5.0) net-protocol - net-ssh (7.2.1) + net-ssh (7.2.3) netrc (0.11.0) nio4r (2.7.1) - nokogiri (1.16.3-arm64-darwin) + nokogiri (1.16.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.3-x86_64-darwin) + nokogiri (1.16.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.3-x86_64-linux) + nokogiri (1.16.4-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -335,7 +355,7 @@ GEM method_source (~> 1.0) psych (5.1.2) stringio - public_suffix (5.0.4) + public_suffix (5.0.5) puma (6.4.2) nio4r (~> 2.0) que (2.3.0) @@ -349,7 +369,7 @@ GEM rack-test (2.1.0) rack (>= 1.3) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) @@ -358,10 +378,10 @@ GEM redcarpet (3.6.0) redis (5.1.0) redis-client (>= 0.17.0) - redis-client (0.21.1) + redis-client (0.22.0) connection_pool regexp_parser (2.9.0) - reline (0.5.0) + reline (0.5.1) io-console (~> 0.5) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) @@ -442,7 +462,7 @@ GEM sanitize (6.1.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - sequel (5.78.0) + sequel (5.79.0) bigdecimal shellany (0.0.1) simple-rss (1.3.3) @@ -452,7 +472,8 @@ GEM snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - sshkit (1.22.0) + sshkit (1.22.1) + base64 mutex_m net-scp (>= 1.1.2) net-sftp (>= 2.1.2) @@ -487,7 +508,7 @@ GEM unicode-emoji (3.4.0) unicode-version (~> 1.0) unicode-version (1.4.0) - vernier (0.6.0) + vernier (0.7.0) version_gem (1.1.4) warning (1.3.0) whenever (1.0.0) diff --git a/Procfile.dev b/Procfile.dev index 81c6404..6d9e85a 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,5 +1,4 @@ web: bundle exec hanami server -tailwind_main: bundle exec rake tailwind:watch -tailwind_admin: bundle exec rake tailwind:watch_admin +tailwind: bundle exec rake tailwind:watch assets: bundle exec hanami assets watch redis: redis-server diff --git a/Rakefile b/Rakefile index ee65411..a831a52 100644 --- a/Rakefile +++ b/Rakefile @@ -99,16 +99,22 @@ namespace :blog do end namespace :tailwind do - task :watch do - system("npx tailwindcss -i ./slices/main/assets/css/app.css -o ./public/assets/_main/app.css --watch") - end + desc "Watch and compile your Tailwind CSS on file changes" + task :watch do + system( + "npx", + "tailwindcss", + "--input", "app/assets/css/tailwind.css", + "--output", "app/assets/builds/tailwind.css", + "--minify", + "--watch" + ) + end - task :watch_admin do - system("npx tailwindcss -i ./slices/admin/assets/css/app.css -o ./public/assets/_admin/app.css --watch") - end task :build do system("npx tailwindcss -i ./slices/main/assets/css/app.css -o ./slices/main/assets/builds/app.css --minify") system("npx tailwindcss -i ./slices/admin/assets/css/app.css -o ./slices/admin/assets/builds/app.css --minify") + system("npx tailwindcss -i ./slices/puzzles/assets/css/app.css -o ./slices/puzzles/assets/builds/app.css --minify") end end diff --git a/app/assets/css/tailwind.css b/app/assets/css/tailwind.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/app/assets/css/tailwind.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/package.json b/package.json index 428b3f7..7c78840 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,16 @@ "name": "test21", "private": true, "type": "module", + "scripts": { + "assets": "node config/assets.js" + }, "dependencies": { "@icelab/defo": "^0.0.3", - "hanami-assets": "^2.1.0-rc.3" + "hanami-assets": "github:hanami/assets-js#main", + "typescript": "^5.2.2" }, "devDependencies": { "@tailwindcss/typography": "^0.5.8", - "tailwindcss": "^3.2.4" + "tailwindcss": "^3.3.3" } } diff --git a/slices/admin/assets/css/app.css b/slices/admin/assets/css/app.css index 8d6981e..e69de29 100644 --- a/slices/admin/assets/css/app.css +++ b/slices/admin/assets/css/app.css @@ -1,4 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; -@tailwind typography; diff --git a/slices/admin/assets/js/app.js b/slices/admin/assets/js/app.js deleted file mode 100644 index 650c851..0000000 --- a/slices/admin/assets/js/app.js +++ /dev/null @@ -1,31 +0,0 @@ -import "../../../../slices/main/assets/builds/app.css"; -import "../css/app.css"; - -(function() { - document.addEventListener('alpine:init', () => { - Alpine.magic('clipboard', () => { - return subject => navigator.clipboard.writeText(subject) - }) - - Alpine.magic('textHighlighter', (el, {Alpine}) => { - return { - isOpen: false, - anchorX: "0px", - anchorY: "0px", - selection: null, - text: "", - highlightText() { - this.isOpen = false - // document. - this.selection = document.getSelection() - this.text = this.selection.toString() - const anchor = this.selection.focusNode.parentElement.getBoundingClientRect() - this.isOpen = el.contains(this.selection.focusNode) && this.selection.focusOffset != this.selection.anchorOffset; - - this.anchorX = `${anchor.left - 170}px` - this.anchorY = `${anchor.top + window.scrollY}px` - } - } - }) - }) -})(); \ No newline at end of file diff --git a/slices/admin/assets/js/app.ts b/slices/admin/assets/js/app.ts new file mode 100644 index 0000000..56c46a2 --- /dev/null +++ b/slices/admin/assets/js/app.ts @@ -0,0 +1,36 @@ +// import "../../../../slices/main/assets/builds/app.css"; +import "@main/css/app.css"; +import "@app/builds/tailwind.css"; +import "../css/app.css"; + +(function () { + document.addEventListener("alpine:init", () => { + Alpine.magic("clipboard", () => { + return (subject) => navigator.clipboard.writeText(subject); + }); + + Alpine.magic("textHighlighter", (el, { Alpine }) => { + return { + isOpen: false, + anchorX: "0px", + anchorY: "0px", + selection: null, + text: "", + highlightText() { + this.isOpen = false; + // document. + this.selection = document.getSelection(); + this.text = this.selection.toString(); + const anchor = + this.selection.focusNode.parentElement.getBoundingClientRect(); + this.isOpen = + el.contains(this.selection.focusNode) && + this.selection.focusOffset != this.selection.anchorOffset; + + this.anchorX = `${anchor.left - 170}px`; + this.anchorY = `${anchor.top + window.scrollY}px`; + }, + }; + }); + }); +})(); diff --git a/slices/admin/decorators/posts/decorator.rb b/slices/admin/decorators/posts/decorator.rb index d16b928..26577e0 100644 --- a/slices/admin/decorators/posts/decorator.rb +++ b/slices/admin/decorators/posts/decorator.rb @@ -55,12 +55,12 @@ module Admin def inline_image_sources inline_images - &.select {|attr, _value| attr == "src"} - &.map {|img| img[1] } || [] + &.select { |attr, _value| attr == "src" } + &.map { |img| img[1] } || [] end def photo_sources - photos.map{|photo| photo["value"]} + photos.map { |photo| photo["value"] } end def prefix_emoji @@ -146,7 +146,7 @@ module Admin end def to_h - clean_content = CGI::unescapeHTML(content.gsub(/<\/?[^>]*>/, "")).strip + clean_content = CGI.unescapeHTML(content.gsub(/<\/?[^>]*>/, "")).strip clean_content = clean_content.gsub(prefix_emoji[0], "") if prefix_emoji { id: slug, diff --git a/slices/main/actions/posts/react.rb b/slices/main/actions/posts/react.rb index 48e4e26..03f81df 100644 --- a/slices/main/actions/posts/react.rb +++ b/slices/main/actions/posts/react.rb @@ -4,7 +4,6 @@ module Main module Actions module Posts class React < Action - include Deps["repos.reaction_repo", "repos.post_repo"] def handle(req, res) @@ -16,7 +15,6 @@ module Main res.body = "👍 #{reaction_count}" res.status = 201 - rescue res.status = 400 end diff --git a/slices/main/assets/css/app.css b/slices/main/assets/css/app.css index 528cbb7..595b9f2 100644 --- a/slices/main/assets/css/app.css +++ b/slices/main/assets/css/app.css @@ -1,98 +1,109 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; -@tailwind typography; - @font-face { - font-family: "Montagu"; - src: url("../fonts/MontaguSlab-VariableFont_opsz,wght.ttf") format("truetype"); - font-display: swap; + font-family: "Montagu"; + src: url("../fonts/MontaguSlab-VariableFont_opsz,wght.ttf") format("truetype"); + font-display: swap; } @font-face { - font-family: "JetBrainsMono"; - src: url("../fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype"); - font-display: swap; + font-family: "JetBrainsMono"; + src: url("../fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype"); + font-display: swap; } @font-face { - font-family: "Figtree"; - src: url("../fonts/Figtree-VariableFont_wght.ttf") format("truetype"); - font-display: swap; + font-family: "Figtree"; + src: url("../fonts/Figtree-VariableFont_wght.ttf") format("truetype"); + font-display: swap; } * { - font-family: "Figtree", Helvetica, Arial, sans-serif; + font-family: "Figtree", Helvetica, Arial, sans-serif; } -h1, h2, h3, h4, h5, h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { - font-family: "Montagu", Times New Roman, serif; +h1, +h2, +h3, +h4, +h5, +h6, +h1 a, +h2 a, +h3 a, +h4 a, +h5 a, +h6 a { + font-family: + "Montagu", + Times New Roman, + serif; } .prose h1 a { - border-bottom: none; - text-decoration: none; + border-bottom: none; + text-decoration: none; } .prose h1 a:hover { - opacity: 0.8; + opacity: 0.8; } .gist tr { - border-bottom: none; + border-bottom: none; } -.gist span, pre, pre span { - font-family: "JetBrainsMono", Monaco, monospace; +.gist span, +pre, +pre span { + font-family: "JetBrainsMono", Monaco, monospace; } .map-marker { - border: 3px solid blue; - border-radius: 8px; - background: RGBa(0, 0, 255, 0.1); - width: 14px; - height: 14px; + border: 3px solid blue; + border-radius: 8px; + background: RGBa(0, 0, 255, 0.1); + width: 14px; + height: 14px; } .prose pre code::before { - padding-left: unset + padding-left: unset; } .prose pre code:after { - padding-right: unset + padding-right: unset; } .prose code { - font-weight: 400; - border-radius: 0.25rem; + font-weight: 400; + border-radius: 0.25rem; } .prose code:before { - content: ""; - padding: 0 0 0 0.25rem; + content: ""; + padding: 0 0 0 0.25rem; } .prose pre { - padding: 0; + padding: 0; } .prose code:after { - content: ""; - padding: 0 0.25rem 0 0; + content: ""; + padding: 0 0.25rem 0 0; } .video-container { - position: relative; - padding-bottom: 56.25%; /* 16:9 */ - height: 0; + position: relative; + padding-bottom: 56.25%; /* 16:9 */ + height: 0; } .video-container iframe { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - border-radius: 8px; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border-radius: 8px; } .squircle { diff --git a/slices/main/assets/js/app.js b/slices/main/assets/js/app.js deleted file mode 100644 index a2047b8..0000000 --- a/slices/main/assets/js/app.js +++ /dev/null @@ -1,76 +0,0 @@ -import { md_gallery } from "./gallery.js"; - -(function() { - document.addEventListener("DOMContentLoaded", function () { - window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { - localStorage.setItem("_x_darkMode", event.matches ? true : false) - }); - - if (window.hljs !== undefined) { - window.hljs.highlightAll(); - } - - const times = document.querySelectorAll('time'); - times.forEach((time) => { - const oldDtime = Date.parse(time.dateTime); - time.innerHTML = new Date(oldDtime).toLocaleDateString(navigator.language, { weekday:"long", year:"numeric", month:"short", day:"numeric"}); - - md_gallery({ - "class_name": "grid gap-4 grid-cols-2 prose-img:m-0" - }); - - const mediaForm = document.getElementById("media_form"); - if (mediaForm !== null) { - htmx.on('#media_form', 'htmx:xhr:progress', function (evt) { - htmx.find('#progress').setAttribute('value', evt.detail.loaded / evt.detail.total * 100) - }); - } - }); - - const videos = document.querySelectorAll('video'); - videos.forEach((video) => { - video.addEventListener("click", () => { - const isPaused = video.paused; - video[isPaused ? "play" : "pause"](); - video.classList.toggle("u-none", !isPaused); - }); - }); - - const mapContainer = document.getElementById("map"); - const goBack = document.getElementById("go-back"); - if (mapContainer !== null) { - if (goBack !== null) { - document.getElementById("go-back").addEventListener("click", () => { - history.back(); - }); - } - - mapboxgl.accessToken = 'pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIyY3ZzaTE0cjUzdm4xdnZ6czRlYjUifQ.FRETOXYRID6T2IoB7qqRLg'; - var map = new mapboxgl.Map({ - container: 'map', - style: 'mapbox://styles/mapbox/streets-v11', - maxZoom: 8 - }); - - const markers = JSON.parse(mapContainer.dataset["markers"]); - - const bounds = new mapboxgl.LngLatBounds(markers[0], markers[0]); - - for (var i = 0; i < markers.length; i++) { - bounds.extend(markers[i]); - } - - map.fitBounds(bounds, { padding: 60 }); - - for (var i = 0; i < markers.length; i++) { - const marker = markers[i]; - const el = document.createElement("div"); - el.className = "map-marker"; - - new mapboxgl.Marker(el) - .setLngLat(marker) - .addTo(map); - } - } - }); -})(); diff --git a/slices/main/assets/js/app.ts b/slices/main/assets/js/app.ts new file mode 100644 index 0000000..341216e --- /dev/null +++ b/slices/main/assets/js/app.ts @@ -0,0 +1,87 @@ +import "@app/builds/tailwind.css"; +import "@main/css/app.css"; +import { md_gallery } from "./gallery.js"; + +(function () { + document.addEventListener("DOMContentLoaded", function () { + window + .matchMedia("(prefers-color-scheme: dark)") + .addEventListener("change", (event) => { + localStorage.setItem("_x_darkMode", event.matches ? true : false); + }); + + if (window.hljs !== undefined) { + window.hljs.highlightAll(); + } + + const times = document.querySelectorAll("time"); + times.forEach((time) => { + const oldDtime = Date.parse(time.dateTime); + time.innerHTML = new Date(oldDtime).toLocaleDateString( + navigator.language, + { weekday: "long", year: "numeric", month: "short", day: "numeric" }, + ); + + md_gallery({ + class_name: "grid gap-4 grid-cols-2 prose-img:m-0", + }); + + const mediaForm = document.getElementById("media_form"); + if (mediaForm !== null) { + htmx.on("#media_form", "htmx:xhr:progress", function (evt) { + htmx + .find("#progress") + .setAttribute( + "value", + (evt.detail.loaded / evt.detail.total) * 100, + ); + }); + } + }); + + const videos = document.querySelectorAll("video"); + videos.forEach((video) => { + video.addEventListener("click", () => { + const isPaused = video.paused; + video[isPaused ? "play" : "pause"](); + video.classList.toggle("u-none", !isPaused); + }); + }); + + const mapContainer = document.getElementById("map"); + const goBack = document.getElementById("go-back"); + if (mapContainer !== null) { + if (goBack !== null) { + document.getElementById("go-back").addEventListener("click", () => { + history.back(); + }); + } + + mapboxgl.accessToken = + "pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIyY3ZzaTE0cjUzdm4xdnZ6czRlYjUifQ.FRETOXYRID6T2IoB7qqRLg"; + var map = new mapboxgl.Map({ + container: "map", + style: "mapbox://styles/mapbox/streets-v11", + maxZoom: 8, + }); + + const markers = JSON.parse(mapContainer.dataset["markers"]); + + const bounds = new mapboxgl.LngLatBounds(markers[0], markers[0]); + + for (var i = 0; i < markers.length; i++) { + bounds.extend(markers[i]); + } + + map.fitBounds(bounds, { padding: 60 }); + + for (var i = 0; i < markers.length; i++) { + const marker = markers[i]; + const el = document.createElement("div"); + el.className = "map-marker"; + + new mapboxgl.Marker(el).setLngLat(marker).addTo(map); + } + } + }); +})(); diff --git a/slices/main/decorators/posts/decorator.rb b/slices/main/decorators/posts/decorator.rb index 12c7cfc..24e59e2 100644 --- a/slices/main/decorators/posts/decorator.rb +++ b/slices/main/decorators/posts/decorator.rb @@ -55,12 +55,12 @@ module Main def inline_image_sources inline_images - &.select {|attr, _value| attr == "src"} - &.map {|img| img[1] } || [] + &.select { |attr, _value| attr == "src" } + &.map { |img| img[1] } || [] end def photo_sources - photos.map{|photo| photo["value"]} + photos.map { |photo| photo["value"] } end def prefix_emoji @@ -146,7 +146,7 @@ module Main end def to_h - clean_content = CGI::unescapeHTML(content.gsub(/<\/?[^>]*>/, "")).strip + clean_content = CGI.unescapeHTML(content.gsub(/<\/?[^>]*>/, "")).strip clean_content = clean_content.gsub(prefix_emoji[0], "") if prefix_emoji { id: slug, diff --git a/slices/main/views/recently_played_games/index.rb b/slices/main/views/recently_played_games/index.rb index 8b8e799..7a00fc8 100644 --- a/slices/main/views/recently_played_games/index.rb +++ b/slices/main/views/recently_played_games/index.rb @@ -11,7 +11,7 @@ module Main recently_played_result.map do |game| { name: game["name"], - playtime_forever: game["playtime_forever"].to_i / 60, + playtime_forever: game["playtime_forever"].to_i / 60 } end end diff --git a/tailwind.config.js b/tailwind.config.js index b73de25..42cda0c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -3,74 +3,81 @@ const colors = require("tailwindcss/colors"); module.exports = { - darkMode: 'class', - content: ["./app/templates/**/*.slim", "./slices/main/templates/**/*.slim", "./slices/admin/templates/**/*.slim", "./public/assets/index.js", "app/decorators/*/decorator.rb"], + darkMode: "class", + content: [ + "./public/*.html", + "./app/views/**/*.rb", + "./app/templates/**/*", + "./slices/**/views/**/*.rb", + "./slices/**/templates/**/*", + "./app/decorators/*/decorator.rb", + ], safelist: [ { - pattern: /bg-(yellow|orange|green|lime|blue|pink|purple|indigo|emerald)-(50|100|800|900)/, - variants: ['hover', 'dark'] + pattern: + /bg-(yellow|orange|green|lime|blue|pink|purple|indigo|emerald)-(50|100|800|900)/, + variants: ["hover", "dark"], }, { - pattern: /text-(yellow|orange|green|lime|blue|pink|purple|indigo|emerald)-(400)/, - variants: ['hover', 'dark'] + pattern: + /text-(yellow|orange|green|lime|blue|pink|purple|indigo|emerald)-(400)/, + variants: ["hover", "dark"], }, ], theme: { fontSize: { - xsm: '0.75rem', - sm: '0.8rem', - base: '1rem', - xl: '1.25rem', - '2xl': '1.563rem', - '3xl': '1.953rem', - '4xl': '2.441rem', - '5xl': '3.052rem', - '8xl': '6rem', + xsm: "0.75rem", + sm: "0.8rem", + base: "1rem", + xl: "1.25rem", + "2xl": "1.563rem", + "3xl": "1.953rem", + "4xl": "2.441rem", + "5xl": "3.052rem", + "8xl": "6rem", }, extend: { gridTemplateColumns: { - '16': 'repeat(16, minmax(0, 1fr))', + 16: "repeat(16, minmax(0, 1fr))", }, gridColumn: { - 'span-13': 'span 13 / span 13', - 'span-14': 'span 14 / span 14', - 'span-15': 'span 15 / span 15', - 'span-16': 'span 16 / span 16', + "span-13": "span 13 / span 13", + "span-14": "span 14 / span 14", + "span-15": "span 15 / span 15", + "span-16": "span 16 / span 16", }, boxShadow: { - 'solid': `10px 10px 1px 2px` + solid: `10px 10px 1px 2px`, }, typography: { DEFAULT: { css: { h1: { - 'font-weight': 500 + "font-weight": 500, }, h2: { - 'font-weight': 500 - }, + "font-weight": 500, + }, h3: { - 'font-weight': 500 + "font-weight": 500, }, h2: { - 'font-weight': 500 + "font-weight": 500, }, - } + }, }, emphasis: { - css: { + css: { em: { - colors: colors.pink['400'] + colors: colors.pink["400"], }, a: { - colors: colors.red['100'] - } - } - } - } + colors: colors.red["100"], + }, + }, + }, + }, }, }, - plugins: [ - require('@tailwindcss/typography'), - ], -} + plugins: [require("@tailwindcss/typography")], +}; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..636b635 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "paths": { + "@app/*": ["./app/assets/*"], + "@main/*": ["./slices/main/assets/*"], + "@admin/*": ["./slices/admin/assets/*"] + } + } +} diff --git a/yarn.lock b/yarn.lock index 4be5154..ab617e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -458,10 +458,9 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -hanami-assets@^2.1.0-rc.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/hanami-assets/-/hanami-assets-2.1.0.tgz#54f658f7b4405fa98d9361a96e7162f56d85dad3" - integrity sha512-nOanYSZgATOrZofZXUwH7E1usTMbnECptaB6nfZCqNuE3QFCpRinOhdGJ8ndZPc1wEKVrs4VS85dQ0fLCa87Iw== +"hanami-assets@github:hanami/assets-js#main": + version "2.1.1" + resolved "https://codeload.github.com/hanami/assets-js/tar.gz/75be4683117dd6c0b039036b9884180de00c90a9" dependencies: esbuild "^0.19.0" fs-extra "^11.1.0" @@ -524,7 +523,7 @@ jackspeak@^2.3.5: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" -jiti@^1.19.1: +jiti@^1.21.0: version "1.21.0" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== @@ -788,8 +787,16 @@ source-map-js@^1.0.2: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: - name string-width-cjs +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -807,8 +814,14 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: - name strip-ansi-cjs +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -840,10 +853,10 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -tailwindcss@^3.2.4: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.1.tgz#f512ca5d1dd4c9503c7d3d28a968f1ad8f5c839d" - integrity sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA== +tailwindcss@^3.3.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.3.tgz#be48f5283df77dfced705451319a5dffb8621519" + integrity sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A== dependencies: "@alloc/quick-lru" "^5.2.0" arg "^5.0.2" @@ -853,7 +866,7 @@ tailwindcss@^3.2.4: fast-glob "^3.3.0" glob-parent "^6.0.2" is-glob "^4.0.3" - jiti "^1.19.1" + jiti "^1.21.0" lilconfig "^2.1.0" micromatch "^4.0.5" normalize-path "^3.0.0" @@ -894,6 +907,11 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== +typescript@^5.2.2: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + universalify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"