Skip to content

Commit

Permalink
chore: rename packages (#31)
Browse files Browse the repository at this point in the history
* Renamed packages into `oryx-frontend`.

* Formatting.

---------

Co-authored-by: Alexander Kovalenko <[email protected]>
  • Loading branch information
tolerants and Alexander Kovalenko authored Jun 17, 2024
1 parent f93f7b8 commit 473ee6a
Show file tree
Hide file tree
Showing 1,617 changed files with 4,357 additions and 4,171 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
VERDACCIO_CONFIG: /home/runner/.config/verdaccio/config.yaml
- name: Run verdaccio again
run: verdaccio &
- name: Set npm registry for @spryker-oryx to verdaccio
run: npm config set @spryker-oryx:registry http://localhost:4873
- name: Set npm registry for @oryx-frontend to verdaccio
run: npm config set @oryx-frontend:registry http://localhost:4873
- name: Release test
run: npm run release-test
- name: Install dependencies for testfront
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/server/hosting/netlify.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builder } from '@netlify/functions';
import { storefrontHandler } from '@spryker-oryx/application/lambda';
import { storefrontHandler } from '@oryx-frontend/application/lambda';

const handler = builder(storefrontHandler);

Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/server/render.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { renderApp, RenderAppConfig } from '@spryker-oryx/application';
import { renderApp, RenderAppConfig } from '@oryx-frontend/application';
import { html } from 'lit';
import { app } from '../src/app';

Expand Down
12 changes: 6 additions & 6 deletions apps/storefront/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { appBuilder } from '@spryker-oryx/application';
import { multiCartFeature } from '@spryker-oryx/cart';
import { labsFeatures } from '@spryker-oryx/labs';
import { b2bStorefrontFeatures } from '@spryker-oryx/presets/b2b-storefront';
import { storefrontFeatures } from '@spryker-oryx/presets/storefront';
import { storefrontTheme } from '@spryker-oryx/themes';
import { appBuilder } from '@oryx-frontend/application';
import { multiCartFeature } from '@oryx-frontend/cart';
import { labsFeatures } from '@oryx-frontend/labs';
import { b2bStorefrontFeatures } from '@oryx-frontend/presets/b2b-storefront';
import { storefrontFeatures } from '@oryx-frontend/presets/storefront';
import { storefrontTheme } from '@oryx-frontend/themes';

const env = import.meta.env;

Expand Down
34 changes: 17 additions & 17 deletions apps/storybook/.storybook/app/build.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { appBuilder } from '@spryker-oryx/application';
import { MockAuthFeature } from '@spryker-oryx/auth/mocks';
import { multiCartFeature } from '@spryker-oryx/cart';
import { mockCartFeature } from '@spryker-oryx/cart/mocks';
import { mockCheckoutFeature } from '@spryker-oryx/checkout/mocks';
import { contentFeature } from '@spryker-oryx/content';
import { mockCoreFeature } from '@spryker-oryx/core/mocks';
import { mockExperienceFeature } from '@spryker-oryx/experience/mocks';
import { formFeature } from '@spryker-oryx/form';
import { I18nFeature } from '@spryker-oryx/i18n';
import { mockOfflineFeature } from '@spryker-oryx/offline/mocks';
import { mockOrderFeature } from '@spryker-oryx/order/mocks';
import { mockProductFeature } from '@spryker-oryx/product/mocks';
import { mockSearchFeature } from '@spryker-oryx/search/mocks';
import { mockSiteFeature } from '@spryker-oryx/site/mocks';
import { uiFeature } from '@spryker-oryx/ui';
import { mockUserFeature } from '@spryker-oryx/user/mocks';
import { appBuilder } from '@oryx-frontend/application';
import { MockAuthFeature } from '@oryx-frontend/auth/mocks';
import { multiCartFeature } from '@oryx-frontend/cart';
import { mockCartFeature } from '@oryx-frontend/cart/mocks';
import { mockCheckoutFeature } from '@oryx-frontend/checkout/mocks';
import { contentFeature } from '@oryx-frontend/content';
import { mockCoreFeature } from '@oryx-frontend/core/mocks';
import { mockExperienceFeature } from '@oryx-frontend/experience/mocks';
import { formFeature } from '@oryx-frontend/form';
import { I18nFeature } from '@oryx-frontend/i18n';
import { mockOfflineFeature } from '@oryx-frontend/offline/mocks';
import { mockOrderFeature } from '@oryx-frontend/order/mocks';
import { mockProductFeature } from '@oryx-frontend/product/mocks';
import { mockSearchFeature } from '@oryx-frontend/search/mocks';
import { mockSiteFeature } from '@oryx-frontend/site/mocks';
import { uiFeature } from '@oryx-frontend/ui';
import { mockUserFeature } from '@oryx-frontend/user/mocks';
import isChromatic from 'chromatic/isChromatic';
import { chromaticStyledComponents } from './chromatic-styles';
import { resource, theme } from './data';
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/.storybook/app/chromatic-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
inputComponent,
selectComponent,
spinnerComponent,
} from '@spryker-oryx/ui';
} from '@oryx-frontend/ui';
import { css } from 'lit';

const noTransitionField = css`
Expand Down
8 changes: 4 additions & 4 deletions apps/storybook/.storybook/app/data.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { backofficeResources } from '@spryker-oryx/presets/backoffice';
import { fesResources } from '@spryker-oryx/presets/fes';
import { storefrontResources } from '@spryker-oryx/presets/storefront';
import { backofficeResources } from '@oryx-frontend/presets/backoffice';
import { fesResources } from '@oryx-frontend/presets/fes';
import { storefrontResources } from '@oryx-frontend/presets/storefront';
import {
backofficeTheme,
fesTheme,
storefrontTheme,
} from '@spryker-oryx/themes';
} from '@oryx-frontend/themes';

export const theme = {
default: 'backoffice',
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/.storybook/app/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App, AppPlugin, InjectionPlugin } from '@spryker-oryx/core';
import { App, AppPlugin, InjectionPlugin } from '@oryx-frontend/core';
import { addons } from '@storybook/addons';
import { SET_CURRENT_STORY } from '@storybook/core-events';
import { resource, theme } from './data';
Expand Down
2 changes: 1 addition & 1 deletion apps/storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@spryker-oryx/storybook",
"name": "@oryx-frontend/storybook",
"version": "0.0.1",
"private": true
}
4 changes: 2 additions & 2 deletions apps/testfront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"build:ssr": "vite build -c vite.config.server.ts"
},
"dependencies": {
"@spryker-oryx/themes": "latest",
"@spryker-oryx/presets": "latest"
"@oryx-frontend/themes": "latest",
"@oryx-frontend/presets": "latest"
},
"devDependencies": {
"vite": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/testfront/server/hosting/netlify.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { builder } from '@netlify/functions';
import { storefrontHandler } from '@spryker-oryx/application/lambda';
import { storefrontHandler } from '@oryx-frontend/application/lambda';

const handler = builder((event, context) =>
storefrontHandler(event, {
Expand Down
2 changes: 1 addition & 1 deletion apps/testfront/server/render.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { renderApp, RenderAppConfig } from '@spryker-oryx/application';
import { renderApp, RenderAppConfig } from '@oryx-frontend/application';
import { html } from 'lit';
import { app } from '../src/app';

Expand Down
2 changes: 1 addition & 1 deletion apps/testfront/server/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
import { createServer } from '@spryker-oryx/application/server';
import { createServer } from '@oryx-frontend/application/server';
import { viteConfig } from '../vite.config.common';

const config = {
Expand Down
6 changes: 3 additions & 3 deletions apps/testfront/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { appBuilder } from '@spryker-oryx/application';
import { storefrontFeatures } from '@spryker-oryx/presets/storefront';
import { storefrontTheme } from '@spryker-oryx/themes';
import { appBuilder } from '@oryx-frontend/application';
import { storefrontFeatures } from '@oryx-frontend/presets/storefront';
import { storefrontTheme } from '@oryx-frontend/themes';

export const app = appBuilder()
.withFeature(storefrontFeatures)
Expand Down
6 changes: 3 additions & 3 deletions docs/drafts/code-style/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('when something happens', () => {
Web components must be defined before they can be used in tests. The `utilities` package provides a the `useComponent` function to define one or multiple components. The `beforeAll` hook can be used to define a component for all test cases.
```ts
import { useComponent } from '@spryker-oryx/utilities';
import { useComponent } from '@oryx-frontend/utilities';

describe('ComponentForTesting', () => {
beforeAll(async () => {
Expand Down Expand Up @@ -161,8 +161,8 @@ someFn() {
}


import * as injector from '@spryker-oryx/injector';
import { resolve } from '@spryker-oryx/injector';
import * as injector from '@oryx-frontend/injector';
import { resolve } from '@oryx-frontend/injector';

vi.spyOn(injector, 'resolve');

Expand Down
2 changes: 1 addition & 1 deletion docs/drafts/components/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A decorator function is used to setup the component definition with default opti
The following code shows how to use the decorator function:

```ts
import { defaultOptions } from '@spryker-oryx/experience';
import { defaultOptions } from '@oryx-frontend/experience';

@defaultOptions({
minChars: 2,
Expand Down
2 changes: 1 addition & 1 deletion docs/drafts/design-system/color-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The color system is configured by themes. You can use predefined themes from the
The following configuration example is based on an existing theme `storefrontTheme`, but the base primary color is changed for light and dark modes.

```ts
import { storefrontTheme } from '@spryker-oryx/themes';
import { storefrontTheme } from '@oryx-frontend/themes';

export const app = appBuilder()
.withFeature([...])
Expand Down
26 changes: 13 additions & 13 deletions docs/drafts/i18n/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

It is important to internationalize texts in UI instead of shipping hardcoded texts.

To achieve this, we provide the `@spryker-oryx/utilities/i18n` package which introduces
lightweight i18n capabilities for vanilla JS and Lit components. It is free from dependencies on other oryx packages like `injector`, so you can freely depend on it from the most low-level packages like `@spryker-oryx/ui`.
To achieve this, we provide the `@oryx-frontend/utilities/i18n` package which introduces
lightweight i18n capabilities for vanilla JS and Lit components. It is free from dependencies on other oryx packages like `injector`, so you can freely depend on it from the most low-level packages like `@oryx-frontend/ui`.

For full i18n capabilities, integrate the `@spryker-oryx/i18n` package. The package includes the capabilities like the following:
For full i18n capabilities, integrate the `@oryx-frontend/i18n` package. The package includes the capabilities like the following:

- Enables the loading of actual translation texts from projects
- Enables the usage pluralization, genders, etc. in translations with the support of the ICU engine
Expand All @@ -16,8 +16,8 @@ For full i18n capabilities, integrate the `@spryker-oryx/i18n` package. The pack
To add full capabilities of i18n, load `I18nFeature` into the oryx app:

```ts
import { app, coreFeature } from '@spryker-oryx/core';
import { I18nFeature } from '@spryker-oryx/i18n';
import { app, coreFeature } from '@oryx-frontend/core';
import { I18nFeature } from '@oryx-frontend/i18n';

app()
.withFeature(coreFeature)
Expand All @@ -30,8 +30,8 @@ app()
To be able to load translation texts into the app, when installing `I18nFeature`, define a loader function:

```ts
import { app, coreFeature } from '@spryker-oryx/core';
import { I18nFeature } from '@spryker-oryx/i18n';
import { app, coreFeature } from '@oryx-frontend/core';
import { I18nFeature } from '@oryx-frontend/i18n';

app()
.withFeature(coreFeature)
Expand Down Expand Up @@ -87,7 +87,7 @@ If a token translation is not found in any of the language data bundles, or if t

## Translation engine

When a full i18n feature is used from `@spryker-oryx/i18n` package, translation texts can use the full power of standartized ICU message expressions:
When a full i18n feature is used from `@oryx-frontend/i18n` package, translation texts can use the full power of standartized ICU message expressions:

- [Message formatting](https://unicode-org.github.io/icu/userguide/format_parse/messages/)

Expand All @@ -105,11 +105,11 @@ ICU message formatting defines standard syntax to handle common translation case

## Internationalize texts in lit components

To internationalize texts inside lit components, use the [`i18n`](/libs/utilities/i18n/src/i18n.directive.ts) lit-directive from the `@spryker-oryx/utilities/i18n` package:
To internationalize texts inside lit components, use the [`i18n`](/libs/utilities/i18n/src/i18n.directive.ts) lit-directive from the `@oryx-frontend/utilities/i18n` package:

```ts
import { LitElement, html } from 'lit';
import { i18n } from '@spryker-oryx/utilities/i18n';
import { i18n } from '@oryx-frontend/utilities/i18n';

class ExampleComponent extends LitElement {
protected override render() {
Expand All @@ -120,11 +120,11 @@ class ExampleComponent extends LitElement {

## Internationalize texts in vanilla JS components

To internationalize texts in vanilla JS or TS, use the [`I18nService`](/libs/i18n/src/lib/i18n.service.ts) service from the `@spryker-oryx/i18n` package:
To internationalize texts in vanilla JS or TS, use the [`I18nService`](/libs/i18n/src/lib/i18n.service.ts) service from the `@oryx-frontend/i18n` package:

```ts
import { inject } from '@spryker-oryx/injector';
import { I18nService } from '@spryker-oryx/i18n';
import { inject } from '@oryx-frontend/injector';
import { I18nService } from '@oryx-frontend/i18n';

class Example {
constructor(i18nService = inject(I18nService)) {
Expand Down
50 changes: 25 additions & 25 deletions docs/drafts/packages/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,30 @@ The base layer contains packages that serve as utilities to all above layers. An

## Packages

| Layer | Packages | Location |
| ------------ | ----------- | --------------------------- |
| **Template** | | |
| | Presets | `@spryker-oryx/presets` |
| | Application | `@spryker-oryx/application` |
| | Themes | `@spryker-oryx/themes` |
| **Domain** | | |
| | Site | `@spryker-oryx/site` |
| | Auth | `@spryker-oryx/auth` |
| | User | `@spryker-oryx/user` |
| | Product | `@spryker-oryx/product` |
| | Search | `@spryker-oryx/search` |
| | Cart | `@spryker-oryx/cart` |
| | Checkout | `@spryker-oryx/checkout` |
| | Content | `@spryker-oryx/content` |
| **Platform** | | |
| | Core | `@spryker-oryx/core` |
| | I18n | `@spryker-oryx/i18n` |
| | Experience | `@spryker-oryx/experience` |
| **Base** | | |
| | UI | `@spryker-oryx/ui` |
| | Form | `@spryker-oryx/form` |
| | Utilities | `@spryker-oryx/utilities` |
| | DI | `@spryker-oryx/di` |
| Layer | Packages | Location |
| ------------ | ----------- | ---------------------------- |
| **Template** | | |
| | Presets | `@oryx-frontend/presets` |
| | Application | `@oryx-frontend/application` |
| | Themes | `@oryx-frontend/themes` |
| **Domain** | | |
| | Site | `@oryx-frontend/site` |
| | Auth | `@oryx-frontend/auth` |
| | User | `@oryx-frontend/user` |
| | Product | `@oryx-frontend/product` |
| | Search | `@oryx-frontend/search` |
| | Cart | `@oryx-frontend/cart` |
| | Checkout | `@oryx-frontend/checkout` |
| | Content | `@oryx-frontend/content` |
| **Platform** | | |
| | Core | `@oryx-frontend/core` |
| | I18n | `@oryx-frontend/i18n` |
| | Experience | `@oryx-frontend/experience` |
| **Base** | | |
| | UI | `@oryx-frontend/ui` |
| | Form | `@oryx-frontend/form` |
| | Utilities | `@oryx-frontend/utilities` |
| | DI | `@oryx-frontend/di` |

## Module boundaries

Expand All @@ -93,4 +93,4 @@ All packages are distributed with the same version, to avoid complex dependency

## Distribution

Packages are distributed under the `@spryker-oryx` scope.
Packages are distributed under the `@oryx-frontend` scope.
2 changes: 1 addition & 1 deletion docs/drafts/packages/verdaccio.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
`node tools/packages/generate.js`

Packages are available from verdaccio registry:
`npm i @spryker-oryx/core --registry http://localhost:4873`
`npm i @oryx-frontend/core --registry http://localhost:4873`
16 changes: 8 additions & 8 deletions docs/drafts/router/routing.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Routing

Routing is an essential feature for any web application, allowing users to navigate between
different pages or components within the application. The `@spryker-oryx/router` package
different pages or components within the application. The `@oryx-frontend/router` package
provides routing infrastructure for your application, including a `RouterService`
for interacting with the router and framework-specific integrations for providing
actual routing config. This guide will walk you through the process of setting up routing
in your application, including how to add the `RouterFeature` to your application,
render the router outlet, and provide routes using Dependency Injection (DI).

`@spryker-oryx/router` provides infrastructure for routing capabilities.
`@oryx-frontend/router` provides infrastructure for routing capabilities.
It gives you mainly the [`RouterService`](/libs/platform/router/src/services/router.service.ts)
which is a generic way for navigating in your application.

There are also framework specific integrations for providing actual routing config:

- for Lit use `@spryker-oryx/router/lit` package
- for Lit use `@oryx-frontend/router/lit` package

## Getting started

To start using router add `RouterFeature` to your application:

```ts
import { appBuilder } from '@spryker-oryx/core';
import { RouterFeature } from '@spryker-oryx/router';
import { appBuilder } from '@oryx-frontend/core';
import { RouterFeature } from '@oryx-frontend/router';

appBuilder().withFeature(new RouterFeature());
```
Expand All @@ -36,7 +36,7 @@ and render it's outlet:

```ts
import { LitElement } from 'lit';
import { LitRouter } from '@spryker-oryx/router/lit';
import { LitRouter } from '@oryx-frontend/router/lit';

class RootComponent extends LitElement {
router = new LitRouter(this, []); // <-- You may provide some static routes here
Expand All @@ -50,8 +50,8 @@ class RootComponent extends LitElement {
Then you can provide routes for Lit applications using DI:

```ts
import { appBuilder } from '@spryker-oryx/core';
import { provideLitRoutes } from '@spryker-oryx/router/lit';
import { appBuilder } from '@oryx-frontend/core';
import { provideLitRoutes } from '@oryx-frontend/router/lit';

const routes = [{ path: '/', render: () => html`<my-page></my-page>` }];

Expand Down
Loading

0 comments on commit 473ee6a

Please sign in to comment.