Skip to content

Commit

Permalink
Merge pull request #343 from Weaverse/leo-dev
Browse files Browse the repository at this point in the history
Implement `shouldRevalidate`
  • Loading branch information
hta218 authored Nov 18, 2023
2 parents 853db9f + 56158fd commit d7b125f
Show file tree
Hide file tree
Showing 9 changed files with 393 additions and 206 deletions.
558 changes: 370 additions & 188 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weaverse-sdks",
"version": "2.6.1",
"version": "2.6.2",
"description": "Weaverse SDKs monorepo.",
"license": "MIT",
"scripts": {
Expand All @@ -26,23 +26,23 @@
"packages/hydrogen"
],
"devDependencies": {
"@types/node": "^20.8.10",
"@types/react": "^18.2.35",
"@types/node": "^20.9.1",
"@types/react": "^18.2.37",
"@types/react-dom": "18.2.14",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"cross-env": "^7.0.3",
"eslint": "8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"husky": "^8.0.3",
"lint-staged": "^15.0.2",
"lint-staged": "^15.1.0",
"prettier": "3.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"tsup": "^7.2.0",
"tsup": "^7.3.0",
"turbo": "^1.10.16",
"typescript": "^5.2.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/core",
"author": "Weaverse Team",
"description": "Weaverse Core",
"version": "2.6.1",
"version": "2.6.2",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/hydrogen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/hydrogen",
"author": "Weaverse Team",
"description": "Components, hooks, and utilities for building Shopify Hydrogen websites with Weaverse",
"version": "2.6.1",
"version": "2.6.2",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
"singleQuote": true
},
"dependencies": {
"@weaverse/react": "2.6.1",
"@weaverse/react": "2.6.2",
"react-error-boundary": "^4.0.11"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/src/hooks/use-studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function useStudio(weaverse: WeaverseHydrogen) {
if (window.weaverseStudio) {
window.weaverseStudio.init(weaverse)
} else {
let studioSrc = `${weaverseHost}/build/studio/hydrogen/index.js?v=${weaverseVersion}`
let studioSrc = `${weaverseHost}/static/studio/hydrogen/index.js?v=${weaverseVersion}`
loadScript(studioSrc)
}
}
Expand Down
9 changes: 7 additions & 2 deletions packages/hydrogen/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import type {
LoaderFunctionArgs as RemixOxygenLoaderArgs,
} from '@shopify/remix-oxygen'
import type {
BasicInput,
BasicInput as CoreBasicInput,
ElementData,
ElementSchema,
InputType,
WeaverseCoreParams,
WeaverseElement,
WeaverseImage,
Expand All @@ -29,7 +30,7 @@ import type { ThemeSettingsStore } from './hooks/use-theme-settings'
import type { WeaverseHydrogen } from './index'
import type { WeaverseClient } from './weaverse-client'

export type { WeaverseImage }
export type { InputType, WeaverseImage }

export type Locale = {
language: LanguageCode
Expand Down Expand Up @@ -85,6 +86,10 @@ export interface HydrogenComponentSchema extends ElementSchema {
toolbar?: (HydrogenToolbarAction | HydrogenToolbarAction[])[]
}

export type BasicInput = CoreBasicInput & {
shouldRevalidate?: boolean
}

export interface InspectorGroup {
group: string
inputs: BasicInput[]
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/react",
"author": "Weaverse Team",
"description": "React bindings for Weaverse",
"version": "2.6.1",
"version": "2.6.2",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -38,6 +38,6 @@
"singleQuote": true
},
"dependencies": {
"@weaverse/core": "2.6.1"
"@weaverse/core": "2.6.2"
}
}
4 changes: 2 additions & 2 deletions packages/shopify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@weaverse/shopify",
"author": "Weaverse Team",
"description": "Weaverse Components for Shopify Online Store 2.0 Section builder",
"version": "2.6.1",
"version": "2.6.2",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
"dependencies": {
"@radix-ui/react-dialog": "^1.0.5",
"@stitches/react": "^1.2.8",
"@weaverse/react": "2.6.1",
"@weaverse/react": "2.6.2",
"clsx": "^2.0.0",
"keen-slider": "^6.8.6"
}
Expand Down

0 comments on commit d7b125f

Please sign in to comment.