├── .gitignore ├── LICENSE ├── README.md ├── code ├── lightna │ ├── lightna-elasticsearch │ │ ├── App │ │ │ └── Client.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config.yaml │ │ └── module.yaml │ ├── lightna-engine │ │ ├── App.php │ │ ├── App │ │ │ ├── ArrayDirectives.php │ │ │ ├── ArrayPath.php │ │ │ ├── Autoloader.php │ │ │ ├── Bootstrap.php │ │ │ ├── Build.php │ │ │ ├── Build │ │ │ │ └── Config.php │ │ │ ├── Cli.php │ │ │ ├── Compiler.php │ │ │ ├── Compiler │ │ │ │ ├── Asset.php │ │ │ │ ├── AssetSign.php │ │ │ │ ├── ClassMap.php │ │ │ │ ├── CompilerA.php │ │ │ │ ├── Config.php │ │ │ │ ├── Layout.php │ │ │ │ ├── LayoutDirectives.php │ │ │ │ ├── LightnaReflectionClass.php │ │ │ │ ├── LightnaReflectionProperty.php │ │ │ │ ├── ObjectSchema.php │ │ │ │ ├── Plugin.php │ │ │ │ ├── Preload.php │ │ │ │ ├── Template.php │ │ │ │ └── Translate.php │ │ │ ├── Config.php │ │ │ ├── Console │ │ │ │ ├── Build │ │ │ │ │ ├── Asset │ │ │ │ │ │ └── Sign.php │ │ │ │ │ └── Config.php │ │ │ │ ├── CommandA.php │ │ │ │ ├── Compile.php │ │ │ │ ├── Config.php │ │ │ │ ├── Config │ │ │ │ │ └── Apply.php │ │ │ │ ├── Index │ │ │ │ │ ├── Entity │ │ │ │ │ │ ├── Info.php │ │ │ │ │ │ ├── Invalidate.php │ │ │ │ │ │ └── Show.php │ │ │ │ │ ├── Gc.php │ │ │ │ │ ├── Queue │ │ │ │ │ │ ├── Block.php │ │ │ │ │ │ ├── Process.php │ │ │ │ │ │ ├── Reset.php │ │ │ │ │ │ ├── Unblock.php │ │ │ │ │ │ └── Watch.php │ │ │ │ │ ├── Update │ │ │ │ │ │ ├── All.php │ │ │ │ │ │ ├── Entity.php │ │ │ │ │ │ ├── Storage.php │ │ │ │ │ │ └── UpdateA.php │ │ │ │ │ └── Version │ │ │ │ │ │ ├── Bind.php │ │ │ │ │ │ ├── Down.php │ │ │ │ │ │ ├── Unbind.php │ │ │ │ │ │ └── Up.php │ │ │ │ ├── Opcache │ │ │ │ │ └── Slap.php │ │ │ │ └── Schema │ │ │ │ │ └── Update.php │ │ │ ├── Context.php │ │ │ ├── Context │ │ │ │ ├── Entity.php │ │ │ │ └── Entity │ │ │ │ │ └── Loader.php │ │ │ ├── Database │ │ │ │ ├── Doctrine │ │ │ │ │ └── AbstractSchemaUpdater.php │ │ │ │ └── Structure.php │ │ │ ├── DatabaseA.php │ │ │ ├── Entity │ │ │ │ ├── EntityA.php │ │ │ │ ├── EntityRoute.php │ │ │ │ ├── Gc.php │ │ │ │ ├── Route.php │ │ │ │ └── State.php │ │ │ ├── Escaper.php │ │ │ ├── Exception │ │ │ │ ├── CliInputException.php │ │ │ │ ├── LightnaException.php │ │ │ │ └── NotFoundException.php │ │ │ ├── I18n.php │ │ │ ├── Index │ │ │ │ ├── Changelog │ │ │ │ │ ├── Collect.php │ │ │ │ │ ├── CollectorInterface.php │ │ │ │ │ └── Handler.php │ │ │ │ ├── IndexAbstract.php │ │ │ │ ├── IndexInterface.php │ │ │ │ ├── Queue │ │ │ │ │ └── Handler.php │ │ │ │ └── ValidEntityCodes.php │ │ │ ├── Indexer.php │ │ │ ├── Layout.php │ │ │ ├── Lock.php │ │ │ ├── Maintenance.php │ │ │ ├── ObjectA.php │ │ │ ├── ObjectManager.php │ │ │ ├── ObjectManagerIgnore.php │ │ │ ├── Opcache.php │ │ │ ├── Project │ │ │ │ ├── Database.php │ │ │ │ └── Database │ │ │ │ │ └── SchemaUpdater.php │ │ │ ├── Query │ │ │ │ └── Index │ │ │ │ │ ├── Changelog.php │ │ │ │ │ └── Queue.php │ │ │ ├── Response.php │ │ │ ├── Response │ │ │ │ └── Header │ │ │ │ │ ├── AbstractHeader.php │ │ │ │ │ ├── CacheControl.php │ │ │ │ │ ├── Csp.php │ │ │ │ │ ├── HeaderInterface.php │ │ │ │ │ ├── XContentTypeOptions.php │ │ │ │ │ ├── XFrameOptions.php │ │ │ │ │ └── XssProtection.php │ │ │ ├── Router.php │ │ │ ├── Router │ │ │ │ ├── Action │ │ │ │ │ ├── ActionInterface.php │ │ │ │ │ ├── Block.php │ │ │ │ │ └── Page.php │ │ │ │ ├── BypassedException.php │ │ │ │ ├── NoRouteException.php │ │ │ │ └── RedirectedException.php │ │ │ ├── Schema │ │ │ │ ├── Index │ │ │ │ │ ├── Changelog.php │ │ │ │ │ ├── Queue.php │ │ │ │ │ └── Triggers.php │ │ │ │ └── Storage │ │ │ │ │ └── Database.php │ │ │ ├── Scope.php │ │ │ ├── Security │ │ │ │ └── Csp.php │ │ │ ├── State │ │ │ │ ├── Common.php │ │ │ │ ├── Common │ │ │ │ │ ├── Index.php │ │ │ │ │ ├── Opcache.php │ │ │ │ │ ├── Opcache │ │ │ │ │ │ └── Slap.php │ │ │ │ │ └── Session.php │ │ │ │ ├── Index.php │ │ │ │ └── Index │ │ │ │ │ └── Entity.php │ │ │ ├── Storage │ │ │ │ ├── Database.php │ │ │ │ ├── Database │ │ │ │ │ ├── Client.php │ │ │ │ │ └── SchemaUpdater.php │ │ │ │ ├── Opcache.php │ │ │ │ └── StorageInterface.php │ │ │ ├── StoragePool.php │ │ │ ├── Templating.php │ │ │ ├── boot.php │ │ │ └── lib │ │ │ │ ├── backend.php │ │ │ │ ├── cli.php │ │ │ │ ├── common.php │ │ │ │ └── frontend.php │ │ ├── Data │ │ │ ├── Block.php │ │ │ ├── Context.php │ │ │ ├── Csp.php │ │ │ ├── DataA.php │ │ │ ├── EntityData.php │ │ │ ├── Request.php │ │ │ ├── Request │ │ │ │ └── Param.php │ │ │ └── Url.php │ │ ├── LICENSE │ │ ├── Test │ │ │ └── Unit │ │ │ │ └── App │ │ │ │ ├── ArrayDirectivesDeleteTest.php │ │ │ │ ├── ArrayDirectivesMoveTest.php │ │ │ │ ├── ArrayDirectivesPositionTest.php │ │ │ │ ├── ArrayDirectivesReplaceTest.php │ │ │ │ ├── ArrayDirectivesTestCase.php │ │ │ │ └── I18nTest.php │ │ ├── cli │ │ ├── composer.json │ │ ├── config │ │ │ ├── backend │ │ │ │ ├── cli.yaml │ │ │ │ └── indexer.yaml │ │ │ ├── config.yaml │ │ │ └── security.yaml │ │ ├── css │ │ │ └── block-wrapper.css │ │ ├── i18n │ │ │ └── en_US.csv │ │ ├── index.php │ │ ├── js │ │ │ ├── PageCache.js │ │ │ ├── PageReadyEvent.js │ │ │ └── lib │ │ │ │ ├── Blocks.js │ │ │ │ ├── Cookie.js │ │ │ │ ├── FormKey.js │ │ │ │ ├── Request.js │ │ │ │ ├── UserInput.js │ │ │ │ ├── XSwipeHandler.js │ │ │ │ └── utils │ │ │ │ ├── dom.js │ │ │ │ ├── isElementInViewport.js │ │ │ │ ├── isTouchDevice.js │ │ │ │ ├── objectToQuery.js │ │ │ │ ├── randomString.js │ │ │ │ └── resolveAnimationEnd.js │ │ ├── layout │ │ │ ├── no-route.yaml │ │ │ └── page.yaml │ │ ├── module.yaml │ │ ├── tailwind.yaml │ │ ├── template │ │ │ ├── error │ │ │ │ ├── 500.phtml │ │ │ │ └── 503.phtml │ │ │ ├── no-route.phtml │ │ │ └── page │ │ │ │ ├── context.phtml │ │ │ │ └── ssr-time.phtml │ │ └── webpack.yaml │ ├── lightna-newrelic │ │ ├── App │ │ │ ├── Newrelic.php │ │ │ └── Plugin │ │ │ │ └── App.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config │ │ │ ├── backend │ │ │ │ └── plugin.yaml │ │ │ └── newrelic.yaml │ │ └── module.yaml │ ├── lightna-pack │ │ ├── LICENSE │ │ ├── composer.json │ │ └── entry │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── cli │ │ │ ├── edition │ │ │ └── main │ │ │ │ ├── sample.config.php │ │ │ │ └── sample.env.php │ │ │ ├── index.php │ │ │ ├── package.json │ │ │ ├── postcss.config.js │ │ │ ├── pub │ │ │ └── index.php │ │ │ ├── webpack.config.direct.js │ │ │ └── webpack.config.js │ ├── lightna-phpunit │ │ ├── App │ │ │ ├── Compiler │ │ │ │ └── PhpUnit.php │ │ │ └── LightnaTestCase.php │ │ ├── LICENSE │ │ ├── bootstrap.integration.php │ │ ├── bootstrap.php │ │ ├── bootstrap.unit.php │ │ ├── composer.json │ │ ├── config │ │ │ └── backend.yaml │ │ ├── module.yaml │ │ ├── phpunit.integration.template.xml │ │ └── phpunit.unit.template.xml │ ├── lightna-redis │ │ ├── App │ │ │ ├── Session │ │ │ │ └── Handler.php │ │ │ └── Storage │ │ │ │ └── Redis.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config.yaml │ │ └── module.yaml │ ├── lightna-session │ │ ├── App │ │ │ ├── Console │ │ │ │ └── Version │ │ │ │ │ └── Up.php │ │ │ ├── Handler │ │ │ │ ├── File.php │ │ │ │ └── HandlerInterface.php │ │ │ ├── Plugin │ │ │ │ └── App.php │ │ │ ├── Session.php │ │ │ └── Session │ │ │ │ ├── Cookie.php │ │ │ │ ├── DataBuilder.php │ │ │ │ └── Serializer.php │ │ ├── Data │ │ │ └── Session.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config │ │ │ ├── backend │ │ │ │ ├── cli.yaml │ │ │ │ └── config.yaml │ │ │ ├── config.yaml │ │ │ └── frontend │ │ │ │ └── config.yaml │ │ ├── js │ │ │ └── Session.js │ │ ├── layout │ │ │ └── page.yaml │ │ ├── module.yaml │ │ ├── template │ │ │ └── page │ │ │ │ └── session │ │ │ │ └── updater.phtml │ │ └── webpack.yaml │ ├── lightna-tailwind │ │ ├── App │ │ │ └── Compiler │ │ │ │ └── Tailwind.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config │ │ │ └── backend.yaml │ │ ├── module.yaml │ │ └── tailwind.config.js │ ├── lightna-webpack │ │ ├── App │ │ │ └── Compiler │ │ │ │ └── Webpack.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config │ │ │ └── backend.yaml │ │ └── module.yaml │ ├── magento-backend │ │ ├── App │ │ │ ├── Entity │ │ │ │ ├── Category.php │ │ │ │ ├── Cms.php │ │ │ │ ├── Config.php │ │ │ │ ├── Content │ │ │ │ │ ├── Category.php │ │ │ │ │ ├── Page.php │ │ │ │ │ └── Product.php │ │ │ │ ├── Product.php │ │ │ │ └── RunCode.php │ │ │ ├── Index │ │ │ │ ├── Changelog │ │ │ │ │ ├── Collect.php │ │ │ │ │ └── Collector │ │ │ │ │ │ ├── Attributes.php │ │ │ │ │ │ ├── Category.php │ │ │ │ │ │ ├── CategoryProducts.php │ │ │ │ │ │ ├── CmsBlock.php │ │ │ │ │ │ ├── CmsPage.php │ │ │ │ │ │ ├── Config.php │ │ │ │ │ │ ├── Inventory.php │ │ │ │ │ │ ├── Product.php │ │ │ │ │ │ ├── ProductWebsite.php │ │ │ │ │ │ ├── Stock.php │ │ │ │ │ │ └── UrlRewrite.php │ │ │ │ ├── DataProvider │ │ │ │ │ └── Cms │ │ │ │ │ │ └── Block.php │ │ │ │ ├── EntityLink.php │ │ │ │ ├── ScopeIndexAbstract.php │ │ │ │ └── Service.php │ │ │ ├── Plugin │ │ │ │ ├── App.php │ │ │ │ ├── App │ │ │ │ │ ├── I18n.php │ │ │ │ │ ├── Index │ │ │ │ │ │ └── Changelog │ │ │ │ │ │ │ └── Handler.php │ │ │ │ │ ├── Schema │ │ │ │ │ │ └── Index │ │ │ │ │ │ │ └── Triggers.php │ │ │ │ │ ├── Scope.php │ │ │ │ │ └── Session │ │ │ │ │ │ ├── Cookie.php │ │ │ │ │ │ └── DataBuilder.php │ │ │ │ └── Context.php │ │ │ ├── Query │ │ │ │ ├── Category.php │ │ │ │ ├── Category │ │ │ │ │ └── Eav.php │ │ │ │ ├── Cms │ │ │ │ │ └── Page.php │ │ │ │ ├── Config.php │ │ │ │ ├── Customer │ │ │ │ │ └── Group.php │ │ │ │ ├── EavAbstract.php │ │ │ │ ├── Flag.php │ │ │ │ ├── Index │ │ │ │ │ ├── CategoryProductsReplica.php │ │ │ │ │ ├── PriceReplica.php │ │ │ │ │ └── ReplicaAbstract.php │ │ │ │ ├── Inventory.php │ │ │ │ ├── Inventory │ │ │ │ │ ├── Msi.php │ │ │ │ │ └── Ssi.php │ │ │ │ ├── Product.php │ │ │ │ ├── Product │ │ │ │ │ ├── Eav.php │ │ │ │ │ └── Gallery.php │ │ │ │ ├── Quote.php │ │ │ │ ├── Store.php │ │ │ │ ├── Url.php │ │ │ │ ├── Website.php │ │ │ │ └── Wishlist.php │ │ │ ├── Scope.php │ │ │ ├── Search.php │ │ │ ├── Search │ │ │ │ └── ClientInterface.php │ │ │ └── Test │ │ │ │ └── Unit │ │ │ │ ├── App │ │ │ │ └── Query │ │ │ │ │ └── ProductTest.php │ │ │ │ └── Index │ │ │ │ └── ProductTest.php │ │ ├── Data │ │ │ ├── Category.php │ │ │ ├── Cms.php │ │ │ ├── Config.php │ │ │ ├── Config │ │ │ │ ├── Currency.php │ │ │ │ ├── Favicon.php │ │ │ │ ├── GoogleAnalytics.php │ │ │ │ ├── Logo.php │ │ │ │ ├── Product.php │ │ │ │ ├── Product │ │ │ │ │ └── Listing.php │ │ │ │ ├── Session.php │ │ │ │ └── Session │ │ │ │ │ └── Cookie.php │ │ │ ├── Content │ │ │ │ ├── Category.php │ │ │ │ ├── Page.php │ │ │ │ ├── Page │ │ │ │ │ ├── Category │ │ │ │ │ │ └── Item.php │ │ │ │ │ └── Menu │ │ │ │ │ │ └── Item.php │ │ │ │ ├── Product.php │ │ │ │ └── Product │ │ │ │ │ ├── FilterableAttribute.php │ │ │ │ │ └── VisibleOnFrontAttribute.php │ │ │ ├── Context.php │ │ │ ├── Context │ │ │ │ └── Cookie.php │ │ │ ├── Currency.php │ │ │ ├── Locale.php │ │ │ ├── Product.php │ │ │ ├── Product │ │ │ │ ├── Breadcrumbs.php │ │ │ │ ├── Breadcrumbs │ │ │ │ │ └── Breadcrumb.php │ │ │ │ ├── Gallery │ │ │ │ │ └── Image.php │ │ │ │ ├── Inventory.php │ │ │ │ ├── Options.php │ │ │ │ ├── Options │ │ │ │ │ ├── Attribute.php │ │ │ │ │ └── Option.php │ │ │ │ ├── Price.php │ │ │ │ ├── Related.php │ │ │ │ ├── Search.php │ │ │ │ └── Search │ │ │ │ │ ├── Facet.php │ │ │ │ │ └── Facet │ │ │ │ │ └── Option.php │ │ │ ├── Search │ │ │ │ ├── Suggestion.php │ │ │ │ └── Suggestions.php │ │ │ ├── Session.php │ │ │ └── Session │ │ │ │ ├── Cart.php │ │ │ │ ├── Cart │ │ │ │ └── Item.php │ │ │ │ ├── Customer.php │ │ │ │ ├── Wishlist.php │ │ │ │ └── Wishlist │ │ │ │ └── Item.php │ │ ├── Index │ │ │ ├── Category.php │ │ │ ├── Cms.php │ │ │ ├── Config.php │ │ │ ├── Content │ │ │ │ ├── Category.php │ │ │ │ ├── Page.php │ │ │ │ └── Product.php │ │ │ ├── CustomRedirect.php │ │ │ ├── Product.php │ │ │ ├── Provider │ │ │ │ ├── Config.php │ │ │ │ ├── Content │ │ │ │ │ ├── Category.php │ │ │ │ │ ├── Page.php │ │ │ │ │ └── Product.php │ │ │ │ └── Product.php │ │ │ ├── RunCode.php │ │ │ └── Session.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config │ │ │ ├── backend │ │ │ │ ├── config.yaml │ │ │ │ ├── indexer.yaml │ │ │ │ ├── magento.configuration.list.yaml │ │ │ │ ├── magento.page.blocks.yaml │ │ │ │ └── magento.product.blocks.yaml │ │ │ ├── config.yaml │ │ │ └── frontend │ │ │ │ └── config.yaml │ │ └── module.yaml │ ├── magento-demo │ │ ├── App │ │ │ └── Plugin │ │ │ │ └── Router.php │ │ ├── LICENSE │ │ ├── config │ │ │ └── backend.yaml │ │ ├── css │ │ │ └── home.css │ │ ├── layout │ │ │ └── page.yaml │ │ ├── module.yaml │ │ ├── tailwind.yaml │ │ └── template │ │ │ ├── server-time-container.phtml │ │ │ └── server-time.phtml │ ├── magento-frontend-lane │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── css │ │ │ └── base │ │ │ │ └── reset.css │ │ ├── layout │ │ │ └── page.yaml │ │ ├── module.yaml │ │ ├── tailwind.yaml │ │ ├── template │ │ │ └── page │ │ │ │ └── head │ │ │ │ ├── js │ │ │ │ └── lane.phtml │ │ │ │ └── link │ │ │ │ └── style │ │ │ │ └── lane.phtml │ │ └── webpack.yaml │ ├── magento-frontend │ │ ├── LICENSE │ │ ├── asset │ │ │ ├── font │ │ │ │ └── Assistant │ │ │ │ │ ├── Assistant-ExtraLight.woff │ │ │ │ │ ├── Assistant-ExtraLight.woff2 │ │ │ │ │ ├── Assistant-Light.woff │ │ │ │ │ ├── Assistant-Light.woff2 │ │ │ │ │ ├── Assistant-Regular.woff │ │ │ │ │ ├── Assistant-Regular.woff2 │ │ │ │ │ ├── Assistant-SemiBold.woff │ │ │ │ │ └── Assistant-SemiBold.woff2 │ │ │ └── image │ │ │ │ ├── favicon.ico │ │ │ │ ├── icon │ │ │ │ ├── angle-small-down.svg │ │ │ │ ├── arrow-small-left.svg │ │ │ │ ├── bars-filter.svg │ │ │ │ ├── cart.svg │ │ │ │ ├── check-green.svg │ │ │ │ ├── check-white.svg │ │ │ │ ├── check.svg │ │ │ │ ├── cross-small.svg │ │ │ │ ├── heart-filled.svg │ │ │ │ ├── heart.svg │ │ │ │ ├── menu-burger.svg │ │ │ │ ├── message │ │ │ │ │ ├── error.svg │ │ │ │ │ ├── notice.svg │ │ │ │ │ ├── success.svg │ │ │ │ │ └── warning.svg │ │ │ │ ├── search.svg │ │ │ │ ├── settings.svg │ │ │ │ ├── user-filled.svg │ │ │ │ └── user.svg │ │ │ │ └── logo-default.svg │ │ ├── composer.json │ │ ├── config │ │ │ └── backend │ │ │ │ └── config.yaml │ │ ├── css │ │ │ ├── base │ │ │ │ ├── animation.css │ │ │ │ ├── buttons.css │ │ │ │ ├── forms.css │ │ │ │ ├── icons.css │ │ │ │ ├── price.css │ │ │ │ ├── typography.css │ │ │ │ └── utilities.css │ │ │ ├── component │ │ │ │ ├── carousel.css │ │ │ │ ├── collapsible.css │ │ │ │ ├── dropdown.css │ │ │ │ ├── layout │ │ │ │ │ ├── breadcrumbs.css │ │ │ │ │ ├── footer.css │ │ │ │ │ ├── grid.css │ │ │ │ │ ├── header.css │ │ │ │ │ ├── main-navigation.css │ │ │ │ │ ├── toolbar.css │ │ │ │ │ └── usp.css │ │ │ │ ├── listing │ │ │ │ │ └── facets.css │ │ │ │ ├── messages.css │ │ │ │ ├── minicart.css │ │ │ │ ├── mobile-overlay.css │ │ │ │ ├── overlay.css │ │ │ │ ├── product │ │ │ │ │ ├── attributes-list.css │ │ │ │ │ ├── gallery.css │ │ │ │ │ ├── grid.css │ │ │ │ │ ├── list.css │ │ │ │ │ ├── options.css │ │ │ │ │ ├── related.css │ │ │ │ │ ├── sku.css │ │ │ │ │ ├── stock.css │ │ │ │ │ ├── tile.css │ │ │ │ │ ├── usp.css │ │ │ │ │ └── wishlist.css │ │ │ │ ├── search │ │ │ │ │ ├── form.css │ │ │ │ │ └── suggestions.css │ │ │ │ ├── tabs.css │ │ │ │ └── toggle-link.css │ │ │ └── page │ │ │ │ ├── category.css │ │ │ │ └── product.css │ │ ├── js │ │ │ ├── common │ │ │ │ ├── AddToCart.js │ │ │ │ ├── Carousel.js │ │ │ │ ├── ClickEventDelegator.js │ │ │ │ ├── Collapsible.js │ │ │ │ ├── LazyContent.js │ │ │ │ ├── Menu.js │ │ │ │ ├── MiniCart.js │ │ │ │ ├── MobileOverlay.js │ │ │ │ ├── PageMessage.js │ │ │ │ ├── Search.js │ │ │ │ ├── SearchSuggestions.js │ │ │ │ └── Tabs.js │ │ │ ├── extend │ │ │ │ └── RequestExtend.js │ │ │ ├── listing │ │ │ │ └── Facets.js │ │ │ └── product │ │ │ │ ├── Gallery.js │ │ │ │ ├── Options.js │ │ │ │ └── Wishlist.js │ │ ├── layout │ │ │ ├── category.yaml │ │ │ ├── cms.yaml │ │ │ ├── component │ │ │ │ └── product │ │ │ │ │ └── tile.yaml │ │ │ ├── page.yaml │ │ │ └── product.yaml │ │ ├── module.yaml │ │ ├── tailwind.yaml │ │ ├── template │ │ │ ├── category │ │ │ │ ├── details.phtml │ │ │ │ ├── facets.phtml │ │ │ │ └── result.phtml │ │ │ ├── cms │ │ │ │ ├── content.phtml │ │ │ │ └── heading.phtml │ │ │ ├── component │ │ │ │ ├── product │ │ │ │ │ ├── discount.phtml │ │ │ │ │ ├── price.phtml │ │ │ │ │ └── tile │ │ │ │ │ │ ├── image.phtml │ │ │ │ │ │ └── name.phtml │ │ │ │ └── toggle-link.phtml │ │ │ ├── page.phtml │ │ │ ├── page │ │ │ │ ├── context.phtml │ │ │ │ ├── footer │ │ │ │ │ ├── copyright.phtml │ │ │ │ │ └── menu.phtml │ │ │ │ ├── head │ │ │ │ │ ├── gtm.phtml │ │ │ │ │ ├── js │ │ │ │ │ │ ├── common.phtml │ │ │ │ │ │ └── product.phtml │ │ │ │ │ ├── link │ │ │ │ │ │ ├── favicon.phtml │ │ │ │ │ │ ├── font.phtml │ │ │ │ │ │ └── style │ │ │ │ │ │ │ ├── common.phtml │ │ │ │ │ │ │ ├── listing.phtml │ │ │ │ │ │ │ └── product.phtml │ │ │ │ │ ├── meta │ │ │ │ │ │ ├── description.phtml │ │ │ │ │ │ ├── encoding.phtml │ │ │ │ │ │ └── viewport.phtml │ │ │ │ │ └── title.phtml │ │ │ │ ├── header │ │ │ │ │ ├── account.phtml │ │ │ │ │ ├── account │ │ │ │ │ │ ├── dropdown-customer.phtml │ │ │ │ │ │ └── dropdown-guest.phtml │ │ │ │ │ ├── logo.phtml │ │ │ │ │ ├── minicart.phtml │ │ │ │ │ ├── minicart │ │ │ │ │ │ ├── content.phtml │ │ │ │ │ │ ├── empty.phtml │ │ │ │ │ │ ├── footer.phtml │ │ │ │ │ │ ├── product-item │ │ │ │ │ │ │ ├── image.phtml │ │ │ │ │ │ │ ├── name.phtml │ │ │ │ │ │ │ ├── price.phtml │ │ │ │ │ │ │ ├── quantity.phtml │ │ │ │ │ │ │ ├── remove.phtml │ │ │ │ │ │ │ └── sku.phtml │ │ │ │ │ │ └── products-list.phtml │ │ │ │ │ ├── mobile-menu-toggle.phtml │ │ │ │ │ ├── search.phtml │ │ │ │ │ └── search │ │ │ │ │ │ ├── form.phtml │ │ │ │ │ │ ├── overlay.phtml │ │ │ │ │ │ └── suggestions.phtml │ │ │ │ ├── menu.phtml │ │ │ │ ├── menu │ │ │ │ │ └── item.phtml │ │ │ │ ├── messages.phtml │ │ │ │ └── usp.phtml │ │ │ └── product │ │ │ │ ├── attributes │ │ │ │ ├── all-visible.phtml │ │ │ │ ├── name.phtml │ │ │ │ └── sku.phtml │ │ │ │ ├── breadcrumbs.phtml │ │ │ │ ├── cta │ │ │ │ └── add-to-cart.phtml │ │ │ │ ├── description.phtml │ │ │ │ ├── gallery.phtml │ │ │ │ ├── options.phtml │ │ │ │ ├── related │ │ │ │ ├── container.phtml │ │ │ │ ├── product-grid.phtml │ │ │ │ └── product-placeholder.phtml │ │ │ │ ├── stock.phtml │ │ │ │ ├── tabs.phtml │ │ │ │ ├── usp.phtml │ │ │ │ └── wishlist.phtml │ │ └── webpack.yaml │ ├── magento-newrelic │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config │ │ │ └── newrelic.yaml │ │ └── module.yaml │ ├── magento-pack │ │ ├── LICENSE │ │ ├── composer.json │ │ └── entry │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── cli │ │ │ ├── edition │ │ │ └── main │ │ │ │ ├── sample.config.php │ │ │ │ └── sample.env.php │ │ │ ├── index.php │ │ │ ├── package.json │ │ │ ├── postcss.config.js │ │ │ ├── webpack.config.direct.js │ │ │ └── webpack.config.js │ └── magento-staging │ │ ├── App │ │ ├── Plugin │ │ │ ├── Index │ │ │ │ ├── Changelog │ │ │ │ │ └── Handler.php │ │ │ │ └── EntityLink.php │ │ │ └── Project │ │ │ │ └── Database.php │ │ ├── Query │ │ │ └── Staging.php │ │ └── Staging.php │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── config │ │ ├── backend.yaml │ │ └── backend │ │ │ └── indexer.yaml │ │ └── module.yaml └── magento │ ├── lightna-demo │ ├── Observer │ │ └── BlockHtmlAfter.php │ ├── Plugin │ │ └── Design.php │ ├── etc │ │ ├── frontend │ │ │ ├── di.xml │ │ │ └── events.xml │ │ └── module.xml │ ├── registration.php │ └── view │ │ └── frontend │ │ └── web │ │ └── css │ │ └── source │ │ └── _module.less │ ├── lightna-frontend │ ├── Block │ │ └── Adminhtml │ │ │ └── Index │ │ │ ├── Additional.php │ │ │ ├── Column │ │ │ └── Status.php │ │ │ └── Grid.php │ ├── Controller │ │ ├── Adminhtml │ │ │ └── Index │ │ │ │ ├── Index.php │ │ │ │ ├── InvalidateAll.php │ │ │ │ └── MassInvalidate.php │ │ └── Session │ │ │ └── Update.php │ ├── LICENSE │ ├── Model │ │ ├── Adminhtml │ │ │ └── Index │ │ │ │ └── DataSource.php │ │ ├── Layout.php │ │ ├── Session.php │ │ └── Session │ │ │ └── Manager.php │ ├── Plugin │ │ ├── CategoryProductFullReindex.php │ │ ├── DbSchema.php │ │ ├── FrontController.php │ │ ├── PriceFullReindex.php │ │ └── RestController.php │ ├── Setup │ │ └── Patch │ │ │ └── Data │ │ │ ├── CreateFooterLinksCmsBlock.php │ │ │ ├── CreateProductUspCmsBlock.php │ │ │ └── CreateUspCmsBlock.php │ ├── composer.json │ ├── etc │ │ ├── acl.xml │ │ ├── adminhtml │ │ │ ├── menu.xml │ │ │ └── routes.xml │ │ ├── config.xml │ │ ├── db_schema.xml │ │ ├── di.xml │ │ ├── frontend │ │ │ ├── di.xml │ │ │ └── routes.xml │ │ ├── module.xml │ │ └── webapi_rest │ │ │ └── di.xml │ ├── registration.php │ ├── registration │ │ ├── backend.php │ │ └── common.php │ └── view │ │ ├── adminhtml │ │ └── layout │ │ │ ├── lightna_index_index.xml │ │ │ └── lightna_index_index_block.xml │ │ └── frontend │ │ └── layout │ │ └── default.xml │ ├── lightna-lane-theme │ ├── LICENSE │ ├── Magento_Checkout │ │ └── layout │ │ │ └── checkout_index_index.xml │ ├── Magento_Theme │ │ ├── layout │ │ │ └── default.xml │ │ └── web │ │ │ └── css │ │ │ └── source │ │ │ └── _module.less │ ├── composer.json │ ├── registration.php │ ├── theme.xml │ └── web │ │ └── css │ │ └── source │ │ └── _theme.less │ └── lightna-theme │ ├── LICENSE │ ├── composer.json │ ├── etc │ └── view.xml │ ├── registration.php │ └── theme.xml ├── entry └── magento-os │ ├── .gitignore │ ├── Makefile │ ├── cli │ ├── composer.json │ ├── composer.lock │ ├── edition │ ├── design-example │ │ └── config.php │ └── main │ │ └── config.php │ ├── index.php │ ├── module │ └── project │ │ └── design-example │ │ ├── js │ │ └── extend │ │ │ └── AddToCart.js │ │ ├── module.yaml │ │ ├── override │ │ └── lightna │ │ │ └── magento-frontend │ │ │ ├── asset │ │ │ └── image │ │ │ │ └── logo-default.svg │ │ │ └── template │ │ │ └── page.phtml │ │ └── webpack.yaml │ ├── package-lock.json │ ├── package.json │ ├── postcss.config.js │ ├── webpack.config.direct.js │ └── webpack.config.js └── project └── magento-os └── .gitkeep /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /generated/ 3 | /project/ 4 | /entry/*-local/ 5 | -------------------------------------------------------------------------------- /code/lightna/lightna-elasticsearch/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/elasticsearch", 3 | "description": "Lightna Elasticsearch module", 4 | "type": "library", 5 | "version": "1.0.50", 6 | "license": "MIT", 7 | "require": { 8 | "ext-curl": "*", 9 | "lightna/engine": "^1.0.50" 10 | }, 11 | "autoload": { 12 | "psr-4": { 13 | "Lightna\\Elasticsearch\\": "" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /code/lightna/lightna-elasticsearch/config.yaml: -------------------------------------------------------------------------------- 1 | elasticsearch: [ ] 2 | -------------------------------------------------------------------------------- /code/lightna/lightna-elasticsearch/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/elasticsearch 2 | namespace: Lightna\Elasticsearch 3 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/ArrayPath.php: -------------------------------------------------------------------------------- 1 | path = $path; 16 | $parts = explode('/', $path); 17 | $this->key = array_pop($parts); 18 | $this->parent = implode('/', $parts); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Autoloader.php: -------------------------------------------------------------------------------- 1 | dir = Bootstrap::getAppliedConfigDir(); 18 | } 19 | 20 | public function apply(): void 21 | { 22 | foreach (LIGHTNA_AREAS as $area) { 23 | $this->save($area, Bootstrap::getUnappliedAreaConfig($area)); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Cli.php: -------------------------------------------------------------------------------- 1 | commands[$command])) { 17 | throw new CliInputException('Command "' . $command . '" not defined'); 18 | } 19 | 20 | getobj($this->commands[$command])->run(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Compiler/LayoutDirectives.php: -------------------------------------------------------------------------------- 1 | assetSign->run(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Build/Config.php: -------------------------------------------------------------------------------- 1 | getArgs()[0]); 16 | $value = $this->config->get($path); 17 | 18 | echo is_array($value) ? json_pretty($value) : $value; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Config/Apply.php: -------------------------------------------------------------------------------- 1 | config->apply(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Entity/Info.php: -------------------------------------------------------------------------------- 1 | entities as $code => $entity) { 19 | if (!$this->indexer->getEntityIndex($code)) { 20 | continue; 21 | } 22 | 23 | echo str_pad($code, 30) . $entity['storage'] . "\n"; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Entity/Invalidate.php: -------------------------------------------------------------------------------- 1 | indexState->invalidate( 19 | $this->validEntityCodes->get($this->getArgs()), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Queue/Block.php: -------------------------------------------------------------------------------- 1 | indexer->blockQueue( 17 | (int)($this->getOpt('wait') ?? 10), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Queue/Process.php: -------------------------------------------------------------------------------- 1 | indexer->process(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Queue/Reset.php: -------------------------------------------------------------------------------- 1 | indexer->validateQueueBlock(true); 21 | $this->changelog->reset(); 22 | $this->queue->reset(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Queue/Unblock.php: -------------------------------------------------------------------------------- 1 | indexer->unblockQueue(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Update/Entity.php: -------------------------------------------------------------------------------- 1 | updateEntities( 16 | $this->validEntityCodes->get($this->getArgs()), 17 | (bool)$this->getOpt('multi'), 18 | (int)$this->getOpt('scope'), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Version/Bind.php: -------------------------------------------------------------------------------- 1 | state->index->bindToBuild = $this->build->getVersion(); 19 | $this->state->save(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Version/Down.php: -------------------------------------------------------------------------------- 1 | state->index->version = $this->state->index->getPreviousVersion(); 17 | $this->state->save(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Version/Unbind.php: -------------------------------------------------------------------------------- 1 | state->index->bindToBuild = 0; 17 | $this->state->save(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Index/Version/Up.php: -------------------------------------------------------------------------------- 1 | state->index->version = $this->state->index->getNextVersion(); 17 | $this->state->index->bindToBuild = 0; 18 | $this->state->save(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Opcache/Slap.php: -------------------------------------------------------------------------------- 1 | state->opcache->slap; 17 | $slap->time = time(); 18 | $slap->length = (int)$this->getArg(1) ?: 60; 19 | $this->state->save(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Console/Schema/Update.php: -------------------------------------------------------------------------------- 1 | updatePool as $update) { 17 | getobj($update)->update(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Context.php: -------------------------------------------------------------------------------- 1 | scope); 23 | } 24 | 25 | /** @noinspection PhpUnused */ 26 | protected function defineScope(): void 27 | { 28 | // Extension point 29 | $this->scope = 1; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Context/Entity.php: -------------------------------------------------------------------------------- 1 | db->getLock($name, $timeout); 16 | } 17 | 18 | public function release(string $name): void 19 | { 20 | $this->db->releaseLock($name); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/ObjectManagerIgnore.php: -------------------------------------------------------------------------------- 1 | name; 15 | } 16 | 17 | public function getValue(): string 18 | { 19 | return $this->value; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Response/Header/CacheControl.php: -------------------------------------------------------------------------------- 1 | securityCsp->getPolicies() as $name => $values) { 19 | $filteredValues = array_keys(array_filter($values)); 20 | if (count($filteredValues)) { 21 | $directives[] = $name . ' ' . implode(' ', $filteredValues); 22 | } 23 | } 24 | 25 | return implode('; ', $directives); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Response/Header/HeaderInterface.php: -------------------------------------------------------------------------------- 1 | invalidatedAt) || $this->rebuiltAt > $this->invalidatedAt; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/App/Storage/Database/Client.php: -------------------------------------------------------------------------------- 1 | attributes) || !is_object($this->attributes)) { 14 | return ''; 15 | } 16 | 17 | $html = ''; 18 | foreach ($this->attributes as $name => $value) { 19 | $value = is_array($value) ? implode(' ', $value) : $value; 20 | $html .= ' ' . $name . '="' . escape($value) . '"'; 21 | } 22 | 23 | return $html; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/Data/Csp.php: -------------------------------------------------------------------------------- 1 | nonce = $this->securityCsp->getNonce(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/Data/EntityData.php: -------------------------------------------------------------------------------- 1 | defineParam($name); 14 | 15 | return $this->$name; 16 | } 17 | 18 | protected function defineParam(string $name): void 19 | { 20 | $this->$name = $_REQUEST[$name] ?? null; 21 | } 22 | 23 | public function __isset(string $name): bool 24 | { 25 | if (!parent::__isset($name)) { 26 | return isset($_REQUEST[$name]); 27 | } 28 | 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | run($command); 31 | } catch (CliInputException $e) { 32 | echo cli_error($e->getMessage()) . "\n"; 33 | exit(1); 34 | } 35 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/engine", 3 | "description": "Lightna Engine module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "php": "^8.1", 9 | "ext-ctype": "*", 10 | "ext-yaml": "*", 11 | "ext-pdo": "*", 12 | "ext-zend-opcache": "*", 13 | "laminas/laminas-db": "^2.20", 14 | "doctrine/dbal": "^4.2" 15 | }, 16 | "autoload": { 17 | "psr-4": { 18 | "Lightna\\Engine\\": "" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/config/backend/indexer.yaml: -------------------------------------------------------------------------------- 1 | indexer: 2 | changelog: 3 | tables: [ ] 4 | batch: 5 | collectors: [ ] 6 | watch: 7 | start_at: 5 8 | interval: 2 9 | stop_at: 50 10 | queue: 11 | lock_wait_interval_ms: 250 12 | lock_wait_print_interval: 5 13 | allowed_check_interval_ms: 250 14 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/config/security.yaml: -------------------------------------------------------------------------------- 1 | security: 2 | csp: 3 | policy: 4 | default-src: 5 | "'none'": true 6 | script-src: 7 | "'strict-dynamic'": true 8 | "'nonce'": true 9 | style-src: 10 | "'nonce'": true 11 | img-src: 12 | "'self'": true 13 | font-src: 14 | "'self'": true 15 | connect-src: 16 | "'self'": true 17 | base-uri: 18 | "'none'": true 19 | object-src: 20 | "'none'": true 21 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/css/block-wrapper.css: -------------------------------------------------------------------------------- 1 | [id^="block-wrapper-"] { 2 | display: contents; 3 | } 4 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/i18n/en_US.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/lightna-engine/i18n/en_US.csv -------------------------------------------------------------------------------- /code/lightna/lightna-engine/index.php: -------------------------------------------------------------------------------- 1 | run(); 23 | 24 | } catch (Throwable $e) { 25 | error500('Initialization error', $e); 26 | } 27 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/PageCache.js: -------------------------------------------------------------------------------- 1 | import { Blocks } from 'lightna/engine/lib/Blocks'; 2 | import { PageReadyEvent } from 'lightna/engine/PageReadyEvent'; 3 | 4 | export class PageCache { 5 | 6 | constructor() { 7 | this.extendProperties(); 8 | this.handlePrivateBlocks().then(() => { 9 | PageReadyEvent.trigger(); 10 | }); 11 | } 12 | 13 | extendProperties() { 14 | } 15 | 16 | async handlePrivateBlocks() { 17 | let privateBlocks = pageContext.privateBlocks; 18 | if (!privateBlocks.length) { 19 | return; 20 | } 21 | 22 | await Blocks.updateHtml( 23 | privateBlocks, 24 | { 'renderLazyBlocks': false }, 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/PageReadyEvent.js: -------------------------------------------------------------------------------- 1 | export class PageReadyEvent { 2 | static listeners = []; 3 | static isTriggered = false; 4 | 5 | static addListener(listener) { 6 | if (!PageReadyEvent.isTriggered) { 7 | PageReadyEvent.listeners.push(listener); 8 | } else { 9 | listener(); 10 | } 11 | } 12 | 13 | static trigger() { 14 | if (PageReadyEvent.isTriggered) return; 15 | 16 | for (const listener of PageReadyEvent.listeners) { 17 | listener(); 18 | } 19 | 20 | PageReadyEvent.isTriggered = true; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/lib/Cookie.js: -------------------------------------------------------------------------------- 1 | export class Cookie { 2 | static get(name) { 3 | const nameEQ = `${name}=`; 4 | const ca = document.cookie.split(';'); 5 | for (let i = 0; i < ca.length; i++) { 6 | let c = ca[i]; 7 | while (c.charAt(0) === ' ') c = c.substring(1, c.length); 8 | if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length); 9 | } 10 | 11 | return null; 12 | } 13 | 14 | static set(name, value, hours) { 15 | let expires = ''; 16 | if (hours) { 17 | const date = new Date(); 18 | date.setTime(date.getTime() + hours * 60 * 60 * 1000); 19 | expires = `; expires=${date.toUTCString()}`; 20 | } 21 | 22 | document.cookie = name + '=' + (value || '') + expires 23 | + '; path=/; SameSite=Lax'; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/lib/FormKey.js: -------------------------------------------------------------------------------- 1 | import { Cookie } from 'lightna/engine/lib/Cookie'; 2 | import { randomString } from 'lightna/engine/lib/utils/randomString'; 3 | 4 | export class FormKey { 5 | static get() { 6 | const value = this.getFormKeyCookie(); 7 | if (value) { 8 | return value; 9 | } 10 | this.create(); 11 | 12 | return this.getFormKeyCookie(); 13 | } 14 | 15 | static getFormKeyCookie() { 16 | return Cookie.get('form_key'); 17 | } 18 | 19 | static create() { 20 | Cookie.set('form_key', randomString(16), 1); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/lib/utils/isElementInViewport.js: -------------------------------------------------------------------------------- 1 | export function isElementInViewport(element) { 2 | const rect = element.getBoundingClientRect(); 3 | return ( 4 | rect.top >= 0 && 5 | rect.left >= 0 && 6 | rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && 7 | rect.right <= (window.innerWidth || document.documentElement.clientWidth) 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/lib/utils/isTouchDevice.js: -------------------------------------------------------------------------------- 1 | export function isTouchDevice() { 2 | return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; 3 | } 4 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/lib/utils/objectToQuery.js: -------------------------------------------------------------------------------- 1 | export function objectToQuery(data, prefix) { 2 | let q = [], 3 | p; 4 | for (p in data) { 5 | if (data.hasOwnProperty(p)) { 6 | const k = prefix ? prefix + '[' + p + ']' : p; 7 | const v = data[p]; 8 | q.push( 9 | v !== null && typeof v === 'object' 10 | ? objectToQuery(v, k) 11 | : encodeURIComponent(k) + '=' + encodeURIComponent(v), 12 | ); 13 | } 14 | } 15 | return q.join('&'); 16 | } 17 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/lib/utils/randomString.js: -------------------------------------------------------------------------------- 1 | export function randomString(length) { 2 | const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 3 | length = typeof length === 'undefined' ? 16 : length; 4 | 5 | let string = ''; 6 | for (let i = 0; i < length; i++) { 7 | string += chars.charAt(Math.floor(Math.random() * chars.length)); 8 | } 9 | 10 | return string; 11 | } 12 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/js/lib/utils/resolveAnimationEnd.js: -------------------------------------------------------------------------------- 1 | export async function resolveAnimationEnd(item) { 2 | return new Promise((resolve) => { 3 | // forces the browser to recalculate styles, ensuring the animation actually starts 4 | void item.offsetWidth; 5 | 6 | const computedStyle = window.getComputedStyle(item); 7 | const animationName = computedStyle.animationName; 8 | const animationDuration = parseFloat(computedStyle.animationDuration) || 0; 9 | 10 | if (animationName !== 'none' && animationDuration) { 11 | item.addEventListener('animationend', resolve, { once: true }); 12 | } else { 13 | resolve(); 14 | } 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/layout/no-route.yaml: -------------------------------------------------------------------------------- 1 | template: lightna/engine/no-route.phtml 2 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/layout/page.yaml: -------------------------------------------------------------------------------- 1 | .head: 2 | container: head 3 | .context: 4 | id: page-context 5 | template: lightna/engine/page/context.phtml 6 | .body: 7 | .after: 8 | .ssr-time: 9 | template: lightna/engine/page/ssr-time.phtml 10 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/engine 2 | namespace: Lightna\Engine 3 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/tailwind.yaml: -------------------------------------------------------------------------------- 1 | entry: 2 | common: 3 | import: 4 | lightna-engine-block-wrapper: lightna/engine/block-wrapper.css 5 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/template/error/503.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 503 Temporary Unavailable 5 | 6 | 7 | 8 |
9 | 503 Temporary Unavailable 10 |
11 | The service is under maintenance 12 |
13 | 14 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/template/page/context.phtml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/template/page/ssr-time.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/lightna-engine/webpack.yaml: -------------------------------------------------------------------------------- 1 | entry: 2 | common: 3 | component: 4 | lightna-pagecache: lightna/engine/PageCache 5 | -------------------------------------------------------------------------------- /code/lightna/lightna-newrelic/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/newrelic", 3 | "description": "Lightna Newrelic module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/engine": "^1.0.50" 9 | }, 10 | "autoload": { 11 | "psr-4": { 12 | "Lightna\\Newrelic\\": "" 13 | } 14 | }, 15 | "suggest": { 16 | "ext-newrelic": "Used for APM monitoring via New Relic" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/lightna-newrelic/config/backend/plugin.yaml: -------------------------------------------------------------------------------- 1 | plugin: 2 | Lightna\Engine\App: 3 | - Lightna\Newrelic\App\Plugin\App 4 | -------------------------------------------------------------------------------- /code/lightna/lightna-newrelic/config/newrelic.yaml: -------------------------------------------------------------------------------- 1 | newrelic: 2 | transaction: 3 | name_mapping: [ ] 4 | -------------------------------------------------------------------------------- /code/lightna/lightna-newrelic/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/newrelic 2 | namespace: Lightna\Newrelic 3 | -------------------------------------------------------------------------------- /code/lightna/lightna-pack/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/pack", 3 | "description": "Lightna package for new project", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/engine": "^1.0.50", 9 | "lightna/tailwind": "^1.0.50", 10 | "lightna/webpack": "^1.0.50", 11 | "lightna/phpunit": "^1.0.50" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /code/lightna/lightna-pack/entry/.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /auth.json 3 | /node_modules 4 | /vendor 5 | /generated 6 | /edition/*/env.php 7 | /edition/*/applied/ 8 | /pub/lightna 9 | -------------------------------------------------------------------------------- /code/lightna/lightna-pack/entry/cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | { 17 | if (argv.mode === 'development') { 18 | config.devtool = 'inline-source-map'; 19 | config.watch = true; 20 | } 21 | 22 | return config; 23 | }; 24 | -------------------------------------------------------------------------------- /code/lightna/lightna-pack/entry/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const deepmerge = require('deepmerge'); 3 | 4 | const editionDir = process.env.LIGHTNA_EDITION_DIR; 5 | const modulesConfig = require('./' + editionDir + '/building/webpack/webpack.config.js'); 6 | 7 | const config = deepmerge(modulesConfig, { 8 | output: { 9 | filename: '[name].js', 10 | path: path.resolve(__dirname, editionDir + '/asset.building/build/js'), 11 | }, 12 | mode: 'production' 13 | }); 14 | 15 | module.exports = config; 16 | -------------------------------------------------------------------------------- /code/lightna/lightna-phpunit/bootstrap.integration.php: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /code/lightna/lightna-phpunit/phpunit.unit.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /code/lightna/lightna-redis/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/redis", 3 | "description": "Lightna Redis module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "ext-redis": "*", 9 | "lightna/engine": "^1.0.50" 10 | }, 11 | "autoload": { 12 | "psr-4": { 13 | "Lightna\\Redis\\": "" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /code/lightna/lightna-redis/config.yaml: -------------------------------------------------------------------------------- 1 | storage: 2 | redis: 3 | adapter: Lightna\Redis\App\Storage\Redis 4 | options: 5 | host: null 6 | port: null 7 | db: null 8 | persistent: true 9 | serializer: igbinary 10 | session_redis: 11 | adapter: Lightna\Redis\App\Storage\Redis 12 | options: 13 | host: null 14 | port: null 15 | db: null 16 | persistent: true 17 | timeout: 2 18 | data_type: string 19 | serializer: null 20 | session_handler: 21 | redis: Lightna\Redis\App\Session\Handler 22 | -------------------------------------------------------------------------------- /code/lightna/lightna-redis/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/redis 2 | namespace: Lightna\Redis 3 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/App/Console/Version/Up.php: -------------------------------------------------------------------------------- 1 | state->session->version = time(); 17 | $this->state->save(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/App/Handler/HandlerInterface.php: -------------------------------------------------------------------------------- 1 | session->prolong(); 22 | $proceed(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/Data/Session.php: -------------------------------------------------------------------------------- 1 | appSession->canRead()) { 18 | $data = $this->appSession->getData(); 19 | $data = $data['index'] ?? []; 20 | } 21 | 22 | parent::init($data); 23 | } 24 | 25 | /** @noinspection PhpUnused */ 26 | protected function defineIsReindexRequired(): void 27 | { 28 | $this->isReindexRequired = $this->appSession->getIsReindexRequired(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/session", 3 | "description": "Lightna Session module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/engine": "^1.0.50" 9 | }, 10 | "autoload": { 11 | "psr-4": { 12 | "Lightna\\Session\\": "" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/config/backend/cli.yaml: -------------------------------------------------------------------------------- 1 | cli: 2 | command: 3 | session.version.up: Lightna\Session\App\Console\Version\Up 4 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/config/backend/config.yaml: -------------------------------------------------------------------------------- 1 | plugin: 2 | Lightna\Engine\App: 3 | - Lightna\Session\App\Plugin\App 4 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/config/config.yaml: -------------------------------------------------------------------------------- 1 | session_handler: 2 | file: Lightna\Session\App\Handler\File 3 | session: 4 | namespace: lightna_session 5 | scoped: true 6 | handler: file 7 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/config/frontend/config.yaml: -------------------------------------------------------------------------------- 1 | storage: 2 | session_file: 3 | adapter: Lightna\Session\App\Storage\File 4 | options: [ ] 5 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/js/Session.js: -------------------------------------------------------------------------------- 1 | import { $ } from 'lightna/engine/lib/utils/dom'; 2 | import { Request } from 'lightna/engine/lib/Request'; 3 | import { PageReadyEvent } from 'lightna/engine/PageReadyEvent'; 4 | 5 | export class Session { 6 | 7 | constructor() { 8 | this.extendProperties(); 9 | this.initializeEventListeners(); 10 | } 11 | 12 | extendProperties() { 13 | } 14 | 15 | initializeEventListeners() { 16 | PageReadyEvent.addListener(this.onPageReady.bind(this)); 17 | } 18 | 19 | onPageReady() { 20 | if ($('#session-isReindexRequired')) { 21 | Request.post('/lightna/session/update'); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/layout/page.yaml: -------------------------------------------------------------------------------- 1 | directive: 2 | - position .body.session-updater last 3 | .body: 4 | .session-updater: 5 | id: lightna-session-updater 6 | private: true 7 | template: lightna/session/page/session/updater.phtml 8 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/session 2 | namespace: Lightna\Session 3 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/template/page/session/updater.phtml: -------------------------------------------------------------------------------- 1 | isReindexRequired) return; 8 | ?> 9 | 10 | 11 | -------------------------------------------------------------------------------- /code/lightna/lightna-session/webpack.yaml: -------------------------------------------------------------------------------- 1 | entry: 2 | common: 3 | component: 4 | lightna-session: lightna/session/Session 5 | -------------------------------------------------------------------------------- /code/lightna/lightna-tailwind/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/tailwind", 3 | "description": "Lightna Tailwind module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "ext-yaml": "*", 9 | "lightna/engine": "^1.0.50" 10 | }, 11 | "autoload": { 12 | "psr-4": { 13 | "Lightna\\Tailwind\\": "" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /code/lightna/lightna-tailwind/config/backend.yaml: -------------------------------------------------------------------------------- 1 | compiler: 2 | pool: 3 | tailwind: 4 | message: make tailwind 5 | compiler: Lightna\Tailwind\App\Compiler\Tailwind 6 | -------------------------------------------------------------------------------- /code/lightna/lightna-tailwind/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/tailwind 2 | namespace: Lightna\Tailwind 3 | -------------------------------------------------------------------------------- /code/lightna/lightna-tailwind/tailwind.config.js: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs'; 2 | 3 | const allModulesConfig = JSON.parse(readFileSync(__dirname + "/config.json", "utf8")); 4 | 5 | module.exports = allModulesConfig; 6 | -------------------------------------------------------------------------------- /code/lightna/lightna-webpack/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/webpack", 3 | "description": "Lightna Webpack module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "ext-yaml": "*", 9 | "lightna/engine": "^1.0.50" 10 | }, 11 | "autoload": { 12 | "psr-4": { 13 | "Lightna\\Webpack\\": "" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /code/lightna/lightna-webpack/config/backend.yaml: -------------------------------------------------------------------------------- 1 | compiler: 2 | pool: 3 | webpack: 4 | message: make webpack 5 | compiler: Lightna\Webpack\App\Compiler\Webpack 6 | -------------------------------------------------------------------------------- /code/lightna/lightna-webpack/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/webpack 2 | namespace: Lightna\Webpack 3 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Entity/Category.php: -------------------------------------------------------------------------------- 1 | entityLink->getColumn($table); 16 | $ids = $this->ids($changelog, $column); 17 | 18 | return $this->entityLink->getIds($table, $ids); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/Changelog/Collector/Attributes.php: -------------------------------------------------------------------------------- 1 | watchedTables)) { 17 | return [ 18 | 'content_product' => [1], // Update visible attributes 19 | 'content_category' => [1], // Update filterable attributes 20 | ]; 21 | } 22 | 23 | return []; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/Changelog/Collector/Category.php: -------------------------------------------------------------------------------- 1 | $this->collect->entityIds($table, $changelog), 20 | 'content_page' => [1], // Update menu and categories 21 | ]; 22 | } 23 | 24 | return []; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/Changelog/Collector/CategoryProducts.php: -------------------------------------------------------------------------------- 1 | $this->collect->ids($changelog, 'product_id'), 20 | ]; 21 | } 22 | 23 | return []; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/Changelog/Collector/CmsBlock.php: -------------------------------------------------------------------------------- 1 | [1], // Update CMS blocks on all pages 17 | 'content_product' => [1], // Update CMS blocks on product pages 18 | ]; 19 | } 20 | 21 | return []; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/Changelog/Collector/CmsPage.php: -------------------------------------------------------------------------------- 1 | $this->collect->entityIds($table, $changelog), 20 | ]; 21 | } 22 | 23 | return []; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/Changelog/Collector/Config.php: -------------------------------------------------------------------------------- 1 | [1]]; 16 | } 17 | 18 | return []; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/Changelog/Collector/ProductWebsite.php: -------------------------------------------------------------------------------- 1 | $this->collect->ids($changelog, 'product_id'), 20 | ]; 21 | } 22 | 23 | return []; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Index/EntityLink.php: -------------------------------------------------------------------------------- 1 | 'page_id', 16 | str_starts_with($table, 'cms_block') => 'block_id', 17 | default => 'entity_id', 18 | }; 19 | } 20 | 21 | public function getIds(string $table, array $ids): array 22 | { 23 | // Extension point 24 | return $ids; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Plugin/App/Schema/Index/Triggers.php: -------------------------------------------------------------------------------- 1 | magentoScope->getList(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Plugin/App/Session/Cookie.php: -------------------------------------------------------------------------------- 1 | config->session->cookie->lifetime; 23 | $options['expires'] = $lifetime > 0 ? time() + $lifetime : $lifetime; 24 | 25 | return $options; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Plugin/Context.php: -------------------------------------------------------------------------------- 1 | magentoScope; 22 | 23 | return function () use ($magentoScope) { 24 | $this->scope = $magentoScope->resolve(); 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Query/Category/Eav.php: -------------------------------------------------------------------------------- 1 | groups = $this->db->fetch( 20 | $this->getListSelect(), 21 | 'customer_group_id', 22 | ); 23 | } 24 | 25 | protected function getListSelect(): Select 26 | { 27 | return $this->db->select() 28 | ->from('customer_group'); 29 | } 30 | 31 | public function getList(): array 32 | { 33 | return $this->groups; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Query/Index/PriceReplica.php: -------------------------------------------------------------------------------- 1 | syncBatchSize = (int)( 21 | $this->rowsBatchSize 22 | / count($this->website->getList()) 23 | / count($this->group->getList()) 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Query/Inventory/Ssi.php: -------------------------------------------------------------------------------- 1 | db->fetch($this->getBatchSelect($productIds), 'product_id'); 18 | } 19 | 20 | protected function getBatchSelect(array $productIds): Select 21 | { 22 | $select = $this->db->select() 23 | ->from(['i' => 'cataloginventory_stock_item']) 24 | ->columns(['product_id', 'qty', 'status' => 'is_in_stock', 'backorders']); 25 | $select->where->in('i.product_id', $productIds); 26 | 27 | return $select; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Query/Website.php: -------------------------------------------------------------------------------- 1 | websites = $this->db->fetch( 20 | $this->getListSelect(), 21 | 'website_id', 22 | ); 23 | } 24 | 25 | protected function getListSelect(): Select 26 | { 27 | return $this->db->select() 28 | ->from('store_website') 29 | ->where('website_id > 0'); 30 | } 31 | 32 | public function getList(): array 33 | { 34 | return $this->websites; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/App/Search/ClientInterface.php: -------------------------------------------------------------------------------- 1 | newSubject(Product::class)->getAvailableTypes(); 18 | $simplePosition = array_search('simple', $types); 19 | $virtualPosition = array_search('virtual', $types); 20 | $configurablePosition = array_search('configurable', $types); 21 | 22 | $this->assertGreaterThan($simplePosition, $configurablePosition); 23 | $this->assertGreaterThan($virtualPosition, $configurablePosition); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Cms.php: -------------------------------------------------------------------------------- 1 | contextEntityLoader->loadData()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Config/Currency.php: -------------------------------------------------------------------------------- 1 | href, '/media')) { 24 | $this->href = $this->url->asset($this->href); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Config/GoogleAnalytics.php: -------------------------------------------------------------------------------- 1 | src, '/media')) { 30 | $this->src = $this->url->asset($this->src); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Config/Product.php: -------------------------------------------------------------------------------- 1 | getEntityData()); 23 | } 24 | 25 | protected function getEntityData(): array 26 | { 27 | return getobj($this->contentCategoryEntity)->get(1); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Content/Page/Category/Item.php: -------------------------------------------------------------------------------- 1 | getEntityData()); 24 | } 25 | 26 | protected function getEntityData(): array 27 | { 28 | return getobj($this->contentProductEntity)->get(1); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Content/Product/FilterableAttribute.php: -------------------------------------------------------------------------------- 1 | lifetime = $this->config->session->cookie->lifetime; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Currency.php: -------------------------------------------------------------------------------- 1 | numberFormatter = new NumberFormatter( 20 | $this->config->locale->code, 21 | NumberFormatter::CURRENCY, 22 | ); 23 | } 24 | 25 | public function render(float|int|string $amount): string 26 | { 27 | return escape($this->numberFormatter->formatCurrency( 28 | (float)$amount, 29 | $this->config->currency->default, 30 | )); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/Data/Locale.php: -------------------------------------------------------------------------------- 1 | $this->getFilterableAttributes() 18 | ]; 19 | } 20 | 21 | protected function getFilterableAttributes(): array 22 | { 23 | $attributes = $this->eav->getFilterableAttributes(); 24 | 25 | $options = $this->eav->getOptions(); 26 | foreach ($attributes as &$attribute) { 27 | $attribute['options'] = $options[$attribute['id']] ?? []; 28 | } 29 | 30 | return $attributes; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-backend", 3 | "description": "Lightna Magento Backend module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "ext-simplexml": "*", 9 | "lightna/engine": "^1.0.50" 10 | }, 11 | "autoload": { 12 | "psr-4": { 13 | "Lightna\\Magento\\Backend\\": "" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/config/backend/config.yaml: -------------------------------------------------------------------------------- 1 | plugin: 2 | Lightna\Engine\App: 3 | - Lightna\Magento\Backend\App\Plugin\App 4 | Lightna\Engine\App\Context: 5 | - Lightna\Magento\Backend\App\Plugin\Context 6 | Lightna\Engine\App\Scope: 7 | - Lightna\Magento\Backend\App\Plugin\App\Scope 8 | Lightna\Engine\App\Index\Changelog\Handler: 9 | - Lightna\Magento\Backend\App\Plugin\App\Index\Changelog\Handler 10 | Lightna\Session\App\Session\Cookie: 11 | - Lightna\Magento\Backend\App\Plugin\App\Session\Cookie 12 | Lightna\Engine\App\Schema\Index\Triggers: 13 | - Lightna\Magento\Backend\App\Plugin\App\Schema\Index\Triggers 14 | Lightna\Engine\App\I18n: 15 | - Lightna\Magento\Backend\App\Plugin\App\I18n 16 | Lightna\Session\App\Session\DataBuilder: 17 | - Lightna\Magento\Backend\App\Plugin\App\Session\DataBuilder 18 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/config/backend/magento.configuration.list.yaml: -------------------------------------------------------------------------------- 1 | magento.configuration.list: 2 | country/code: general/country/default 3 | locale/code: general/locale/code 4 | store/name: general/store_information/name 5 | logo/src: design/header/logo_src 6 | logo/width: design/header/logo_width 7 | logo/height: design/header/logo_height 8 | logo/alt: design/header/logo_alt 9 | favicon/href: design/head/shortcut_icon 10 | copyright: design/footer/copyright 11 | noRoutePageIdentifier: web/default/cms_no_route 12 | currency/default: currency/options/default 13 | ga/active: google/analytics/active 14 | ga/account: google/analytics/account 15 | session/cookie/lifetime: web/cookie/cookie_lifetime 16 | product/listing/defaultPageSize: catalog/frontend/grid_per_page 17 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/config/backend/magento.page.blocks.yaml: -------------------------------------------------------------------------------- 1 | magento.page.blocks: 2 | footerLinksHtml: footer_links 3 | uspHtml: usp 4 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/config/backend/magento.product.blocks.yaml: -------------------------------------------------------------------------------- 1 | magento.product.blocks: 2 | uspHtml: product_usp 3 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/config/frontend/config.yaml: -------------------------------------------------------------------------------- 1 | maintenance.vary_name: MAGE_RUN_CODE 2 | router.bypass.rule.url_starts_with: 3 | - checkout/ 4 | - customer/ 5 | - sales/ 6 | - wishlist/ 7 | - downloadable/customer/products/ 8 | - newsletter/manage/ 9 | - vault/cards/listaction/ 10 | - review/customer/ 11 | - newsletter/ 12 | - catalogsearch/ 13 | - search/ajax/suggest 14 | - lightna/session/update 15 | 16 | cart.item.fields: 17 | - product_id 18 | - sku 19 | - name 20 | - qty 21 | - price 22 | -------------------------------------------------------------------------------- /code/lightna/magento-backend/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/magento-backend 2 | namespace: Lightna\Magento\Backend 3 | -------------------------------------------------------------------------------- /code/lightna/magento-demo/App/Plugin/Router.php: -------------------------------------------------------------------------------- 1 | request->param->disable_lightna); 22 | 23 | return $disableLightna ? true : $proceed(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-demo/config/backend.yaml: -------------------------------------------------------------------------------- 1 | plugin: 2 | Lightna\Engine\App\Router: 3 | - Lightna\Magento\Demo\App\Plugin\Router 4 | -------------------------------------------------------------------------------- /code/lightna/magento-demo/layout/page.yaml: -------------------------------------------------------------------------------- 1 | .body: 2 | .usp.before: 3 | .demo-server-time-container: 4 | id: demo-server-time-container 5 | template: lightna/magento-demo/server-time-container.phtml 6 | .footer.after: 7 | .demo-server-time: 8 | id: demo-server-time 9 | template: lightna/magento-demo/server-time.phtml 10 | -------------------------------------------------------------------------------- /code/lightna/magento-demo/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/magento-demo 2 | namespace: Lightna\Magento\Demo 3 | -------------------------------------------------------------------------------- /code/lightna/magento-demo/tailwind.yaml: -------------------------------------------------------------------------------- 1 | entry: 2 | common: 3 | content: 4 | magento-demo-template: lightna/magento-demo/template/**/*.phtml 5 | import: 6 | magento-demo-home: lightna/magento-demo/home.css 7 | lane: 8 | content: 9 | magento-demo-template: lightna/magento-demo/template/**/*.phtml 10 | tailwind: 11 | theme: 12 | fontFamily: 13 | mono: [ Inconsolata, monospace ] 14 | -------------------------------------------------------------------------------- /code/lightna/magento-demo/template/server-time-container.phtml: -------------------------------------------------------------------------------- 1 |
4 |
5 | -------------------------------------------------------------------------------- /code/lightna/magento-demo/template/server-time.phtml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 23 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend-lane/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-frontend-lane", 3 | "description": "Lightna Magento Frontend Lane module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/magento-frontend": "^1.0.50" 9 | }, 10 | "autoload": { 11 | "psr-4": { 12 | "Lightna\\Magento\\Frontend\\Lane\\": "" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend-lane/css/base/reset.css: -------------------------------------------------------------------------------- 1 | body { 2 | height: auto; 3 | } 4 | 5 | select { 6 | padding: 4px 24px 6px 12px; 7 | } 8 | 9 | .product-item-info, 10 | .swatch-option.text, 11 | .product.data.items .switch { 12 | box-sizing: content-box; 13 | } 14 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend-lane/layout/page.yaml: -------------------------------------------------------------------------------- 1 | .head: 2 | .link: 3 | .font: 4 | id: font 5 | .stylesheet-lane: 6 | id: style-lane 7 | template: lightna/magento-frontend-lane/page/head/link/style/lane.phtml 8 | .script: 9 | .lane: 10 | id: script-lane 11 | template: lightna/magento-frontend-lane/page/head/js/lane.phtml 12 | .body: 13 | .usp: 14 | id: header-usp 15 | .header: 16 | id: header 17 | .footer: 18 | id: footer 19 | .copyright: 20 | id: copyright 21 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend-lane/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/magento-frontend-lane 2 | namespace: Lightna\Magento\Frontend\Lane 3 | require: 4 | - lightna/magento-frontend 5 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend-lane/template/page/head/js/lane.phtml: -------------------------------------------------------------------------------- 1 | mode !== 'lane') { 8 | return; 9 | } 10 | ?> 11 | 12 | 13 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend-lane/template/page/head/link/style/lane.phtml: -------------------------------------------------------------------------------- 1 | mode !== 'lane') { 8 | return; 9 | } 10 | ?> 11 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend-lane/webpack.yaml: -------------------------------------------------------------------------------- 1 | entry: 2 | lane: 3 | component: 4 | lightna-pagecache: lightna/engine/PageCache 5 | lightna-session: lightna/session/Session 6 | magento-common-click-delegator: lightna/magento-frontend/common/ClickEventDelegator 7 | magento-common-lazy-content: lightna/magento-frontend/common/LazyContent 8 | magento-common-menu: lightna/magento-frontend/common/Menu 9 | magento-common-mobile-overlay: lightna/magento-frontend/common/MobileOverlay 10 | magento-common-mini-cart: lightna/magento-frontend/common/MiniCart 11 | magento-common-search: lightna/magento-frontend/common/Search 12 | magento-common-search-suggestions: lightna/magento-frontend/common/SearchSuggestions 13 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-ExtraLight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-ExtraLight.woff -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-ExtraLight.woff2 -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-Light.woff -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-Light.woff2 -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-Regular.woff -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-Regular.woff2 -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-SemiBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-SemiBold.woff -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/font/Assistant/Assistant-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/font/Assistant/Assistant-SemiBold.woff2 -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/code/lightna/magento-frontend/asset/image/favicon.ico -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/angle-small-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/arrow-small-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/bars-filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/check-green.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/check-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/cross-small.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/heart-filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/menu-burger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/message/error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/message/notice.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/message/success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/message/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/user-filled.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/asset/image/icon/user.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-frontend", 3 | "description": "Lightna Magento Frontend module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/magento-backend": "^1.0.50", 9 | "lightna/session": "^1.0.50", 10 | "lightna/tailwind": "^1.0.50", 11 | "lightna/webpack": "^1.0.50" 12 | }, 13 | "autoload": { 14 | "psr-4": { 15 | "Lightna\\Magento\\Frontend\\": "" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/config/backend/config.yaml: -------------------------------------------------------------------------------- 1 | logo.default: 2 | src: lightna/magento-frontend/image/logo-default.svg 3 | width: 105 4 | height: 31 5 | alt: Lightna 6 | favicon.default: 7 | href: lightna/magento-frontend/image/favicon.ico 8 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/base/price.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .price { 3 | @apply text-sm font-normal md:text-base; 4 | } 5 | 6 | .special-price { 7 | @apply price text-rose-700; 8 | } 9 | 10 | .old-price { 11 | @apply price line-through opacity-70; 12 | } 13 | 14 | .price-lg .price { 15 | @apply text-2xl; 16 | } 17 | 18 | .price-lg .special-price { 19 | @apply text-3xl; 20 | } 21 | 22 | .price-lg .old-price { 23 | @apply text-lg; 24 | } 25 | 26 | .price-discount { 27 | @apply rounded-sm bg-rose-700 px-1.5 py-1 text-xs font-normal text-white; 28 | } 29 | 30 | .price-discount.amount:before { 31 | content: '-'; 32 | } 33 | 34 | .price-discount.percent { 35 | @apply uppercase; 36 | } 37 | 38 | .price-discount.percent .value:after { 39 | content: '%'; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/base/utilities.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .no-scrollbar::-webkit-scrollbar { 3 | @apply hidden; 4 | } 5 | 6 | /* Hide scrollbar for Edge and Firefox */ 7 | .no-scrollbar { 8 | -ms-overflow-style: none; /* Edge */ 9 | scrollbar-width: none; /* Firefox */ 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/collapsible.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .collapsible__content { 3 | @apply hidden overflow-hidden transition-[max-height] duration-200 ease-out; 4 | } 5 | 6 | .collapsible--active .collapsible__content { 7 | @apply block; 8 | } 9 | 10 | .collapsible--active .icon-chevron-down { 11 | @apply -scale-y-100; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/layout/breadcrumbs.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .breadcrumbs { 3 | @apply mb-4 flex gap-x-2 gap-y-1 flex-wrap text-sm; 4 | } 5 | 6 | .breadcrumbs__item { 7 | @apply after:content-['/'] after:ml-2 last:after:content-none; 8 | } 9 | 10 | .breadcrumbs__link { 11 | @apply hover:text-primary-alt; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/layout/footer.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | footer { 3 | @apply mt-auto; 4 | } 5 | 6 | .footer-columns { 7 | @apply bg-primary-bg lg:mt-20; 8 | } 9 | 10 | .footer-columns .columns { 11 | @apply page-container grid gap-4 md:grid-cols-2 lg:grid-cols-4; 12 | } 13 | 14 | .footer-columns .title { 15 | @apply mb-2 font-semibold uppercase; 16 | } 17 | 18 | .footer-columns ul { 19 | @apply flex flex-col gap-2; 20 | } 21 | 22 | .footer-columns li { 23 | @apply m-0; 24 | } 25 | 26 | .footer-columns a { 27 | @apply hover:no-underline; 28 | } 29 | 30 | .copyright { 31 | @apply py-4 text-center text-xs; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/layout/grid.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .page-container { 3 | @apply mx-auto w-full max-w-screen-xl p-5 sm:px-6 md:py-6; 4 | } 5 | 6 | .grid-one-column { 7 | grid-template-columns: minmax(auto, 1234px); 8 | } 9 | 10 | .full-width-container { 11 | @apply grid-one-column grid justify-center px-5 sm:px-6; 12 | } 13 | 14 | .bottomed-footer { 15 | @apply flex min-h-screen flex-col; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/layout/toolbar.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .toolbar { 3 | @apply mb-4 mt-8 border-t border-stone-200 py-4; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/layout/usp.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .usp { 3 | @apply overflow-hidden bg-primary-bg px-5 md:px-6; 4 | } 5 | 6 | .usp ul { 7 | @apply m-auto flex max-w-screen-xl items-center text-center text-sm md:grid md:animate-none md:gap-6; 8 | } 9 | 10 | .usp ul:hover { 11 | animation-play-state: paused; 12 | } 13 | 14 | .usp li { 15 | @apply w-full shrink-0 py-1 m-0; 16 | } 17 | } 18 | 19 | .slide-2 ul { 20 | @apply animate-slide-2 md:grid-cols-2; 21 | } 22 | 23 | .slide-3 ul { 24 | @apply animate-slide-3 md:grid-cols-3; 25 | } 26 | 27 | .slide-4 ul { 28 | @apply animate-slide-4 md:grid-cols-4; 29 | } 30 | 31 | .slide-5 ul { 32 | @apply animate-slide-5 md:grid-cols-5; 33 | } 34 | 35 | .usp[class*='slide'] ul { 36 | @apply md:animate-none; 37 | } 38 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/mobile-overlay.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .mobile-overlay__title__container { 3 | @apply flex justify-between pb-5 md:hidden; 4 | } 5 | 6 | .mobile-overlay__title { 7 | @apply text-xl font-normal uppercase; 8 | } 9 | 10 | .mobile-overlay__title__container .icon { 11 | @apply icon-close cursor-pointer; 12 | } 13 | 14 | @media screen and (max-width: 767px) { 15 | .mobile-overlay { 16 | @apply fixed -left-full top-0 z-50 block h-full w-full overflow-auto bg-white transition-transform duration-500; 17 | } 18 | 19 | .mobile-overlay--active { 20 | @apply relative h-full w-full overflow-hidden; 21 | } 22 | 23 | .mobile-overlay--active .mobile-overlay.active { 24 | @apply translate-x-full; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/overlay.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .overlay__title__container { 3 | @apply mb-4 flex justify-between border-b pb-5; 4 | } 5 | 6 | .overlay__title { 7 | @apply text-xl font-normal uppercase; 8 | } 9 | 10 | .overlay__title__container .icon { 11 | @apply icon-close cursor-pointer; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/attributes-list.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .product-attributes-list__item { 3 | @apply flex justify-between gap-x-2 border-b border-dashed py-2 first:pt-0; 4 | } 5 | 6 | .product-attributes-list__item__value { 7 | @apply max-w-[70%] text-right font-normal; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/grid.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .products-grid { 3 | @apply grid grid-cols-2 gap-x-4 gap-y-6 md:gap-x-6 lg:grid-cols-3; 4 | } 5 | 6 | .products-grid--wide { 7 | @apply grid grid-cols-2 gap-x-4 gap-y-6 md:gap-x-6 md:grid-cols-4; 8 | } 9 | 10 | .products-grid--carousel { 11 | @apply flex w-full overflow-hidden -mr-6; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/options.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .product-options { 3 | @apply mb-2 flex flex-wrap items-center gap-2; 4 | } 5 | 6 | .product-options__label { 7 | @apply w-full text-sm font-normal text-slate-500; 8 | } 9 | 10 | .product-options__option { 11 | @apply h-9 min-w-9 cursor-pointer rounded-sm border px-2 py-1 text-center; 12 | } 13 | 14 | .product-options__option.active { 15 | @apply border-primary-main; 16 | } 17 | 18 | .product-options__option.disabled { 19 | @apply text-slate-300 border-gray-100 cursor-default; 20 | border: 1px solid #eee; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/related.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .related-products { 3 | @apply my-8 md:my-12 lg:my-16; 4 | } 5 | 6 | .related-products__title { 7 | @apply border-b pb-4 text-xl md:text-3xl font-semibold md:pr-24; 8 | } 9 | 10 | .related-products__products-grid + .products-placeholder, 11 | #block-wrapper-related-products:has(.related-products__products-grid) + .products-placeholder { 12 | @apply hidden; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/sku.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .product-sku { 3 | @apply text-sm font-normal text-slate-500; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/stock.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .product-stock { 3 | @apply mt-4 inline-flex rounded-sm px-2 py-1 text-xs font-semibold; 4 | } 5 | 6 | .product-stock.in-stock { 7 | @apply bg-green-100 text-green-700; 8 | } 9 | 10 | .product-stock.out-of-stock { 11 | @apply bg-red-100 text-red-600; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/usp.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .product-usp { 3 | @apply my-5; 4 | } 5 | 6 | .product-usp ul { 7 | @apply flex flex-col gap-1; 8 | } 9 | 10 | .product-usp li { 11 | @apply relative pl-6; 12 | } 13 | 14 | .product-usp li:before { 15 | content: ''; 16 | @apply icon-sm icon-checkmark absolute left-0 top-[5px] mr-2 block shrink-0; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/product/wishlist.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .wishlist__button { 3 | @apply block h-full flex items-center justify-center aspect-square cursor-pointer 4 | rounded-full border hover:shadow-md; 5 | } 6 | 7 | .wishlist__icon { 8 | @apply icon icon-heart__outline; 9 | } 10 | 11 | .wishlist__button.added .wishlist__icon{ 12 | @apply icon-heart__filled; 13 | } 14 | 15 | .wishlist__button.animated { 16 | @apply pointer-events-none; 17 | } 18 | 19 | .wishlist__button.animated .wishlist__icon { 20 | @apply pulse; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/search/suggestions.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .search__suggestions-container { 3 | @apply -ml-10 md:ml-0 mt-2 md:mt-3 bg-white rounded-sm shadow-md; 4 | } 5 | 6 | .search__suggestions { 7 | @apply flex flex-col; 8 | } 9 | 10 | .search__suggestions li { 11 | @apply m-0 p-0 border-b border-gray-200 last:border-b-0; 12 | } 13 | 14 | .search__suggestion { 15 | @apply flex items-center justify-between py-2 px-5 text-sm text-gray-900 16 | hover:bg-gray-100 cursor-pointer hover:no-underline; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/tabs.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .tabs { 3 | @apply overflow-hidden; 4 | } 5 | 6 | .tabs__headings-container { 7 | @apply flex gap-8 overflow-auto border-b py-2 font-semibold uppercase; 8 | } 9 | 10 | .tab-trigger { 11 | @apply cursor-pointer whitespace-nowrap py-2 text-sm opacity-70 hover:opacity-100 md:text-base; 12 | } 13 | 14 | .tab-trigger.active { 15 | @apply opacity-100; 16 | } 17 | 18 | .tab-content { 19 | @apply hidden py-4 md:text-lg; 20 | } 21 | 22 | .tab-content.active { 23 | @apply block; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/component/toggle-link.css: -------------------------------------------------------------------------------- 1 | @layer components { 2 | .toggle-link { 3 | @apply order-last text-center underline hover:no-underline; 4 | } 5 | 6 | .toggle-link .on, 7 | .toggle-link.active .off { 8 | @apply hidden; 9 | } 10 | 11 | .toggle-link.active .on { 12 | @apply inline; 13 | } 14 | 15 | .toggle-link:not(.active) ~ li:nth-child(n + 7) { 16 | /* +1 for the show more button */ 17 | @apply hidden; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/page/category.css: -------------------------------------------------------------------------------- 1 | @layer utilities { 2 | .no-results { 3 | @apply -mt-6 md:-ml-[328px] md:mt-0; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/css/page/product.css: -------------------------------------------------------------------------------- 1 | @layer utilities { 2 | .product-actions-row { 3 | @apply w-full flex gap-3 items-center; 4 | } 5 | 6 | .product-actions-row .wishlist__icon { 7 | @apply shrink-0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/js/extend/RequestExtend.js: -------------------------------------------------------------------------------- 1 | import { PageMessage} from 'lightna/magento-frontend/common/PageMessage'; 2 | 3 | export function extend(Request) { 4 | return class extends Request { 5 | static _onSuccess(response) { 6 | super._onSuccess(response); 7 | 8 | if (!response.messagesHtml) { 9 | return; 10 | } 11 | 12 | new PageMessage(response.messagesHtml); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/layout/cms.yaml: -------------------------------------------------------------------------------- 1 | extends: 2 | - page 3 | .body: 4 | attributes: 5 | class: 6 | - cms 7 | - bottomed-footer 8 | .main: 9 | container: div 10 | .heading: 11 | template: lightna/magento-frontend/cms/heading.phtml 12 | .content: 13 | template: lightna/magento-frontend/cms/content.phtml 14 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/magento-frontend 2 | namespace: Lightna\Magento\Frontend 3 | require: 4 | - lightna/magento-backend 5 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/category/details.phtml: -------------------------------------------------------------------------------- 1 | 7 |

8 | name() ?> 9 |

10 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/category/result.phtml: -------------------------------------------------------------------------------- 1 | 7 |
8 | result)) { ?> 9 |
10 | 11 | 16 |
17 | Total - total() ?>, Page size - pageSize() ?>
18 |
19 | 20 |
21 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/cms/content.phtml: -------------------------------------------------------------------------------- 1 | 7 | content ?> 8 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/cms/heading.phtml: -------------------------------------------------------------------------------- 1 | 7 | contentHeading) { ?> 8 |

9 | contentHeading ?> 10 |

11 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/component/product/discount.phtml: -------------------------------------------------------------------------------- 1 | 8 | price->discount > 0): ?> 9 | price->regular < 100): ?> 10 | 11 | price->discountPercent() ?> 12 | 13 | 14 | 15 | render($product->price->discount) ?> 16 | 17 | 18 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/component/product/price.phtml: -------------------------------------------------------------------------------- 1 | 9 |
attributes() ?>> 10 | price->discount > 0): ?> 11 | render($product->price->regular) ?> 12 | render($product->price->final) ?> 13 | 14 | render($product->price->final) ?> 15 | 16 |
17 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/component/product/tile/image.phtml: -------------------------------------------------------------------------------- 1 | 9 | gallery) ?> 10 | 11 | <?= $product->name() ?> 16 | 17 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/component/product/tile/name.phtml: -------------------------------------------------------------------------------- 1 | 7 | name() ?> 8 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/component/toggle-link.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page.phtml: -------------------------------------------------------------------------------- 1 | 8 | 9 | attributes() ?>> 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/context.phtml: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/footer/copyright.phtml: -------------------------------------------------------------------------------- 1 | 7 | 10 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/footer/menu.phtml: -------------------------------------------------------------------------------- 1 | 7 | footerLinksHtml) : ?> 8 | 11 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/gtm.phtml: -------------------------------------------------------------------------------- 1 | ga; 9 | if (!$ga->active || !$ga->account) { 10 | return; 11 | } 12 | ?> 13 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/js/common.phtml: -------------------------------------------------------------------------------- 1 | 8 | 13 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/js/product.phtml: -------------------------------------------------------------------------------- 1 | 8 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/link/favicon.phtml: -------------------------------------------------------------------------------- 1 | favicon; 7 | ?> 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/link/font.phtml: -------------------------------------------------------------------------------- 1 | 7 | 9 | 11 | 13 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/link/style/common.phtml: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/link/style/listing.phtml: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/link/style/product.phtml: -------------------------------------------------------------------------------- 1 | 8 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/meta/description.phtml: -------------------------------------------------------------------------------- 1 | metaDescription) { 8 | return; 9 | } 10 | ?> 11 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/meta/encoding.phtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/meta/viewport.phtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/head/title.phtml: -------------------------------------------------------------------------------- 1 | 7 | <?= $entity->title() ?> 8 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/account.phtml: -------------------------------------------------------------------------------- 1 | customer->groupId !== 0; 7 | $iconClass = $isLoggedIn ? 'icon-user__filled' : 'icon-user__outline'; 8 | ?> 9 | 19 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/account/dropdown-customer.phtml: -------------------------------------------------------------------------------- 1 | 7 | 18 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/account/dropdown-guest.phtml: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/logo.phtml: -------------------------------------------------------------------------------- 1 | logo; 7 | ?> 8 |
9 | 11 | <?= $logo->alt() ?> 18 | 19 |
20 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart.phtml: -------------------------------------------------------------------------------- 1 | cart; 7 | ?> 8 |
9 |
10 | qty > 0) { ?> 11 |
qty() ?>
12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/content.phtml: -------------------------------------------------------------------------------- 1 | cart; 8 | ?> 9 |
10 |
11 | 12 | 13 |
14 |
15 | qty === 0): ?> 16 | 17 | 18 | 19 | 20 | 21 |
22 |
23 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/empty.phtml: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/footer.phtml: -------------------------------------------------------------------------------- 1 | cart; 9 | ?> 10 | 17 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/product-item/image.phtml: -------------------------------------------------------------------------------- 1 | 7 |
8 | 9 | <?= $item->name() ?> 10 | 11 |
12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/product-item/name.phtml: -------------------------------------------------------------------------------- 1 | 7 | 8 | name() ?> 9 | 10 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/product-item/price.phtml: -------------------------------------------------------------------------------- 1 | 8 | 9 | render($item->price) ?> 10 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/product-item/quantity.phtml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | qty() ?> 10 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/product-item/remove.phtml: -------------------------------------------------------------------------------- 1 | 8 |
11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/product-item/sku.phtml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | sku() ?> 10 | 11 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/minicart/products-list.phtml: -------------------------------------------------------------------------------- 1 | cart; 9 | ?> 10 | 15 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/mobile-menu-toggle.phtml: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/search.phtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/search/overlay.phtml: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/header/search/suggestions.phtml: -------------------------------------------------------------------------------- 1 | getItems()) { 8 | return; 9 | } 10 | ?> 11 |
12 | 23 |
24 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/menu.phtml: -------------------------------------------------------------------------------- 1 | 7 | 15 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/messages.phtml: -------------------------------------------------------------------------------- 1 | isPost) { 8 | return; 9 | } 10 | ?> 11 | 12 |
13 |
14 | 15 | 16 | 17 |
18 |
19 |
20 | 21 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/page/usp.phtml: -------------------------------------------------------------------------------- 1 | 7 | uspHtml) : ?> 8 |
9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/attributes/all-visible.phtml: -------------------------------------------------------------------------------- 1 | 8 | visibleOnFrontAttributes as $attribute) { ?> 9 | {$attribute->code}) { ?> 10 |
11 | label() ?> 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/attributes/name.phtml: -------------------------------------------------------------------------------- 1 | 7 |

name() ?>

8 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/attributes/sku.phtml: -------------------------------------------------------------------------------- 1 | 7 |
sku() ?>
8 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/breadcrumbs.phtml: -------------------------------------------------------------------------------- 1 | trail) { 8 | return; 9 | } 10 | ?> 11 | 18 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/cta/add-to-cart.phtml: -------------------------------------------------------------------------------- 1 | 8 |
attributes() ?> data-product-id="entityId() ?>"> 9 | 10 |
11 | 14 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/description.phtml: -------------------------------------------------------------------------------- 1 | 7 | description ?> 8 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/related/container.phtml: -------------------------------------------------------------------------------- 1 | relatedIds) === 0) { 7 | return; 8 | } 9 | ?> 10 | 15 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/related/product-placeholder.phtml: -------------------------------------------------------------------------------- 1 | relatedIds), $block->max); 8 | ?> 9 |
attributes() ?>> 10 | 15 |
16 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/stock.phtml: -------------------------------------------------------------------------------- 1 | 7 | inventory->status) : ?> 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/tabs.phtml: -------------------------------------------------------------------------------- 1 | {'.'}; 7 | ?> 8 |
9 |
10 | $tab): ?> 11 |
14 | title) ?> 15 |
16 | 17 |
18 | $tab): ?> 19 |
21 | 22 |
23 | 24 |
25 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/usp.phtml: -------------------------------------------------------------------------------- 1 | 7 | uspHtml) : ?> 8 |
9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /code/lightna/magento-frontend/template/product/wishlist.phtml: -------------------------------------------------------------------------------- 1 | wishlist->items; 8 | $inWishlist = isset($wishlistItems[$product->entityId()]); 9 | ?> 10 | 11 |
14 | 15 |
16 | 17 |
20 | 21 |
22 | 23 | -------------------------------------------------------------------------------- /code/lightna/magento-newrelic/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-newrelic", 3 | "description": "Lightna Magento Newrelic module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/newrelic": "^1.0.50", 9 | "lightna/magento-frontend": "^1.0.50" 10 | }, 11 | "autoload": { 12 | "psr-4": { 13 | "Lightna\\Magento\\Newrelic\\": "" 14 | } 15 | }, 16 | "suggest": { 17 | "ext-newrelic": "Used for APM monitoring via New Relic" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /code/lightna/magento-newrelic/config/newrelic.yaml: -------------------------------------------------------------------------------- 1 | newrelic: 2 | transaction: 3 | name_mapping: 4 | lightna/page/home: cms/index/index 5 | lightna/page/cms: cms/page/view 6 | lightna/page/no-route: cms/noroute/index 7 | lightna/page/product: catalog/product/view 8 | lightna/page/category: catalog/category/view 9 | -------------------------------------------------------------------------------- /code/lightna/magento-newrelic/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/magento-newrelic 2 | namespace: Lightna\Magento\Newrelic 3 | -------------------------------------------------------------------------------- /code/lightna/magento-pack/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-pack", 3 | "description": "Lightna Magento package", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/magento-frontend": "^1.0.50", 9 | "lightna/magento-frontend-lane": "^1.0.50", 10 | "lightna/phpunit": "^1.0.50" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /code/lightna/magento-pack/entry/.gitignore: -------------------------------------------------------------------------------- 1 | /auth.json 2 | /node_modules 3 | /vendor 4 | /generated 5 | /edition/*/env.php 6 | /edition/*/applied/ 7 | -------------------------------------------------------------------------------- /code/lightna/magento-pack/entry/cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | { 17 | if (argv.mode === 'development') { 18 | config.devtool = 'inline-source-map'; 19 | config.watch = true; 20 | } 21 | 22 | return config; 23 | }; 24 | -------------------------------------------------------------------------------- /code/lightna/magento-pack/entry/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const deepmerge = require('deepmerge'); 3 | 4 | const editionDir = process.env.LIGHTNA_EDITION_DIR; 5 | const modulesConfig = require('./' + editionDir + '/building/webpack/webpack.config.js'); 6 | 7 | const config = deepmerge(modulesConfig, { 8 | output: { 9 | filename: '[name].js', 10 | path: path.resolve(__dirname, editionDir + '/asset.building/build/js'), 11 | }, 12 | mode: 'production' 13 | }); 14 | 15 | module.exports = config; 16 | -------------------------------------------------------------------------------- /code/lightna/magento-staging/App/Plugin/Index/Changelog/Handler.php: -------------------------------------------------------------------------------- 1 | staging->applyNewVersion(); 22 | $proceed(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /code/lightna/magento-staging/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-staging", 3 | "description": "Lightna Magento Staging module", 4 | "type": "library", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/engine": "^1.0.50" 9 | }, 10 | "autoload": { 11 | "psr-4": { 12 | "Lightna\\Magento\\Staging\\": "" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /code/lightna/magento-staging/module.yaml: -------------------------------------------------------------------------------- 1 | name: lightna/magento-staging 2 | namespace: Lightna\Magento\Staging 3 | require: 4 | - lightna/magento-backend 5 | -------------------------------------------------------------------------------- /code/magento/lightna-demo/etc/frontend/di.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /code/magento/lightna-demo/etc/frontend/events.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /code/magento/lightna-demo/etc/module.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /code/magento/lightna-demo/registration.php: -------------------------------------------------------------------------------- 1 | getStatus() ? 'grid-severity-notice' : 'grid-severity-minor'; 20 | 21 | return "" . __($value) . ""; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/Block/Adminhtml/Index/Grid.php: -------------------------------------------------------------------------------- 1 | _controller = 'index'; 14 | $this->_headerText = __('Lightna Index'); 15 | parent::_construct(); 16 | $this->buttonList->remove('add'); 17 | 18 | $this->buttonList->add( 19 | 'lightna_index_invalidate_all', 20 | [ 21 | 'label' => __('Invalidate All Indices'), 22 | 'onclick' => 'setLocation(\'' . $this->getUrl('lightna/index/invalidateAll') . '\')', 23 | 'class' => 'primary' 24 | ] 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/Controller/Adminhtml/Index/InvalidateAll.php: -------------------------------------------------------------------------------- 1 | invalidateAll(); 20 | 21 | return $this->resultFactory->create(ResultFactory::TYPE_REDIRECT)->setPath('lightna/index/index'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/Controller/Adminhtml/Index/MassInvalidate.php: -------------------------------------------------------------------------------- 1 | getRequest()->getParam('indices', []); 20 | newobj(IndexState::class)->invalidate($indices); 21 | 22 | return $this->resultFactory->create(ResultFactory::TYPE_REDIRECT)->setPath('lightna/index/index'); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/Controller/Session/Update.php: -------------------------------------------------------------------------------- 1 | resultFactory->create(ResultFactory::TYPE_JSON)->setData([]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/Model/Session.php: -------------------------------------------------------------------------------- 1 | $table) { 17 | if (str_starts_with($table, 'lightna_')) { 18 | unset($tables[$key]); 19 | } 20 | } 21 | 22 | return $tables; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-module-frontend", 3 | "description": "Magento Frontend module for Lightna", 4 | "type": "magento2-module", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "autoload": { 8 | "files": [ 9 | "registration.php" 10 | ], 11 | "psr-4": { 12 | "Lightna\\Frontend\\": "" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/acl.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/adminhtml/menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/adminhtml/routes.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 90 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/db_schema.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/frontend/di.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/frontend/routes.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/module.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/etc/webapi_rest/di.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/registration.php: -------------------------------------------------------------------------------- 1 | get($class); 12 | }, 13 | ); 14 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/view/adminhtml/layout/lightna_index_index.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /code/magento/lightna-frontend/view/frontend/layout/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | page-context 9 | 10 | 11 | 12 | 13 | magento-context 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /code/magento/lightna-lane-theme/Magento_Checkout/layout/checkout_index_index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | copyright 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /code/magento/lightna-lane-theme/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-theme-lane", 3 | "description": "Magento Lane Theme for Lightna", 4 | "type": "magento2-theme", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "require": { 8 | "lightna/magento-theme": "^1.0.50" 9 | }, 10 | "autoload": { 11 | "files": [ 12 | "registration.php" 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /code/magento/lightna-lane-theme/registration.php: -------------------------------------------------------------------------------- 1 | 3 | Lightna Lane 4 | Lightna/Lightna 5 | 6 | -------------------------------------------------------------------------------- /code/magento/lightna-theme/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna/magento-theme", 3 | "description": "Magento Theme for Lightna", 4 | "type": "magento2-theme", 5 | "license": "MIT", 6 | "version": "1.0.50", 7 | "autoload": { 8 | "files": [ 9 | "registration.php" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /code/magento/lightna-theme/etc/view.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 285 8 | 354 9 | 10 | 11 | 535 12 | 664 13 | 14 | 15 | 100 16 | 124 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /code/magento/lightna-theme/registration.php: -------------------------------------------------------------------------------- 1 | 3 | Lightna 4 | Magento/luma 5 | 6 | -------------------------------------------------------------------------------- /entry/magento-os/.gitignore: -------------------------------------------------------------------------------- 1 | /auth.json 2 | /node_modules 3 | /vendor 4 | /generated 5 | /edition/*/env.php 6 | /edition/*/applied/ 7 | -------------------------------------------------------------------------------- /entry/magento-os/cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 10 | 11 | attributes() ?> data-feature-design-example="true"> 12 | 13 | 14 | -------------------------------------------------------------------------------- /entry/magento-os/module/project/design-example/webpack.yaml: -------------------------------------------------------------------------------- 1 | extend: 2 | lightna/magento-frontend/common/AddToCart: 3 | extend-example: project/design-example/extend/AddToCart 4 | -------------------------------------------------------------------------------- /entry/magento-os/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lightna-magento-frontend", 3 | "private": true, 4 | "devDependencies": { 5 | "autoprefixer": "^10.4.20", 6 | "deepmerge": "^4.3.1", 7 | "postcss-import": "^16.1.0", 8 | "prettier": "^3.3.3", 9 | "prettier-plugin-tailwindcss": "^0.6.5", 10 | "tailwindcss": "^3.4.3", 11 | "webpack": "^5.91.0", 12 | "webpack-cli": "^5.1.4" 13 | }, 14 | "scripts": { 15 | "webpack": "webpack" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /entry/magento-os/webpack.config.direct.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const deepmerge = require('deepmerge'); 3 | 4 | const editionDir = process.env.LIGHTNA_EDITION_DIR; 5 | const editionAssetDir = process.env.LIGHTNA_EDITION_ASSET_DIR; 6 | const modulesConfig = require('./' + editionDir + '/build/webpack/webpack.config.js'); 7 | 8 | const config = deepmerge(modulesConfig, { 9 | output: { 10 | filename: '[name].js', 11 | path: path.resolve(__dirname, editionAssetDir + '/build/js'), 12 | }, 13 | mode: 'production' 14 | }); 15 | 16 | module.exports = (env, argv) => { 17 | if (argv.mode === 'development') { 18 | const devOptions = { 19 | devtool: 'inline-source-map', 20 | watch: true, 21 | cache: false, 22 | }; 23 | 24 | Object.assign(config, devOptions); 25 | } 26 | 27 | return config; 28 | }; 29 | -------------------------------------------------------------------------------- /entry/magento-os/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const deepmerge = require('deepmerge'); 3 | 4 | const editionDir = process.env.LIGHTNA_EDITION_DIR; 5 | const modulesConfig = require('./' + editionDir + '/building/webpack/webpack.config.js'); 6 | 7 | const config = deepmerge(modulesConfig, { 8 | output: { 9 | filename: '[name].js', 10 | path: path.resolve(__dirname, editionDir + '/asset.building/build/js'), 11 | }, 12 | mode: 'production' 13 | }); 14 | 15 | module.exports = config; 16 | -------------------------------------------------------------------------------- /project/magento-os/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightna-project/lightna/683f23b38a740c1ac744d4d9996a68ce327a279e/project/magento-os/.gitkeep --------------------------------------------------------------------------------