@planningcenter/tapestry 0.4.1-rc.8 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/utilities/Icon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@planningcenter/icons/css/symbol.css';
|
|
2
2
|
import general from '@planningcenter/icons/sprites/general.svg';
|
|
3
|
-
import { Symbol } from '@planningcenter/symbol';
|
|
3
|
+
import { Symbol } from '@planningcenter/icons/symbol';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
6
|
const icons = { general };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../src/utilities/Icon.tsx"],"sourcesContent":["import \"@planningcenter/icons/css/symbol.css\"\n\nimport general from \"@planningcenter/icons/sprites/general.svg\"\nimport { Symbol } from \"@planningcenter/symbol\"\nimport React from \"react\"\n\nconst icons = { general }\n\nfunction Icon({ symbol: s, ...platformProps }: { symbol: string }) {\n const [collection, symbol] = s.replace(\".svg\", \"\").split(\"#\")\n\n if (!isValidCollection(collection)) {\n throw new Error(`Unknown icon collection: ${collection}`)\n }\n\n const fullPath = icons[collection]\n const relativePath = fullPath.replace(/https:\\/\\/[^/]*/, \"\")\n\n return <Symbol symbol={`${relativePath}#${symbol}`} {...platformProps} />\n}\n\nexport default Icon\n\nfunction isValidCollection(\n collection: string\n): collection is keyof typeof icons {\n return collection in icons\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,KAAK,GAAG,EAAE,OAAO,EAAE,CAAA;AAEzB,SAAS,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,aAAa,EAAsB,EAAA;AAC/D,IAAA,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAE7D,IAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE;AAClC,QAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,CAAA,CAAE,CAAC,CAAA;KAC1D;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAA;IAClC,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAA;AAE5D,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,MAAM,EAAC,EAAA,MAAM,EAAE,CAAA,EAAG,YAAY,CAAA,CAAA,EAAI,MAAM,CAAA,CAAE,EAAM,GAAA,aAAa,GAAI,CAAA;AAC3E,CAAC;AAID,SAAS,iBAAiB,CACxB,UAAkB,EAAA;IAElB,OAAO,UAAU,IAAI,KAAK,CAAA;AAC5B;;;;"}
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../src/utilities/Icon.tsx"],"sourcesContent":["import \"@planningcenter/icons/css/symbol.css\"\n\nimport general from \"@planningcenter/icons/sprites/general.svg\"\nimport { Symbol } from \"@planningcenter/icons/symbol\"\nimport React from \"react\"\n\nconst icons = { general }\n\nfunction Icon({ symbol: s, ...platformProps }: { symbol: string }) {\n const [collection, symbol] = s.replace(\".svg\", \"\").split(\"#\")\n\n if (!isValidCollection(collection)) {\n throw new Error(`Unknown icon collection: ${collection}`)\n }\n\n const fullPath = icons[collection]\n const relativePath = fullPath.replace(/https:\\/\\/[^/]*/, \"\")\n\n return <Symbol symbol={`${relativePath}#${symbol}`} {...platformProps} />\n}\n\nexport default Icon\n\nfunction isValidCollection(\n collection: string\n): collection is keyof typeof icons {\n return collection in icons\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,KAAK,GAAG,EAAE,OAAO,EAAE,CAAA;AAEzB,SAAS,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,aAAa,EAAsB,EAAA;AAC/D,IAAA,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAE7D,IAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE;AAClC,QAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,CAAA,CAAE,CAAC,CAAA;KAC1D;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAA;IAClC,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAA;AAE5D,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,MAAM,EAAC,EAAA,MAAM,EAAE,CAAA,EAAG,YAAY,CAAA,CAAA,EAAI,MAAM,CAAA,CAAE,EAAM,GAAA,aAAa,GAAI,CAAA;AAC3E,CAAC;AAID,SAAS,iBAAiB,CACxB,UAAkB,EAAA;IAElB,OAAO,UAAU,IAAI,KAAK,CAAA;AAC5B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/tapestry",
|
|
3
|
-
"version": "0.4.1
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -78,13 +78,12 @@
|
|
|
78
78
|
"shadow-dom-testing-library": "^1.11.3",
|
|
79
79
|
"storybook": "^8.2.9",
|
|
80
80
|
"style-dictionary": "^4.2.0",
|
|
81
|
-
"tapestry-wc": "^0.4.1
|
|
81
|
+
"tapestry-wc": "^0.4.1",
|
|
82
82
|
"typescript": "^5.5.3",
|
|
83
|
-
"vitest": "^
|
|
83
|
+
"vitest": "^3.0.0"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@planningcenter/icons": "^15.
|
|
87
|
-
"@planningcenter/symbol": "^4.0.0-alpha.2",
|
|
86
|
+
"@planningcenter/icons": "^15.19.1",
|
|
88
87
|
"@planningcenter/tapestry-wrap": "^0.2.1",
|
|
89
88
|
"classnames": "^2.5.1",
|
|
90
89
|
"lodash": "^4.17.21"
|
|
@@ -100,5 +99,5 @@
|
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
},
|
|
103
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "cc2f5d0889ade8fa82872f8050225c81b95d867e"
|
|
104
103
|
}
|