diff --git a/package-lock.json b/package-lock.json index 0f65e4ad..86f800e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6554,6 +6554,19 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -9093,284 +9106,6 @@ "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" } }, - "node_modules/@tailwindcss/node": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.4.tgz", - "integrity": "sha512-MT5118zaiO6x6hNA04OWInuAiP1YISXql8Z+/Y8iisV5nuhM8VXlyhRuqc2PEviPszcXI66W44bCIk500Oolhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "enhanced-resolve": "^5.18.1", - "jiti": "^2.4.2", - "lightningcss": "1.29.2", - "tailwindcss": "4.1.4" - } - }, - "node_modules/@tailwindcss/node/node_modules/jiti": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", - "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.4.tgz", - "integrity": "sha512-p5wOpXyOJx7mKh5MXh5oKk+kqcz8T+bA3z/5VWWeQwFrmuBItGwz8Y2CHk/sJ+dNb9B0nYFfn0rj/cKHZyjahQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.4", - "@tailwindcss/oxide-darwin-arm64": "4.1.4", - "@tailwindcss/oxide-darwin-x64": "4.1.4", - "@tailwindcss/oxide-freebsd-x64": "4.1.4", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.4", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.4", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.4", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.4", - "@tailwindcss/oxide-linux-x64-musl": "4.1.4", - "@tailwindcss/oxide-wasm32-wasi": "4.1.4", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.4", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.4" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.4.tgz", - "integrity": "sha512-xMMAe/SaCN/vHfQYui3fqaBDEXMu22BVwQ33veLc8ep+DNy7CWN52L+TTG9y1K397w9nkzv+Mw+mZWISiqhmlA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.4.tgz", - "integrity": "sha512-JGRj0SYFuDuAGilWFBlshcexev2hOKfNkoX+0QTksKYq2zgF9VY/vVMq9m8IObYnLna0Xlg+ytCi2FN2rOL0Sg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.4.tgz", - "integrity": "sha512-sdDeLNvs3cYeWsEJ4H1DvjOzaGios4QbBTNLVLVs0XQ0V95bffT3+scptzYGPMjm7xv4+qMhCDrkHwhnUySEzA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.4.tgz", - "integrity": "sha512-VHxAqxqdghM83HslPhRsNhHo91McsxRJaEnShJOMu8mHmEj9Ig7ToHJtDukkuLWLzLboh2XSjq/0zO6wgvykNA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.4.tgz", - "integrity": "sha512-OTU/m/eV4gQKxy9r5acuesqaymyeSCnsx1cFto/I1WhPmi5HDxX1nkzb8KYBiwkHIGg7CTfo/AcGzoXAJBxLfg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.4.tgz", - "integrity": "sha512-hKlLNvbmUC6z5g/J4H+Zx7f7w15whSVImokLPmP6ff1QqTVE+TxUM9PGuNsjHvkvlHUtGTdDnOvGNSEUiXI1Ww==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.4.tgz", - "integrity": "sha512-X3As2xhtgPTY/m5edUtddmZ8rCruvBvtxYLMw9OsZdH01L2gS2icsHRwxdU0dMItNfVmrBezueXZCHxVeeb7Aw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.4.tgz", - "integrity": "sha512-2VG4DqhGaDSmYIu6C4ua2vSLXnJsb/C9liej7TuSO04NK+JJJgJucDUgmX6sn7Gw3Cs5ZJ9ZLrnI0QRDOjLfNQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.4.tgz", - "integrity": "sha512-v+mxVgH2kmur/X5Mdrz9m7TsoVjbdYQT0b4Z+dr+I4RvreCNXyCFELZL/DO0M1RsidZTrm6O1eMnV6zlgEzTMQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.4.tgz", - "integrity": "sha512-2TLe9ir+9esCf6Wm+lLWTMbgklIjiF0pbmDnwmhR9MksVOq+e8aP3TSsXySnBDDvTTVd/vKu1aNttEGj3P6l8Q==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.4.0", - "@emnapi/runtime": "^1.4.0", - "@emnapi/wasi-threads": "^1.0.1", - "@napi-rs/wasm-runtime": "^0.2.8", - "@tybys/wasm-util": "^0.9.0", - "tslib": "^2.8.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.4.tgz", - "integrity": "sha512-VlnhfilPlO0ltxW9/BgfLI5547PYzqBMPIzRrk4W7uupgCt8z6Trw/tAj6QUtF2om+1MH281Pg+HHUJoLesmng==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.4.tgz", - "integrity": "sha512-+7S63t5zhYjslUGb8NcgLpFXD+Kq1F/zt5Xv5qTv7HaFTG/DHyHD9GA6ieNAxhgyA4IcKa/zy7Xx4Oad2/wuhw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/postcss": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.4.tgz", - "integrity": "sha512-bjV6sqycCEa+AQSt2Kr7wpGF1bOZJ5wsqnLEkqSbM/JEHxx/yhMH8wHmdkPyApF9xhHeMSwnnkDUUMMM/hYnXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "@tailwindcss/node": "4.1.4", - "@tailwindcss/oxide": "4.1.4", - "postcss": "^8.4.41", - "tailwindcss": "4.1.4" - } - }, "node_modules/@tailwindcss/typography": { "version": "0.5.16", "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.16.tgz", @@ -12075,6 +11810,16 @@ "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/chrome-trace-event": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", @@ -13774,16 +13519,6 @@ "lodash-es": "^4.17.21" } }, - "node_modules/daisyui": { - "version": "5.0.28", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.0.28.tgz", - "integrity": "sha512-H082p8Lg3c7Se9wTbjfSOOhfUbp3BnOM2+cdr3OeY5G1Ll7GYLXB9NWLHgitkTsB1pQKwHRYYchqN2YG0VVShg==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/saadeghi/daisyui?sponsor=1" - } - }, "node_modules/data-urls": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", @@ -22513,6 +22248,35 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mlly": { "version": "1.7.4", "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", @@ -28312,7 +28076,8 @@ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.4.tgz", "integrity": "sha512-1ZIUqtPITFbv/DxRmDr5/agPqJwF69d24m9qmM1939TJehgY539CtzeZRjbLt5G6fSy/7YqqYsfvoTEw9xUI2A==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/tapable": { "version": "2.2.1", @@ -28323,6 +28088,34 @@ "node": ">=6" } }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/teeny-request": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-9.0.0.tgz", @@ -30775,7 +30568,7 @@ }, "packages/destinations/core/etag": { "name": "@elbwalker/destination-core-etag", - "version": "0.0.10", + "version": "0.0.11", "funding": [ { "type": "GitHub Sponsors", @@ -30784,17 +30577,17 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/tsup": "0.0.1", "@elbwalker/types": "3.4.0", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/utils": "^3.8.2" } }, "packages/destinations/node/aws": { "name": "@elbwalker/destination-node-aws", - "version": "1.1.5", + "version": "1.1.6", "funding": [ { "type": "GitHub Sponsors", @@ -30804,8 +30597,8 @@ "license": "MIT", "dependencies": { "@aws-sdk/client-firehose": "^3.606.0", - "@elbwalker/source-node": "3.4.1", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/source-node": "3.4.2", + "@elbwalker/utils": "^3.8.2" }, "devDependencies": { "@elbwalker/types": "3.4.0" @@ -30813,7 +30606,7 @@ }, "packages/destinations/node/bigquery": { "name": "@elbwalker/destination-node-bigquery", - "version": "2.1.5", + "version": "2.2.0", "funding": [ { "type": "GitHub Sponsors", @@ -30822,8 +30615,8 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/source-node": "3.4.1", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/source-node": "3.4.2", + "@elbwalker/utils": "^3.8.2" }, "devDependencies": { "@elbwalker/types": "3.4.0", @@ -30832,7 +30625,7 @@ }, "packages/destinations/node/etag": { "name": "@elbwalker/destination-node-etag", - "version": "0.1.5", + "version": "0.1.6", "funding": [ { "type": "GitHub Sponsors", @@ -30841,18 +30634,18 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/destination-core-etag": "0.0.10", - "@elbwalker/source-node": "^3.4.1" + "@elbwalker/destination-core-etag": "0.0.11", + "@elbwalker/source-node": "^3.4.2" }, "devDependencies": { "@elbwalker/tsup": "0.0.1", "@elbwalker/types": "3.4.0", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/utils": "^3.8.2" } }, "packages/destinations/node/meta": { "name": "@elbwalker/destination-node-meta", - "version": "2.1.5", + "version": "2.2.1", "funding": [ { "type": "GitHub Sponsors", @@ -30861,8 +30654,8 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/source-node": "3.4.1", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/source-node": "3.4.2", + "@elbwalker/utils": "^3.8.2" }, "devDependencies": { "@elbwalker/types": "3.4.0" @@ -30870,7 +30663,7 @@ }, "packages/destinations/web/api": { "name": "@elbwalker/destination-web-api", - "version": "3.0.3", + "version": "3.0.4", "funding": [ { "type": "GitHub Sponsors", @@ -30879,17 +30672,17 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/tsup": "0.0.1", "@elbwalker/types": "3.4.0", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/utils": "^3.8.2" } }, "packages/destinations/web/etag": { "name": "@elbwalker/destination-web-etag", - "version": "0.1.8", + "version": "0.1.9", "funding": [ { "type": "GitHub Sponsors", @@ -30898,17 +30691,17 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { - "@elbwalker/destination-core-etag": "0.0.10", + "@elbwalker/destination-core-etag": "0.0.11", "@elbwalker/types": "3.4.0", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/utils": "^3.8.2" } }, "packages/destinations/web/google-ads": { "name": "@elbwalker/destination-web-google-ads", - "version": "3.0.3", + "version": "3.0.4", "funding": [ { "type": "GitHub Sponsors", @@ -30917,7 +30710,7 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/tsup": "0.0.1", @@ -30934,7 +30727,7 @@ }, "packages/destinations/web/google-ga4": { "name": "@elbwalker/destination-web-google-ga4", - "version": "3.1.5", + "version": "3.1.6", "funding": [ { "type": "GitHub Sponsors", @@ -30943,17 +30736,17 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/tsup": "0.0.1", "@elbwalker/types": "3.4.0", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/utils": "^3.8.2" } }, "packages/destinations/web/google-gtm": { "name": "@elbwalker/destination-web-google-gtm", - "version": "3.0.3", + "version": "3.0.4", "funding": [ { "type": "GitHub Sponsors", @@ -30962,7 +30755,7 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/types": "3.4.0" @@ -30970,7 +30763,7 @@ }, "packages/destinations/web/meta-pixel": { "name": "@elbwalker/destination-web-meta-pixel", - "version": "3.0.3", + "version": "3.1.0", "funding": [ { "type": "GitHub Sponsors", @@ -30979,7 +30772,7 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/tsup": "0.0.1", @@ -30989,7 +30782,7 @@ }, "packages/destinations/web/piwikpro": { "name": "@elbwalker/destination-web-piwikpro", - "version": "2.0.3", + "version": "2.0.4", "funding": [ { "type": "GitHub Sponsors", @@ -30998,8 +30791,8 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/utils": "3.8.1", - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/utils": "3.8.2", + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/types": "3.4.0" @@ -31007,7 +30800,7 @@ }, "packages/destinations/web/plausible": { "name": "@elbwalker/destination-web-plausible", - "version": "4.0.3", + "version": "4.0.4", "funding": [ { "type": "GitHub Sponsors", @@ -31016,7 +30809,7 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/types": "3.4.0" @@ -31024,7 +30817,7 @@ }, "packages/sources/datalayer": { "name": "@elbwalker/source-datalayer", - "version": "0.1.2", + "version": "0.2.0", "funding": [ { "type": "GitHub Sponsors", @@ -31033,16 +30826,16 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/types": "3.4.0", - "@elbwalker/utils": "^3.8.1" + "@elbwalker/utils": "^3.8.2" } }, "packages/sources/gcp": { "name": "@elbwalker/source-gcp", - "version": "0.0.5", + "version": "0.0.6", "funding": [ { "type": "GitHub Sponsors", @@ -31051,7 +30844,7 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/walker.js": "3.4.1" + "@elbwalker/walker.js": "3.4.2" }, "devDependencies": { "@elbwalker/types": "3.4.0", @@ -31060,7 +30853,7 @@ }, "packages/sources/node": { "name": "@elbwalker/source-node", - "version": "3.4.1", + "version": "3.4.2", "funding": [ { "type": "GitHub Sponsors", @@ -31069,13 +30862,13 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/utils": "3.8.1" + "@elbwalker/utils": "3.8.2" }, "devDependencies": {} }, "packages/sources/walkerjs": { "name": "@elbwalker/walker.js", - "version": "3.4.1", + "version": "3.4.2", "funding": [ { "type": "GitHub Sponsors", @@ -31084,7 +30877,7 @@ ], "license": "MIT", "dependencies": { - "@elbwalker/utils": "3.8.1" + "@elbwalker/utils": "3.8.2" } }, "packages/tagger": { @@ -31115,7 +30908,7 @@ }, "packages/utils": { "name": "@elbwalker/utils", - "version": "3.8.1", + "version": "3.8.2", "funding": [ { "type": "GitHub Sponsors", @@ -31135,16 +30928,17 @@ "@docusaurus/preset-classic": "^3.7.0", "@docusaurus/theme-live-codeblock": "^3.7.0", "@docusaurus/theme-mermaid": "^3.7.0", - "@elbwalker/destination-web-api": "^3.0.3", - "@elbwalker/destination-web-google-ads": "^3.0.3", - "@elbwalker/destination-web-google-ga4": "^3.1.5", - "@elbwalker/destination-web-google-gtm": "^3.0.3", - "@elbwalker/destination-web-meta-pixel": "^3.0.3", - "@elbwalker/destination-web-piwikpro": "^2.0.3", - "@elbwalker/destination-web-plausible": "^4.0.3", + "@elbwalker/destination-node-meta": "^2.2.1", + "@elbwalker/destination-web-api": "^3.0.4", + "@elbwalker/destination-web-google-ads": "^3.0.4", + "@elbwalker/destination-web-google-ga4": "^3.1.6", + "@elbwalker/destination-web-google-gtm": "^3.0.4", + "@elbwalker/destination-web-meta-pixel": "^3.1.0", + "@elbwalker/destination-web-piwikpro": "^2.0.4", + "@elbwalker/destination-web-plausible": "^4.0.4", "@elbwalker/tagger": "^2.1.5", - "@elbwalker/utils": "^3.8.1", - "@elbwalker/walker.js": "^3.4.1", + "@elbwalker/utils": "^3.8.2", + "@elbwalker/walker.js": "^3.4.2", "@iconify/react": "^5.2.1", "@mdx-js/react": "^3.1.0", "css-loader": "^7.1.2", @@ -31164,20 +30958,326 @@ "@heroicons/react": "^2.2.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/postcss": "^4.1.3", + "@tailwindcss/postcss": "^4.1.6", "@tailwindcss/typography": "^0.5.16", "autoprefixer": "^10.4.21", "clsx": "^2.1.1", - "daisyui": "^5.0.14", + "daisyui": "^5.0.35", "postcss": "^8.5.3", "prettier": "^3.5.3", - "tailwindcss": "^4.1.3", + "tailwindcss": "^4.1.6", "typescript": "~5.8.3" }, "engines": { "node": ">=18.0" } }, + "website/node_modules/@tailwindcss/node": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.6.tgz", + "integrity": "sha512-ed6zQbgmKsjsVvodAS1q1Ld2BolEuxJOSyyNc+vhkjdmfNUDCmQnlXBfQkHrlzNmslxHsQU/bFmzcEbv4xXsLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "enhanced-resolve": "^5.18.1", + "jiti": "^2.4.2", + "lightningcss": "1.29.2", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.6" + } + }, + "website/node_modules/@tailwindcss/oxide": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.6.tgz", + "integrity": "sha512-0bpEBQiGx+227fW4G0fLQ8vuvyy5rsB1YIYNapTq3aRsJ9taF3f5cCaovDjN5pUGKKzcpMrZst/mhNaKAPOHOA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.4", + "tar": "^7.4.3" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.6", + "@tailwindcss/oxide-darwin-arm64": "4.1.6", + "@tailwindcss/oxide-darwin-x64": "4.1.6", + "@tailwindcss/oxide-freebsd-x64": "4.1.6", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.6", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.6", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.6", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.6", + "@tailwindcss/oxide-linux-x64-musl": "4.1.6", + "@tailwindcss/oxide-wasm32-wasi": "4.1.6", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.6", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.6" + } + }, + "website/node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.6.tgz", + "integrity": "sha512-VHwwPiwXtdIvOvqT/0/FLH/pizTVu78FOnI9jQo64kSAikFSZT7K4pjyzoDpSMaveJTGyAKvDjuhxJxKfmvjiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.6.tgz", + "integrity": "sha512-weINOCcqv1HVBIGptNrk7c6lWgSFFiQMcCpKM4tnVi5x8OY2v1FrV76jwLukfT6pL1hyajc06tyVmZFYXoxvhQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.6.tgz", + "integrity": "sha512-3FzekhHG0ww1zQjQ1lPoq0wPrAIVXAbUkWdWM8u5BnYFZgb9ja5ejBqyTgjpo5mfy0hFOoMnMuVDI+7CXhXZaQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.6.tgz", + "integrity": "sha512-4m5F5lpkBZhVQJq53oe5XgJ+aFYWdrgkMwViHjRsES3KEu2m1udR21B1I77RUqie0ZYNscFzY1v9aDssMBZ/1w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.6.tgz", + "integrity": "sha512-qU0rHnA9P/ZoaDKouU1oGPxPWzDKtIfX7eOGi5jOWJKdxieUJdVV+CxWZOpDWlYTd4N3sFQvcnVLJWJ1cLP5TA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.6.tgz", + "integrity": "sha512-jXy3TSTrbfgyd3UxPQeXC3wm8DAgmigzar99Km9Sf6L2OFfn/k+u3VqmpgHQw5QNfCpPe43em6Q7V76Wx7ogIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.6.tgz", + "integrity": "sha512-8kjivE5xW0qAQ9HX9reVFmZj3t+VmljDLVRJpVBEoTR+3bKMnvC7iLcoSGNIUJGOZy1mLVq7x/gerVg0T+IsYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.6.tgz", + "integrity": "sha512-A4spQhwnWVpjWDLXnOW9PSinO2PTKJQNRmL/aIl2U/O+RARls8doDfs6R41+DAXK0ccacvRyDpR46aVQJJCoCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.6.tgz", + "integrity": "sha512-YRee+6ZqdzgiQAHVSLfl3RYmqeeaWVCk796MhXhLQu2kJu2COHBkqlqsqKYx3p8Hmk5pGCQd2jTAoMWWFeyG2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.6.tgz", + "integrity": "sha512-qAp4ooTYrBQ5pk5jgg54/U1rCJ/9FLYOkkQ/nTE+bVMseMfB6O7J8zb19YTpWuu4UdfRf5zzOrNKfl6T64MNrQ==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@emnapi/wasi-threads": "^1.0.2", + "@napi-rs/wasm-runtime": "^0.2.9", + "@tybys/wasm-util": "^0.9.0", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "website/node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.6.tgz", + "integrity": "sha512-nqpDWk0Xr8ELO/nfRUDjk1pc9wDJ3ObeDdNMHLaymc4PJBWj11gdPCWZFKSK2AVKjJQC7J2EfmSmf47GN7OuLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.6.tgz", + "integrity": "sha512-5k9xF33xkfKpo9wCvYcegQ21VwIBU1/qEbYlVukfEIyQbEA47uK8AAwS7NVjNE3vHzcmxMYwd0l6L4pPjjm1rQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "website/node_modules/@tailwindcss/postcss": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss/-/postcss-4.1.6.tgz", + "integrity": "sha512-ELq+gDMBuRXPJlpE3PEen+1MhnHAQQrh2zF0dI1NXOlEWfr2qWf2CQdr5jl9yANv8RErQaQ2l6nIFO9OSCVq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "@tailwindcss/node": "4.1.6", + "@tailwindcss/oxide": "4.1.6", + "postcss": "^8.4.41", + "tailwindcss": "4.1.6" + } + }, + "website/node_modules/daisyui": { + "version": "5.0.35", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.0.35.tgz", + "integrity": "sha512-AWi11n/x5++mps55jcwrBf0Lmip1euWY0FYcH/05SFGmoqrU7S7/aIUWaiaeqlJ5EcmEZ/7zEY73aOxMv6hcIg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/saadeghi/daisyui?sponsor=1" + } + }, + "website/node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "website/node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, "website/node_modules/prettier": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", @@ -31193,6 +31293,13 @@ "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } + }, + "website/node_modules/tailwindcss": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.6.tgz", + "integrity": "sha512-j0cGLTreM6u4OWzBeLBpycK0WIh8w7kSwcUsQZoGLHZ7xDTdM69lN64AgoIEEwFi0tnhs4wSykUa5YWxAzgFYg==", + "dev": true, + "license": "MIT" } } } diff --git a/website/docs/getting_started/event-model.mdx b/website/docs/getting_started/event-model.mdx index 70acba5e..921bf61a 100644 --- a/website/docs/getting_started/event-model.mdx +++ b/website/docs/getting_started/event-model.mdx @@ -70,8 +70,8 @@ static, their content can be defined dynamically with different value types. // All nested entities within the main entity { type: 'github', data: { repo: 'walkerOS' } }, ], - consent: { functional: true }, // Status of the granted consent state(s) - id: '1647261462000-01b5e2-5', // Timestamp, group & count of the event + consent: { functional: true, marketing: true }, // Status of the granted consent state(s) + id: '1647261462000-01b5e2-2', // Timestamp, group & count of the event trigger: 'visible', // Name of the trigger that fired entity: 'promotion', // The entity name involved in the event action: 'view', // The specific action performed on the entity @@ -120,20 +120,21 @@ is a `page view`, `session start`, `product visible`, or `order complete`. Data properties describe the entity in **more detail**. Depending on the entity (e.g. _product_, -_order_, _content_) they can vary and provide specific insights relevant to the interaction. +_order_, _content_) they can vary and provide specific insights relevant to the +interaction. ### Context -Context refers to the **state** -or **environment** in which the event was triggered. It could be as simple as a page -position or as complex as the logical stage in a user journey, like a shopping journey -from inspiration to checkout stage. +Context refers to the +**state** or **environment** in which the event was triggered. It could be as +simple as a page position or as complex as the logical stage in a user journey, +like a shopping journey from inspiration to checkout stage. ### Globals -Globals describe the **overall -state** influencing events or user behavior. These might include the theme used, -page type for web, or cart value. +Globals describe the +**overall state** influencing events or user behavior. These might include the +theme used, page type for web, or cart value. ### Custom @@ -177,9 +178,9 @@ interface User extends Properties { ### Consent -Consent captures the **permissions -granted** by the user, which is crucial for subsequent data processing and helpful -to comply with privacy regulations. +Consent captures the +**permissions granted** by the user, which is crucial for subsequent data +processing and helpful to comply with privacy regulations. ### Source diff --git a/website/docs/sources/walkerjs/installation/package.mdx b/website/docs/sources/walkerjs/installation/package.mdx index 7016e40f..37baf2ae 100644 --- a/website/docs/sources/walkerjs/installation/package.mdx +++ b/website/docs/sources/walkerjs/installation/package.mdx @@ -18,22 +18,43 @@ npm i @elbwalker/walker.js Then run the following code once to create an instance: ```js -import { Walkerjs } from '@elbwalker/walker.js'; +import { createSourceWalkerjs } from '@elbwalker/walker.js'; -window.walkerjs = Walkerjs({ +const { elb, instance } = createSourceWalkerjs({ /* custom config */ }); ``` -To configure and communicate with the walker.js instance load the `elb`-helper -function: +## elb + +To configure and communicate with the walker.js instance asynchronously either +load the `elb`-helper function: ```js import { elb } from '@elbwalker/walker.js'; +``` + +Or define the `elb`-helper function yourself: + +```ts +// Typescript +import type { Elb } from '@elbwalker/walker.js'; +const elb: Elb.Fn = (...args: unknown[]) => { + (window.elbLayer = window.elbLayer || []).push(args); +}; -window.elb = elb; -elb('entity action', data, trigger, context, nested); // push events -elb('walker ', data); // configure walker, see Commands +// JavaScript +function elb() { + (window.elbLayer = window.elbLayer || []).push(arguments); +} +``` + +or use the `elb` returned from `createSourceWalkerjs` which returns the `async` +result of the call: + +```js +const { elb } = createSourceWalkerjs(); +await elb('entity action'); ``` ## Single Page Applications diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 5643550e..2b3e3ce3 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -87,9 +87,8 @@ const config: Config = { position: 'left', label: 'Documentation', }, - { to: '/playground', label: 'Playground', position: 'left' }, + { to: '/playground/', label: 'Playground', position: 'left' }, { to: '/services', label: 'Services', position: 'left' }, - { to: '/blog', label: 'Blog', position: 'left' }, { href: vars.github, label: 'GitHub', @@ -109,7 +108,7 @@ const config: Config = { }, { label: 'Playground', - to: '/playground', + to: '/playground/', }, { label: 'walker.js', diff --git a/website/package.json b/website/package.json index 3bb0d27f..a1b871d8 100644 --- a/website/package.json +++ b/website/package.json @@ -19,16 +19,17 @@ "@docusaurus/preset-classic": "^3.7.0", "@docusaurus/theme-live-codeblock": "^3.7.0", "@docusaurus/theme-mermaid": "^3.7.0", - "@elbwalker/destination-web-api": "^3.0.3", - "@elbwalker/destination-web-google-ads": "^3.0.3", - "@elbwalker/destination-web-google-ga4": "^3.1.5", - "@elbwalker/destination-web-google-gtm": "^3.0.3", - "@elbwalker/destination-web-meta-pixel": "^3.0.3", - "@elbwalker/destination-web-piwikpro": "^2.0.3", - "@elbwalker/destination-web-plausible": "^4.0.3", + "@elbwalker/destination-node-meta": "^2.2.1", + "@elbwalker/destination-web-api": "^3.0.4", + "@elbwalker/destination-web-google-ads": "^3.0.4", + "@elbwalker/destination-web-google-ga4": "^3.1.6", + "@elbwalker/destination-web-google-gtm": "^3.0.4", + "@elbwalker/destination-web-meta-pixel": "^3.1.0", + "@elbwalker/destination-web-piwikpro": "^2.0.4", + "@elbwalker/destination-web-plausible": "^4.0.4", "@elbwalker/tagger": "^2.1.5", - "@elbwalker/utils": "^3.8.1", - "@elbwalker/walker.js": "^3.4.1", + "@elbwalker/utils": "^3.8.2", + "@elbwalker/walker.js": "^3.4.2", "@iconify/react": "^5.2.1", "@mdx-js/react": "^3.1.0", "css-loader": "^7.1.2", @@ -48,14 +49,14 @@ "@heroicons/react": "^2.2.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/forms": "^0.5.10", - "@tailwindcss/postcss": "^4.1.3", + "@tailwindcss/postcss": "^4.1.6", "@tailwindcss/typography": "^0.5.16", "autoprefixer": "^10.4.21", "clsx": "^2.1.1", - "daisyui": "^5.0.14", + "daisyui": "^5.0.35", "postcss": "^8.5.3", "prettier": "^3.5.3", - "tailwindcss": "^4.1.3", + "tailwindcss": "^4.1.6", "typescript": "~5.8.3" }, "browserslist": { diff --git a/website/src/components/atoms/icons.tsx b/website/src/components/atoms/icons.tsx new file mode 100644 index 00000000..f8cad0d1 --- /dev/null +++ b/website/src/components/atoms/icons.tsx @@ -0,0 +1,26 @@ +import React, { ReactNode } from 'react'; + +interface CheckProps { + children: ReactNode; +} + +export function Check({ children }: CheckProps) { + return ( + + + {children} + + ); +} \ No newline at end of file diff --git a/website/src/components/home/hero.tsx b/website/src/components/home/hero.tsx index 4b0b5b76..cb5afa39 100644 --- a/website/src/components/home/hero.tsx +++ b/website/src/components/home/hero.tsx @@ -1,51 +1,28 @@ import React from 'react'; -import { Button } from '../atoms/buttons'; - -export default function Hero() { - const CheckSVG = ({ children }) => ( - - - {children} - - ); +import Hero from '@site/src/components/organisms/hero'; +export default function HomeHero() { return ( -
-
-

-
walkerOS
-
- Open-source event data collection -
-

-

- Collect event data for digital analytics in a unified and - privacy-centric way. -

-
- - -
-
-
- runs in your own infrastructure - integrates with various analytics & marketing tools - in-built consent mode -
-
+ walkerOS} + subtitle="Open-source event data collection" + text="Collect event data for digital analytics in a unified and privacy-centric way." + primaryButton={{ + link: "/docs/getting_started/quick_start", + children: "Get started", + elbAction: 'start', + }} + secondaryButton={{ + link: "/playground/", + children: "Playground", + elbAction: 'playground', + }} + elbTitle="home" + badges={[ + "runs in your own infrastructure", + "integrates with various analytics & marketing tools", + "in-built consent mode" + ]} + /> ); } diff --git a/website/src/components/molecules/codeBox.tsx b/website/src/components/molecules/codeBox.tsx index c09984a5..d7aac9bf 100644 --- a/website/src/components/molecules/codeBox.tsx +++ b/website/src/components/molecules/codeBox.tsx @@ -1,4 +1,4 @@ -import { WalkerOS } from '@elbwalker/types'; +import type { WalkerOS } from '@elbwalker/types'; import { isString, isDefined, tryCatch, tryCatchAsync } from '@elbwalker/utils'; import Editor from 'react-simple-code-editor'; import { useState, useEffect, useRef } from 'react'; @@ -10,8 +10,8 @@ import { TypewriterOptions, pauseTypewriter, resetTypewriter, -} from './typewriterCode'; -import SyntaxHighlighter from './syntaxHighlighter'; +} from '@site/src/components/molecules/typewriterCode'; +import SyntaxHighlighter from '@site/src/components/molecules/syntaxHighlighter'; interface FormatValueProps { intent?: number; @@ -132,29 +132,41 @@ const CodeBox: React.FC = ({ const handleFormat = tryCatchAsync( async (value: string, onChangeHandler: (code: string) => void) => { + const trimmedValue = value.trim(); + // Check if the content is a complete statement const isCompleteStatement = /^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=/.test( - value.trim(), + trimmedValue, ); // If it's not a complete statement, wrap it in a return statement - const contentToFormat = isCompleteStatement ? value : `return ${value}`; + const contentToFormat = isCompleteStatement + ? trimmedValue + : `return ${trimmedValue}`; const formattedValue = await prettier.format(contentToFormat, { - parser: language === 'html' ? 'html' : 'babel', + printWidth: 80, + tabWidth: 2, + useTabs: false, plugins: [parserBabel, estree], + parser: 'babel', semi: false, singleQuote: true, trailingComma: 'es5', - printWidth: 80, - tabWidth: 2, - useTabs: false, }); - const finalValue = isCompleteStatement + let finalValue = isCompleteStatement ? formattedValue : formattedValue.replace(/^return\s+/, '').replace(/[\r\n]+$/, ''); + // Clean up the formatted value + finalValue = finalValue.trim().replace(/^\(|\)$/g, ''); // Remove parentheses + + // Only remove indentation if it looks like HTML + if (finalValue.match(/<[^>]+>/)) { + finalValue = finalValue.replace(/^\s{2}/gm, '').replace(/^\s/, ''); + } + onChangeHandler?.(finalValue); }, ); diff --git a/website/src/components/molecules/codeBoxOverlay.tsx b/website/src/components/molecules/codeBoxOverlay.tsx deleted file mode 100644 index 59d98567..00000000 --- a/website/src/components/molecules/codeBoxOverlay.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import React, { useEffect } from 'react'; - -interface FullScreenOverlayProps { - isOpen: boolean; - onClose: () => void; - children: React.ReactNode; -} - -const FullScreenOverlay: React.FC = ({ - isOpen, - onClose, - children, -}) => { - useEffect(() => { - const handleEscKey = (event: KeyboardEvent) => { - if (event.key === 'Escape') { - onClose(); - } - }; - - if (isOpen) { - document.addEventListener('keydown', handleEscKey); - document.body.style.overflow = 'hidden'; - } - - return () => { - document.removeEventListener('keydown', handleEscKey); - document.body.style.overflow = 'unset'; - }; - }, [isOpen, onClose]); - - if (!isOpen) return null; - - const handleOverlayClick = (e: React.MouseEvent) => { - if (e.currentTarget === e.target) { - onClose(); - } - }; - - return ( -
-
-
- - {children} -
-
-
- ); -}; - -export default FullScreenOverlay; diff --git a/website/src/components/molecules/preview.tsx b/website/src/components/molecules/preview.tsx new file mode 100644 index 00000000..46ad686d --- /dev/null +++ b/website/src/components/molecules/preview.tsx @@ -0,0 +1,132 @@ +import { FC, useRef, useState, useCallback, useEffect } from 'react'; +import { debounce, tryCatch } from '@elbwalker/utils'; +import '@site/src/css/highlighting.scss'; + +interface PreviewProps { + code: string; + previewId?: string; + boxClassNames?: string; +} + +export const Preview: FC = ({ + code, + previewId = 'preview', + boxClassNames = 'flex-1 resize flex flex-col max-h-96 lg:max-h-full', +}) => { + const previewRef = useRef(null); + const [highlights, setHighlights] = useState({ + globals: false, + context: false, + entity: false, + property: false, + action: false, + }); + + const toggleHighlight = (type: keyof typeof highlights) => { + setHighlights((prev) => ({ + ...prev, + [type]: !prev[type], + })); + }; + + const initPreview = useCallback( + debounce( + (elem: HTMLElement) => window.elb('walker init', elem), + 1000, + true, + ), + [], + ); + + const updatePreviewContent = useCallback( + debounce( + (code: string) => { + if (!previewRef.current) return; + + previewRef.current.innerHTML = code.trim().replace(/;$/, ''); + + // Then find all entities and mark their properties + const entities = Array.from( + previewRef.current.querySelectorAll('[data-elb]'), + ) + .map((el) => el.getAttribute('data-elb')) + .filter((entity): entity is string => !!entity); + + entities.forEach((entity) => { + tryCatch(() => { + previewRef.current + ?.querySelectorAll(`[data-elb-${entity}]`) + .forEach((el) => { + el.setAttribute('data-elbproperty', ''); + }); + })(); + }); + + // Initialize walker + initPreview(previewRef.current); + }, + 200, + true, + ), + [], + ); + + // Subsequent updates + useEffect(() => { + updatePreviewContent(code); + }, [code]); + + const highlightGlobals = highlights.globals ? 'highlight-globals' : ''; + const highlightContext = highlights.context ? 'highlight-context' : ''; + const highlightEntity = highlights.entity ? 'highlight-entity' : ''; + const highlightProperty = highlights.property ? 'highlight-property' : ''; + const highlightAction = highlights.action ? 'highlight-action' : ''; + + return ( +
+
+ Preview +
+
+
+
+
+
+
+ + + + +
+
+ ); +}; + +export default Preview; diff --git a/website/src/components/molecules/syntaxHighlighter.tsx b/website/src/components/molecules/syntaxHighlighter.tsx index 0e34badb..829fa270 100644 --- a/website/src/components/molecules/syntaxHighlighter.tsx +++ b/website/src/components/molecules/syntaxHighlighter.tsx @@ -19,25 +19,31 @@ const SyntaxHighlighter: React.FC = ({ // Track the data-elb attribute state for each line let isProcessingElbAttribute = false; let isProcessingElbDash = false; - + return (
{line.map((token, key) => { const tokenProps = getTokenProps({ token, key }); - + // Check for the start of data-elb or data-elbaction // Handle cases where 'data' might be part of a larger token const hasDataToken = token.content.includes('data'); if (hasDataToken) { const nextToken = line[key + 1]?.content; const nextNextToken = line[key + 2]?.content; - + // If this is a combined token (e.g. 'div data') - if (token.content !== 'data' && token.content !== ' data') { + if ( + token.content !== 'data' && + token.content !== ' data' + ) { // Check if the next parts form the attribute - if (nextToken === '-' && nextNextToken?.startsWith('elb')) { + if ( + nextToken === '-' && + nextNextToken?.startsWith('elb') + ) { isProcessingElbAttribute = true; - + // Split and render the combined token const parts = token.content.split('data'); return ( @@ -51,16 +57,19 @@ const SyntaxHighlighter: React.FC = ({ ); } - } else if (nextToken === '-' && nextNextToken?.startsWith('elb')) { + } else if ( + nextToken === '-' && + nextNextToken?.startsWith('elb') + ) { isProcessingElbAttribute = true; } } // Handle the rest of the attribute parts - if (isProcessingElbAttribute && ( - token.content === '-' || - token.content.startsWith('elb') - )) { + if ( + isProcessingElbAttribute && + (token.content === '-' || token.content.startsWith('elb')) + ) { // Set flag when we see elb- to highlight what follows if (token.content === 'elb-') { isProcessingElbDash = true; @@ -73,12 +82,15 @@ const SyntaxHighlighter: React.FC = ({ isProcessingElbDash = true; } } - - if (token.content === '=' || token.content.includes('=')) { + + if ( + token.content === '=' || + token.content.includes('=') + ) { isProcessingElbAttribute = false; isProcessingElbDash = false; } - + return ( = ({ } // Handle the promotion part after elb- - if (isProcessingElbDash && token.content !== '=' && !token.content.includes('=')) { + if ( + isProcessingElbDash && + token.content !== '=' && + !token.content.includes('=') + ) { return ( WalkerOS.Event; + resultFn?: (output: unknown) => string; +} + +export const EventFlow: FC = ({ + code, + mapping, + height = '400px', + previewId = 'preview', + eventFn, + resultFn, +}) => { + const [htmlCode, setHtmlCode] = useState(code.trim()); + const [eventCode, setEventCode] = useState(undefined); + const [mappingCode, setMappingCode] = useState( + isString(mapping) ? mapping : formatValue(mapping), + ); + const [resultCode, setResultCode] = useState(''); + + const updateEventCode = useCallback( + debounce( + (code: string) => { + setEventCode(code); + }, + 1, + true, + ), + [], + ); + + const createResult = useRef( + debounce(async (eventStr: string, mappingStr: string) => { + tryCatchAsync( + async () => { + if (!eventStr) return; + + const event = (await parseInput(eventStr)) as WalkerOS.Event; + const mapping = (await parseInput(mappingStr)) as Mapping.Config; + await destinationPush( + window.walkerjs, + { + push: (event, config, mapping, options) => { + const value = options.data || event; + + setResultCode(formatValue(resultFn ? resultFn(value) : value)); + }, + config: { + mapping, + }, + }, + { ...event }, + ); + }, + (err) => { + setResultCode(formatValue({ error: String(err) })); + }, + )(); + }, 600), + ).current; + + useEffect(() => { + createResult(eventCode, mappingCode); + }, [eventCode, mappingCode]); + + useEffect(() => { + taggingRegistry.add(previewId, (event) => { + delete event.context.previewId; + updateEventCode(JSON.stringify(eventFn ? eventFn(event) : event)); + }); + + return () => { + taggingRegistry.delete(previewId); + }; + }, [previewId]); + + const boxClassNames = `flex-1 resize flex flex-col max-h-96 lg:max-h-full`; + + return ( + +
+
+ { + setHtmlCode(code.trim()); + }} + className={boxClassNames} + /> +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ ); +}; + +export default EventFlow; diff --git a/website/src/components/organisms/fullScreenMode.tsx b/website/src/components/organisms/fullScreenMode.tsx new file mode 100644 index 00000000..88926da7 --- /dev/null +++ b/website/src/components/organisms/fullScreenMode.tsx @@ -0,0 +1,78 @@ +import React, { useState, useEffect } from 'react'; +import FullScreenButton from '@site/src/components/molecules/fullScreenButton'; + +interface FullScreenModeProps { + children: React.ReactNode; + className?: string; +} + +const FullScreenMode: React.FC = ({ + children, + className = '' +}) => { + const [isFullScreen, setIsFullScreen] = useState(false); + + useEffect(() => { + const handleEscKey = (event: KeyboardEvent) => { + if (event.key === 'Escape' && isFullScreen) { + setIsFullScreen(false); + } + }; + + if (isFullScreen) { + document.addEventListener('keydown', handleEscKey); + document.body.style.overflow = 'hidden'; + } + + return () => { + document.removeEventListener('keydown', handleEscKey); + document.body.style.overflow = 'unset'; + }; + }, [isFullScreen]); + + const handleOverlayClick = (e: React.MouseEvent) => { + if (e.currentTarget === e.target) { + setIsFullScreen(false); + } + }; + + return ( + <> + {/* Inline view with fullscreen button */} +
+
+
+ setIsFullScreen(true)} /> +
+ {children} +
+
+ + {/* Fullscreen overlay */} + {isFullScreen && ( +
+
+
+ +
+
+ {children} +
+
+
+ )} + + ); +}; + +export default FullScreenMode; \ No newline at end of file diff --git a/website/src/components/organisms/hero.tsx b/website/src/components/organisms/hero.tsx new file mode 100644 index 00000000..4e89f8ab --- /dev/null +++ b/website/src/components/organisms/hero.tsx @@ -0,0 +1,70 @@ +import React, { ReactNode } from 'react'; +import { Button, ButtonProps } from '@site/src/components/atoms/buttons'; +import { Check } from '@site/src/components/atoms/icons'; +import { tagger } from '@site/src/components/walkerjs'; + +interface HeroProps { + title: ReactNode; + subtitle?: ReactNode; + text?: ReactNode; + primaryButton?: ButtonProps; + secondaryButton?: ButtonProps; + elbTitle?: string; + badges?: string[]; +} + +export default function Hero({ + title, + subtitle, + text, + primaryButton, + secondaryButton, + elbTitle, + badges, +}: HeroProps) { + // Set default variant for secondaryButton if not provided + const secondaryButtonWithDefault = secondaryButton + ? { ...secondaryButton, variant: secondaryButton.variant || 'secondary' } + : undefined; + + return ( +
+
+

+ {title} + {subtitle && ( +
+ {subtitle} +
+ )} +

+ {text && ( +

+ {text} +

+ )} +
+ {primaryButton &&
+
+ {badges && badges.length && ( +
+ {badges.map((badge, index) => ( + {badge} + ))} +
+ )} +
+ ); +} diff --git a/website/src/components/organisms/liveCode.tsx b/website/src/components/organisms/liveCode.tsx index b62e4a34..7c1167c9 100644 --- a/website/src/components/organisms/liveCode.tsx +++ b/website/src/components/organisms/liveCode.tsx @@ -1,9 +1,8 @@ import type { WalkerOS } from '@elbwalker/types'; import { useEffect, useState, useRef, memo } from 'react'; import { debounce, isString, tryCatchAsync } from '@elbwalker/utils'; -import CodeBox, { formatValue } from '../molecules/codeBox'; -import FullScreenOverlay from '../molecules/codeBoxOverlay'; -import FullScreenButton from '../molecules/fullScreenButton'; +import CodeBox, { formatValue } from '@site/src/components/molecules/codeBox'; +import FullScreenMode from '@site/src/components/organisms/fullScreenMode'; export interface LiveCodeProps { input: unknown; @@ -129,20 +128,9 @@ export const LiveCode: React.FC = memo( ); return ( -
-
-
- setIsFullScreen(true)} /> -
- {renderCodeBoxes()} -
- setIsFullScreen(false)} - > - {renderCodeBoxes(true)} - -
+ + {renderCodeBoxes()} + ); }, ); diff --git a/website/src/components/organisms/tagging.tsx b/website/src/components/organisms/tagging.tsx index dbf2cc5d..f5887403 100644 --- a/website/src/components/organisms/tagging.tsx +++ b/website/src/components/organisms/tagging.tsx @@ -1,13 +1,12 @@ import type { WalkerOS } from '@elbwalker/types'; +import type { TypewriterOptions } from '@site/src/components/molecules/typewriterCode'; import { debounce, tryCatch } from '@elbwalker/utils'; -import React, { useEffect, useRef, useState, useCallback } from 'react'; +import { useEffect, useRef, useState, useCallback, FC } from 'react'; import { elb } from '@elbwalker/walker.js'; -import CodeBox from '../molecules/codeBox'; -import FullScreenOverlay from '../molecules/codeBoxOverlay'; -import FullScreenButton from '../molecules/fullScreenButton'; -import type { TypewriterOptions } from '../molecules/typewriterCode'; -import { resetTypewriter } from '../molecules/typewriterCode'; -import '../../css/highlighting.scss'; +import CodeBox from '@site/src/components/molecules/codeBox'; +import FullScreenMode from '@site/src/components/organisms/fullScreenMode'; +import { resetTypewriter } from '@site/src/components/molecules/typewriterCode'; +import '@site/src/css/highlighting.scss'; export const taggingRegistry = (() => { const registry = new Map void>(); @@ -31,23 +30,23 @@ interface PreviewProps { hidePreview?: boolean; hideConsole?: boolean; previewId?: string; + fn?: (event: WalkerOS.Event) => void; typewriter?: TypewriterOptions; } -const Tagging: React.FC = ({ +const Tagging: FC = ({ code, height = '400px', hideCode = false, hidePreview = false, hideConsole = false, previewId = 'preview', + fn, typewriter, }) => { const [logs, setLogs] = useState(); const previewRef = useRef(null); - const initialCode = useRef(code.trim()); - const [liveCode, setLiveCode] = useState(initialCode.current); - const [isFullScreen, setIsFullScreen] = useState(false); + const [liveCode, setLiveCode] = useState(code.trim()); const [isPaused, setIsPaused] = useState(false); const [highlights, setHighlights] = useState({ globals: false, @@ -57,6 +56,12 @@ const Tagging: React.FC = ({ action: false, }); + useEffect(() => { + setLiveCode(code.trim()); + }, [code]); + + const initialCode = useRef(code.trim()); + const initPreview = useCallback( debounce( (elem: HTMLElement) => { @@ -109,7 +114,7 @@ const Tagging: React.FC = ({ useEffect(() => { taggingRegistry.add(previewId, (event) => { delete event.context.previewId; - setLogs(JSON.stringify(event, null, 2)); + setLogs(JSON.stringify(fn ? fn(event) : event, null, 2)); }); return () => { @@ -124,111 +129,96 @@ const Tagging: React.FC = ({ })); }; - const boxClassNames = `flex-1 resize flex flex-col ${isFullScreen ? 'max-h-[calc(100vh-12rem)]' : 'max-h-96 xl:max-h-full'}`; + const boxClassNames = `flex-1 resize flex flex-col max-h-96 lg:max-h-full`; const highlightGlobals = highlights.globals ? 'highlight-globals' : ''; const highlightContext = highlights.context ? 'highlight-context' : ''; const highlightEntity = highlights.entity ? 'highlight-entity' : ''; const highlightProperty = highlights.property ? 'highlight-property' : ''; const highlightAction = highlights.action ? 'highlight-action' : ''; - const renderBoxes = (isFullScreenMode = false) => ( -
- {!hideCode && ( - { - setLiveCode(initialCode.current); - resetTypewriter(); - setIsPaused(false); - }} - className={boxClassNames} - typewriter={typewriter} - /> - )} - - {!hidePreview && ( -
-
- Preview -
+ return ( + +
+ {!hideCode && ( + { + setLiveCode(initialCode.current); + resetTypewriter(); + setIsPaused(false); + }} + className={boxClassNames} + typewriter={typewriter} + /> + )} + + {!hidePreview && (
+
+ Preview +
-
+
+
+
+
+
+ + + +
-
- - - - + )} + + {!hideConsole && ( +
+ setLogs('')} + />
-
- )} - - {!hideConsole && ( -
- setLogs('')} - /> -
- )} -
- ); - - return ( -
-
-
- setIsFullScreen(true)} /> -
- {renderBoxes()} + )}
- setIsFullScreen(false)} - > - {renderBoxes(true)} - -
+ ); }; diff --git a/website/src/components/services/hero.tsx b/website/src/components/services/hero.tsx index 2af27335..ba3e4635 100644 --- a/website/src/components/services/hero.tsx +++ b/website/src/components/services/hero.tsx @@ -1,53 +1,34 @@ import React from 'react'; -import { Button } from '../atoms/buttons'; - -export default function Hero() { - const CheckSVG = ({ children }) => ( - - - {children} - - ); +import Hero from '@site/src/components/organisms/hero'; +export default function ServicesHero() { return ( -
-
-

-
walkerOS
-
- Professional services -
-

-

- We help you set up and leverage walkerOS. Go from tracking chaos to - tracking excellence in record speed. -

-
- - -
-
-
- direct support from the creators - initial setup in 5 days - fully integrated into your infrastructure -
-
+ walkerOS
} + subtitle="Professional services" + text={ + <> + We help you set up and leverage walkerOS. +
+ Go from tracking chaos to tracking excellence in record speed. + + } + primaryButton={{ + link: 'https://calendly.com/elb-alexander/30min', + children: 'Schedule free call', + elbAction: 'call', + }} + secondaryButton={{ + link: 'mailto:hello@elbwalker.com', + children: 'Write an email', + elbAction: 'mail', + }} + elbTitle="services" + badges={[ + 'direct support from the creators', + 'initial setup in 5 days', + 'fully integrated into your infrastructure', + ]} + /> ); } diff --git a/website/src/components/templates/promotionLive.tsx b/website/src/components/templates/promotionLive.tsx index f8c56fa4..130f129c 100644 --- a/website/src/components/templates/promotionLive.tsx +++ b/website/src/components/templates/promotionLive.tsx @@ -1,6 +1,9 @@ import React from 'react'; -import Tagging from '../organisms/tagging'; -import { TypeEdit, EditMode } from '../molecules/typewriterCode'; +import Tagging from '@site/src/components/organisms/tagging'; +import { + TypeEdit, + EditMode, +} from '@site/src/components/molecules/typewriterCode'; const baseCode = `
{
{ + delete event.globals; + delete event.custom; + delete event.user; + delete event.nested; + delete event.consent; + delete event.version; + return event; + }} height="640px" code={`
-
+

Quick and simple tracking setup

-

Click a button to trigger more events.

- -
diff --git a/website/src/components/walkerjs.tsx b/website/src/components/walkerjs.tsx index a03f7970..7924912a 100644 --- a/website/src/components/walkerjs.tsx +++ b/website/src/components/walkerjs.tsx @@ -1,24 +1,63 @@ import { useEffect } from 'react'; import { useLocation } from 'react-router-dom'; -import { elb, Walkerjs } from '@elbwalker/walker.js'; +import type { Elb, SourceWalkerjs } from '@elbwalker/walker.js'; +import { createSourceWalkerjs } from '@elbwalker/walker.js'; import { destinationWebAPI } from '@elbwalker/destination-web-api'; +import { taggingRegistry } from '@site/src/components/organisms/tagging'; import Tagger from '@elbwalker/tagger'; -import { taggingRegistry } from './organisms/tagging'; + +declare global { + interface Window { + alst: Elb.Fn; + alstLayer: Elb.Layer; + runnerjs: SourceWalkerjs.Instance; + } +} export const DataCollection = () => { const location = useLocation(); useEffect(() => { + // Setup demo walkerjs if (!window.walkerjs) { - // Setup walkerjs + const { elb, instance } = createSourceWalkerjs({ + run: true, + pageview: false, + session: false, + consent: { functional: true, marketing: true }, + user: { session: 's3ss10n' }, + }); + window.elb = elb; - window.walkerjs = Walkerjs({ + window.walkerjs = instance; + + // Destination Preview + elb('walker destination', { + push: (e) => { + const previewId = e.context?.previewId?.[0]; + if (previewId) taggingRegistry.get(String(previewId))?.(e); + }, + }); + } else { + // new page load + window.elb('walker run'); + } + + // Setup internal walkerjs + if (!window.runnerjs) { + window.alstLayer = []; + const { elb: alst, instance } = createSourceWalkerjs({ default: true, session: {}, + prefix: 'data-alst', + elbLayer: window.alstLayer, }); + window.alst = alst; + window.runnerjs = instance; + // Destination Lama - elb('walker destination', destinationWebAPI, { + alst('walker destination', destinationWebAPI, { custom: { url: 'https://moin.p.elbwalkerapis.com/lama', transform: (event) => { @@ -34,27 +73,21 @@ export const DataCollection = () => { }); // Destination API - elb('walker destination', destinationWebAPI, { + alst('walker destination', destinationWebAPI, { custom: { url: 'https://europe-west1-walkeros-firebase-stack.cloudfunctions.net/ingest', transport: 'beacon', }, }); - - // Destination Preview - elb('walker destination', { - push: (e) => { - const previewId = e.context?.previewId?.[0]; - if (previewId) taggingRegistry.get(String(previewId))?.(e); - }, - }); } else { // new page load - elb('walker run'); + window.alst('walker run'); } }, [location]); return null; }; -export const tagger = Tagger({ prefix: 'data-alst' }); +export const tagger: ReturnType = Tagger({ + prefix: 'data-alst', +}); diff --git a/website/src/css/custom.css b/website/src/css/custom.css index 199dbd06..bc91b1c2 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -73,9 +73,9 @@ html[data-theme='dark'] { --color-primary: var(--color-elbwalker); - --color-primary-content: var(--color-gray-900); - --color-secondary: var(--color-gray-400); - --color-secondary-content: var(--color-gray-900); + --color-primary-content: var(--color-gray-50); + --color-secondary: var(--color-gray-700); + --color-secondary-content: var(--color-gray-50); --color-base-100: var(--color-gray-900); --color-base-200: var(--color-gray-800); --color-base-300: var(--color-gray-700); diff --git a/website/src/css/event-flow.scss b/website/src/css/event-flow.scss new file mode 100644 index 00000000..285d2ad3 --- /dev/null +++ b/website/src/css/event-flow.scss @@ -0,0 +1,13 @@ +.event-flow { + .dui-card-body { + padding: 1rem; + } + + h3 { + margin: 0; + } + + p { + margin-bottom: 0.25rem; + } +} diff --git a/website/src/pages/playground.tsx b/website/src/pages/playground.tsx deleted file mode 100644 index 6259f9a1..00000000 --- a/website/src/pages/playground.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { JSX } from 'react'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import { PromotionReady } from '@site/src/components/templates/promotionLive'; - -export default function Playground(): JSX.Element { - const { siteConfig } = useDocusaurusContext(); - return ( - - - - ); -} diff --git a/website/src/pages/playground/index.tsx b/website/src/pages/playground/index.tsx new file mode 100644 index 00000000..5898b131 --- /dev/null +++ b/website/src/pages/playground/index.tsx @@ -0,0 +1,106 @@ +import { JSX } from 'react'; +import Layout from '@theme/Layout'; +import EventFlow from '@site/src/components/organisms/eventFlow'; +import '@site/src/css/event-flow.scss'; + +const exampleCode = `
+
+ Product +
+
delicious
+
+
+
+

+ Everyday Ruck Snack +

+
+ + +
+

+ € 2.50 € 3.14 +

+
+ + +
+
+
`; + +export default function EventFlowPage(): JSX.Element { + return ( + + !!e.data.old_price + }, + }, + }, + }, + save: { + data: { + map: { + event: 'event', + data: 'data' + } + } + } + }, +}`} + height="640px" + previewId="event-flow" + eventFn={(event) => { + delete event.custom; + return event; + }} + resultFn={(output) => { + return `dataLayer.push(${JSON.stringify(output, null, 2)});`; + }} + /> + + ); +} diff --git a/website/static/img/examples/everyday_ruck_snack.png b/website/static/img/examples/everyday_ruck_snack.png new file mode 100644 index 00000000..6c90f1bc Binary files /dev/null and b/website/static/img/examples/everyday_ruck_snack.png differ